#include <mesh.h>
Public Member Functions | |
Mesh ()=default | |
Mesh (Core &core) | |
virtual bool | init (utility::ErrorState &errorState) override |
virtual MeshInstance & | getMeshInstance () override |
virtual const MeshInstance & | getMeshInstance () const override |
template<typename T > | |
const VertexAttribute< T > * | FindAttribute (const std::string &id) const |
template<typename T > | |
const VertexAttribute< T > & | GetAttribute (const std::string &id) const |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
RTTIMeshProperties | mProperties |
Property: 'Properties' RTTI mesh CPU data. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Serializable Mesh. This mesh can be used to either load from json or binary format. Notice that the rtti properties that are deserialized should remain constant, like any other resource. To alter mesh data dynamically, use the MeshInstance that is returned from this object.
The RTTI data in the Mesh can conveniently be used as a source to alter the MeshInstance's contents. For instance, it is possible to copy the original data from the Mesh into the MeshInstance while making some modifications.
|
default |
Constructor used during serialization.
const VertexAttribute< T > * FindAttribute | ( | const std::string & | id | ) | const |
Finds vertex attribute.
id | The name of the vertex attribute. For predefined vertex attributions like position, color etc, use the various MeshInstance::VertexAttributeIDs. |
const VertexAttribute< T > & GetAttribute | ( | const std::string & | id | ) | const |
Gets vertex attribute.
id | The name of the vertex attribute. For predefined vertex attributions like position, color etc, use the various MeshInstance::VertexAttributeIDs. |
|
overridevirtual |
Implements IMesh.
|
overridevirtual |
Implements IMesh.
|
overridevirtual |
Initialized the mesh instance.
errorState | Contains error information if an error occurred. |
Reimplemented from Object.
RTTIMeshProperties mProperties |
Property: 'Properties' RTTI mesh CPU data.