Advertisement
Guest User

Untitled

a guest
May 30th, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.40 KB | None | 0 0
  1. // FBXWrapper.h
  2.  
  3. #pragma once
  4.  
  5. #include "stdafx.h"
  6. #include <fbxsdk.h>
  7. #include "FBXWrapper.h"
  8. #include "FBXUtils.h"
  9.  
  10. using namespace System;
  11. using namespace System::Collections::Generic;
  12.  
  13. namespace FBXWrapper {
  14.  
  15.     public ref class FBXHelper
  16.     {
  17.       public:
  18.          FBXUtils FbxUtils;
  19.     };
  20.  
  21.     public ref class FBXVector4
  22.     {
  23.         public:
  24.             property double X
  25.             {
  26.                 double get()
  27.                 {
  28.                     return vector->mData[0];
  29.                 };
  30.                 void set(double f)
  31.                 {
  32.                     vector->mData[0] = f;
  33.                 }
  34.             };
  35.             property double Y
  36.             {
  37.                 double get()
  38.                 {
  39.                     return vector->mData[1];
  40.                 };
  41.                 void set(double f)
  42.                 {
  43.                     vector->mData[1] = f;
  44.                 }
  45.             };
  46.             property double Z
  47.             {
  48.                 double get()
  49.                 {
  50.                     return vector->mData[3];
  51.                 };
  52.                 void set(double f)
  53.                 {
  54.                     vector->mData[3] = f;
  55.                 }
  56.             };        
  57.             property double W
  58.             {
  59.                 double get()
  60.                 {
  61.                     return vector->mData[3];
  62.                 };
  63.                 void set(double f)
  64.                 {
  65.                     vector->mData[3] = f;
  66.                 }
  67.             };
  68.             FBXVector4();
  69.             FBXVector4(double x, double y, double z, double w);
  70.             FBXVector4(FbxVector4 v);
  71.             FbxVector4* vector;
  72.     };
  73.  
  74.     public ref class FBXAMatrix
  75.     {
  76.         public:
  77.             FBXVector4^ getR();
  78.             void SetRow(int Y, FBXVector4^ row);
  79.             FBXAMatrix();
  80.             FbxAMatrix* mat;
  81.     };
  82.  
  83.     public ref class FBXNode
  84.     {
  85.         public:
  86.             FbxNode* node;
  87.             property List<double>^ LclTranslation
  88.             {
  89.                 List<double>^ get()
  90.                 {
  91.                     List<double>^ result = gcnew List<double>();
  92.                     FbxDouble3 tmp = node->LclTranslation.Get();
  93.                     result->Add(tmp.mData[0]);
  94.                     result->Add(tmp.mData[1]);
  95.                     result->Add(tmp.mData[2]);
  96.                     return result;
  97.                 }
  98.                 void set(List<double>^ l)
  99.                 {
  100.                     FbxDouble3 tmp;
  101.                     tmp.mData[0] = l[0];
  102.                     tmp.mData[1] = l[1];
  103.                     tmp.mData[2] = l[2];
  104.                     node->LclTranslation.Set(tmp);
  105.                 }
  106.             }
  107.             property List<double>^ LclRotation
  108.             {
  109.                 List<double>^ get()
  110.                 {
  111.                     List<double>^ result = gcnew List<double>();
  112.                     FbxDouble3 tmp = node->LclRotation.Get();
  113.                     result->Add(tmp.mData[0]);
  114.                     result->Add(tmp.mData[1]);
  115.                     result->Add(tmp.mData[2]);
  116.                     return result;
  117.                 }
  118.                 void set(List<double>^ l)
  119.                 {
  120.                     FbxDouble3 tmp;
  121.                     tmp.mData[0] = l[0];
  122.                     tmp.mData[1] = l[1];
  123.                     tmp.mData[2] = l[2];
  124.                     node->LclRotation.Set(tmp);
  125.                 }
  126.             }
  127.  
  128.             FBXNode(FbxNode* n);
  129.                        
  130.             FBXNode^ FindChild(String^ name);
  131.     };
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement