public

Inheritance Graph

graph BT
	MeshVertexData
	click MeshVertexData "classRendering_1_1MeshVertexData"

Description

VertexData-Class. Part of the Mesh implementation containing all vertex specific data of a mesh:

  • VertexDescription : Data format of the vertices.

  • The local storage for the vertex data (If the data is uploaded to the graphics card, the local copy may be freed.)

  • The vertex buffer id, if the data has been uploaded to graphics memory.

  • A bounding box enclosing all vertices.

Public Functions

   
   
  MeshVertexData()
   
  MeshVertexData(const MeshVertexData & other)
   
  MeshVertexData( MeshVertexData && void)
   
  ~MeshVertexData()
   
MeshVertexData & operator=(const MeshVertexData & void)
   
MeshVertexData & operator=( MeshVertexData && void)
   
const VertexDescription & getVertexDescription() const
   
uint32_t getVertexCount() const
   
bool empty() const
   
void swap( MeshVertexData & other)
   
void allocate(uint32_t count, const VertexDescription & vd)
   
void releaseLocalData()
   
void markAsChanged()
   
bool hasChanged() const
   
bool hasLocalData() const
   
const uint8_t * data() const
   
uint8_t * data()
   
size_t dataSize() const
   
const uint8_t * operator[](uint32_t index) const
   
uint8_t * operator[](uint32_t index)
   
void updateBoundingBox()
   
const Geometry::Box & getBoundingBox() const
   
void _setBoundingBox(const Geometry::Box & box)
   
bool isUploaded() const
   
void bind( RenderingContext & context, bool useVBO)
   
void unbind( RenderingContext & context, bool useVBO)
   
bool upload()
Call* upload() *with default usage hint.
   
bool upload(uint32_t usageHint)
   
bool download()
   
void downloadTo(std::vector< uint8_t > & destination) const
   
void removeGlBuffer()
   
void drawArray( RenderingContext & context, bool useVBO, uint32_t drawMode, uint32_t startIndex, uint32_t numberOfElements)
   
void _swapBufferObject( BufferObject & other)
   
BufferObject & _getBufferObject()

Documentation

function
Rendering::MeshVertexData::MeshVertexData

public
   
   
MeshVertexData( )

Defined in Rendering/Mesh/MeshVertexData.h:50


function
Rendering::MeshVertexData::MeshVertexData

public
     
     
MeshVertexData( const MeshVertexData & other )

Copy all data fromother.

Note: If the other data is only available in the graphics card memory, this may only be called from within the gl-thread.

Defined in Rendering/Mesh/MeshVertexData.h:54


function
Rendering::MeshVertexData::MeshVertexData

public
     
     
MeshVertexData( MeshVertexData && void )

Defined in Rendering/Mesh/MeshVertexData.h:55


function
Rendering::MeshVertexData::~MeshVertexData

public
   
   
~MeshVertexData( )

Defined in Rendering/Mesh/MeshVertexData.h:57


function
Rendering::MeshVertexData::operator=

public
     
     
MeshVertexData & operator=( const MeshVertexData & void )

Defined in Rendering/Mesh/MeshVertexData.h:59


function
Rendering::MeshVertexData::operator=

public
     
     
MeshVertexData & operator=( MeshVertexData && void )

Defined in Rendering/Mesh/MeshVertexData.h:60


function
Rendering::MeshVertexData::getVertexDescription

public const inline
   
   
const VertexDescription & getVertexDescription( ) const

Defined in Rendering/Mesh/MeshVertexData.h:62


function
Rendering::MeshVertexData::getVertexCount

public const inline
   
   
uint32_t getVertexCount( ) const

Defined in Rendering/Mesh/MeshVertexData.h:63


function
Rendering::MeshVertexData::empty

public const inline
   
   
bool empty( ) const

Defined in Rendering/Mesh/MeshVertexData.h:64


function
Rendering::MeshVertexData::swap

public
     
     
void swap( MeshVertexData & other )

Defined in Rendering/Mesh/MeshVertexData.h:65


function
Rendering::MeshVertexData::allocate

public
     
     
void allocate( uint32_t count,
  const VertexDescription & vd
)    

Set the local vertex data. The old data is freed.

Note: Sets dataChanged.

Defined in Rendering/Mesh/MeshVertexData.h:70


function
Rendering::MeshVertexData::releaseLocalData

public
   
   
void releaseLocalData( )

Defined in Rendering/Mesh/MeshVertexData.h:71


function
Rendering::MeshVertexData::markAsChanged

public inline
   
   
void markAsChanged( )

Defined in Rendering/Mesh/MeshVertexData.h:72


function
Rendering::MeshVertexData::hasChanged

public const inline
   
   
bool hasChanged( ) const

Defined in Rendering/Mesh/MeshVertexData.h:73


function
Rendering::MeshVertexData::hasLocalData

public const inline
   
   
bool hasLocalData( ) const

Defined in Rendering/Mesh/MeshVertexData.h:74


function
Rendering::MeshVertexData::data

public const inline
   
   
const uint8_t * data( ) const

Defined in Rendering/Mesh/MeshVertexData.h:75


function
Rendering::MeshVertexData::data

public inline
   
   
uint8_t * data( )

Defined in Rendering/Mesh/MeshVertexData.h:76


function
Rendering::MeshVertexData::dataSize

public const inline
   
   
size_t dataSize( ) const

Defined in Rendering/Mesh/MeshVertexData.h:77


function
Rendering::MeshVertexData::operator[]

public const
     
     
const uint8_t * operator[]( uint32_t index ) const

Defined in Rendering/Mesh/MeshVertexData.h:78


function
Rendering::MeshVertexData::operator[]

public
     
     
uint8_t * operator[]( uint32_t index )

Defined in Rendering/Mesh/MeshVertexData.h:79


function
Rendering::MeshVertexData::updateBoundingBox

public
   
   
void updateBoundingBox( )

Defined in Rendering/Mesh/MeshVertexData.h:82


function
Rendering::MeshVertexData::getBoundingBox

public const inline
   
   
const Geometry::Box & getBoundingBox( ) const

Defined in Rendering/Mesh/MeshVertexData.h:83


function
Rendering::MeshVertexData::_setBoundingBox

public inline
     
     
void _setBoundingBox( const Geometry::Box & box )

Set a new bounding box.

Note: This function should not be used normally. It is needed in special situations when there is no vertex data but the bounding box is known.

Parameters

box
New bounding box.

Defined in Rendering/Mesh/MeshVertexData.h:90


function
Rendering::MeshVertexData::isUploaded

public const inline
   
   
bool isUploaded( ) const

Defined in Rendering/Mesh/MeshVertexData.h:94


function
Rendering::MeshVertexData::bind

public
     
     
void bind( RenderingContext & context,
  bool useVBO
)    

(internal)

Defined in Rendering/Mesh/MeshVertexData.h:97


function
Rendering::MeshVertexData::unbind

public
     
     
void unbind( RenderingContext & context,
  bool useVBO
)    

(internal)

Defined in Rendering/Mesh/MeshVertexData.h:99


function
Rendering::MeshVertexData::upload

public
   
   
bool upload( )

Call* upload() *with default usage hint.

Defined in Rendering/Mesh/MeshVertexData.h:102


function
Rendering::MeshVertexData::upload

public
     
     
bool upload( uint32_t usageHint )

(internal) Create or update a VBO if hasChanged is set to true. hasChanged is set to false.

Defined in Rendering/Mesh/MeshVertexData.h:105


function
Rendering::MeshVertexData::download

public
   
   
bool download( )

(internal)

Defined in Rendering/Mesh/MeshVertexData.h:107


function
Rendering::MeshVertexData::downloadTo

public const
     
     
void downloadTo( std::vector< uint8_t > & destination ) const

Defined in Rendering/Mesh/MeshVertexData.h:108


function
Rendering::MeshVertexData::removeGlBuffer

public
   
   
void removeGlBuffer( )

(internal)

Defined in Rendering/Mesh/MeshVertexData.h:110


function
Rendering::MeshVertexData::drawArray

public
     
     
void drawArray( RenderingContext & context,
  bool useVBO,
  uint32_t drawMode,
  uint32_t startIndex,
  uint32_t numberOfElements
)    

(internal) Draw the vertices using the VBO or a VertexArray. Used by MeshDataStrategy::doDisplay(..) if the mesh does not use indices.

Defined in Rendering/Mesh/MeshVertexData.h:114


function
Rendering::MeshVertexData::_swapBufferObject

public inline
     
     
void _swapBufferObject( BufferObject & other )

Swap the internal BufferObject .

Note: The local data is not changed!

Note: the size of the new buffer must be equal to that of the old one.

Note: Use only if you know what you are doing!

Defined in Rendering/Mesh/MeshVertexData.h:120


function
Rendering::MeshVertexData::_getBufferObject

public inline
   
   
BufferObject & _getBufferObject( )

get the internal BufferObject .

Note: Use only if you know what you are doing!

Defined in Rendering/Mesh/MeshVertexData.h:124