34 #ifndef MESH_VERTEXBUFFERNODE_H
35 #define MESH_VERTEXBUFFERNODE_H
38 #include "vertexBufferBase.h"
43 class VertexBufferNode :
public VertexBufferBase
46 VertexBufferNode() : _left( 0 ), _right( 0 ) {}
47 virtual ~VertexBufferNode();
49 virtual void draw( VertexBufferState& state )
const;
50 virtual Index getNumberOfVertices()
const
51 {
return _left->getNumberOfVertices()+_right->getNumberOfVertices();}
53 virtual const VertexBufferBase* getLeft()
const {
return _left; }
54 virtual const VertexBufferBase* getRight()
const {
return _right; }
57 virtual void toStream( std::ostream& os );
58 virtual void fromMemory(
char** addr, VertexBufferData& globalData );
60 virtual void setupTree( VertexData& data,
const Index start,
61 const Index length,
const Axis axis,
63 VertexBufferData& globalData );
64 virtual const BoundingSphere& updateBoundingSphere();
65 virtual void updateRange();
68 VertexBufferBase* _left;
69 VertexBufferBase* _right;
75 #endif // MESH_VERTEXBUFFERNODE_H
co::Object to distribute a model, holds a VertexBufferBase node.