56 #include "CoordFrameNode.hh" 58 #include "../GL/stipple_alpha.hh" 77 bb_min_ = bb_max_ =
Vec3f(0,0,0);
114 glBegin(GL_LINE_LOOP);
115 glVertex3f(bb_min_[0], bb_min_[1], bb_min_[2]);
116 glVertex3f(bb_max_[0], bb_min_[1], bb_min_[2]);
117 glVertex3f(bb_max_[0], bb_max_[1], bb_min_[2]);
118 glVertex3f(bb_min_[0], bb_max_[1], bb_min_[2]);
121 glBegin(GL_LINE_LOOP);
122 glVertex3f(bb_min_[0], bb_min_[1], bb_max_[2]);
123 glVertex3f(bb_max_[0], bb_min_[1], bb_max_[2]);
124 glVertex3f(bb_max_[0], bb_max_[1], bb_max_[2]);
125 glVertex3f(bb_min_[0], bb_max_[1], bb_max_[2]);
129 glVertex3f(bb_min_[0], bb_min_[1], bb_min_[2]);
130 glVertex3f(bb_min_[0], bb_min_[1], bb_max_[2]);
131 glVertex3f(bb_max_[0], bb_min_[1], bb_min_[2]);
132 glVertex3f(bb_max_[0], bb_min_[1], bb_max_[2]);
133 glVertex3f(bb_max_[0], bb_max_[1], bb_min_[2]);
134 glVertex3f(bb_max_[0], bb_max_[1], bb_max_[2]);
135 glVertex3f(bb_min_[0], bb_max_[1], bb_min_[2]);
136 glVertex3f(bb_min_[0], bb_max_[1], bb_max_[2]);
143 std::vector<float>::const_iterator p_it, p_end;
144 Vec3f v0, v1, v2, v3;
150 p_it = x_planes_.begin();
151 p_end = x_planes_.end();
155 for (
bool finished(
false); !finished; )
163 p_it = y_planes_.begin();
164 p_end = y_planes_.end();
169 p_it = z_planes_.begin();
170 p_end = z_planes_.end();
185 v0 =
Vec3f(*p_it, bb_min_[1], bb_min_[2]);
186 v1 =
Vec3f(*p_it, bb_max_[1], bb_min_[2]);
187 v2 =
Vec3f(*p_it, bb_max_[1], bb_max_[2]);
188 v3 =
Vec3f(*p_it, bb_min_[1], bb_max_[2]);
192 v0 =
Vec3f(bb_min_[0], *p_it, bb_min_[2]);
193 v1 =
Vec3f(bb_max_[0], *p_it, bb_min_[2]);
194 v2 =
Vec3f(bb_max_[0], *p_it, bb_max_[2]);
195 v3 =
Vec3f(bb_min_[0], *p_it, bb_max_[2]);
199 v0 =
Vec3f(bb_min_[0], bb_min_[1], *p_it);
200 v1 =
Vec3f(bb_max_[0], bb_min_[1], *p_it);
201 v2 =
Vec3f(bb_max_[0], bb_max_[1], *p_it);
202 v3 =
Vec3f(bb_min_[0], bb_max_[1], *p_it);
214 glBegin(GL_LINE_LOOP);
241 bb_min_ = bb_action.
bbMin();
242 bb_max_ = bb_action.
bbMax();
const Vec3d & bbMax() const
Returns maximum point of the bounding box.
static void shadeModel(GLenum _mode)
replaces glShadeModel, supports locking
CoordFrameNode(BaseNode *_parent=0, const std::string &_name="<CoordFrameNode>")
Default constructor.
Namespace providing different geometric functions concerning angles.
vector_type & maximize(const vector_type &_rhs)
maximize values: same as *this = max(*this, _rhs), but faster
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax) override
update bounding box
void draw(GLState &_state, const DrawModes::DrawMode &_drawMode) override
drawing the primitive
static void disable(GLenum _cap, bool _warnRemoved=true)
replaces glDisable, but supports locking
VectorT< float, 3 > Vec3f
DrawModes::DrawMode availableDrawModes() const override
return available draw modes
vector_type & minimize(const vector_type &_rhs)
minimize values: same as *this = min(*this, _rhs), but faster
void glVertex(const Vec2i &_v)
Wrapper: glVertex for Vec2i.
DrawMode SOLID_FLAT_SHADED
draw flat shaded faces (requires face normals)
void update_bounding_box()
update bounding box (compute in from BB of children)
DrawMode WIREFRAME
draw wireframe
const Vec3d & bbMin() const
Returns minimum point of the bounding box.
void set_bounding_box(const Vec3f &_bb_min, const Vec3f &_bb_max)
set bounding box
void traverse(BaseNode *_node, Action &_action)