Castor3D  ..
Classes | Public Member Functions | Protected Attributes | List of all members
Castor3D::Geometry Class Reference

Geometry handler class. More...

+ Inheritance diagram for Castor3D::Geometry:
+ Collaboration diagram for Castor3D::Geometry:

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...
 

Detailed Description

Geometry handler class.

Author
Sylvain DOREMUS
Date
09/02/2010
Version
0.1

Constructor & Destructor Documentation

◆ Geometry()

C3D_API Castor3D::Geometry::Geometry ( Castor::String const &  p_name,
Scene p_scene,
SceneNodeSPtr  p_sn,
MeshSPtr  p_mesh = nullptr 
)

Constructor.

Remarks
Not to be used by the user, use Scene::CreatePrimitive function
Parameters
[in]p_nameThe geometry name
[in]p_sceneThe parent scene
[in]p_meshThe mesh, default is nullptr
[in]p_snThe scene node to which the geometry is attached

◆ ~Geometry()

virtual C3D_API Castor3D::Geometry::~Geometry ( )
virtual

Destructor.

Member Function Documentation

◆ Cleanup()

C3D_API void Castor3D::Geometry::Cleanup ( )

Cleans all the object owned and created by the geometry.

◆ CreateBuffers()

C3D_API void Castor3D::Geometry::CreateBuffers ( uint32_t &  p_nbFaces,
uint32_t &  p_nbVertex 
)

brief Creates the mesh buffers

Parameters
[out]p_nbFacesUsed to retrieve the faces number
[out]p_nbVertexUsed to retrieve the vertexes number

◆ EndRender()

virtual C3D_API void Castor3D::Geometry::EndRender ( )
inlinevirtual

End render function, dummy.

◆ GetAnimatedObject()

AnimatedObjectSPtr const& Castor3D::Geometry::GetAnimatedObject ( ) const
inline

Retrieves the animated skeleton instance.

Returns
The value

References m_animatedObject.

◆ GetMaterial()

C3D_API MaterialSPtr Castor3D::Geometry::GetMaterial ( SubmeshSPtr  p_submesh) const

Retrieves the submesh material.

Parameters
[in]p_submeshThe submesh
Returns
The material

◆ GetMesh()

MeshSPtr Castor3D::Geometry::GetMesh ( ) const
inline

Retrieves the mesh.

Returns
The mesh

References m_mesh.

◆ HasListsCreated()

bool Castor3D::Geometry::HasListsCreated ( ) const
inline

Retrieves the mesh buffers creation status.

Returns
The mesh buffers creation status

References m_listCreated.

◆ IsVisible()

bool Castor3D::Geometry::IsVisible ( ) const
inline

Retrieves the visibility status.

Returns
The visibility status

References m_visible.

◆ Render()

virtual C3D_API void Castor3D::Geometry::Render ( )
virtual

Renders the geometry in a given display mode.

◆ SetAnimatedObject()

void Castor3D::Geometry::SetAnimatedObject ( AnimatedObjectSPtr const &  p_object)
inline

Sets the animated skeleton instance.

Parameters
[in]p_objectThe new value

References m_animatedObject.

◆ SetMaterial()

C3D_API void Castor3D::Geometry::SetMaterial ( SubmeshSPtr  p_submesh,
MaterialSPtr  p_material 
)

Defines a submesh material.

Parameters
[in]p_submeshThe submesh
[in]p_materialThe material

◆ SetMesh()

C3D_API void Castor3D::Geometry::SetMesh ( MeshSPtr  p_mesh)

Defines this geometry's mesh.

Parameters
[in]p_meshThe mesh

◆ SetVisible()

void Castor3D::Geometry::SetVisible ( bool  p_visible)
inline

Defines the visibility status.

Parameters
[in]p_visibleThe visibility status

References m_visible.

Member Data Documentation

◆ m_animatedObject

AnimatedObjectSPtr Castor3D::Geometry::m_animatedObject
protected

The animated object instance, if any.

Referenced by GetAnimatedObject(), and SetAnimatedObject().

◆ m_changed

bool Castor3D::Geometry::m_changed
protected

Tells if the geometry has changed.

Tells if the mesh buffers are generated

◆ m_listCreated

bool Castor3D::Geometry::m_listCreated
protected

Referenced by HasListsCreated().

◆ m_mesh

MeshWPtr Castor3D::Geometry::m_mesh
protected

The mesh.

Referenced by GetMesh().

◆ m_strMeshName

Castor::String Castor3D::Geometry::m_strMeshName
protected

The mesh name.

◆ m_submeshesMaterials

std::map< SubmeshSPtr, MaterialSPtr > Castor3D::Geometry::m_submeshesMaterials
protected

The submeshes materials.

◆ m_visible

bool Castor3D::Geometry::m_visible
protected

Tells if the geometry is visible.

Referenced by IsVisible(), and SetVisible().


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