44#include <ACG/Scenegraph/MaterialNode.hh>
45#include <ACG/Scenegraph/DrawModes.hh>
46#include <ACG/GL/VertexDeclaration.hh>
47#include <ACG/GL/globjects.hh>
48#include <ACG/Math/Matrix3x3T.hh>
66 std::string _name=
"<BoxesNode>" );
76 void clear() { elem_.clear(); updateVBO_ =
true; }
78 void reserve(
size_t _n) { elem_.reserve(_n); }
88 void setScaleFactor(
float _val) { scaleFactor_ = _val;}
94 std::vector<BoxElement> elem_;
95 float scaleFactor_ = 1.0f;
98 std::vector<std::array<Vec3f,3>> triangles_;
99 std::vector<Vec4f> triangle_colors_;
101 GeometryBuffer geometry_vbo_;
102 GeometryBuffer instance_vbo_;
109 std::string boxesNodeName_;
void createVBO()
creates the vbo only if update was requested
void push_back(const BoxElement &_v)
STL conformance.
DrawModes::DrawMode availableDrawModes() const override
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax) override
void getRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const ACG::SceneGraph::Material *_mat) override
Deferred draw call with shader based renderer.
ACG_CLASSNAME(MaterialNode)
set current GL-color and GL-material
Class to define the vertex input layout.
DrawMode SOLID_FACES_COLORED_FLAT_SHADED
draw flat shaded and colored faces (requires face normals and colors)
Namespace providing different geometric functions concerning angles.