#include "stdafx.h" #include "NiObjects/NiSMemory.h" #include "Rotation.h" #include "MessageBoxDLG.h" #include "WinTools.h" #include "anm_data.h" /* 使用するパラメータ appParam.animationUUID CSetAnimation */ CNiSMemory::CNiSMemory(void) { indexHandle = NULL; ptrAnimIndex = NULL; for (int i=0; i* posVect, Quaternion* rotQuat, NiSDK_Lib lib, int joints_num) { double* shm = NULL; // Position if (appParam.outDataCoord) { for (int j=0; j=0) { shm = ptrMapData[n]; if (shm!=NULL) { if (posVect[j].c>=0.0) { shm[1] = posVect[j].x; shm[2] = posVect[j].y; shm[3] = posVect[j].z; } } } } } // Quaternion if (appParam.outDataQuate) { // Positon of Root Joint if (!appParam.outDataCoord) { int n = NiSDK2SLPosJointNum(0, lib); if (n>=0) { shm = ptrMapData[n]; if (shm!=NULL) { if (posVect[0].c>=0.0) { shm[1] = posVect[0].x; shm[2] = posVect[0].y; shm[3] = posVect[0].z; } } } } for (int j=0; j=0) { shm = ptrMapData[n]; if (shm!=NULL) { if (rotQuat[j].c>=0.0) { shm[4] = rotQuat[j].x; shm[5] = rotQuat[j].y; shm[6] = rotQuat[j].z; shm[7] = rotQuat[j].s; } } } } } } void CNiSMemory::clearLocalAnimationData(void) { for (int i=0; i=0 && n=0 && n