Add updateBoundingBox parameter to IMeshBuffer::append and some fixes and optimizations
Fix: When appending to an empty mesh boundingbox has to be initialized with first position Adding updateBoundingBox parameter as there is a bit costs involved in updating that and it might not be necessary at that point Default is still to do it - and with the default parameter it's at least compile compatible to old interface (unless users created their own meshbuffers). Optimizing the copying of vertices in CDynamicMeshBuffer::append by using memset when possible instead of pushing each vertex (which goes through quite a few virtual functions) git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6496 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@@ -131,14 +131,16 @@ namespace scene
|
||||
\param vertices Pointer to a vertex array.
|
||||
\param numVertices Number of vertices in the array.
|
||||
\param indices Pointer to index array.
|
||||
\param numIndices Number of indices in array. */
|
||||
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) = 0;
|
||||
\param numIndices Number of indices in array.
|
||||
\param updateBoundingBox When true update boundingbox by the added vertices */
|
||||
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices, bool updateBoundingBox=true) = 0;
|
||||
|
||||
//! Not supported right now by all meshbuffer
|
||||
//! In theory: Append the meshbuffer to the current buffer
|
||||
/** Only works for compatible vertex and index types
|
||||
\param other Buffer to append to this one. */
|
||||
virtual void append(const IMeshBuffer* const other) = 0;
|
||||
\param other Buffer to append to this one.
|
||||
s \param updateBoundingBox When true update boundingbox by the added vertices */
|
||||
virtual void append(const IMeshBuffer* const other, bool updateBoundingBox=true) = 0;
|
||||
|
||||
//! get the current hardware mapping hint
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const = 0;
|
||||
|
Reference in New Issue
Block a user