Move mesh and skinned mesh options into shared base

This commit is contained in:
Wojtek Figat
2021-11-05 12:07:00 +01:00
parent 18f9d782ae
commit 1f12e37412
3 changed files with 20 additions and 31 deletions

View File

@@ -20,12 +20,14 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(MeshBase);
protected:
ModelBase* _model;
bool _use16BitIndexBuffer;
BoundingBox _box;
BoundingSphere _sphere;
int32 _index;
int32 _lodIndex;
uint32 _vertices;
uint32 _triangles;
int32 _materialSlotIndex;
bool _use16BitIndexBuffer;
explicit MeshBase(const SpawnParams& params)
: PersistentScriptingObject(params)
@@ -37,11 +39,27 @@ public:
/// <summary>
/// Gets the model owning this mesh.
/// </summary>
FORCE_INLINE ModelBase* GetModelBase() const
API_PROPERTY() FORCE_INLINE ModelBase* GetModelBase() const
{
return _model;
}
/// <summary>
/// Gets the mesh parent LOD index.
/// </summary>
API_PROPERTY() FORCE_INLINE int32 GetLODIndex() const
{
return _lodIndex;
}
/// <summary>
/// Gets the mesh index.
/// </summary>
API_PROPERTY() FORCE_INLINE int32 GetIndex() const
{
return _index;
}
/// <summary>
/// Gets the triangle count.
/// </summary>