57 #include "QuadNode.hh" 70 QuadNode::QuadNode(
BaseNode* _parent,
71 const std::string& _name )
91 Vec3f bbMin(FLT_MAX,FLT_MAX,FLT_MAX);
92 Vec3f bbMax(-FLT_MAX,-FLT_MAX,-FLT_MAX);
94 PointVector::const_iterator p_it = point_.begin(), p_end = point_.end();
96 for ( ; p_it != p_end; ++p_it )
140 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
142 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
147 _drawMode & DrawModes::HIDDENLINE )
182 QuadNode::draw_faces()
189 for ( ; i < point_.size(); i += 4, j += 1 )
207 QuadNode::draw_wireframe()
210 for (
unsigned int i = 0; i < point_.size(); ++i )
static void enable(GLenum _cap, bool _warnRemoved=true)
replaces glEnable, but supports locking
static void shadeModel(GLenum _mode)
replaces glShadeModel, supports locking
void glNormal(const Vec3f &_n)
Wrapper: glNormal for Vec3f.
void draw(GLState &_state, const DrawModes::DrawMode &_drawMode) override
Draw this node using the draw modes _drawMode.
Namespace providing different geometric functions concerning angles.
DrawMode HIDDENLINE
draw hidden line (2 rendering passes needed)
vector_type & maximize(const vector_type &_rhs)
maximize values: same as *this = max(*this, _rhs), but faster
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax) override
static void depthRange(GLclampd _zNear, GLclampd _zFar)
replaces glDepthRange, supports locking
PickTarget
What target to use for picking.
static void disable(GLenum _cap, bool _warnRemoved=true)
replaces glDisable, but supports locking
void pick(GLState &_state, PickTarget _target) override
bool pick_set_maximum(size_t _idx)
Set the maximal number of primitives/components of your object.
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 NONE
not a valid draw mode
DrawMode SOLID_FLAT_SHADED
draw flat shaded faces (requires face normals)
DrawModes::DrawMode availableDrawModes() const override
DrawMode WIREFRAME
draw wireframe
DrawMode SOLID_FACES_COLORED
draw colored, but not lighted faces using face colors
void pick_set_name(size_t _idx)
sets the current name/color (like glLoadName(_idx))
VectorT< double, 3 > Vec3d