Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
jpp::scene::SSharedMeshBuffer Class Reference

Implementation of the IMeshBuffer interface with shared vertex list. More...

#include <jimcpp/core/engine/SSharedMeshBuffer.hpp>

Inheritance diagram for jpp::scene::SSharedMeshBuffer:
Inheritance graph
Collaboration diagram for jpp::scene::SSharedMeshBuffer:
Collaboration graph

Public Member Functions

 SSharedMeshBuffer ()
 constructor
 
 SSharedMeshBuffer (core::array< video::S3DVertex > *vertices)
 constructor
 
virtual const video::SMaterialgetMaterial () const override
 returns the material of this meshbuffer
 
virtual video::SMaterialgetMaterial () override
 returns the material of this meshbuffer
 
virtual const void * getVertices () const override
 returns pointer to vertices
 
virtual void * getVertices () override
 returns pointer to vertices
 
virtual u32 getVertexCount () const override
 returns amount of vertices
 
virtual const u16getIndices () const override
 returns pointer to indices
 
virtual u16getIndices () override
 returns pointer to indices
 
virtual u32 getIndexCount () const override
 returns amount of indices
 
virtual video::E_INDEX_TYPE getIndexType () const override
 Get type of index data which is stored in this meshbuffer.
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const override
 returns an axis aligned bounding box
 
virtual void setBoundingBox (const core::aabbox3df &box) override
 set user axis aligned bounding box
 
virtual video::E_VERTEX_TYPE getVertexType () const override
 returns which type of vertex data is stored.
 
virtual void recalculateBoundingBox () override
 recalculates the bounding box. should be called if the mesh changed.
 
virtual const core::vector3dfgetPosition (u32 i) const override
 returns position of vertex i
 
virtual core::vector3dfgetPosition (u32 i) override
 returns position of vertex i
 
virtual const core::vector3dfgetNormal (u32 i) const override
 returns normal of vertex i
 
virtual core::vector3dfgetNormal (u32 i) override
 returns normal of vertex i
 
virtual const core::vector2dfgetTCoords (u32 i) const override
 returns texture coord of vertex i
 
virtual core::vector2dfgetTCoords (u32 i) override
 returns texture coord of vertex i
 
virtual video::SColorgetColor (u32 i) override
 returns color of vertex i
 
virtual const video::SColorgetColor (u32 i) const override
 returns color of vertex i
 
virtual void append (const void *const vertices, u32 numVertices, const u16 *const indices, u32 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
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index () const override
 get the current hardware mapping hint
 
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 u32 getChangedID_Vertex () const override
 Get the currently used ID for identification of changes.
 
virtual u32 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.
 
- Public Member Functions inherited from jpp::scene::IMeshBuffer
virtual u32 getPrimitiveCount () const
 Calculate how many geometric primitives are used by this meshbuffer.
 
- Public Member Functions inherited from jpp::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.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Public Attributes

video::SMaterial Material
 Material of this meshBuffer.
 
core::array< video::S3DVertex > * Vertices
 Shared Array of vertices.
 
core::array< u16Indices
 Array of indices.
 
u32 ChangedID_Vertex
 ID used for hardware buffer management.
 
u32 ChangedID_Index
 ID used for hardware buffer management.
 
core::aabbox3df BoundingBox
 Bounding box.
 
E_HARDWARE_MAPPING MappingHintVertex
 hardware mapping hint
 
E_HARDWARE_MAPPING MappingHintIndex
 
E_PRIMITIVE_TYPE PrimitiveType
 Primitive type used for rendering (triangles, lines, ...)
 

Additional Inherited Members

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

Detailed Description

Implementation of the IMeshBuffer interface with shared vertex list.

Member Function Documentation

◆ append() [1/2]

virtual void jpp::scene::SSharedMeshBuffer::append ( const IMeshBuffer *const  other)
inlineoverridevirtual

append the meshbuffer to the current buffer

Implements jpp::scene::IMeshBuffer.

◆ append() [2/2]

virtual void jpp::scene::SSharedMeshBuffer::append ( const void *const  vertices,
u32  numVertices,
const u16 *const  indices,
u32  numIndices 
)
inlineoverridevirtual

append the vertices and indices to the current buffer

Implements jpp::scene::IMeshBuffer.

◆ createClone()

virtual IMeshBuffer * jpp::scene::SSharedMeshBuffer::createClone ( int  cloneFlags) const
inlineoverridevirtual

Create copy of the meshbuffer.

Implements jpp::scene::IMeshBuffer.

◆ getBoundingBox()

virtual const core::aabbox3d< f32 > & jpp::scene::SSharedMeshBuffer::getBoundingBox ( ) const
inlineoverridevirtual

returns an axis aligned bounding box

Implements jpp::scene::IMeshBuffer.

◆ getChangedID_Index()

virtual u32 jpp::scene::SSharedMeshBuffer::getChangedID_Index ( ) const
inlineoverridevirtual

Get the currently used ID for identification of changes.

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

Implements jpp::scene::IMeshBuffer.

◆ getChangedID_Vertex()

virtual u32 jpp::scene::SSharedMeshBuffer::getChangedID_Vertex ( ) const
inlineoverridevirtual

Get the currently used ID for identification of changes.

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

Implements jpp::scene::IMeshBuffer.

◆ getColor() [1/2]

virtual const video::SColor & jpp::scene::SSharedMeshBuffer::getColor ( u32  i) const
inlineoverridevirtual

returns color of vertex i

Implements jpp::scene::IMeshBuffer.

◆ getColor() [2/2]

virtual video::SColor & jpp::scene::SSharedMeshBuffer::getColor ( u32  i)
inlineoverridevirtual

returns color of vertex i

Implements jpp::scene::IMeshBuffer.

◆ getHardwareMappingHint_Index()

virtual E_HARDWARE_MAPPING jpp::scene::SSharedMeshBuffer::getHardwareMappingHint_Index ( ) const
inlineoverridevirtual

get the current hardware mapping hint

Implements jpp::scene::IMeshBuffer.

◆ getHardwareMappingHint_Vertex()

virtual E_HARDWARE_MAPPING jpp::scene::SSharedMeshBuffer::getHardwareMappingHint_Vertex ( ) const
inlineoverridevirtual

get the current hardware mapping hint

Implements jpp::scene::IMeshBuffer.

◆ getIndexCount()

virtual u32 jpp::scene::SSharedMeshBuffer::getIndexCount ( ) const
inlineoverridevirtual

returns amount of indices

Implements jpp::scene::IMeshBuffer.

◆ getIndexType()

virtual video::E_INDEX_TYPE jpp::scene::SSharedMeshBuffer::getIndexType ( ) const
inlineoverridevirtual

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

Implements jpp::scene::IMeshBuffer.

◆ getIndices() [1/2]

virtual const u16 * jpp::scene::SSharedMeshBuffer::getIndices ( ) const
inlineoverridevirtual

returns pointer to indices

Implements jpp::scene::IMeshBuffer.

◆ getIndices() [2/2]

virtual u16 * jpp::scene::SSharedMeshBuffer::getIndices ( )
inlineoverridevirtual

returns pointer to indices

Implements jpp::scene::IMeshBuffer.

◆ getMaterial() [1/2]

virtual const video::SMaterial & jpp::scene::SSharedMeshBuffer::getMaterial ( ) const
inlineoverridevirtual

returns the material of this meshbuffer

Implements jpp::scene::IMeshBuffer.

◆ getMaterial() [2/2]

virtual video::SMaterial & jpp::scene::SSharedMeshBuffer::getMaterial ( )
inlineoverridevirtual

returns the material of this meshbuffer

Implements jpp::scene::IMeshBuffer.

◆ getNormal() [1/2]

virtual const core::vector3df & jpp::scene::SSharedMeshBuffer::getNormal ( u32  i) const
inlineoverridevirtual

returns normal of vertex i

Implements jpp::scene::IMeshBuffer.

◆ getNormal() [2/2]

virtual core::vector3df & jpp::scene::SSharedMeshBuffer::getNormal ( u32  i)
inlineoverridevirtual

returns normal of vertex i

Implements jpp::scene::IMeshBuffer.

◆ getPosition() [1/2]

virtual const core::vector3df & jpp::scene::SSharedMeshBuffer::getPosition ( u32  i) const
inlineoverridevirtual

returns position of vertex i

Implements jpp::scene::IMeshBuffer.

◆ getPosition() [2/2]

virtual core::vector3df & jpp::scene::SSharedMeshBuffer::getPosition ( u32  i)
inlineoverridevirtual

returns position of vertex i

Implements jpp::scene::IMeshBuffer.

◆ getPrimitiveType()

virtual E_PRIMITIVE_TYPE jpp::scene::SSharedMeshBuffer::getPrimitiveType ( ) const
inlineoverridevirtual

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

Implements jpp::scene::IMeshBuffer.

◆ getTCoords() [1/2]

virtual const core::vector2df & jpp::scene::SSharedMeshBuffer::getTCoords ( u32  i) const
inlineoverridevirtual

returns texture coord of vertex i

Implements jpp::scene::IMeshBuffer.

◆ getTCoords() [2/2]

virtual core::vector2df & jpp::scene::SSharedMeshBuffer::getTCoords ( u32  i)
inlineoverridevirtual

returns texture coord of vertex i

Implements jpp::scene::IMeshBuffer.

◆ getType()

virtual EMESH_BUFFER_TYPE jpp::scene::SSharedMeshBuffer::getType ( ) const
inlineoverridevirtual

Returns type of the class implementing the IMeshBuffer.

Reimplemented from jpp::scene::IMeshBuffer.

◆ getVertexCount()

virtual u32 jpp::scene::SSharedMeshBuffer::getVertexCount ( ) const
inlineoverridevirtual

returns amount of vertices

Implements jpp::scene::IMeshBuffer.

◆ getVertexType()

virtual video::E_VERTEX_TYPE jpp::scene::SSharedMeshBuffer::getVertexType ( ) const
inlineoverridevirtual

returns which type of vertex data is stored.

Implements jpp::scene::IMeshBuffer.

◆ getVertices() [1/2]

virtual const void * jpp::scene::SSharedMeshBuffer::getVertices ( ) const
inlineoverridevirtual

returns pointer to vertices

Implements jpp::scene::IMeshBuffer.

◆ getVertices() [2/2]

virtual void * jpp::scene::SSharedMeshBuffer::getVertices ( )
inlineoverridevirtual

returns pointer to vertices

Implements jpp::scene::IMeshBuffer.

◆ recalculateBoundingBox()

virtual void jpp::scene::SSharedMeshBuffer::recalculateBoundingBox ( )
inlineoverridevirtual

recalculates the bounding box. should be called if the mesh changed.

Implements jpp::scene::IMeshBuffer.

◆ setBoundingBox()

virtual void jpp::scene::SSharedMeshBuffer::setBoundingBox ( const core::aabbox3df box)
inlineoverridevirtual

set user axis aligned bounding box

Implements jpp::scene::IMeshBuffer.

◆ setDirty()

virtual void jpp::scene::SSharedMeshBuffer::setDirty ( E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX)
inlineoverridevirtual

flags the mesh as changed, reloads hardware buffers

Implements jpp::scene::IMeshBuffer.

◆ setHardwareMappingHint()

virtual void jpp::scene::SSharedMeshBuffer::setHardwareMappingHint ( E_HARDWARE_MAPPING  NewMappingHint,
E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX 
)
inlineoverridevirtual

set the hardware mapping hint, for driver

Implements jpp::scene::IMeshBuffer.

◆ setPrimitiveType()

virtual void jpp::scene::SSharedMeshBuffer::setPrimitiveType ( E_PRIMITIVE_TYPE  type)
inlineoverridevirtual

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

Implements jpp::scene::IMeshBuffer.


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

Jimcpp    @cppfx.xyz

K