Castor3D 0.15.0
Multiplatform 3D engine
|
#include <Submesh.hpp>
Fonctions membres publiques | |
C3D_API | Submesh (Mesh &mesh, uint32_t id=1, SubmeshFlags const &flags=SubmeshFlags{}) |
Constructeur. | |
C3D_API | ~Submesh () |
Destructeur. | |
C3D_API void | initialise (RenderDevice const &device) |
Initialise le sous-maillage. | |
C3D_API void | cleanup (RenderDevice const &device) |
Nettoie le sous-maillage. | |
C3D_API void | update () |
Met à jour les tampons. | |
C3D_API void | computeContainers () |
Calcule les conteneurs (cube et sphère) | |
C3D_API void | updateContainers (castor::BoundingBox const &boundingBox) |
Met à jour les conteneurs depuis la bounding box donnée. | |
C3D_API uint32_t | getFaceCount () const |
C3D_API uint32_t | getPointsCount () const |
C3D_API int | isInMyPoints (castor::Point3f const &position, double precision) |
Teste si le point donné fait partie de ceux de ce sous-maillage. | |
C3D_API InterleavedVertex | addPoint (float x, float y, float z) |
Crée un Vertex à partir des coordonnées données et l'ajoute à la liste. | |
C3D_API InterleavedVertex | addPoint (castor::Point3f const &value) |
Crée un Vertex à partir du point donné et l'ajoute à la liste. | |
C3D_API InterleavedVertex | addPoint (float *value) |
Crée un Vertex à partir des coordonnées données et l'ajoute à la liste. | |
C3D_API void | addPoint (InterleavedVertex const &value) |
Ajoute un sommet à la liste. | |
C3D_API void | addPoints (InterleavedVertex const *const begin, InterleavedVertex const *const end) |
Ajoute des points à la liste. | |
C3D_API void | computeNormals (bool reverted=false) |
Génère les normales et les tangentes. | |
C3D_API ProgramFlags | getProgramFlags (Material const &material) const |
C3D_API SubmeshFlags | getSubmeshFlags (Pass const *pass) const |
C3D_API MorphFlags | getMorphFlags () const |
C3D_API void | instantiate (Geometry const *geometry, MaterialObs oldMaterial, MaterialObs newMaterial, bool update) |
Instancie le submesh avec une géométrie et son matériau. | |
C3D_API GeometryBuffers const & | getGeometryBuffers (SubmeshRenderNode const &node, PipelineFlags const &flags) const |
C3D_API void | enableSceneUpdate (bool updateScene) |
Active la mise à jour de la scène en cas de modification. | |
C3D_API void | setBaseData (SubmeshData submeshData, castor::Point3fArray data) |
void | disableSceneUpdate () |
void | needsUpdate () |
void | addPoints (std::vector< InterleavedVertex > const &vertices) |
template<size_t Count> | |
void | addPoints (std::array< InterleavedVertex, Count > const &vertices) |
void | setDefaultMaterial (MaterialObs material) |
void | setIndexMapping (IndexMappingUPtr mapping) |
IndexMappingRPtr | getIndexMapping () const |
template<typename ComponentT , typename ... ParamsT> | |
ComponentT * | createComponent (ParamsT &&... params) |
void | addComponent (SubmeshComponentUPtr component) |
template<typename ComponentT > | |
void | addComponent (castor::UniquePtr< ComponentT > component) |
void | setTopology (VkPrimitiveTopology value) |
C3D_API InterleavedVertex | getInterleavedPoint (uint32_t index) const |
C3D_API castor::Point3fArray const & | getPositions () const |
C3D_API castor::Point3fArray & | getPositions () |
C3D_API castor::Point3fArray const & | getNormals () const |
C3D_API castor::Point3fArray & | getNormals () |
C3D_API castor::Point3fArray const & | getTangents () const |
C3D_API castor::Point3fArray & | getTangents () |
C3D_API castor::Point3fArray const & | getTexcoords0 () const |
C3D_API castor::Point3fArray & | getTexcoords0 () |
C3D_API castor::Point3fArray const & | getTexcoords1 () const |
C3D_API castor::Point3fArray & | getTexcoords1 () |
C3D_API castor::Point3fArray const & | getTexcoords2 () const |
C3D_API castor::Point3fArray & | getTexcoords2 () |
C3D_API castor::Point3fArray const & | getTexcoords3 () const |
C3D_API castor::Point3fArray & | getTexcoords3 () |
C3D_API castor::Point3fArray const & | getColours () const |
C3D_API castor::Point3fArray & | getColours () |
C3D_API castor::Point3fArray const & | getBaseData (SubmeshData submeshData) const |
C3D_API castor::Point3fArray & | getBaseData (SubmeshData submeshData) |
C3D_API GpuBufferOffsetT< castor::Point4f > const & | getMorphTargets () const |
C3D_API uint32_t | getMorphTargetsCount () const |
C3D_API std::vector< Meshlet > const & | getMeshlets () const |
C3D_API std::vector< Meshlet > & | getMeshlets () |
C3D_API uint32_t | getMeshletsCount () const |
C3D_API bool | isDynamic () const |
C3D_API bool | isAnimated () const |
C3D_API ObjectBufferOffset const & | getFinalBufferOffsets (Geometry const &instance) const |
C3D_API ObjectBufferOffset const & | getSourceBufferOffsets () const |
C3D_API GpuBufferOffsetT< Meshlet > const & | getMeshletsBuffer () const |
C3D_API GpuBufferOffsetT< MeshletCullData > const & | getFinalMeshletsBounds (Geometry const &instance) const |
C3D_API GpuBufferOffsetT< MeshletCullData > const & | getSourceMeshletsBounds () const |
C3D_API bool | hasMorphComponent () const |
C3D_API bool | hasSkinComponent () const |
C3D_API VkDeviceSize | getVertexOffset (Geometry const &geometry) const |
C3D_API VkDeviceSize | getIndexOffset () const |
C3D_API VkDeviceSize | getMeshletOffset () const |
SkeletonRPtr | getSkeleton () const |
MaterialObs | getDefaultMaterial () const |
castor::BoundingBox const & | getBoundingBox () const |
castor::BoundingBox & | getBoundingBox () |
castor::BoundingSphere const & | getBoundingSphere () const |
castor::BoundingSphere & | getBoundingSphere () |
bool | isInitialised () const |
Mesh const & | getParent () const |
Mesh & | getParent () |
uint32_t | getId () const |
bool | hasComponent (castor::String const &name) const |
SubmeshComponentRPtr | getComponent (castor::String const &name) const |
template<typename ComponentT > | |
ComponentT * | getComponent () const |
InstantiationComponent & | getInstantiation () |
InstantiationComponent const & | getInstantiation () const |
SubmeshComponentIDMap const & | getComponents () const |
VkPrimitiveTopology | getTopology () const |
SubmeshFlags | getFinalSubmeshFlags () const |
Amis | |
template<typename T > | |
struct | SubmeshComponentAdder |
class | BinaryWriter< Submesh > |
class | BinaryParser< Submesh > |
|
explicit |
Constructeur.
[in] | mesh | Le mesh parent. |
[in] | id | L'ID du sous-maillage. |
[in] | flags | Les indicateur du sous-maillage. |
C3D_API castor3d::Submesh::~Submesh | ( | ) |
Destructeur.
|
inline |
|
inline |
C3D_API InterleavedVertex castor3d::Submesh::addPoint | ( | castor::Point3f const & | value | ) |
Crée un Vertex à partir du point donné et l'ajoute à la liste.
[in] | value | Le point |
C3D_API InterleavedVertex castor3d::Submesh::addPoint | ( | float * | value | ) |
Crée un Vertex à partir des coordonnées données et l'ajoute à la liste.
[in] | value | Les coordonnées du point |
C3D_API InterleavedVertex castor3d::Submesh::addPoint | ( | float | x, |
float | y, | ||
float | z | ||
) |
Crée un Vertex à partir des coordonnées données et l'ajoute à la liste.
[in] | x | Coordonnée X |
[in] | y | Coordonnée Y |
[in] | z | Coordonnée Y |
C3D_API void castor3d::Submesh::addPoint | ( | InterleavedVertex const & | value | ) |
Ajoute un sommet à la liste.
[in] | value | Le sommet. |
C3D_API void castor3d::Submesh::addPoints | ( | InterleavedVertex const *const | begin, |
InterleavedVertex const *const | end | ||
) |
Ajoute des points à la liste.
[in] | begin | Le début des données de sommets. |
[in] | end | La fin des données de sommets. |
|
inline |
|
inline |
C3D_API void castor3d::Submesh::cleanup | ( | RenderDevice const & | device | ) |
Nettoie le sous-maillage.
[in] | device | Le périphérique de rendu. |
C3D_API void castor3d::Submesh::computeContainers | ( | ) |
Calcule les conteneurs (cube et sphère)
C3D_API void castor3d::Submesh::computeNormals | ( | bool | reverted = false | ) |
Génère les normales et les tangentes.
[in] | reverted | true pour inverser les normales. |
|
inline |
|
inline |
C3D_API void castor3d::Submesh::enableSceneUpdate | ( | bool | updateScene | ) |
Active la mise à jour de la scène en cas de modification.
name Mutateurs.
[in] | updateScene | Dit si cet appel déclenche une mise à jour de la scène. |
C3D_API castor::Point3fArray & castor3d::Submesh::getBaseData | ( | SubmeshData | submeshData | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getBaseData | ( | SubmeshData | submeshData | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
C3D_API castor::Point3fArray & castor3d::Submesh::getColours | ( | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getColours | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
C3D_API uint32_t castor3d::Submesh::getFaceCount | ( | ) | const |
C3D_API ObjectBufferOffset const & castor3d::Submesh::getFinalBufferOffsets | ( | Geometry const & | instance | ) | const |
C3D_API GpuBufferOffsetT< MeshletCullData > const & castor3d::Submesh::getFinalMeshletsBounds | ( | Geometry const & | instance | ) | const |
|
inline |
C3D_API GeometryBuffers const & castor3d::Submesh::getGeometryBuffers | ( | SubmeshRenderNode const & | node, |
PipelineFlags const & | flags | ||
) | const |
[in] | node | Le noeud de rendu utilisant ce sous-maillage. |
[in] | flags | Les indicateurs de pipeline. |
|
inline |
|
inline |
C3D_API VkDeviceSize castor3d::Submesh::getIndexOffset | ( | ) | const |
|
inline |
|
inline |
C3D_API InterleavedVertex castor3d::Submesh::getInterleavedPoint | ( | uint32_t | index | ) | const |
name Accesseurs.
C3D_API VkDeviceSize castor3d::Submesh::getMeshletOffset | ( | ) | const |
C3D_API GpuBufferOffsetT< Meshlet > const & castor3d::Submesh::getMeshletsBuffer | ( | ) | const |
C3D_API uint32_t castor3d::Submesh::getMeshletsCount | ( | ) | const |
C3D_API MorphFlags castor3d::Submesh::getMorphFlags | ( | ) | const |
C3D_API GpuBufferOffsetT< castor::Point4f > const & castor3d::Submesh::getMorphTargets | ( | ) | const |
C3D_API uint32_t castor3d::Submesh::getMorphTargetsCount | ( | ) | const |
C3D_API castor::Point3fArray & castor3d::Submesh::getNormals | ( | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getNormals | ( | ) | const |
|
inline |
|
inline |
C3D_API uint32_t castor3d::Submesh::getPointsCount | ( | ) | const |
C3D_API castor::Point3fArray & castor3d::Submesh::getPositions | ( | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getPositions | ( | ) | const |
C3D_API ProgramFlags castor3d::Submesh::getProgramFlags | ( | Material const & | material | ) | const |
[in] | material | Le matériau pour lequel on veut les indicateurs. |
|
inline |
C3D_API ObjectBufferOffset const & castor3d::Submesh::getSourceBufferOffsets | ( | ) | const |
C3D_API GpuBufferOffsetT< MeshletCullData > const & castor3d::Submesh::getSourceMeshletsBounds | ( | ) | const |
C3D_API SubmeshFlags castor3d::Submesh::getSubmeshFlags | ( | Pass const * | pass | ) | const |
[in] | pass | La passe pour laquelle on veut les indicateurs. |
C3D_API castor::Point3fArray & castor3d::Submesh::getTangents | ( | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getTangents | ( | ) | const |
C3D_API castor::Point3fArray & castor3d::Submesh::getTexcoords0 | ( | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getTexcoords0 | ( | ) | const |
C3D_API castor::Point3fArray & castor3d::Submesh::getTexcoords1 | ( | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getTexcoords1 | ( | ) | const |
C3D_API castor::Point3fArray & castor3d::Submesh::getTexcoords2 | ( | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getTexcoords2 | ( | ) | const |
C3D_API castor::Point3fArray & castor3d::Submesh::getTexcoords3 | ( | ) |
C3D_API castor::Point3fArray const & castor3d::Submesh::getTexcoords3 | ( | ) | const |
|
inline |
|
inline |
C3D_API bool castor3d::Submesh::hasMorphComponent | ( | ) | const |
C3D_API bool castor3d::Submesh::hasSkinComponent | ( | ) | const |
C3D_API void castor3d::Submesh::initialise | ( | RenderDevice const & | device | ) |
Initialise le sous-maillage.
[in] | device | Le périphérique de rendu. |
C3D_API void castor3d::Submesh::instantiate | ( | Geometry const * | geometry, |
MaterialObs | oldMaterial, | ||
MaterialObs | newMaterial, | ||
bool | update | ||
) |
Instancie le submesh avec une géométrie et son matériau.
[in] | geometry | La géométrie instantiant le submesh. |
[in] | oldMaterial | Le matériau précédent. |
[in] | newMaterial | Le nouveau matériau. |
[in] | update | Dit si le composant d'instantiation doit être mis à jour. |
C3D_API bool castor3d::Submesh::isAnimated | ( | ) | const |
C3D_API bool castor3d::Submesh::isDynamic | ( | ) | const |
|
inline |
C3D_API int castor3d::Submesh::isInMyPoints | ( | castor::Point3f const & | position, |
double | precision | ||
) |
Teste si le point donné fait partie de ceux de ce sous-maillage.
[in] | position | Le point à tester |
[in] | precision | La précision de comparaison |
|
inline |
C3D_API void castor3d::Submesh::setBaseData | ( | SubmeshData | submeshData, |
castor::Point3fArray | data | ||
) |
|
inline |
|
inline |
|
inline |
C3D_API void castor3d::Submesh::update | ( | ) |
Met à jour les tampons.
C3D_API void castor3d::Submesh::updateContainers | ( | castor::BoundingBox const & | boundingBox | ) |
Met à jour les conteneurs depuis la bounding box donnée.
|
friend |
|
friend |
|
friend |