Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::scene::CVertexBuffer Class Reference
Inheritance diagram for nirt::scene::CVertexBuffer:
Inheritance graph
Collaboration diagram for nirt::scene::CVertexBuffer:
Collaboration graph

Public Member Functions

 CVertexBuffer (video::E_VERTEX_TYPE vertexType)
 
 CVertexBuffer (const IVertexBuffer &VertexBufferCopy)
 
virtual void setType (video::E_VERTEX_TYPE vertexType) override
 
virtual void * getData () override
 Pointer to first element of vertex data.
 
virtual const void * getData () const override
 Const pointer to first element.
 
virtual video::E_VERTEX_TYPE getType () const override
 
virtual u32 stride () const override
 Number of bytes per element.
 
virtual u32 size () const override
 Number of elements.
 
virtual void push_back (const video::S3DVertex &element) override
 Add vertex to end.
 
virtual void push_back (const video::S3DVertex2TCoords &element) override
 
virtual void push_back (const video::S3DVertexTangents &element) override
 
virtual void setValue (u32 index, const video::S3DVertex &value) override
 Set value at index. Buffer must be already large enough that element exists.
 
virtual void setValue (u32 index, const video::S3DVertex2TCoords &value) override
 
virtual void setValue (u32 index, const video::S3DVertexTangents &value) override
 
virtual video::S3DVertexoperator[] (u32 index) override
 Direct access to elements. Risky to use!
 
virtual video::S3DVertexoperator[] (const u32 index) const override
 
virtual video::S3DVertexgetLast () override
 
virtual void set_used (u32 usedNow) override
 
virtual void reallocate (u32 new_size, bool canShrink=true) override
 
virtual u32 allocated_size () const override
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint () const override
 get the current hardware mapping hint
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint) override
 set the hardware mapping hint, for driver
 
virtual void setDirty () override
 flags the mesh as changed, reloads hardware buffers
 
virtual u32 getChangedID () const override
 Get the currently used ID for identification of changes.
 
- Public Member Functions inherited from nirt::scene::IVertexBuffer
virtual void * pointer ()
 Same as getData.
 
- Public Member Functions inherited from nirt::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

IVertexList * Vertices
 
E_HARDWARE_MAPPING MappingHint
 
u32 ChangedID
 

Additional Inherited Members

- Protected Member Functions inherited from nirt::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Member Function Documentation

◆ allocated_size()

virtual u32 nirt::scene::CVertexBuffer::allocated_size ( ) const
inlineoverridevirtual

◆ getChangedID()

virtual u32 nirt::scene::CVertexBuffer::getChangedID ( ) const
inlineoverridevirtual

Get the currently used ID for identification of changes.

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

Implements nirt::scene::IVertexBuffer.

◆ getData() [1/2]

virtual const void * nirt::scene::CVertexBuffer::getData ( ) const
inlineoverridevirtual

Const pointer to first element.

Implements nirt::scene::IVertexBuffer.

◆ getData() [2/2]

virtual void * nirt::scene::CVertexBuffer::getData ( )
inlineoverridevirtual

Pointer to first element of vertex data.

Implements nirt::scene::IVertexBuffer.

◆ getHardwareMappingHint()

virtual E_HARDWARE_MAPPING nirt::scene::CVertexBuffer::getHardwareMappingHint ( ) const
inlineoverridevirtual

get the current hardware mapping hint

Implements nirt::scene::IVertexBuffer.

◆ getLast()

virtual video::S3DVertex & nirt::scene::CVertexBuffer::getLast ( )
inlineoverridevirtual

◆ getType()

virtual video::E_VERTEX_TYPE nirt::scene::CVertexBuffer::getType ( ) const
inlineoverridevirtual

◆ operator[]() [1/2]

virtual video::S3DVertex & nirt::scene::CVertexBuffer::operator[] ( const u32  index) const
inlineoverridevirtual

◆ operator[]() [2/2]

virtual video::S3DVertex & nirt::scene::CVertexBuffer::operator[] ( u32  index)
inlineoverridevirtual

Direct access to elements. Risky to use!

The reference must be cast to the correct type before use. It's only video::S3DVertex if getType is EVT_STANDARD. otherwise cast it first to a reference type derived from S3DVertex like S3DVertex2TCoords& or S3DVertexTangents&.

Implements nirt::scene::IVertexBuffer.

◆ push_back() [1/3]

virtual void nirt::scene::CVertexBuffer::push_back ( const video::S3DVertex element)
inlineoverridevirtual

Add vertex to end.

Implements nirt::scene::IVertexBuffer.

◆ push_back() [2/3]

virtual void nirt::scene::CVertexBuffer::push_back ( const video::S3DVertex2TCoords element)
inlineoverridevirtual

◆ push_back() [3/3]

virtual void nirt::scene::CVertexBuffer::push_back ( const video::S3DVertexTangents element)
inlineoverridevirtual

◆ reallocate()

virtual void nirt::scene::CVertexBuffer::reallocate ( u32  new_size,
bool  canShrink = true 
)
inlineoverridevirtual

◆ set_used()

virtual void nirt::scene::CVertexBuffer::set_used ( u32  usedNow)
inlineoverridevirtual

◆ setDirty()

virtual void nirt::scene::CVertexBuffer::setDirty ( )
inlineoverridevirtual

flags the mesh as changed, reloads hardware buffers

Implements nirt::scene::IVertexBuffer.

◆ setHardwareMappingHint()

virtual void nirt::scene::CVertexBuffer::setHardwareMappingHint ( E_HARDWARE_MAPPING  NewMappingHint)
inlineoverridevirtual

set the hardware mapping hint, for driver

Implements nirt::scene::IVertexBuffer.

◆ setType()

virtual void nirt::scene::CVertexBuffer::setType ( video::E_VERTEX_TYPE  vertexType)
inlineoverridevirtual

◆ setValue() [1/3]

virtual void nirt::scene::CVertexBuffer::setValue ( u32  index,
const video::S3DVertex value 
)
inlineoverridevirtual

Set value at index. Buffer must be already large enough that element exists.

Implements nirt::scene::IVertexBuffer.

◆ setValue() [2/3]

virtual void nirt::scene::CVertexBuffer::setValue ( u32  index,
const video::S3DVertex2TCoords value 
)
inlineoverridevirtual

◆ setValue() [3/3]

virtual void nirt::scene::CVertexBuffer::setValue ( u32  index,
const video::S3DVertexTangents value 
)
inlineoverridevirtual

◆ size()

virtual u32 nirt::scene::CVertexBuffer::size ( ) const
inlineoverridevirtual

Number of elements.

Implements nirt::scene::IVertexBuffer.

◆ stride()

virtual u32 nirt::scene::CVertexBuffer::stride ( ) const
inlineoverridevirtual

Number of bytes per element.

Implements nirt::scene::IVertexBuffer.


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

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print