Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
jpp::scene::CVertexBuffer Class Reference
Inheritance diagram for jpp::scene::CVertexBuffer:
Inheritance graph
Collaboration diagram for jpp::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 jpp::scene::IVertexBuffer
virtual void * pointer ()
 Same as getData.
 
- 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

IVertexList * Vertices
 
E_HARDWARE_MAPPING MappingHint
 
u32 ChangedID
 

Additional Inherited Members

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

Member Function Documentation

◆ allocated_size()

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

◆ getChangedID()

virtual u32 jpp::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 jpp::scene::IVertexBuffer.

◆ getData() [1/2]

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

Const pointer to first element.

Implements jpp::scene::IVertexBuffer.

◆ getData() [2/2]

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

Pointer to first element of vertex data.

Implements jpp::scene::IVertexBuffer.

◆ getHardwareMappingHint()

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

get the current hardware mapping hint

Implements jpp::scene::IVertexBuffer.

◆ getLast()

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

◆ getType()

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

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

virtual video::S3DVertex & jpp::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 jpp::scene::IVertexBuffer.

◆ push_back() [1/3]

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

Add vertex to end.

Implements jpp::scene::IVertexBuffer.

◆ push_back() [2/3]

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

◆ push_back() [3/3]

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

◆ reallocate()

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

◆ set_used()

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

◆ setDirty()

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

flags the mesh as changed, reloads hardware buffers

Implements jpp::scene::IVertexBuffer.

◆ setHardwareMappingHint()

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

set the hardware mapping hint, for driver

Implements jpp::scene::IVertexBuffer.

◆ setType()

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

◆ setValue() [1/3]

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

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

Implements jpp::scene::IVertexBuffer.

◆ setValue() [2/3]

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

◆ setValue() [3/3]

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

◆ size()

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

Number of elements.

Implements jpp::scene::IVertexBuffer.

◆ stride()

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

Number of bytes per element.

Implements jpp::scene::IVertexBuffer.


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

Jimcpp    @cppfx.xyz

K