31 #ifndef MESH_VERTEXBUFFERROOT_H
32 #define MESH_VERTEXBUFFERROOT_H
34 #include "vertexBufferNode.h"
35 #include "vertexBufferData.h"
40 class VertexBufferRoot :
public VertexBufferNode
43 VertexBufferRoot() : VertexBufferNode(), _invertFaces(false) {}
45 virtual void cullDraw( VertexBufferState& state )
const;
46 virtual void draw( VertexBufferState& state )
const;
48 void setupTree( VertexData& data );
49 bool writeToFile(
const std::string& filename );
50 bool readFromFile(
const std::string& filename );
51 bool hasColors()
const {
return _data.colors.size() > 0; }
53 void useInvertedFaces() { _invertFaces =
true; }
55 const std::string& getName()
const {
return _name; }
58 virtual void toStream( std::ostream& os );
59 virtual void fromMemory(
char* start );
62 bool _constructFromPly(
const std::string& filename );
63 bool _readBinary( std::string filename );
65 void _beginRendering( VertexBufferState& state )
const;
66 void _endRendering( VertexBufferState& state )
const;
68 VertexBufferData _data;
77 #endif // MESH_VERTEXBUFFERROOT_H
co::Object to distribute a model, holds a VertexBufferBase node.