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