![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <Mesh.hpp>


Public Member Functions | |
| C3D_API | Mesh (castor::String const &name, Scene &scene) |
| Constructor. | |
| C3D_API | ~Mesh () noexcept override |
| Destructor. | |
| C3D_API | Mesh (Mesh &&rhs)=delete |
| Move constructor. | |
| C3D_API Mesh & | operator= (Mesh &&rhs)=delete |
| Move assignment operator. | |
| C3D_API | Mesh (Mesh const &rhs)=delete |
| Copy constructor. | |
| C3D_API Mesh & | operator= (Mesh const &rhs)=delete |
| Copy assignment operator. | |
| C3D_API void | initialise () |
| Initialises the mesh. | |
| C3D_API void | cleanup () |
| Cleans the submesh. | |
| C3D_API crg::FramePassArray | record (crg::ResourcesCache &resources, crg::FramePassGroup &graph, crg::FramePassArray previousPasses) |
| Records the submeshes' dependent render passes. | |
| C3D_API void | registerDependencies (crg::FramePass &pass) const |
| Records the submeshes's dependencies. | |
| C3D_API void | update (CpuUpdater &updater) |
| Updates the submeshes' render components. | |
| C3D_API void | updateContainers () |
| Computes the bounding box and sphere from the submeshes. | |
| C3D_API void | computeContainers () |
| Computes the bounding box and sphere. | |
| C3D_API uint32_t | getFaceCount () const |
| Returns the total faces count. | |
| C3D_API uint32_t | getVertexCount () const |
| Returns the total vertex count. | |
| C3D_API SubmeshRPtr | getSubmesh (uint32_t index) const |
| Tries to retrieve the submesh at the given index. | |
| C3D_API SubmeshRPtr | createSubmesh () |
| Creates a submesh. | |
| C3D_API SubmeshRPtr | createDefaultSubmesh () |
| Creates a submesh with positions, normals, tangents, and texcoords0 components. | |
| C3D_API void | deleteSubmesh (Submesh const *submesh) |
| Deletes a given submesh if it is in the mesh's submeshes. | |
| C3D_API void | computeNormals (bool reverted=false) |
| Generates normals and tangents. | |
| C3D_API void | setSkeleton (SkeletonRPtr skeleton) |
| Sets the skeleton. | |
| C3D_API MeshAnimation & | createAnimation (castor::String const &name) |
| Creates an animation. | |
| C3D_API void | removeAnimation (castor::String const &name) |
| Removes an animation. | |
| C3D_API void | cloneInto (Mesh &output) const |
| Clones this object into the given one. | |
| SubmeshPtrArrayIt | begin () |
| Retrieves an iterator to the begin of the submeshes. | |
| SubmeshPtrArrayConstIt | begin () const |
| Retrieves a constant iterator to the begin of the submeshes. | |
| SubmeshPtrArrayIt | end () |
| Retrieves an iterator to the end of the submeshes. | |
| SubmeshPtrArrayConstIt | end () const |
| Retrieves a constant iterator to the end of the submeshes. | |
Getters. | |
| uint32_t | getSubmeshCount () const |
| castor::BoundingBox const & | getBoundingBox () const |
| castor::BoundingSphere const & | getBoundingSphere () const |
| SkeletonRPtr | getSkeleton () const |
| bool | isSerialisable () const |
| SceneRPtr | getScene () const |
Setters. | |
| void | setSerialisable (bool value) |
Public Member Functions inherited from castor::NamedBaseT< T > | |
| NamedBaseT (T name) noexcept | |
| Constructor. | |
| T const & | getName () const noexcept |
| Retrieves the name. | |
| void | rename (T name) noexcept |
Public Member Functions inherited from castor3d::Animable | |
| virtual C3D_API | ~Animable () noexcept=default |
| C3D_API void | cleanupAnimations () |
| Empties the animations map. | |
| virtual C3D_API bool | hasAnimation () const noexcept |
| C3D_API bool | hasAnimation (castor::String const &name) const |
| C3D_API Animation const & | getAnimation (castor::String const &name) const |
| Retrieves an animation. | |
| C3D_API Animation & | getAnimation (castor::String const &name) |
| Retrieves an animation. | |
| C3D_API void | addAnimation (AnimationPtr animation) |
| Adds an animation. | |
| AnimationsMap const & | getAnimations () const |
Public Member Functions inherited from castor::OwnedBy< Engine > | |
| Engine * | getOwner () const noexcept |
| void | setOwner (Engine &owner) noexcept |
Static Public Member Functions | |
| static C3D_API void | addParsers (castor::AttributeParsers &result) |
Public Attributes | |
| MeshChangeSignal | onChange |
Friends | |
| class | MeshGenerator |
| class | BinaryWriter< Mesh > |
| class | BinaryParser< Mesh > |
Additional Inherited Members | |
Protected Types inherited from castor3d::Animable | |
| using | AnimationPtr = castor::UniquePtr< Animation > |
| using | AnimationsMap = castor::StringMap< AnimationPtr > |
Protected Member Functions inherited from castor3d::Animable | |
| C3D_API void | doRemoveAnimation (castor::String const &name) |
| Removes an animation. | |
| template<typename AnimationType > | |
| AnimationType & | doGetAnimation (castor::String const &name) |
| Retrieves an animation. | |
| template<typename AnimationType > | |
| AnimationType const & | doGetAnimation (castor::String const &name) const |
| Retrieves an animation. | |
| C3D_API | Animable (Engine &owner) |
| C3D_API | Animable (Animable &&rhs) noexcept=default |
| C3D_API Animable & | operator= (Animable &&rhs) noexcept=delete |
| C3D_API | Animable (Animable const &rhs)=delete |
| C3D_API Animable & | operator= (Animable const &rhs)=delete |
Protected Member Functions inherited from castor::OwnedBy< Engine > | |
| OwnedBy (Engine &owner) noexcept | |
| Constructor. | |
Protected Attributes inherited from castor::NamedBaseT< T > | |
| T | m_name |
Protected Attributes inherited from castor3d::Animable | |
| AnimationsMap | m_animations |
| C3D_API castor3d::Mesh::Mesh | ( | castor::String const & | name, |
| Scene & | scene ) |
Constructor.
| [in] | name | This mesh name. |
| [in] | scene | The parent scene. |
|
overridenoexcept |
Destructor.
|
static |
|
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 | ( | ) |
Cleans the submesh.
Clones this object into the given one.
| [in,out] | output | Receives this object's data. |
| 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 SubmeshRPtr castor3d::Mesh::createDefaultSubmesh | ( | ) |
Creates a submesh with positions, normals, tangents, and texcoords0 components.
| C3D_API SubmeshRPtr castor3d::Mesh::createSubmesh | ( | ) |
Creates a 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 |
|
inline |
| C3D_API uint32_t castor3d::Mesh::getFaceCount | ( | ) | const |
Returns the total faces count.
|
inline |
|
inline |
| C3D_API SubmeshRPtr castor3d::Mesh::getSubmesh | ( | uint32_t | index | ) | const |
Tries to retrieve the submesh at the given index.
| [in] | index | The wanted submesh index |
|
inline |
| C3D_API uint32_t castor3d::Mesh::getVertexCount | ( | ) | const |
Returns the total vertex count.
| C3D_API void castor3d::Mesh::initialise | ( | ) |
Initialises the mesh.
|
inline |
| C3D_API crg::FramePassArray castor3d::Mesh::record | ( | crg::ResourcesCache & | resources, |
| crg::FramePassGroup & | graph, | ||
| crg::FramePassArray | previousPasses ) |
Records the submeshes' dependent render passes.
| C3D_API void castor3d::Mesh::registerDependencies | ( | crg::FramePass & | pass | ) | const |
Records the submeshes's dependencies.
| C3D_API void castor3d::Mesh::removeAnimation | ( | castor::String const & | name | ) |
Removes an animation.
| [in] | name | The animation name |
|
inline |
| C3D_API void castor3d::Mesh::setSkeleton | ( | SkeletonRPtr | skeleton | ) |
Sets the skeleton.
| [in] | skeleton | The new value |
| C3D_API void castor3d::Mesh::update | ( | CpuUpdater & | updater | ) |
Updates the submeshes' render components.
| C3D_API void castor3d::Mesh::updateContainers | ( | ) |
Computes the bounding box and sphere from the submeshes.
|
friend |
|
friend |
|
friend |
| MeshChangeSignal castor3d::Mesh::onChange |