Commit ebe0b517 authored by Jan Möbius's avatar Jan Möbius

Switch enter,draw,leave and enterpick,leavepick to get drawmode as const ref

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10926 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f56daf66
......@@ -93,7 +93,7 @@ availableDrawModes() const
void
QtWidgetNode::
draw(GLState& _state , DrawModes::DrawMode /*_drawMode*/)
draw(GLState& _state , const DrawModes::DrawMode& /*_drawMode*/)
{
// Project 3d point onto screen
ACG::Vec3d projected = _state.project(position_);
......
......@@ -110,7 +110,7 @@ public:
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// draw points and normals
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
void position(ACG::Vec3d _position) { position_ = _position; };
......
......@@ -172,7 +172,7 @@ BaseNode::delete_subtree()
//----------------------------------------------------------------------------
void
BaseNode::enterPick(GLState& _state, PickTarget /*_target*/, DrawModes::DrawMode _drawMode)
BaseNode::enterPick(GLState& _state, PickTarget /*_target*/, const DrawModes::DrawMode& _drawMode)
{
enter (_state, _drawMode);
}
......@@ -180,7 +180,7 @@ BaseNode::enterPick(GLState& _state, PickTarget /*_target*/, DrawModes::DrawMode
//----------------------------------------------------------------------------
void
BaseNode::leavePick(GLState& _state, PickTarget /*_target*/, DrawModes::DrawMode _drawMode)
BaseNode::leavePick(GLState& _state, PickTarget /*_target*/, const DrawModes::DrawMode& _drawMode)
{
leave (_state, _drawMode);
}
......
......@@ -166,23 +166,22 @@ public:
function.
\see MaterialNode
*/
virtual void enter(GLState& /*_state */, DrawModes::DrawMode /*_drawMode*/ ) {}
virtual void enter(GLState& /*_state */, const DrawModes::DrawMode& /*_drawMode*/ ) {}
/** Draw this node using the draw modes _drawMode */
virtual void draw(GLState& /* _state */, DrawModes::DrawMode /* _drawMode */) {}
virtual void draw(GLState& /* _state */, const DrawModes::DrawMode& /* _drawMode */) {}
/** The leave function is used to restore GL states the have been changed.
This function must restore the status before enter() !
*/
virtual void leave(GLState& /* _state */, DrawModes::DrawMode /* _drawMode */) {}
virtual void leave(GLState& /* _state */, const DrawModes::DrawMode& /* _drawMode */) {}
/** This function is called when traversing the scene graph during picking
and arriving at this node. It can be used to store GL states that
will be changed in order to restore then in the leavePick()
function. Its default implementation will call the enter() function.
*/
virtual void enterPick(GLState& _state , PickTarget _target,
DrawModes::DrawMode _drawMode );
virtual void enterPick(GLState& _state , PickTarget _target, const DrawModes::DrawMode& _drawMode );
/** Draw the node using the GL picking name stack. The node's ID
will already be on the name stack, so only names identifing e.g. faces
......@@ -194,8 +193,7 @@ public:
This function must restore the status before enterPick() !
Its default implementation will call the leave() function.
*/
virtual void leavePick(GLState& _state, PickTarget _target,
DrawModes::DrawMode _drawMode );
virtual void leavePick(GLState& _state, PickTarget _target, const DrawModes::DrawMode& _drawMode );
/** Enable or Disable picking for this node
* ( default: enabled )
......
......@@ -79,7 +79,7 @@ BoundingBoxNode::~BoundingBoxNode() {
void
BoundingBoxNode::
draw(GLState& /* _state */ , DrawModes::DrawMode _drawMode)
draw(GLState& /* _state */ , const DrawModes::DrawMode& _drawMode)
{
ACG::SceneGraph::BoundingBoxAction act;
......
......@@ -99,7 +99,7 @@ public:
DrawModes::DrawMode availableDrawModes() const;
/// draw lines and normals
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
};
......
......@@ -67,7 +67,7 @@ CartesianClippingNode::CartesianClippingNode( BaseNode* _parent,
void
CartesianClippingNode::enter( GLState & _state, DrawModes::DrawMode /* _drawmode */ )
CartesianClippingNode::enter( GLState & _state, const DrawModes::DrawMode& /* _drawmode */ )
{
Vec3d eye = _state.eye();
......@@ -146,7 +146,7 @@ CartesianClippingNode::enter( GLState & _state, DrawModes::DrawMode /* _drawmode
void
CartesianClippingNode::leave( GLState & /* _state */ , DrawModes::DrawMode /* _drawmode */ )
CartesianClippingNode::leave( GLState & /* _state */ , const DrawModes::DrawMode& /* _drawmode */ )
{
glDisable( GL_CLIP_PLANE0 );
glDisable( GL_CLIP_PLANE1 );
......
......@@ -87,10 +87,10 @@ public:
ACG_CLASSNAME(CartesianClippingNode);
/// begin clipping
void enter( GLState & _state, DrawModes::DrawMode _drawmode );
void enter( GLState & _state, const DrawModes::DrawMode& _drawmode );
/// stop clipping
void leave( GLState & _state, DrawModes::DrawMode _drawmode );
void leave( GLState & _state, const DrawModes::DrawMode& _drawmode );
/// set position
void set_cursor( const Vec3f & _pos );
......
......@@ -133,7 +133,7 @@ ClippingNode::set_offset(float _offset)
//----------------------------------------------------------------------------
void ClippingNode::enter(GLState& /* _state */ , DrawModes::DrawMode /* _drawmode */ )
void ClippingNode::enter(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawmode */ )
{
// one clipping plane
if (slice_width_ == 0.0)
......@@ -157,7 +157,7 @@ void ClippingNode::enter(GLState& /* _state */ , DrawModes::DrawMode /* _drawmod
//----------------------------------------------------------------------------
void ClippingNode::leave(GLState& /* _state */ , DrawModes::DrawMode /* _drawmode */ )
void ClippingNode::leave(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawmode */ )
{
glDisable(GL_CLIP_PLANE0);
if (slice_width_ > 0.0)
......
......@@ -96,10 +96,10 @@ public:
ACG_CLASSNAME(ClippingNode);
/// set texture
void enter(GLState& _state, DrawModes::DrawMode _drawmode);
void enter(GLState& _state, const DrawModes::DrawMode& _drawmode);
/// restores original texture (or no-texture)
void leave(GLState& _state, DrawModes::DrawMode _drawmode);
void leave(GLState& _state, const DrawModes::DrawMode& _drawmode);
/// set position and normal of plane
void set_plane(const Vec3f& _position, const Vec3f& _normal, float _eps=0.0);
......
......@@ -105,7 +105,7 @@ CoordFrameNode::boundingBox(Vec3d& _bbMin, Vec3d& _bbMax)
void
CoordFrameNode::draw(GLState& /* _state */ , DrawModes::DrawMode /* _drawMode */ )
CoordFrameNode::draw(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawMode */ )
{
// draw bounding box
......
......@@ -97,7 +97,7 @@ public:
/// update bounding box
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// drawing the primitive
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// update bounding box (compute in from BB of children)
......
......@@ -208,7 +208,7 @@ CoordsysNode::drawCoordsysPick( GLState& _state) {
void
CoordsysNode::
draw(GLState& _state , DrawModes::DrawMode /*_drawMode*/)
draw(GLState& _state , const DrawModes::DrawMode& /*_drawMode*/)
{
GLenum prev_depth = _state.depthFunc();
......
......@@ -117,7 +117,7 @@ public:
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// draw Coordsys
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// draw Coordsys for object picking
void pick(GLState& _state, PickTarget _target);
......
......@@ -174,7 +174,7 @@ DrawMode& DrawMode::operator++() {
return (*this);
}
DrawMode DrawMode::operator&(const DrawMode& _mode) {
DrawMode DrawMode::operator&(const DrawMode& _mode) const {
// If we are asked for Point, also return the Modes for Points shaded and colors
// if ( (_mode.modeFlags_ & POINTS.modeFlags_).any() )
......@@ -265,7 +265,7 @@ bool DrawMode::isAtomic() {
//----------------------------------------------------------------------------
bool
DrawMode::containsAtomicDrawMode( DrawMode _atomicDrawMode)
DrawMode::containsAtomicDrawMode( DrawMode _atomicDrawMode) const
{
return (*this) & _atomicDrawMode;
}
......
......@@ -117,7 +117,7 @@ namespace DrawModes {
bool operator==(const DrawMode& _mode) const;
DrawMode operator&(const DrawMode& _mode);
DrawMode operator&(const DrawMode& _mode) const;
DrawMode& operator++();
......@@ -154,7 +154,7 @@ namespace DrawModes {
/** \brief Check whether an Atomic DrawMode is active in this draw Mode
*/
bool containsAtomicDrawMode( DrawMode _atomicDrawMode );
bool containsAtomicDrawMode( DrawMode _atomicDrawMode ) const;
/** \brief Seperates this drawMode into a list of all seperate atomic drawmodes
*
......
......@@ -87,7 +87,7 @@ DrawModes::DrawMode EnvMapNode::availableDrawModes() const
//----------------------------------------------------------------------------
void EnvMapNode::enter(GLState& _state, DrawModes::DrawMode _drawmode)
void EnvMapNode::enter(GLState& _state, const DrawModes::DrawMode& _drawmode)
{
if (_drawmode==DrawModes::SOLID_ENV_MAPPED)
{
......@@ -105,7 +105,7 @@ void EnvMapNode::enter(GLState& _state, DrawModes::DrawMode _drawmode)
//----------------------------------------------------------------------------
void EnvMapNode::leave(GLState& _state, DrawModes::DrawMode _drawmode)
void EnvMapNode::leave(GLState& _state, const DrawModes::DrawMode& _drawmode)
{
if (_drawmode==DrawModes::SOLID_ENV_MAPPED)
{
......@@ -117,15 +117,11 @@ void EnvMapNode::leave(GLState& _state, DrawModes::DrawMode _drawmode)
TextureNode::leave( _state, _drawmode);
}
void EnvMapNode::enterPick(GLState& /*_state*/ ,
PickTarget /*_target*/,
DrawModes::DrawMode /*_drawMode*/ ) {
void EnvMapNode::enterPick(GLState& /*_state*/ , PickTarget /*_target*/, const DrawModes::DrawMode& /*_drawMode*/ ) {
}
void EnvMapNode::leavePick(GLState& /*_state*/,
PickTarget /*_target*/,
DrawModes::DrawMode /*_drawMode*/ ) {
void EnvMapNode::leavePick(GLState& /*_state*/, PickTarget /*_target*/, const DrawModes::DrawMode& /*_drawMode*/ ) {
}
......
......@@ -90,18 +90,18 @@ public:
DrawModes::DrawMode availableDrawModes() const;
/// set texture
void enter(GLState& _state, DrawModes::DrawMode _drawmode);
void enter(GLState& _state, const DrawModes::DrawMode& _drawmode);
/// restores original texture (or no-texture)
void leave(GLState& _state, DrawModes::DrawMode _drawmode);
void leave(GLState& _state, const DrawModes::DrawMode& _drawmode);
/** \brief Do nothing in picking
*/
void enterPick(GLState& _state, PickTarget _target, DrawModes::DrawMode _drawMode );
void enterPick(GLState& _state, PickTarget _target, const DrawModes::DrawMode& _drawMode );
/** \brief Do nothing in picking
*/
void leavePick(GLState& _state, PickTarget _target, DrawModes::DrawMode _drawMode );
void leavePick(GLState& _state, PickTarget _target, const DrawModes::DrawMode& _drawMode );
};
......
......@@ -137,7 +137,7 @@ availableDrawModes() const
void
GlutPrimitiveNode::
draw(GLState& _state, DrawModes::DrawMode _drawMode)
draw(GLState& _state, const DrawModes::DrawMode& _drawMode)
{
for (int i = 0; i < (int)primitives_.size(); ++i)
{
......
......@@ -210,7 +210,7 @@ public:
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// drawing the primitive
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
void draw_obj(int _idx) const;
/// picking
......
......@@ -128,7 +128,7 @@ GridNode::pick(GLState& /*_state*/, PickTarget /*_target*/)
void
GridNode::draw(GLState& _state , DrawModes::DrawMode /* _drawMode */ )
GridNode::draw(GLState& _state , const DrawModes::DrawMode& /* _drawMode */ )
{
glPushAttrib( GL_LIGHTING_BIT ); // STACK_ATTRIBUTES <- LIGHTING_ATTRIBUTE
......
......@@ -105,7 +105,7 @@ public:
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// drawing the primitive
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// don't pick me
void pick(GLState& _state, PickTarget _target);
......
......@@ -77,7 +77,7 @@ LightSourceNode::LightSourceNode( BaseNode* _parent,
//----------------------------------------------------------------------------
void LightSourceNode::enter(GLState& _state, DrawModes::DrawMode /* _drawmode */ )
void LightSourceNode::enter(GLState& _state, const DrawModes::DrawMode& /* _drawmode */ )
{
// save old lights
for(unsigned int i=0; i<lightsSave_.size(); i++)
......@@ -116,7 +116,7 @@ void LightSourceNode::enter(GLState& _state, DrawModes::DrawMode /* _drawmode */
//----------------------------------------------------------------------------
void LightSourceNode::leave(GLState& /* _state */ , DrawModes::DrawMode /* _drawmode*/ )
void LightSourceNode::leave(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawmode*/ )
{
// restore old enabled lights
for(unsigned int i=0; i<lights_.size(); i++)
......
......@@ -137,9 +137,9 @@ public:
ACG_CLASSNAME(LightSourceNode);
/// set current Light Sources
void enter(GLState& _state, DrawModes::DrawMode _drawmode);
void enter(GLState& _state, const DrawModes::DrawMode& _drawmode);
/// restores original Light Sources
void leave(GLState& _state, DrawModes::DrawMode _drawmode);
void leave(GLState& _state, const DrawModes::DrawMode& _drawmode);
/// enable LightSource _nr
void enable(GLenum _nr)
......
......@@ -91,7 +91,7 @@ availableDrawModes() const
void
LineNode::
enter(GLState& _state , DrawModes::DrawMode _drawMode)
enter(GLState& _state , const DrawModes::DrawMode& _drawMode)
{
MaterialNode::enter(_state, _drawMode);
......@@ -108,7 +108,7 @@ enter(GLState& _state , DrawModes::DrawMode _drawMode)
void
LineNode::
draw(GLState& /* _state */ , DrawModes::DrawMode _drawMode)
draw(GLState& /* _state */ , const DrawModes::DrawMode& _drawMode)
{
if (_drawMode & DrawModes::WIREFRAME)
{
......@@ -151,14 +151,14 @@ draw(GLState& /* _state */ , DrawModes::DrawMode _drawMode)
void
LineNode::
leave(GLState& _state , DrawModes::DrawMode _drawMode)
leave(GLState& _state , const DrawModes::DrawMode& _drawMode)
{
if (alwaysOnTop()) {
//restore depth function and change GLState accordingly
_state.set_depthFunc(prev_depth_);
}
MaterialNode::leave(_state, _drawMode);
if (alwaysOnTop()) {
//restore depth function and change GLState accordingly
_state.set_depthFunc(prev_depth_);
}
MaterialNode::leave(_state, _drawMode);
}
......
......@@ -129,13 +129,13 @@ public:
/// set depth function (needed for lasso selection so that the line can be draw in pseudo-2D)
void enter(GLState& _state, DrawModes::DrawMode _drawMode);
void enter(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// draw lines and normals
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// reset depth function to what it was before enter()
void leave(GLState& _state, DrawModes::DrawMode _drawMode);
void leave(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// reserve mem for _n lines
......
......@@ -169,7 +169,7 @@ setup_sphere_system(GLState& _state)
void
ManipulatorNode::draw(GLState& _state, DrawModes::DrawMode /* _drawMode */ )
ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode */ )
{
if (draw_cylinder_)
{
......
......@@ -132,7 +132,7 @@ public:
}
/// draw the cylinder (if enabled)
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// picking
void pick(GLState& _state, PickTarget _target);
......
......@@ -92,7 +92,7 @@ Material2Node::Material2Node( BaseNode* _parent,
//----------------------------------------------------------------------------
void Material2Node::enter(GLState& _state, DrawModes::DrawMode /* _drawmode */ )
void Material2Node::enter(GLState& _state, const DrawModes::DrawMode& /* _drawmode */ )
{
if (applyProperties_ & BaseColor)
{
......@@ -207,7 +207,7 @@ void Material2Node::enter(GLState& _state, DrawModes::DrawMode /* _drawmode */ )
//----------------------------------------------------------------------------
void Material2Node::leave(GLState& _state, DrawModes::DrawMode /* _drawmode*/ )
void Material2Node::leave(GLState& _state, const DrawModes::DrawMode& /* _drawmode*/ )
{
if (applyProperties_ & BaseColor)
{
......
......@@ -118,9 +118,9 @@ public:
/// set current GL-color and GL-material
void enter(GLState& _state, DrawModes::DrawMode _drawmode);
void enter(GLState& _state, const DrawModes::DrawMode& _drawmode);
/// restores original GL-color and GL-material
void leave(GLState& _state, DrawModes::DrawMode _drawmode);
void leave(GLState& _state, const DrawModes::DrawMode& _drawmode);
/// get properties that will be applied (OR'ed ApplyProperties)
......
......@@ -78,7 +78,7 @@ MaterialNode::MaterialNode( BaseNode* _parent,
//----------------------------------------------------------------------------
void MaterialNode::enter(GLState& _state, DrawModes::DrawMode _drawmode )
void MaterialNode::enter(GLState& _state, const DrawModes::DrawMode& _drawmode )
{
if (applyProperties_ & BaseColor)
{
......@@ -208,22 +208,18 @@ void MaterialNode::enter(GLState& _state, DrawModes::DrawMode _drawmode )
//----------------------------------------------------------------------------
void MaterialNode::enterPick(GLState& /*_state*/ ,
PickTarget /*_target*/,
DrawModes::DrawMode /*_drawMode*/ ) {
void MaterialNode::enterPick(GLState& /*_state*/ , PickTarget /*_target*/, const DrawModes::DrawMode& /*_drawMode*/ ) {
}
void MaterialNode::leavePick(GLState& /*_state*/,
PickTarget /*_target*/,
DrawModes::DrawMode /*_drawMode*/ ) {
void MaterialNode::leavePick(GLState& /*_state*/, PickTarget /*_target*/, const DrawModes::DrawMode& /*_drawMode*/ ) {
}
//----------------------------------------------------------------------------
void MaterialNode::leave(GLState& _state, DrawModes::DrawMode _drawmode )
void MaterialNode::leave(GLState& _state, const DrawModes::DrawMode& _drawmode )
{
if (applyProperties_ & BaseColor)
{
......
......@@ -342,16 +342,16 @@ public:
ACG_CLASSNAME(MaterialNode);
/// set current GL-color and GL-material
void enter(GLState& _state, DrawModes::DrawMode _drawmode);
void enter(GLState& _state, const DrawModes::DrawMode& _drawmode);
/// restores original GL-color and GL-material
void leave(GLState& _state, DrawModes::DrawMode _drawmode);
void leave(GLState& _state, const DrawModes::DrawMode& _drawmode);
/** \brief Do nothing in picking*/
void enterPick(GLState& _state, PickTarget _target, DrawModes::DrawMode _drawMode );
void enterPick(GLState& _state, PickTarget _target, const DrawModes::DrawMode& _drawMode );
/** \brief Do nothing in picking */
void leavePick(GLState& _state, PickTarget _target, DrawModes::DrawMode _drawMode );
void leavePick(GLState& _state, PickTarget _target, const DrawModes::DrawMode& _drawMode );
/** @} */
......
......@@ -217,7 +217,7 @@ boundingBox(Vec3d& _bbMin, Vec3d& _bbMax) {
template<class Mesh>
void
MeshNodeT<Mesh>::
draw(GLState& _state, DrawModes::DrawMode _drawMode) {
draw(GLState& _state, const DrawModes::DrawMode& _drawMode) {
// Update strips if necessary
stripProcessor_.stripify();
......
......@@ -338,7 +338,7 @@ public:
/** \brief Draws the object
*
*/
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/** \brief return available draw modes
*
......
......@@ -562,7 +562,7 @@ update_topology()
template<class Mesh>
void
MeshNodeT<Mesh>::
draw(GLState& _state, DrawModes::DrawMode _drawMode)
draw(GLState& _state, const DrawModes::DrawMode& _drawMode)
{
GLenum prev_depth = _state.depthFunc();
......
......@@ -106,7 +106,7 @@ public:
/// update bounding box
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// drawing
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// picking
void pick(GLState& _state, PickTarget _target);
......
......@@ -108,7 +108,7 @@ availableDrawModes() const
void
OBJNode::
draw(GLState& _state, DrawModes::DrawMode _drawMode)
draw(GLState& _state, const DrawModes::DrawMode& _drawMode)
{
if (_drawMode & DrawModes::POINTS)
{
......
......@@ -101,7 +101,7 @@ public:
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// drawing the primitive
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// picking
void pick(GLState& _state, PickTarget _target);
......
......@@ -164,7 +164,7 @@ void PlaneNode::drawPlanePick( GLState& _state) {
//----------------------------------------------------------------
void PlaneNode::draw(GLState& _state , DrawModes::DrawMode /*_drawMode*/)
void PlaneNode::draw(GLState& _state , const DrawModes::DrawMode& /*_drawMode*/)
{
_state.push_modelview_matrix();
......
......@@ -92,7 +92,7 @@ class ACGDLLEXPORT PlaneNode : public BaseNode
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// draw Plane
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// draw Plane for object picking
void pick(GLState& _state, PickTarget _target);
......
......@@ -94,7 +94,7 @@ availableDrawModes() const
void
PointNode::
draw(GLState& /* _state */ , DrawModes::DrawMode _drawMode)
draw(GLState& /* _state */ , const DrawModes::DrawMode& _drawMode)
{
if (points_.size() == 0)
return;
......
......@@ -109,7 +109,7 @@ public:
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
/// draw points and normals
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
/// reserve mem for _np points and _nn normals
void reserve(unsigned int _np, unsigned int _nn, unsigned int _nc) {
......
......@@ -130,7 +130,7 @@ availableDrawModes() const
void
QuadNode::
draw(GLState& /* _state */ , DrawModes::DrawMode _drawMode)
draw(GLState& /* _state */ , const DrawModes::DrawMode& _drawMode)
{
if (_drawMode & DrawModes::WIREFRAME ||
_drawMode & DrawModes::HIDDENLINE )
......
......@@ -82,7 +82,7 @@ public:
DrawModes::DrawMode availableDrawModes() const;
void boundingBox(Vec3d& _bbMin, Vec3d& _bbMax);
void draw(GLState& _state, DrawModes::DrawMode _drawMode);
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
void pick(GLState& _state, PickTarget _target);
void add_quad( const ACG::Vec3f & _p0,
......
......@@ -119,7 +119,7 @@ hasShader( DrawModes::DrawMode _drawmode, bool _pick ) {
void
ShaderNode::enter(GLState& /*_state*/, DrawModes::DrawMode _drawmode )
ShaderNode::enter(GLState& /*_state*/, const DrawModes::DrawMode& _drawmode )
{
for ( std::map<unsigned int,ShaderInfo>::iterator it = shaders.begin(); it != shaders.end(); ++it) {
if ( _drawmode.containsAtomicDrawMode(it->first) && it->second.initialized ) {
......@@ -131,7 +131,7 @@ ShaderNode::enter(GLState& /*_state*/, DrawModes::DrawMode _drawmode )
//----------------------------------------------------------------------------
void
ShaderNode::enterPick(GLState& /*_state*/, PickTarget /*_target*/, DrawModes::DrawMode _drawmode )
ShaderNode::enterPick(GLState& /*_state*/, PickTarget /*_target*/, const DrawModes::DrawMode& _drawmode )
{
for ( std::map<unsigned int,ShaderInfo>::iterator it = pickShaders.begin(); it != pickShaders.end(); ++it) {
if ( _drawmode.containsAtomicDrawMode(it->first) && it->second.initialized ) {
......@@ -198,7 +198,7 @@ ShaderNode::fragmentShaderName(DrawModes::DrawMode _drawmode, bool _pick) {
//----------------------------------------------------------------------------
void ShaderNode::leave(GLState& /*_state*/, DrawModes::DrawMode _drawmode )
void ShaderNode::leave(GLState& /*_state*/, const DrawModes::DrawMode& _drawmode )
{
for ( std::map<unsigned int,ShaderInfo>::iterator it = shaders.begin(); it != shaders.end(); ++it)
if ( _drawmode.containsAtomicDrawMode(it->first) && it->second.initialized )
......@@ -208,7 +208,7 @@ void ShaderNode::leave(GLState& /*_state*/, DrawModes::DrawMode _drawmode )
//----------------------------------------------------------------------------
void ShaderNode::leavePick(GLState& /*_state*/, PickTarget /*_target*/, DrawModes::DrawMode _drawmode )