Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::scene::SSkinMeshBuffer Class Reference

A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime. More...

#include <duckcpp/core/engine/SSkinMeshBuffer.hpp>

Inheritance diagram for dcpp::scene::SSkinMeshBuffer:
Inheritance graph
Collaboration diagram for dcpp::scene::SSkinMeshBuffer:
Collaboration graph

Public Member Functions

 SSkinMeshBuffer (dcpp::video::E_VERTEX_TYPE vt=dcpp::video::EVT_STANDARD)
 Default constructor.
 
virtual const dcpp::video::SMaterialgetMaterial () const override
 Get Material of this buffer.
 
virtual dcpp::video::SMaterialgetMaterial () override
 Get Material of this buffer.
 
virtual dcpp::video::S3DVertexgetVertex (dcpp::uint32_kt index)
 Get standard vertex at given index.
 
virtual const void * getVertices () const override
 Get pointer to vertex array.
 
virtual void * getVertices () override
 Get pointer to vertex array.
 
virtual dcpp::uint32_kt getVertexCount () const override
 Get vertex count.
 
virtual dcpp::video::E_INDEX_TYPE getIndexType () const override
 Get type of index data which is stored in this meshbuffer.
 
virtual const dcpp::uint16_ktgetIndices () const override
 Get pointer to index array.
 
virtual dcpp::uint16_ktgetIndices () override
 Get pointer to index array.
 
virtual dcpp::uint32_kt getIndexCount () const override
 Get index count.
 
virtual const dcpp::nub::aabbox3dfgetBoundingBox () const override
 Get bounding box.
 
virtual void setBoundingBox (const dcpp::nub::aabbox3df &box) override
 Set bounding box.
 
virtual void recalculateBoundingBox () override
 Recalculate bounding box.
 
virtual dcpp::video::E_VERTEX_TYPE getVertexType () const override
 Get vertex type.
 
void convertTo2TCoords ()
 Convert to 2tcoords vertex type.
 
void convertToTangents ()
 Convert to tangents vertex type.
 
virtual const dcpp::nub::vector3dfgetPosition (dcpp::uint32_kt i) const override
 returns position of vertex i
 
virtual dcpp::nub::vector3dfgetPosition (dcpp::uint32_kt i) override
 returns position of vertex i
 
virtual const dcpp::nub::vector3dfgetNormal (dcpp::uint32_kt i) const override
 returns normal of vertex i
 
virtual dcpp::nub::vector3dfgetNormal (dcpp::uint32_kt i) override
 returns normal of vertex i
 
virtual const dcpp::nub::vector2dfgetTCoords (dcpp::uint32_kt i) const override
 returns texture coords of vertex i
 
virtual dcpp::nub::vector2dfgetTCoords (dcpp::uint32_kt i) override
 returns texture coords of vertex i
 
virtual dcpp::video::SColorgetColor (dcpp::uint32_kt i) override
 returns color of vertex i
 
virtual const dcpp::video::SColorgetColor (dcpp::uint32_kt i) const override
 returns color of vertex i
 
virtual void append (const void *const vertices, dcpp::uint32_kt numVertices, const dcpp::uint16_kt *const indices, dcpp::uint32_kt numIndices) override
 append the vertices and indices to the current buffer
 
virtual void append (const IMeshBuffer *const other) override
 append the meshbuffer to the current buffer
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex () const override
 get the current hardware mapping hint for vertex buffers
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index () const override
 get the current hardware mapping hint for index buffers
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) override
 set the hardware mapping hint, for driver
 
virtual void setPrimitiveType (E_PRIMITIVE_TYPE type) override
 Describe what kind of primitive geometry is used by the meshbuffer.
 
virtual E_PRIMITIVE_TYPE getPrimitiveType () const override
 Get the kind of primitive geometry which is used by the meshbuffer.
 
virtual void setDirty (E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) override
 flags the mesh as changed, reloads hardware buffers
 
virtual dcpp::uint32_kt getChangedID_Vertex () const override
 Get the currently used ID for identification of changes.
 
virtual dcpp::uint32_kt getChangedID_Index () const override
 Get the currently used ID for identification of changes.
 
virtual EMESH_BUFFER_TYPE getType () const override
 Returns type of the class implementing the IMeshBuffer.
 
virtual IMeshBuffercreateClone (int cloneFlags) const override
 Create copy of the meshbuffer.
 
void boundingBoxNeedsRecalculated (void)
 Call this after changing the positions of any vertex.
 
- Public Member Functions inherited from dcpp::scene::IMeshBuffer
virtual dcpp::uint32_kt getPrimitiveCount () const
 Calculate how many geometric primitives are used by this meshbuffer.
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
dcpp::int32_kt getReferenceCount () const
 Get the reference count.
 
const dcpp::char_ktgetDebugName () const
 Returns the debug name of the object.
 

Public Attributes

dcpp::nub::array< dcpp::video::S3DVertexTangentsVertices_Tangents
 
dcpp::nub::array< dcpp::video::S3DVertex2TCoordsVertices_2TCoords
 
dcpp::nub::array< dcpp::video::S3DVertexVertices_Standard
 
dcpp::nub::array< dcpp::uint16_ktIndices
 
dcpp::uint32_kt ChangedID_Vertex
 
dcpp::uint32_kt ChangedID_Index
 
dcpp::nub::matrix4 Transformation
 
dcpp::video::SMaterial Material
 
dcpp::video::E_VERTEX_TYPE VertexType
 
dcpp::nub::aabbox3df BoundingBox
 
E_PRIMITIVE_TYPE PrimitiveType
 Primitive type used for rendering (triangles, lines, ...)
 
E_HARDWARE_MAPPING MappingHint_Vertex:3
 
E_HARDWARE_MAPPING MappingHint_Index:3
 
bool BoundingBoxNeedsRecalculated:1
 

Additional Inherited Members

- Public Types inherited from dcpp::scene::IMeshBuffer
enum  ECloneFlags { ECF_VERTICES = 1 , ECF_INDICES = 2 }
 Bitflags with options for cloning. More...
 
- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const dcpp::char_kt *newName)
 Sets the debug name of the object.
 

Detailed Description

A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime.

Member Function Documentation

◆ append() [1/2]

virtual void dcpp::scene::SSkinMeshBuffer::append ( const IMeshBuffer *const  other)
inlineoverridevirtual

append the meshbuffer to the current buffer

Implements dcpp::scene::IMeshBuffer.

◆ append() [2/2]

virtual void dcpp::scene::SSkinMeshBuffer::append ( const void *const  vertices,
dcpp::uint32_kt  numVertices,
const dcpp::uint16_kt *const  indices,
dcpp::uint32_kt  numIndices 
)
inlineoverridevirtual

append the vertices and indices to the current buffer

Implements dcpp::scene::IMeshBuffer.

◆ createClone()

virtual IMeshBuffer * dcpp::scene::SSkinMeshBuffer::createClone ( int  cloneFlags) const
inlineoverridevirtual

Create copy of the meshbuffer.

Implements dcpp::scene::IMeshBuffer.

◆ getBoundingBox()

virtual const dcpp::nub::aabbox3df & dcpp::scene::SSkinMeshBuffer::getBoundingBox ( ) const
inlineoverridevirtual

Get bounding box.

Implements dcpp::scene::IMeshBuffer.

◆ getChangedID_Index()

virtual dcpp::uint32_kt dcpp::scene::SSkinMeshBuffer::getChangedID_Index ( ) const
inlineoverridevirtual

Get the currently used ID for identification of changes.

This shouldn't be used for anything outside the VideoDriver.

Implements dcpp::scene::IMeshBuffer.

◆ getChangedID_Vertex()

virtual dcpp::uint32_kt dcpp::scene::SSkinMeshBuffer::getChangedID_Vertex ( ) const
inlineoverridevirtual

Get the currently used ID for identification of changes.

This shouldn't be used for anything outside the VideoDriver.

Implements dcpp::scene::IMeshBuffer.

◆ getColor() [1/2]

virtual const dcpp::video::SColor & dcpp::scene::SSkinMeshBuffer::getColor ( dcpp::uint32_kt  i) const
inlineoverridevirtual

returns color of vertex i

Implements dcpp::scene::IMeshBuffer.

◆ getColor() [2/2]

virtual dcpp::video::SColor & dcpp::scene::SSkinMeshBuffer::getColor ( dcpp::uint32_kt  i)
inlineoverridevirtual

returns color of vertex i

Implements dcpp::scene::IMeshBuffer.

◆ getHardwareMappingHint_Index()

virtual E_HARDWARE_MAPPING dcpp::scene::SSkinMeshBuffer::getHardwareMappingHint_Index ( ) const
inlineoverridevirtual

get the current hardware mapping hint for index buffers

Implements dcpp::scene::IMeshBuffer.

◆ getHardwareMappingHint_Vertex()

virtual E_HARDWARE_MAPPING dcpp::scene::SSkinMeshBuffer::getHardwareMappingHint_Vertex ( ) const
inlineoverridevirtual

get the current hardware mapping hint for vertex buffers

Implements dcpp::scene::IMeshBuffer.

◆ getIndexCount()

virtual dcpp::uint32_kt dcpp::scene::SSkinMeshBuffer::getIndexCount ( ) const
inlineoverridevirtual

Get index count.

Implements dcpp::scene::IMeshBuffer.

◆ getIndexType()

virtual dcpp::video::E_INDEX_TYPE dcpp::scene::SSkinMeshBuffer::getIndexType ( ) const
inlineoverridevirtual

Get type of index data which is stored in this meshbuffer.

Returns
Index type of this buffer.

Implements dcpp::scene::IMeshBuffer.

◆ getIndices() [1/2]

virtual const dcpp::uint16_kt * dcpp::scene::SSkinMeshBuffer::getIndices ( ) const
inlineoverridevirtual

Get pointer to index array.

Implements dcpp::scene::IMeshBuffer.

◆ getIndices() [2/2]

virtual dcpp::uint16_kt * dcpp::scene::SSkinMeshBuffer::getIndices ( )
inlineoverridevirtual

Get pointer to index array.

Implements dcpp::scene::IMeshBuffer.

◆ getMaterial() [1/2]

virtual const dcpp::video::SMaterial & dcpp::scene::SSkinMeshBuffer::getMaterial ( ) const
inlineoverridevirtual

Get Material of this buffer.

Implements dcpp::scene::IMeshBuffer.

◆ getMaterial() [2/2]

virtual dcpp::video::SMaterial & dcpp::scene::SSkinMeshBuffer::getMaterial ( )
inlineoverridevirtual

Get Material of this buffer.

Implements dcpp::scene::IMeshBuffer.

◆ getNormal() [1/2]

virtual const dcpp::nub::vector3df & dcpp::scene::SSkinMeshBuffer::getNormal ( dcpp::uint32_kt  i) const
inlineoverridevirtual

returns normal of vertex i

Implements dcpp::scene::IMeshBuffer.

◆ getNormal() [2/2]

virtual dcpp::nub::vector3df & dcpp::scene::SSkinMeshBuffer::getNormal ( dcpp::uint32_kt  i)
inlineoverridevirtual

returns normal of vertex i

Implements dcpp::scene::IMeshBuffer.

◆ getPosition() [1/2]

virtual const dcpp::nub::vector3df & dcpp::scene::SSkinMeshBuffer::getPosition ( dcpp::uint32_kt  i) const
inlineoverridevirtual

returns position of vertex i

Implements dcpp::scene::IMeshBuffer.

◆ getPosition() [2/2]

virtual dcpp::nub::vector3df & dcpp::scene::SSkinMeshBuffer::getPosition ( dcpp::uint32_kt  i)
inlineoverridevirtual

returns position of vertex i

Implements dcpp::scene::IMeshBuffer.

◆ getPrimitiveType()

virtual E_PRIMITIVE_TYPE dcpp::scene::SSkinMeshBuffer::getPrimitiveType ( ) const
inlineoverridevirtual

Get the kind of primitive geometry which is used by the meshbuffer.

Implements dcpp::scene::IMeshBuffer.

◆ getTCoords() [1/2]

virtual const dcpp::nub::vector2df & dcpp::scene::SSkinMeshBuffer::getTCoords ( dcpp::uint32_kt  i) const
inlineoverridevirtual

returns texture coords of vertex i

Implements dcpp::scene::IMeshBuffer.

◆ getTCoords() [2/2]

virtual dcpp::nub::vector2df & dcpp::scene::SSkinMeshBuffer::getTCoords ( dcpp::uint32_kt  i)
inlineoverridevirtual

returns texture coords of vertex i

Implements dcpp::scene::IMeshBuffer.

◆ getType()

virtual EMESH_BUFFER_TYPE dcpp::scene::SSkinMeshBuffer::getType ( ) const
inlineoverridevirtual

Returns type of the class implementing the IMeshBuffer.

Reimplemented from dcpp::scene::IMeshBuffer.

◆ getVertexCount()

virtual dcpp::uint32_kt dcpp::scene::SSkinMeshBuffer::getVertexCount ( ) const
inlineoverridevirtual

Get vertex count.

Implements dcpp::scene::IMeshBuffer.

◆ getVertexType()

virtual dcpp::video::E_VERTEX_TYPE dcpp::scene::SSkinMeshBuffer::getVertexType ( ) const
inlineoverridevirtual

Get vertex type.

Implements dcpp::scene::IMeshBuffer.

◆ getVertices() [1/2]

virtual const void * dcpp::scene::SSkinMeshBuffer::getVertices ( ) const
inlineoverridevirtual

Get pointer to vertex array.

Implements dcpp::scene::IMeshBuffer.

◆ getVertices() [2/2]

virtual void * dcpp::scene::SSkinMeshBuffer::getVertices ( )
inlineoverridevirtual

Get pointer to vertex array.

Implements dcpp::scene::IMeshBuffer.

◆ recalculateBoundingBox()

virtual void dcpp::scene::SSkinMeshBuffer::recalculateBoundingBox ( )
inlineoverridevirtual

Recalculate bounding box.

Implements dcpp::scene::IMeshBuffer.

◆ setBoundingBox()

virtual void dcpp::scene::SSkinMeshBuffer::setBoundingBox ( const dcpp::nub::aabbox3df box)
inlineoverridevirtual

Set bounding box.

Implements dcpp::scene::IMeshBuffer.

◆ setDirty()

virtual void dcpp::scene::SSkinMeshBuffer::setDirty ( E_BUFFER_TYPE  Buffer = EBT_VERTEX_AND_INDEX)
inlineoverridevirtual

flags the mesh as changed, reloads hardware buffers

Implements dcpp::scene::IMeshBuffer.

◆ setHardwareMappingHint()

virtual void dcpp::scene::SSkinMeshBuffer::setHardwareMappingHint ( E_HARDWARE_MAPPING  NewMappingHint,
E_BUFFER_TYPE  Buffer = EBT_VERTEX_AND_INDEX 
)
inlineoverridevirtual

set the hardware mapping hint, for driver

Implements dcpp::scene::IMeshBuffer.

◆ setPrimitiveType()

virtual void dcpp::scene::SSkinMeshBuffer::setPrimitiveType ( E_PRIMITIVE_TYPE  type)
inlineoverridevirtual

Describe what kind of primitive geometry is used by the meshbuffer.

Implements dcpp::scene::IMeshBuffer.


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

Duckcpp    @cppfx.xyz