Updates to various components, added a few new ones.

This commit is contained in:
Areloch 2019-02-24 01:50:38 -06:00
parent 775ca57047
commit 34d05ff16f
52 changed files with 4566 additions and 1799 deletions

View file

@ -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