Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::TriFaceMapping::ComponentData Struct Reference

#include <TriFaceMapping.hpp>

Inheritance diagram for castor3d::TriFaceMapping::ComponentData:
Inheritance graph
[legend]
Collaboration diagram for castor3d::TriFaceMapping::ComponentData:
Collaboration graph
[legend]

Public Member Functions

 ComponentData (Submesh &submesh, VkBufferUsageFlags bufferUsageFlags)
 
void copy (SubmeshComponentDataRPtr data) const override
 Copies given component's data into this one.
 
C3D_API void clearFaces ()
 Clears this submesh's face array.
 
C3D_API Face addFace (uint32_t a, uint32_t b, uint32_t c)
 Creates and adds a face to the submesh.
 
C3D_API void addFaceGroup (FaceIndices const *const begin, FaceIndices const *const end)
 Creates and adds faces to the submesh.
 
C3D_API void addQuadFace (uint32_t a, uint32_t b, uint32_t c, uint32_t d, castor::Point3f const &minUV=castor::Point3f(), castor::Point3f const &maxUV=castor::Point3f(1, 1, 1))
 Creates and adds a quad face to the submesh.
 
void addFaceGroup (castor::Vector< FaceIndices > const &faces)
 Creates and adds faces to the submesh.
 
template<size_t Count>
void addFaceGroup (castor::Array< FaceIndices, Count > const &faces)
 Creates and adds faces to the submesh.
 
template<uint32_t Count>
void addFaceGroup (FaceIndices(&faces)[Count])
 Creates and adds faces to the submesh.
 
Face const & operator[] (uint32_t index) const
 
FaceArray const & getFaces () const
 
FaceArray & getFaces ()
 
void setData (FaceArray faces)
 
uint32_t getCount () const noexcept
 
bool hasNormals () const noexcept
 
void setHasNormals () noexcept
 
- Public Member Functions inherited from castor3d::IndexMapping::ComponentData
 ComponentData (Submesh &submesh, VkBufferUsageFlags bufferUsageFlags)
 
void gather (PipelineFlags const &flags, Pass const &pass, ObjectBufferOffset const &bufferOffsets, ashes::BufferCRefArray &buffers, castor::Vector< uint64_t > &offsets, ashes::PipelineVertexInputStateCreateInfoCRefArray &layouts, uint32_t &currentBinding, uint32_t &currentLocation) override final
 Gathers buffers that need to go in a vertex layout.
 
VkBufferUsageFlags getUsageFlags () const noexcept override
 
- Public Member Functions inherited from castor3d::SubmeshComponentData
C3D_API SubmeshComponentData (Submesh &submesh)
 
C3D_API bool initialise (RenderDevice const &device)
 Initialises the submesh.
 
C3D_API void cleanup (RenderDevice const &device)
 Cleans the submesh.
 
C3D_API void upload (UploadData &uploader)
 Uploads data on VRAM.
 
void needsUpdate ()
 
- Public Member Functions inherited from castor3d::SubmeshSubComponent
 SubmeshSubComponent ()=default
 
 SubmeshSubComponent (SubmeshSubComponent const &)=delete
 
SubmeshSubComponentoperator= (SubmeshSubComponent const &)=delete
 
C3D_API SubmeshSubComponent (SubmeshSubComponent &&) noexcept=default
 
C3D_API SubmeshSubComponentoperator= (SubmeshSubComponent &&) noexcept=default
 
virtual C3D_API ~SubmeshSubComponent () noexcept=default
 

Additional Inherited Members

- Protected Attributes inherited from castor3d::SubmeshComponentData
Submeshm_submesh
 

Constructor & Destructor Documentation

◆ ComponentData()

castor3d::TriFaceMapping::ComponentData::ComponentData ( Submesh & submesh,
VkBufferUsageFlags bufferUsageFlags )
inlineexplicit

Member Function Documentation

◆ addFace()

C3D_API Face castor3d::TriFaceMapping::ComponentData::addFace ( uint32_t a,
uint32_t b,
uint32_t c )

Creates and adds a face to the submesh.

Parameters
[in]aThe first face's vertex index.
[in]bThe second face's vertex index.
[in]cThe third face's vertex index.
Returns
The created face.

◆ addFaceGroup() [1/4]

template<size_t Count>
void castor3d::TriFaceMapping::ComponentData::addFaceGroup ( castor::Array< FaceIndices, Count > const & faces)
inline

Creates and adds faces to the submesh.

Parameters
[in]facesThe faces.

References addFaceGroup().

Here is the call graph for this function:

◆ addFaceGroup() [2/4]

void castor3d::TriFaceMapping::ComponentData::addFaceGroup ( castor::Vector< FaceIndices > const & faces)
inline

Creates and adds faces to the submesh.

Parameters
[in]facesThe faces.

References addFaceGroup().

Here is the call graph for this function:

◆ addFaceGroup() [3/4]

C3D_API void castor3d::TriFaceMapping::ComponentData::addFaceGroup ( FaceIndices const *const begin,
FaceIndices const *const end )

Creates and adds faces to the submesh.

Parameters
[in]beginThe faces data begin.
[in]endThe faces data end.

Referenced by addFaceGroup(), addFaceGroup(), and addFaceGroup().

Here is the caller graph for this function:

◆ addFaceGroup() [4/4]

template<uint32_t Count>
void castor3d::TriFaceMapping::ComponentData::addFaceGroup ( FaceIndices(&) faces[Count])
inline

Creates and adds faces to the submesh.

Parameters
[in]facesThe faces.

References addFaceGroup().

Here is the call graph for this function:

◆ addQuadFace()

C3D_API void castor3d::TriFaceMapping::ComponentData::addQuadFace ( uint32_t a,
uint32_t b,
uint32_t c,
uint32_t d,
castor::Point3f const & minUV = castor::Point3f(),
castor::Point3f const & maxUV = castor::Point3f(1, 1, 1) )

Creates and adds a quad face to the submesh.

Parameters
[in]aThe first face's vertex index.
[in]bThe second face's vertex index.
[in]cThe third face's vertex index.
[in]dThe fourth face's vertex index.
[in]minUVThe UV of the bottom left corner.
[in]maxUVThe UV of the top right corner.

◆ clearFaces()

C3D_API void castor3d::TriFaceMapping::ComponentData::clearFaces ( )

Clears this submesh's face array.

◆ copy()

void castor3d::TriFaceMapping::ComponentData::copy ( SubmeshComponentDataRPtr data) const
overridevirtual

Copies given component's data into this one.

Parameters
[in,out]dataThe source component's data.

Implements castor3d::SubmeshComponentData.

◆ getCount()

uint32_t castor3d::TriFaceMapping::ComponentData::getCount ( ) const
inlinenoexcept

◆ getFaces() [1/2]

FaceArray & castor3d::TriFaceMapping::ComponentData::getFaces ( )
inline

◆ getFaces() [2/2]

FaceArray const & castor3d::TriFaceMapping::ComponentData::getFaces ( ) const
inline

◆ hasNormals()

bool castor3d::TriFaceMapping::ComponentData::hasNormals ( ) const
inlinenoexcept

◆ operator[]()

Face const & castor3d::TriFaceMapping::ComponentData::operator[] ( uint32_t index) const
inline

References CU_Require.

◆ setData()

void castor3d::TriFaceMapping::ComponentData::setData ( FaceArray faces)
inline

◆ setHasNormals()

void castor3d::TriFaceMapping::ComponentData::setHasNormals ( )
inlinenoexcept

The documentation for this struct was generated from the following file: