61 #include "BoundingBoxNode.hh"
63 #include "../GL/GLPrimitives.hh"
69 namespace SceneGraph {
130 glPushAttrib (GL_ENABLE_BIT);
137 _state.
scale(bbsize[0], bbsize[1], bbsize[2]);
139 glColor4f(0.0f,1.0f,0.0f,1.0f);
141 box_->draw_primitive();
168 ro.emissive =
Vec3f(0.0f, 1.0f, 0.0f);
173 box_->addToRenderer_primitive(_renderer, &ro);
void scale(double _s)
scale by (_s, _s, _s)
ShaderGenDesc shaderDesc
Drawmode and other shader params.
void getRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const ACG::SceneGraph::Material *_mat)
draw with renderobjects
Namespace providing different geometric functions concerning angles.
int getLayerIndexByPrimitive(DrawModePrimitive _type) const
search for layer with specified primitive
static void disable(GLenum _cap)
replaces glDisable, but supports locking
Interface class between scenegraph and renderer.
void translate(double _x, double _y, double _z, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
translate by (_x, _y, _z)
void initFromState(GLState *_glState)
Initializes a RenderObject instance.
const Vec3d & bbMax() const
Returns maximum point of the bounding box.
VectorT< double, 3 > Vec3d
DrawModes::DrawMode drawMode() const
Return the own draw modes of this node.
BoundingBoxNode(BaseNode *_parent=0, std::string _name="<BoundingBoxNode>")
default constructor
void push_modelview_matrix()
push modelview matrix
void translate(Scalar _x, Scalar _y, Scalar _z, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
multiply self with translation matrix (x,y,z)
void scale(Scalar _x, Scalar _y, Scalar _z, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
multiply self with scaling matrix (x,y,z)
VectorT< float, 3 > Vec3f
virtual ~BoundingBoxNode()
destructor
void pop_modelview_matrix()
pop modelview matrix
void draw(GLState &_state, const DrawModes::DrawMode &_drawMode)
draw lines and normals
DrawMode WIREFRAME
draw wireframe
GLMatrixd modelview
Modelview transform.
const Vec3d & bbMin() const
Returns minimum point of the bounding box.
void computeAABB(Vec3d *_outMin, Vec3d *_outMax)
compute aabb of subtree
void traverse(BaseNode *_node, Action &_action)
DrawModes::DrawMode availableDrawModes() const
return available draw modes