Castor3D
..
|
Geometry handler class. More...
Classes | |
class | BinaryParser |
MovableObject loader. More... | |
class | TextLoader |
Geometry loader. More... | |
Public Member Functions | |
C3D_API | Geometry (Castor::String const &p_name, Scene &p_scene, SceneNodeSPtr p_sn, MeshSPtr p_mesh=nullptr) |
Constructor. More... | |
virtual C3D_API | ~Geometry () |
Destructor. More... | |
C3D_API void | Cleanup () |
Cleans all the object owned and created by the geometry. More... | |
C3D_API void | CreateBuffers (uint32_t &p_nbFaces, uint32_t &p_nbVertex) |
virtual C3D_API void | Render () |
Renders the geometry in a given display mode. More... | |
virtual C3D_API void | EndRender () |
End render function, dummy. More... | |
C3D_API void | SetMesh (MeshSPtr p_mesh) |
Defines this geometry's mesh. More... | |
C3D_API MaterialSPtr | GetMaterial (SubmeshSPtr p_submesh) const |
Retrieves the submesh material. More... | |
C3D_API void | SetMaterial (SubmeshSPtr p_submesh, MaterialSPtr p_material) |
Defines a submesh material. More... | |
MeshSPtr | GetMesh () const |
Retrieves the mesh. More... | |
bool | HasListsCreated () const |
Retrieves the mesh buffers creation status. More... | |
bool | IsVisible () const |
Retrieves the visibility status. More... | |
void | SetVisible (bool p_visible) |
Defines the visibility status. More... | |
AnimatedObjectSPtr const & | GetAnimatedObject () const |
Retrieves the animated skeleton instance. More... | |
void | SetAnimatedObject (AnimatedObjectSPtr const &p_object) |
Sets the animated skeleton instance. More... | |
Public Member Functions inherited from Castor3D::MovableObject | |
C3D_API | MovableObject (Castor::String const &p_name, Scene &p_scene, eMOVABLE_TYPE p_type, SceneNodeSPtr p_sn) |
Constructor. More... | |
virtual C3D_API | ~MovableObject () |
Destructor. More... | |
C3D_API void | Detach () |
Detaches the movable object from it's parent. More... | |
virtual C3D_API void | AttachTo (SceneNodeSPtr p_node) |
Attaches the movable object to a node. More... | |
Castor::String const & | GetName () const |
Retrieves the object name. More... | |
SceneNodeSPtr | GetParent () const |
Retrieves the parent node. More... | |
eMOVABLE_TYPE | GetType () const |
Retrieves the object type. More... | |
void | SetName (Castor::String const &p_name) |
Sets the object name. More... | |
Public Member Functions inherited from Castor3D::Animable | |
C3D_API AnimationSPtr | CreateAnimation (Castor::String const &p_name) |
Creates an animation. More... | |
C3D_API void | CleanupAnimations () |
Empties the animations map. More... | |
C3D_API AnimationSPtr | GetAnimation (Castor::String const &p_name) |
Retrieves an animation. More... | |
AnimationPtrStrMap const & | GetAnimations () const |
Protected Attributes | |
MeshWPtr | m_mesh |
The mesh. More... | |
Castor::String | m_strMeshName |
The mesh name. More... | |
bool | m_changed |
Tells if the geometry has changed. More... | |
bool | m_listCreated |
bool | m_visible |
Tells if the geometry is visible. More... | |
AnimatedObjectSPtr | m_animatedObject |
The animated object instance, if any. More... | |
std::map< SubmeshSPtr, MaterialSPtr > | m_submeshesMaterials |
The submeshes materials. More... | |
Protected Attributes inherited from Castor3D::MovableObject | |
eMOVABLE_TYPE | m_type |
Movable object type. More... | |
Castor::String | m_name |
The object name. More... | |
Castor::String | m_strNodeName |
The parent node name. More... | |
SceneNodeWPtr | m_pSceneNode |
The parent scene node. More... | |
uint32_t | m_notifyIndex = 0 |
The node change notification index. More... | |
Protected Attributes inherited from Castor3D::Animable | |
AnimationPtrStrMap | m_animations |
All animations. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Castor3D::Animable | |
Animable () | |
Constructor. More... | |
~Animable () | |
Destructor. More... | |
C3D_API Castor3D::Geometry::Geometry | ( | Castor::String const & | p_name, |
Scene & | p_scene, | ||
SceneNodeSPtr | p_sn, | ||
MeshSPtr | p_mesh = nullptr |
||
) |
Constructor.
[in] | p_name | The geometry name |
[in] | p_scene | The parent scene |
[in] | p_mesh | The mesh, default is nullptr |
[in] | p_sn | The scene node to which the geometry is attached |
|
virtual |
Destructor.
C3D_API void Castor3D::Geometry::Cleanup | ( | ) |
Cleans all the object owned and created by the geometry.
C3D_API void Castor3D::Geometry::CreateBuffers | ( | uint32_t & | p_nbFaces, |
uint32_t & | p_nbVertex | ||
) |
brief Creates the mesh buffers
[out] | p_nbFaces | Used to retrieve the faces number |
[out] | p_nbVertex | Used to retrieve the vertexes number |
|
inlinevirtual |
End render function, dummy.
|
inline |
C3D_API MaterialSPtr Castor3D::Geometry::GetMaterial | ( | SubmeshSPtr | p_submesh | ) | const |
Retrieves the submesh material.
[in] | p_submesh | The submesh |
|
inline |
|
inline |
Retrieves the mesh buffers creation status.
References m_listCreated.
|
inline |
|
virtual |
Renders the geometry in a given display mode.
|
inline |
Sets the animated skeleton instance.
[in] | p_object | The new value |
References m_animatedObject.
C3D_API void Castor3D::Geometry::SetMaterial | ( | SubmeshSPtr | p_submesh, |
MaterialSPtr | p_material | ||
) |
Defines a submesh material.
[in] | p_submesh | The submesh |
[in] | p_material | The material |
C3D_API void Castor3D::Geometry::SetMesh | ( | MeshSPtr | p_mesh | ) |
Defines this geometry's mesh.
[in] | p_mesh | The mesh |
|
inline |
|
protected |
The animated object instance, if any.
Referenced by GetAnimatedObject(), and SetAnimatedObject().
|
protected |
Tells if the geometry has changed.
Tells if the mesh buffers are generated
|
protected |
Referenced by HasListsCreated().
|
protected |
The mesh.
Referenced by GetMesh().
|
protected |
The mesh name.
|
protected |
The submeshes materials.
|
protected |
Tells if the geometry is visible.
Referenced by IsVisible(), and SetVisible().