mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-27 23:35:45 +00:00
Updates to various components, added a few new ones.
This commit is contained in:
parent
775ca57047
commit
34d05ff16f
52 changed files with 4566 additions and 1799 deletions
|
|
@ -101,18 +101,6 @@ protected:
|
|||
Vector<matMap> mChangingMaterials;
|
||||
Vector<matMap> mMaterials;
|
||||
|
||||
public:
|
||||
enum RenderMode
|
||||
{
|
||||
Individual = 0,
|
||||
DynamicBatch,
|
||||
StaticBatch,
|
||||
Instanced
|
||||
};
|
||||
|
||||
protected:
|
||||
RenderMode mRenderMode;
|
||||
|
||||
public:
|
||||
StringTableEntry mMeshAssetId;
|
||||
AssetPtr<ShapeAsset> mMeshAsset;
|
||||
|
|
@ -144,6 +132,8 @@ public:
|
|||
void updateShape();
|
||||
void updateMaterials();
|
||||
|
||||
void _shapeAssetUpdated(ShapeAsset* asset);
|
||||
|
||||
virtual void onComponentRemove();
|
||||
virtual void onComponentAdd();
|
||||
|
||||
|
|
@ -153,6 +143,8 @@ public:
|
|||
static bool _setShape(void *object, const char *index, const char *data);
|
||||
const char* _getShape(void *object, const char *data);
|
||||
|
||||
static bool writeShape(void* obj, StringTableEntry pFieldName) { return static_cast<MeshComponent*>(obj)->mMeshAsset.notNull(); }
|
||||
|
||||
bool setMeshAsset(const char* assetName);
|
||||
|
||||
virtual TSShape* getShape() { if (mMeshAsset) return mMeshAsset->getShape(); else return NULL; }
|
||||
|
|
@ -186,7 +178,4 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
typedef MeshComponent::RenderMode BatchingMode;
|
||||
DefineEnumType(BatchingMode);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue