OutputDebugString(L"Test Debug Message\n"); Platform::String^ msg = L"String Message\n"; OutputDebugString(msg->Data()); |
#include "BasicMath.h" struct float3 { float x; float y; float z; }; float3 f3(float x, float y, float z) { float3 wf3; wf3.x = x; wf3.y = y; wf3.z = z; return wf3; } |
Platform::String^ Str = "Text Data"; std::wstring msg; msg = Str->Data(); |
// 中心点を 0,0,0 として、座標 pos を rt で回転する float3 MyCamera::MatRotate(float3 pos, float3 rt) { XMMATRIX mat; XMVECTOR vect; vect = XMVectorSet(pos.x, pos.y, pos.z, 0.0f); mat = XMMatrixRotationRollPitchYaw(-rt.x, -rt.y, -rt.z); vect = XMVector3TransformNormal(vect, mat); return f3(XMVectorGetX(vect), XMVectorGetY(vect), XMVectorGetZ(vect)); } |
float x; int num; std::string Word; std::wstring DWord; x = (float)atof((char *)Word.data()); num = atoi((char *)Word.data()); x = (float)_wtof(DWord.data()); num = _wtoi(DWord.data()); |