Polyphase Game Engine
Loading...
Searching...
No Matches
StaticMesh Class Reference

#include <StaticMesh.h>

Inheritance diagram for StaticMesh:
Asset Object

Public Member Functions

 DECLARE_ASSET (StaticMesh, Asset)
 
 StaticMesh ()
 
 ~StaticMesh ()
 
void CreateRaw (uint32_t numVertices, Vertex *vertices, uint32_t numIndices, IndexType *indices)
 
void CreateRawColor (uint32_t numVertices, VertexColor *vertices, uint32_t numIndices, IndexType *indices)
 
StaticMeshResourceGetResource ()
 
virtual void LoadStream (Stream &stream, Platform platform) override
 
virtual void SaveStream (Stream &stream, Platform platform) override
 
virtual void Create () override
 
virtual void Destroy () override
 
virtual bool Import (const std::string &path, ImportOptions *options) override
 
virtual void GatherProperties (std::vector< Property > &outProps) override
 
virtual glm::vec4 GetTypeColor () override
 
virtual const char * GetTypeName () override
 
virtual const char * GetTypeImportExt () override
 
class MaterialGetMaterial ()
 
void SetMaterial (class Material *newMaterial)
 
uint32_t GetNumIndices () const
 
uint32_t GetNumFaces () const
 
uint32_t GetNumVertices () const
 
bool HasVertexColor () const
 
VertexGetVertices ()
 
VertexColorGetColorVertices ()
 
IndexTypeGetIndices ()
 
Bounds GetBounds () const
 
btBvhTriangleMeshShape * GetTriangleCollisionShape ()
 
btCollisionShape * GetCollisionShape ()
 
void SetCollisionShape (btCollisionShape *shape)
 
void SetCollisionShapes (uint32_t numCollisionShapes, btCollisionShape **collisionShapes, btTransform *transforms, bool compound)
 
void SetGenerateTriangleCollisionMesh (bool generate)
 
bool IsTriangleCollisionMeshEnabled () const
 
uint32_t GetVertexSize () const
 
- Public Member Functions inherited from Asset
 DECLARE_FACTORY_MANAGER (Asset)
 
 DECLARE_FACTORY (Asset, Asset)
 
 DECLARE_OBJECT (Asset, Object)
 
 Asset ()
 
virtual ~Asset ()
 
virtual void Copy (Asset *srcAsset)
 
const std::string & GetName () const
 
bool IsLoaded () const
 
bool IsRefCounted () const
 
int32_t GetRefCount () const
 
bool IsEmbedded () const
 
void SetEmbedded (bool embed)
 
bool IsEngineAsset () const
 
void SetEngineAsset (bool engineAsset)
 
void SetName (const std::string &name)
 
void IncrementRefCount ()
 
void DecrementRefCount ()
 
void LoadFile (const char *path, AsyncLoadRequest *request=nullptr)
 
void LoadEmbedded (const EmbeddedFile *embeddedAsset, AsyncLoadRequest *request=nullptr)
 
void SaveFile (const char *path, Platform platform)
 
virtual bool ShouldSnapshotForPie () const
 
bool IsTransient () const
 
void SetTransient (bool transient)
 
uint64_t GetUuid () const
 
void SetUuid (uint64_t uuid)
 
void EnsureUuid ()
 
void WriteHeader (Stream &stream)
 
- Public Member Functions inherited from Object
virtual ~Object ()=default
 
virtual const char * RuntimeName () const =0
 
virtual const char * RuntimeParentName () const =0
 
virtual RuntimeId InstanceRuntimeId () const =0
 
virtual ObjectQueryInterface (RuntimeId id) const
 
virtual bool Is (RuntimeId id) const
 
virtual bool Is (const char *name) const
 
virtual bool DrawCustomProperty (Property &prop)
 
template<typename T >
T * As () const
 
virtual bool Equals (const Object *rhs) const
 

Static Public Member Functions

static bool HandlePropChange (Datum *datum, uint32_t index, const void *newValue)
 
- Static Public Member Functions inherited from Asset
static AssetHeader ReadHeader (Stream &stream)
 
static std::string GetNameFromPath (const std::string &path)
 
static std::string GetDirectoryFromPath (const std::string &path)
 
static const char * GetNameFromTypeId (TypeId id)
 
static TypeId GetTypeIdFromName (const char *name)
 
- Static Public Member Functions inherited from Object
static const char * ClassRuntimeName ()
 

Additional Inherited Members

- Protected Attributes inherited from Asset
uint32_t mVersion = 0
 
TypeId mType = INVALID_TYPE_ID
 
uint64_t mUuid = 0
 
bool mEmbedded = false
 
bool mLoaded = false
 
bool mEnableRefCount = true
 
bool mEngineAsset = false
 
bool mTransient = false
 
std::string mName = "Asset"
 
int32_t mRefCount = 0
 

Constructor & Destructor Documentation

◆ StaticMesh()

StaticMesh::StaticMesh ( )

◆ ~StaticMesh()

StaticMesh::~StaticMesh ( )

Member Function Documentation

◆ Create()

void StaticMesh::Create ( )
overridevirtual

Reimplemented from Asset.

◆ CreateRaw()

void StaticMesh::CreateRaw ( uint32_t  numVertices,
Vertex vertices,
uint32_t  numIndices,
IndexType indices 
)

◆ CreateRawColor()

void StaticMesh::CreateRawColor ( uint32_t  numVertices,
VertexColor vertices,
uint32_t  numIndices,
IndexType indices 
)

◆ DECLARE_ASSET()

StaticMesh::DECLARE_ASSET ( StaticMesh  ,
Asset   
)

◆ Destroy()

void StaticMesh::Destroy ( )
overridevirtual

Reimplemented from Asset.

◆ GatherProperties()

void StaticMesh::GatherProperties ( std::vector< Property > &  outProps)
overridevirtual

Reimplemented from Asset.

◆ GetBounds()

Bounds StaticMesh::GetBounds ( ) const

◆ GetCollisionShape()

btCollisionShape * StaticMesh::GetCollisionShape ( )

◆ GetColorVertices()

VertexColor * StaticMesh::GetColorVertices ( )

◆ GetIndices()

IndexType * StaticMesh::GetIndices ( )

◆ GetMaterial()

Material * StaticMesh::GetMaterial ( )

◆ GetNumFaces()

uint32_t StaticMesh::GetNumFaces ( ) const

◆ GetNumIndices()

uint32_t StaticMesh::GetNumIndices ( ) const

◆ GetNumVertices()

uint32_t StaticMesh::GetNumVertices ( ) const

◆ GetResource()

StaticMeshResource * StaticMesh::GetResource ( )

◆ GetTriangleCollisionShape()

btBvhTriangleMeshShape * StaticMesh::GetTriangleCollisionShape ( )

◆ GetTypeColor()

glm::vec4 StaticMesh::GetTypeColor ( )
overridevirtual

Reimplemented from Asset.

◆ GetTypeImportExt()

const char * StaticMesh::GetTypeImportExt ( )
overridevirtual

Reimplemented from Asset.

◆ GetTypeName()

const char * StaticMesh::GetTypeName ( )
overridevirtual

Reimplemented from Asset.

◆ GetVertexSize()

uint32_t StaticMesh::GetVertexSize ( ) const

◆ GetVertices()

Vertex * StaticMesh::GetVertices ( )

◆ HandlePropChange()

bool StaticMesh::HandlePropChange ( Datum datum,
uint32_t  index,
const void *  newValue 
)
static

◆ HasVertexColor()

bool StaticMesh::HasVertexColor ( ) const

◆ Import()

bool StaticMesh::Import ( const std::string &  path,
ImportOptions options 
)
overridevirtual

Reimplemented from Asset.

◆ IsTriangleCollisionMeshEnabled()

bool StaticMesh::IsTriangleCollisionMeshEnabled ( ) const

◆ LoadStream()

void StaticMesh::LoadStream ( Stream stream,
Platform  platform 
)
overridevirtual

Reimplemented from Asset.

◆ SaveStream()

void StaticMesh::SaveStream ( Stream stream,
Platform  platform 
)
overridevirtual

Reimplemented from Asset.

◆ SetCollisionShape()

void StaticMesh::SetCollisionShape ( btCollisionShape *  shape)

◆ SetCollisionShapes()

void StaticMesh::SetCollisionShapes ( uint32_t  numCollisionShapes,
btCollisionShape **  collisionShapes,
btTransform *  transforms,
bool  compound 
)

◆ SetGenerateTriangleCollisionMesh()

void StaticMesh::SetGenerateTriangleCollisionMesh ( bool  generate)

◆ SetMaterial()

void StaticMesh::SetMaterial ( class Material newMaterial)

The documentation for this class was generated from the following files: