![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <Geometry.hpp>
Public Member Functions | |
C3D_API | Geometry (castor::String const &name, Scene &scene, SceneNode &node, MeshResPtr mesh={}) |
Constructor. More... | |
C3D_API | Geometry (castor::String const &name, Scene &scene, MeshResPtr mesh={}) |
Constructor. More... | |
C3D_API void | prepare (uint32_t &nbFaces, uint32_t &nbVertex) |
C3D_API void | setMesh (MeshResPtr mesh) |
Defines this geometry's mesh. More... | |
C3D_API MaterialRPtr | getMaterial (Submesh const &submesh) const |
Retrieves the submesh material. More... | |
C3D_API void | setMaterial (Submesh &submesh, MaterialRPtr material, bool updateSubmesh=true) |
Defines a submesh material. More... | |
C3D_API void | updateContainers (SubmeshBoundingBoxList const &boxes) |
Computes the bounding box from the given submeshes boxes. More... | |
C3D_API castor::BoundingBox const & | getBoundingBox (Submesh const &submesh) const |
C3D_API castor::BoundingSphere const & | getBoundingSphere (Submesh const &submesh) const |
C3D_API void | setBoundingBox (Submesh const &submesh, castor::BoundingBox const &box) |
Sets the bounding box for given submesh. More... | |
C3D_API uint32_t | getId (Pass const &pass, Submesh const &submesh) const |
C3D_API void | setId (Pass const &pass, Submesh const &submesh, uint32_t id) |
MeshResPtr | getMesh () const |
castor::BoundingBox const & | getBoundingBox () const |
castor::BoundingSphere const & | getBoundingSphere () const |
![]() | |
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type, SceneNode &node) |
Constructor. More... | |
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type) |
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 (SceneNode &node) |
Attaches the movable object to a node. More... | |
C3D_API EngineRPtr | getEngine () const |
SceneNode * | getParent () const |
MovableType | getType () const |
![]() | |
void | setVisible (bool value) |
void | setShadowCaster (bool value) |
void | setShadowReceiver (bool value) |
void | setCulled (bool value) |
bool | isVisible () const |
bool | isShadowCaster () const |
bool | isShadowReceiver () const |
bool | isCulled () const |
Public Attributes | |
OnSubmeshMaterialChanged | onMaterialChanged |
Additional Inherited Members | |
![]() | |
MovableType | m_type |
castor::String | m_strNodeName |
SceneNode * | m_sceneNode |
OnSceneNodeChangedConnection | m_notifyIndex |
C3D_API castor3d::Geometry::Geometry | ( | castor::String const & | name, |
Scene & | scene, | ||
SceneNode & | node, | ||
MeshResPtr | mesh = {} |
||
) |
Constructor.
[in] | name | The geometry name. |
[in] | scene | The parent scene. |
[in] | node | The scene node to which the geometry is attached. |
[in] | mesh | The mesh. |
C3D_API castor3d::Geometry::Geometry | ( | castor::String const & | name, |
Scene & | scene, | ||
MeshResPtr | mesh = {} |
||
) |
Constructor.
[in] | name | The geometry name. |
[in] | scene | The parent scene. |
[in] | mesh | The mesh. |
|
inline |
C3D_API castor::BoundingBox const & castor3d::Geometry::getBoundingBox | ( | Submesh const & | submesh | ) | const |
[in] | submesh | The submesh. |
|
inline |
C3D_API castor::BoundingSphere const & castor3d::Geometry::getBoundingSphere | ( | Submesh const & | submesh | ) | const |
[in] | submesh | The submesh. |
Retrieves the submesh material.
[in] | submesh | The submesh. |
|
inline |
C3D_API void castor3d::Geometry::prepare | ( | uint32_t & | nbFaces, |
uint32_t & | nbVertex | ||
) |
brief Creates the mesh buffers
[out] | nbFaces | Used to retrieve the faces number |
[out] | nbVertex | Used to retrieve the vertexes number |
C3D_API void castor3d::Geometry::setBoundingBox | ( | Submesh const & | submesh, |
castor::BoundingBox const & | box | ||
) |
Sets the bounding box for given submesh.
[in] | submesh | The submesh. |
[in] | box | The bounding box. |
C3D_API void castor3d::Geometry::setMaterial | ( | Submesh & | submesh, |
MaterialRPtr | material, | ||
bool | updateSubmesh = true |
||
) |
Defines a submesh material.
[in] | submesh | The submesh. |
[in] | material | The material. |
[in] | updateSubmesh | Tells if the submesh's buffers need to be updated. |
C3D_API void castor3d::Geometry::setMesh | ( | MeshResPtr | mesh | ) |
Defines this geometry's mesh.
[in] | mesh | The mesh. |
C3D_API void castor3d::Geometry::updateContainers | ( | SubmeshBoundingBoxList const & | boxes | ) |
Computes the bounding box from the given submeshes boxes.
OnSubmeshMaterialChanged castor3d::Geometry::onMaterialChanged |