Aether3D
Game Engine
Public Member Functions | List of all members
Model Class Referenceabstract

Contains meshes loaded from Aether3D's own .ae3d file format. More...

#include <Model.hpp>

Inheritance diagram for Model:
SceneGraphNode

Public Member Functions

virtual void GetAABB (Vec3 &outMin, Vec3 &outMax) const =0
 
virtual std::vector< std::string > GetMeshNames () const =0
 
virtual std::vector< std::string > GetMeshJointNames (const std::string &meshName) const =0
 
virtual const std::string & GetPath () const =0
 
virtual void ApplyAnimation (int firstKeyFrame, int lastKeyFrame)=0
 
virtual MaterialGetMeshMaterial (const char *meshName)=0
 
virtual void EnableWireframe (bool enable)=0
 
virtual void SetMaterialForMesh (Material *material, const std::string &meshName)=0
 
virtual void SetMaterialForMeshSubstring (Material *material, const std::string &meshNameSubstring)=0
 
- Public Member Functions inherited from SceneGraphNode
 SceneGraphNode ()
 
virtual ~SceneGraphNode ()
 
virtual bool AddChild (SceneGraphNode *child)
 
virtual bool ContainsChild (const SceneGraphNode *node) const
 
virtual void FindFirstChildWithName (const char *name, SceneGraphNode **outNode)
 
virtual void SetLayerMask (unsigned mask)
 
virtual void SetName (const std::string &newName)
 
virtual void SetPosition (const Vec3 &aPosition)
 
virtual void SetRotation (const Quaternion &aRotation)
 
virtual Quaternion GetRotation () const
 
virtual void SetScale (float aScale)
 
virtual float GetScale () const
 
virtual void SolveMatrices ()
 
virtual SceneGraphNodeParent ()
 
virtual std::string GetName () const
 
virtual Type GetType () const
 
virtual unsigned GetLayerMask () const
 
virtual std::list< SceneGraphNode * > & Children ()
 
virtual Vec3 GetPosition () const
 
virtual SceneGraphNodeRoot ()
 
void CleanDirties ()
 
bool IsDirty () const
 

Additional Inherited Members

- Public Types inherited from SceneGraphNode
enum  Type { None, Model, Camera, Light }
 
- Static Public Member Functions inherited from SceneGraphNode
static void RegisterScene (Scene *scene)
 
static void UnregisterScene ()
 
- Public Attributes inherited from SceneGraphNode
std::list< SceneGraphNode * > children
 
Matrix44 modelMatrix
 
- Protected Attributes inherited from SceneGraphNode
Type type
 
float scale
 
Vec3 position
 
SceneGraphNodeparent
 
Quaternion rotation
 
std::string name
 
bool dirtyTransform = true
 
unsigned layerMask = 0xFFFFFFFF
 

Detailed Description

Contains meshes loaded from Aether3D's own .ae3d file format.

Member Function Documentation

◆ ApplyAnimation()

virtual void Model::ApplyAnimation ( int  firstKeyFrame,
int  lastKeyFrame 
)
pure virtual

Applies skeletal or blendshape animation for all meshes. Use parameters 0, 0 to apply the whole animation.

Parameters
firstKeyFrameFirst key frame of the animation that is applied.
lastKeyFrameLast key frame of the animation that is applied.

◆ EnableWireframe()

virtual void Model::EnableWireframe ( bool  enable)
pure virtual
Parameters
enableTrue, if the model should be rendered as a wireframe.

◆ GetAABB()

virtual void Model::GetAABB ( Vec3 outMin,
Vec3 outMax 
) const
pure virtual
Parameters
outMinMinimum corner of AABB in world-space.
outMaxMaximum corner of AABB in world-space.

◆ GetMeshJointNames()

virtual std::vector< std::string > Model::GetMeshJointNames ( const std::string &  meshName) const
pure virtual

Gets joint names for a Mesh.

Parameters
meshNameMesh name.
Returns
Array of joint names for meshName. If mesh or joints not found, returns an empty array.

◆ GetMeshMaterial()

virtual Material* Model::GetMeshMaterial ( const char *  meshName)
pure virtual

Gets Mesh's material.

Parameters
meshNameMesh's name.
Returns
Material or null if mesh or material is invalid.

◆ GetMeshNames()

virtual std::vector< std::string > Model::GetMeshNames ( ) const
pure virtual
Returns
Mesh names.

◆ GetPath()

virtual const std::string& Model::GetPath ( ) const
pure virtual
Returns
Path that was given to Aether3D_API::MakeModel().

◆ SetMaterialForMesh()

virtual void Model::SetMaterialForMesh ( Material material,
const std::string &  meshName 
)
pure virtual

Sets a material for a mesh. If mesh is not found, does nothing.

Parameters
materialMaterial.
meshNameMesh's name (case-sensitive).

◆ SetMaterialForMeshSubstring()

virtual void Model::SetMaterialForMeshSubstring ( Material material,
const std::string &  meshNameSubstring 
)
pure virtual

Sets a material for meshes whose name contain meshNameSubstring. If meshes are not found, does nothing.

Parameters
materialMaterial.
meshNameSubstringPart of mesh's name (case-sensitive).

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