Logo
ModelInstance.h
1#pragma once
2
3#include "Types.h"
4
5#include "gfx/mdl/ModelData.h"
6#include "gfx/Material.h"
7
8namespace SharpKmyPhysics
9{
10 ref class PhysicsObject;
11}
12
13namespace SharpKmyGfx
14{
15 public ref class NodeInstance
16 {
17 public:
18 void* native = nullptr;
19 NodeInstance(void* ptr)
20 {
21 native = ptr;
22 }
27 };
28
29 public ref class ModelInstance
30 {
31 public:
32 kmyGfx::ModelInstance *obj2 = nullptr;
33 ModelData^ mdl = nullptr;
34
35 ModelInstance(ModelData^ data, array<Material^> ^list, System::Guid stampGUID);
36 ModelInstance(kmyGfx::ModelInstance* ptr);
38
40 kmyGfx::ModelInstance* getNativeModelInstance() { return obj2; }
41
42 void setVisibility(bool flg);
43 void setDisplayID(unsigned int id);
44 void setPickupID(unsigned short id);
45 void setOverrideColor(float r, float g, float b, float a);
46 void setOpacityMultiplier(float p);
47 void setDrawHidden(bool flg);
48 void buildingLightOn(bool flg);
49
50 void setIgnoreMotion(int channel, System::Collections::Generic::List<System::String^> ^list);
51 void addMotion(System::String ^name, ModelData ^motion, bool loop, bool useCombine);
52 void addMotion(System::String ^name, ModelData ^motion, bool loop, bool useCombine, System::String ^stackName);
53 void addMotion(System::String ^name, ModelData ^motion, float start, float end, bool loop, bool useCombine, System::String ^stackName);
54 void clearMotion();
55 void removeAnimatedTransform(bool clearAnimation);
56 void playMotion(System::String^ name, float blendTime, bool force);
57 void playMotion(System::String^ name, float blendTime) { playMotion(name, blendTime, false); }
58 void setMorphBlend(System::String ^name, float blend);
59 float getMorphBlend(System::String^ name);
60 bool containsMotion(System::String ^name);
62 System::Collections::Generic::List<System::String^>^ getMotionNameList();
63 System::Collections::Generic::List<System::String^>^ getMorphNameList();
64 System::Guid getStampGUID();
65
66 SharpKmyMath::Matrix4 getNodeMatrix(System::String ^name);
67 void setNodeMatrix(System::String ^name, SharpKmyMath::Matrix4 matrix);
69
70 int getMaterialCount();
71 MaterialInstance^ getMaterialInstance(unsigned int idx);
72 void setMaterial(int index, Material^ mtl);
73
75 void stopPickup(bool flg);
76
79 float minX = 0, minY = 0, minZ = 0;
80 float maxX = 0, maxY = 0, maxZ = 0;
81
82 static System::Collections::Generic::List<ModelInstance^>^ getModelInstanceListByStampGUID(System::Guid guid);
83
84 private:
85 };
86
87}
Definition: Material.h:26
Definition: MaterialInstance.h:6
Definition: ModelData.h:65
Definition: ModelInstance.h:30
~ModelInstance()
Definition: ModelInstance.cpp:78
void clearNodePosturePhysicsOverrideFlag()
Definition: ModelInstance.cpp:356
void buildingLightOn(bool flg)
Definition: ModelInstance.cpp:341
void clearMotion()
Definition: ModelInstance.cpp:154
float minX
Definition: ModelInstance.h:79
void playMotion(System::String^ name, float blendTime)
Definition: ModelInstance.h:57
void removeAnimatedTransform(bool clearAnimation)
Definition: ModelInstance.cpp:159
SharpKmyMath::Matrix4 getNodeMatrix(System::String ^name)
Definition: ModelInstance.cpp:272
static System::Collections::Generic::List< ModelInstance^> getModelInstanceListByStampGUID(System::Guid guid)
Definition: ModelInstance.cpp:362
MaterialInstance getMaterialInstance(unsigned int idx)
Definition: ModelInstance.cpp:303
void addMotion(System::String ^name, ModelData ^motion, bool loop, bool useCombine)
Definition: ModelInstance.cpp:120
kmyGfx::ModelInstance * obj2
Definition: ModelInstance.h:32
ModelInstance(ModelData^ data, array< Material^> ^list, System::Guid stampGUID)
Definition: ModelInstance.cpp:41
kmyGfx::ModelInstance * getNativeModelInstance()
Definition: ModelInstance.h:40
int getMotionLoopCount()
Definition: ModelInstance.cpp:258
void setDrawHidden(bool flg)
Definition: ModelInstance.cpp:243
float maxY
Definition: ModelInstance.h:80
void setOpacityMultiplier(float p)
Definition: ModelInstance.cpp:253
void setNodeMatrix(System::String ^name, SharpKmyMath::Matrix4 matrix)
Definition: ModelInstance.cpp:286
void setMaterial(int index, Material^ mtl)
Definition: ModelInstance.cpp:311
System::Collections::Generic::List< System::String^> getMorphNameList()
Definition: ModelInstance.cpp:217
void setVisibility(bool flg)
Definition: ModelInstance.cpp:83
void getBound(SharpKmyMath::Vector3% min, SharpKmyMath::Vector3% max)
Definition: ModelInstance.cpp:323
void stopPickup(bool flg)
Definition: ModelInstance.cpp:318
void setPickupID(unsigned short id)
Definition: ModelInstance.cpp:98
ModelData getModel()
Definition: ModelInstance.cpp:88
bool containsMotion(System::String ^name)
Definition: ModelInstance.cpp:192
void setIgnoreMotion(int channel, System::Collections::Generic::List< System::String^> ^list)
Definition: ModelInstance.cpp:103
float minZ
Definition: ModelInstance.h:79
float minY
Definition: ModelInstance.h:79
void setMorphBlend(System::String ^name, float blend)
Definition: ModelInstance.cpp:172
SharpKmyPhysics::PhysicsObject getPhysicsObject()
Definition: ModelInstance.cpp:346
void setOverrideColor(float r, float g, float b, float a)
Definition: ModelInstance.cpp:248
int getMaterialCount()
Definition: ModelInstance.cpp:297
System::Guid getStampGUID()
Definition: ModelInstance.cpp:233
void playMotion(System::String^ name, float blendTime, bool force)
float maxX
Definition: ModelInstance.h:80
float getMorphBlend(System::String^ name)
Definition: ModelInstance.cpp:181
float maxZ
Definition: ModelInstance.h:80
void setDisplayID(unsigned int id)
Definition: ModelInstance.cpp:93
ModelData mdl
Definition: ModelInstance.h:33
NodeInstance getRootNode()
Definition: ModelInstance.cpp:264
System::Collections::Generic::List< System::String^> getMotionNameList()
Definition: ModelInstance.cpp:201
Definition: ModelInstance.h:16
SharpKmyMath::Matrix4 getMatrix()
Definition: ModelInstance.cpp:26
NodeInstance getFirstChild()
Definition: ModelInstance.cpp:12
NodeInstance getNextSibling()
Definition: ModelInstance.cpp:19
NodeInstance getParent()
Definition: ModelInstance.cpp:5
NodeInstance(void *ptr)
Definition: ModelInstance.h:19
void * native
Definition: ModelInstance.h:18
Definition: Matrix4.h:10
Definition: PhysicsObject.h:17
Definition: Billboard.cpp:4
Definition: Billboard.h:6
Definition: Vector3.h:8