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