![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <Mesh.hpp>
Public Member Functions | |
C3D_API | Mesh (castor::String const &name, Scene &scene) |
Constructor. More... | |
C3D_API | ~Mesh () override |
Destructor. More... | |
C3D_API | Mesh (Mesh &&rhs)=default |
Move constructor. More... | |
C3D_API Mesh & | operator= (Mesh &&rhs)=delete |
Move assignment operator. More... | |
C3D_API | Mesh (Mesh const &rhs)=delete |
Copy constructor. More... | |
C3D_API Mesh & | operator= (Mesh const &rhs)=delete |
Copy assignment operator. More... | |
C3D_API void | initialise () |
C3D_API void | cleanup () |
C3D_API void | updateContainers () |
Computes the bounding box and sphere from the submeshes. More... | |
C3D_API void | computeContainers () |
Computes the bounding box and sphere. More... | |
C3D_API uint32_t | getFaceCount () const |
Returns the total faces count. More... | |
C3D_API uint32_t | getVertexCount () const |
Returns the total vertex count. More... | |
C3D_API SubmeshSPtr | getSubmesh (uint32_t index) const |
Tries to retrieve the submesh at the given index. More... | |
C3D_API SubmeshSPtr | createSubmesh () |
Creates a submesh. More... | |
C3D_API void | deleteSubmesh (SubmeshSPtr &submesh) |
Deletes a given submesh if it is in the mesh's submeshes. More... | |
C3D_API void | computeNormals (bool reverted=false) |
Generates normals and tangents. More... | |
C3D_API void | setSkeleton (SkeletonSPtr skeleton) |
Sets the skeleton. More... | |
C3D_API MeshAnimation & | createAnimation (castor::String const &name) |
Creates an animation. More... | |
C3D_API void | removeAnimation (castor::String const &name) |
Removes an animation. More... | |
SubmeshPtrArrayIt | begin () |
Retrieves an iterator to the begin of the submeshes. More... | |
SubmeshPtrArrayConstIt | begin () const |
Retrieves a constant iterator to the begin of the submeshes. More... | |
SubmeshPtrArrayIt | end () |
Retrieves an iterator to the end of the submeshes. More... | |
SubmeshPtrArrayConstIt | end () const |
Retrieves a constant iterator to the end of the submeshes. More... | |
bool | isModified () const |
Retrieves the modify status. More... | |
uint32_t | getSubmeshCount () const |
Retrieves the submesh count. More... | |
castor::BoundingBox const & | getBoundingBox () const |
Retrieves the collision box. More... | |
castor::BoundingSphere const & | getBoundingSphere () const |
Retrieves the collision sphere. More... | |
SkeletonSPtr | getSkeleton () const |
Retrieves the skeleton. More... | |
bool | isSerialisable () const |
void | setSerialisable (bool value) |
Sets the serialisable status. More... | |
SceneRPtr | getScene () const |
![]() | |
virtual C3D_API | ~AnimableT ()=default |
void | cleanupAnimations () |
Empties the animations map. More... | |
bool | hasAnimation () const |
bool | hasAnimation (castor::String const &name) const |
Animation const & | getAnimation (castor::String const &name) const |
Retrieves an animation. More... | |
Animation & | getAnimation (castor::String const &name) |
Retrieves an animation. More... | |
void | addAnimation (AnimationPtr animation) |
Adds an animation. More... | |
AnimationPtrStrMap const & | getAnimations () const |
Friends | |
class | MeshGenerator |
class | BinaryWriter< Mesh > |
class | BinaryParser< Mesh > |
Additional Inherited Members | |
![]() | |
using | Animation = AnimationT< Engine > |
using | AnimationPtr = std::unique_ptr< Animation > |
using | AnimationPtrStrMap = std::map< castor::String, AnimationPtr > |
![]() | |
void | doRemoveAnimation (castor::String const &name) |
Removes an animation. More... | |
AnimationType & | doGetAnimation (castor::String const &name) |
Retrieves an animation. More... | |
AnimationType const & | doGetAnimation (castor::String const &name) const |
Retrieves an animation. More... | |
AnimableT (Engine &owner) | |
C3D_API | AnimableT (AnimableT &&rhs)=default |
C3D_API | AnimableT (AnimableT const &rhs)=delete |
C3D_API AnimableT & | operator= (AnimableT &&rhs)=delete |
C3D_API AnimableT & | operator= (AnimableT const &rhs)=delete |
![]() | |
AnimationPtrStrMap | m_animations |
Constructor.
[in] | name | This mesh name. |
[in] | scene | The parent scene. |
|
override |
Destructor.
|
inline |
Retrieves an iterator to the begin of the submeshes.
|
inline |
Retrieves a constant iterator to the begin of the submeshes.
C3D_API void castor3d::Mesh::cleanup | ( | ) |
C3D_API void castor3d::Mesh::computeContainers | ( | ) |
Computes the bounding box and sphere.
C3D_API void castor3d::Mesh::computeNormals | ( | bool | reverted = false | ) |
Generates normals and tangents.
C3D_API MeshAnimation & castor3d::Mesh::createAnimation | ( | castor::String const & | name | ) |
Creates an animation.
[in] | name | The animation name |
C3D_API SubmeshSPtr castor3d::Mesh::createSubmesh | ( | ) |
Creates a submesh.
C3D_API void castor3d::Mesh::deleteSubmesh | ( | SubmeshSPtr & | submesh | ) |
Deletes a given submesh if it is in the mesh's submeshes.
[in] | submesh | The submesh to delete |
|
inline |
Retrieves an iterator to the end of the submeshes.
|
inline |
Retrieves a constant iterator to the end of the submeshes.
|
inline |
Retrieves the collision box.
|
inline |
Retrieves the collision sphere.
C3D_API uint32_t castor3d::Mesh::getFaceCount | ( | ) | const |
Returns the total faces count.
|
inline |
|
inline |
Retrieves the skeleton.
C3D_API SubmeshSPtr castor3d::Mesh::getSubmesh | ( | uint32_t | index | ) | const |
Tries to retrieve the submesh at the given index.
[in] | index | The wanted submesh index |
|
inline |
Retrieves the submesh count.
C3D_API uint32_t castor3d::Mesh::getVertexCount | ( | ) | const |
Returns the total vertex count.
C3D_API void castor3d::Mesh::initialise | ( | ) |
|
inline |
Retrieves the modify status.
|
inline |
C3D_API void castor3d::Mesh::removeAnimation | ( | castor::String const & | name | ) |
Removes an animation.
[in] | name | The animation name |
|
inline |
Sets the serialisable status.
[in] | value | The new value. |
C3D_API void castor3d::Mesh::setSkeleton | ( | SkeletonSPtr | skeleton | ) |
Sets the skeleton.
[in] | skeleton | The new value |
C3D_API void castor3d::Mesh::updateContainers | ( | ) |
Computes the bounding box and sphere from the submeshes.
|
friend |
|
friend |
|
friend |