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