Fixes to const paramter types.
This commit is contained in:
parent
3713bf1ced
commit
661240d1ca
@ -67,7 +67,7 @@ class SG_EXPORT Fog : public StateAttribute
|
||||
EXP2 = GL_EXP2
|
||||
};
|
||||
|
||||
inline void setMode( const Mode mode ) { _mode = mode; }
|
||||
inline void setMode( Mode mode ) { _mode = mode; }
|
||||
inline Mode getMode() const { return _mode; }
|
||||
|
||||
inline void setDensity( float density ) { _density = density; }
|
||||
|
@ -133,10 +133,10 @@ class SG_EXPORT Node : public Object
|
||||
/** Set cull node callback, called during cull traversal. */
|
||||
void setCullCallback(NodeCallback* nc) { _cullCallback = nc; }
|
||||
|
||||
/** Get app node callback, called during app traversal. */
|
||||
/** Get cull node callback, called during cull traversal. */
|
||||
inline NodeCallback* getCullCallback() { return _cullCallback.get(); }
|
||||
|
||||
/** Get const app node callback, called during app traversal. */
|
||||
/** Get const cull node callback, called during cull traversal. */
|
||||
inline const NodeCallback* getCullCallback() const { return _cullCallback.get(); }
|
||||
|
||||
/** Set the view frustum/small feature culling of this node to be active or inactive.
|
||||
|
@ -137,7 +137,7 @@ class SG_EXPORT NodeVisitor : public Referenced
|
||||
NodeVisitor has been attached via setTraverseVisitor()
|
||||
and the new mode is not TRAVERSE_VISITOR then the attached
|
||||
visitor is detached. Default mode is TRAVERSE_NONE.*/
|
||||
void setTraversalMode(const TraversalMode mode);
|
||||
void setTraversalMode(TraversalMode mode);
|
||||
|
||||
/** Get the traversal mode.*/
|
||||
inline TraversalMode getTraversalMode() const { return _traversalMode; }
|
||||
|
@ -72,10 +72,10 @@ class SG_EXPORT Object : public Referenced
|
||||
* Can be set to either STATIC for values that do not change over the lifetime of the object,
|
||||
* or DYNAMIC for values that vary over the lifetime of the object. The DataVariance value
|
||||
* can be used be routines such as optimzation codes that wish to share static data.*/
|
||||
inline void setDataVariance(const DataVariance dv) { _dataVariance = dv; }
|
||||
inline void setDataVariance(DataVariance dv) { _dataVariance = dv; }
|
||||
|
||||
/** Get the data variance of this object.*/
|
||||
inline const DataVariance getDataVariance() const { return _dataVariance; }
|
||||
inline DataVariance getDataVariance() const { return _dataVariance; }
|
||||
|
||||
|
||||
/**
|
||||
|
@ -44,9 +44,9 @@ class SG_EXPORT ShadeModel : public StateAttribute
|
||||
SMOOTH = GL_SMOOTH
|
||||
};
|
||||
|
||||
inline void setMode(const Mode mode) { _mode = mode; }
|
||||
inline void setMode(Mode mode) { _mode = mode; }
|
||||
|
||||
inline const Mode getMode() const { return _mode; }
|
||||
inline Mode getMode() const { return _mode; }
|
||||
|
||||
virtual void apply(State& state) const;
|
||||
|
||||
|
@ -518,7 +518,15 @@ class CompositeShape : public Shape
|
||||
|
||||
/** find the index number of child, if child is not found then it returns getNumChildren(),
|
||||
* so should be used in similar sytle of STL's result!=end().*/
|
||||
unsigned int findChildNo(Shape* shape);
|
||||
unsigned int findChildNo(Shape* shape) const
|
||||
{
|
||||
for (unsigned int childNo=0;childNo<_children.size();++childNo)
|
||||
{
|
||||
if (_children[childNo]==shape) return childNo;
|
||||
}
|
||||
return _children.size(); // node not found.
|
||||
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -69,18 +69,18 @@ class SG_EXPORT Stencil : public StateAttribute
|
||||
ALWAYS = GL_ALWAYS
|
||||
};
|
||||
|
||||
inline void setFunction(const Function func,int ref,uint mask)
|
||||
inline void setFunction(Function func,int ref,uint mask)
|
||||
{
|
||||
_func = func;
|
||||
_funcRef = ref;
|
||||
_funcMask = mask;
|
||||
}
|
||||
|
||||
inline const Function getFunction() const { return _func; }
|
||||
inline Function getFunction() const { return _func; }
|
||||
|
||||
inline int getFunctionRef() const { return _funcRef; }
|
||||
|
||||
inline const uint getFunctionMask() const { return _funcMask; }
|
||||
inline uint getFunctionMask() const { return _funcMask; }
|
||||
|
||||
|
||||
enum Operation
|
||||
@ -100,7 +100,7 @@ class SG_EXPORT Stencil : public StateAttribute
|
||||
* third parameter controls the operation when both the stencil test
|
||||
* and depth pass. Ordering of parameter is the same as if using
|
||||
* glStencilOp(,,).*/
|
||||
inline void setOperation(const Operation sfail, const Operation zfail, const Operation zpass)
|
||||
inline void setOperation(Operation sfail, Operation zfail, Operation zpass)
|
||||
{
|
||||
_sfail = sfail;
|
||||
_zfail = zfail;
|
||||
@ -108,18 +108,18 @@ class SG_EXPORT Stencil : public StateAttribute
|
||||
}
|
||||
|
||||
/** get the operation when the stencil test fails.*/
|
||||
inline const Operation getStencilFailOperation() const { return _sfail; }
|
||||
inline Operation getStencilFailOperation() const { return _sfail; }
|
||||
|
||||
/** get the operation when the stencil test passes but the depth test fails*/
|
||||
inline const Operation getStencilPassAndDepthFailOperation() const { return _zfail; }
|
||||
inline Operation getStencilPassAndDepthFailOperation() const { return _zfail; }
|
||||
|
||||
/** get the operation when both the stencil test and the depth test pass*/
|
||||
inline const Operation getStencilPassAndDepthPassOperation() const { return _zpass; }
|
||||
inline Operation getStencilPassAndDepthPassOperation() const { return _zpass; }
|
||||
|
||||
|
||||
inline void setWriteMask(uint mask) { _writeMask = mask; }
|
||||
|
||||
inline const uint getWriteMask() const { return _writeMask; }
|
||||
inline uint getWriteMask() const { return _writeMask; }
|
||||
|
||||
|
||||
virtual void apply(State& state) const;
|
||||
|
@ -51,9 +51,9 @@ class SG_EXPORT TexEnv : public StateAttribute
|
||||
ADD = GL_ADD
|
||||
};
|
||||
|
||||
void setMode( const Mode mode ) { _mode = mode; }
|
||||
void setMode( Mode mode ) { _mode = mode; }
|
||||
|
||||
const Mode getMode() const { return _mode; }
|
||||
Mode getMode() const { return _mode; }
|
||||
|
||||
void setColor( const Vec4& color ) { _color = color; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user