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