5 private ref class Transform
8 Transform(XXSharpKmyMath::Vector3 translate,
9 XXSharpKmyMath::Vector3 rotate,
10 XXSharpKmyMath::Vector3 scale) {
12 this->translate = translate;
13 this->rotate = rotate;
17 Transform(
const kmyMath::Transform &t)
19 translate.x = t.getTranslate().x;
20 translate.y = t.getTranslate().y;
21 translate.z = t.getTranslate().z;
23 rotate.x = t.getRotateEular().x;
24 rotate.y = t.getRotateEular().y;
25 rotate.z = t.getRotateEular().z;
27 scale.x = t.getScale().x;
28 scale.y = t.getScale().y;
29 scale.z = t.getScale().z;
32 kmyMath::Transform toNative()
35 t.setTranslate(kmyMath::Vector3(translate.x, translate.y, translate.z));
36 t.setRotate(kmyMath::Vector3(rotate.x, rotate.y, rotate.z));
37 t.setScale(kmyMath::Vector3(scale.x, scale.y, scale.z));
41 void fromNative(
const kmyMath::Transform &t)
43 translate.x = t.getTranslate().x;
44 translate.y = t.getTranslate().y;
45 translate.z = t.getTranslate().z;
47 rotate.x = t.getRotateEular().x;
48 rotate.y = t.getRotateEular().y;
49 rotate.z = t.getRotateEular().z;
51 scale.x = t.getScale().x;
52 scale.y = t.getScale().y;
53 scale.z = t.getScale().z;
56 void copyFrom(Transform ^t)
58 translate = t->translate;
63 XXSharpKmyMath::Vector3 translate, rotate, scale;