Castor3D 0.16.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)=default |
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. | |
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. | |
bool | isModified () const |
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::AnimableT< Engine > | |
virtual C3D_API | ~AnimableT () noexcept=default |
void | cleanupAnimations () |
Empties the animations map. | |
bool | hasAnimation () const |
bool | hasAnimation (castor::String const &name) const |
Animation const & | getAnimation (castor::String const &name) const |
Retrieves an animation. | |
Animation & | getAnimation (castor::String const &name) |
Retrieves an animation. | |
void | addAnimation (AnimationPtr animation) |
Adds an animation. | |
AnimationsMap const & | getAnimations () const |
Public Member Functions inherited from castor::OwnedBy< Owner > | |
Owner * | getOwner () const |
Friends | |
class | MeshGenerator |
class | BinaryWriter< Mesh > |
class | BinaryParser< Mesh > |
Additional Inherited Members | |
Protected Types inherited from castor3d::AnimableT< Engine > | |
using | Animation |
using | AnimationPtr |
using | AnimationsMap |
Protected Member Functions inherited from castor3d::AnimableT< Engine > | |
void | doRemoveAnimation (castor::String const &name) |
Removes an animation. | |
AnimationType & | doGetAnimation (castor::String const &name) |
Retrieves an animation. | |
AnimationType const & | doGetAnimation (castor::String const &name) const |
Retrieves an animation. | |
AnimableT (Engine &owner) | |
C3D_API | AnimableT (AnimableT &&rhs) noexcept=default |
C3D_API | AnimableT (AnimableT const &rhs)=delete |
C3D_API AnimableT & | operator= (AnimableT &&rhs) noexcept=delete |
C3D_API AnimableT & | operator= (AnimableT const &rhs)=delete |
Protected Member Functions inherited from castor::OwnedBy< Owner > | |
OwnedBy (Owner &owner) | |
Constructor. | |
Protected Attributes inherited from castor::NamedBaseT< T > | |
T | m_name |
Protected Attributes inherited from castor3d::AnimableT< Engine > | |
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.
|
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.
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 |
|
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 |