Converted the instances of const built in types being returned from methods
and passed as paramters into straight forward non const built in types, i.e. const bool foogbar(const int) becomes bool foobar(int).
This commit is contained in:
@@ -83,7 +83,7 @@ class DrawableDrawCallback : public osg::Drawable::DrawCallback
|
||||
struct LODCallback : public osg::LOD::EvaluateLODCallback
|
||||
{
|
||||
/** Compute the child to select.*/
|
||||
virtual const int evaluateLODChild(const osg::LOD* lod, const osg::Vec3& eye_local, const float bias) const
|
||||
virtual int evaluateLODChild(const osg::LOD* lod, const osg::Vec3& eye_local, const float bias) const
|
||||
{
|
||||
std::cout<<"evaluateLODChild callback - pre lod->evaluateLODChild"<<std::endl;
|
||||
int result = lod->evaluateLODChild(eye_local,bias);
|
||||
@@ -95,7 +95,7 @@ struct LODCallback : public osg::LOD::EvaluateLODCallback
|
||||
struct TransformCallback : public osg::Transform::ComputeTransformCallback
|
||||
{
|
||||
/** Get the transformation matrix which moves from local coords to world coords.*/
|
||||
virtual const bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform* transform, osg::NodeVisitor* nv) const
|
||||
virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform* transform, osg::NodeVisitor* nv) const
|
||||
{
|
||||
std::cout<<"computeLocalToWorldMatrix - pre transform->computeLocalToWorldMatrix"<<std::endl;
|
||||
bool result = transform->computeLocalToWorldMatrix(matrix,nv);
|
||||
@@ -104,7 +104,7 @@ struct TransformCallback : public osg::Transform::ComputeTransformCallback
|
||||
}
|
||||
|
||||
/** Get the transformation matrix which moves from world coords to local coords.*/
|
||||
virtual const bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform* transform, osg::NodeVisitor* nv) const
|
||||
virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform* transform, osg::NodeVisitor* nv) const
|
||||
{
|
||||
std::cout<<"computeWorldToLocalMatrix - pre transform->computeWorldToLocalMatrix"<<std::endl;
|
||||
bool result = transform->computeWorldToLocalMatrix(matrix,nv);
|
||||
|
||||
@@ -28,7 +28,7 @@ extern osg::Node *makeClouds( void );
|
||||
struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransformCallback
|
||||
{
|
||||
/** Get the transformation matrix which moves from local coords to world coords.*/
|
||||
virtual const bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const
|
||||
virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const
|
||||
{
|
||||
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
|
||||
if (cv)
|
||||
@@ -40,7 +40,7 @@ struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransfo
|
||||
}
|
||||
|
||||
/** Get the transformation matrix which moves from world coords to local coords.*/
|
||||
virtual const bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const
|
||||
virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const
|
||||
{
|
||||
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
|
||||
if (cv)
|
||||
|
||||
@@ -28,7 +28,7 @@ Billboard::~Billboard()
|
||||
{
|
||||
}
|
||||
|
||||
void Billboard::setMode(const Mode mode)
|
||||
void Billboard::setMode(Mode mode)
|
||||
{
|
||||
_mode = mode;
|
||||
_cachedMode = CACHE_DIRTY;
|
||||
@@ -64,7 +64,7 @@ void Billboard::updateCache()
|
||||
_side.normalize();
|
||||
}
|
||||
|
||||
const bool Billboard::addDrawable(Drawable *gset)
|
||||
bool Billboard::addDrawable(Drawable *gset)
|
||||
{
|
||||
if (Geode::addDrawable(gset))
|
||||
{
|
||||
@@ -79,7 +79,7 @@ const bool Billboard::addDrawable(Drawable *gset)
|
||||
}
|
||||
|
||||
|
||||
const bool Billboard::addDrawable(Drawable *gset,const Vec3& pos)
|
||||
bool Billboard::addDrawable(Drawable *gset,const Vec3& pos)
|
||||
{
|
||||
if (Geode::addDrawable(gset))
|
||||
{
|
||||
@@ -93,7 +93,7 @@ const bool Billboard::addDrawable(Drawable *gset,const Vec3& pos)
|
||||
}
|
||||
|
||||
|
||||
const bool Billboard::removeDrawable( Drawable *gset )
|
||||
bool Billboard::removeDrawable( Drawable *gset )
|
||||
{
|
||||
PositionList::iterator pitr = _positionList.begin();
|
||||
for (DrawableList::iterator itr=_drawables.begin();
|
||||
@@ -112,7 +112,7 @@ const bool Billboard::removeDrawable( Drawable *gset )
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool Billboard::computeMatrix(Matrix& modelview, const Vec3& eye_local, const Vec3& pos_local) const
|
||||
bool Billboard::computeMatrix(Matrix& modelview, const Vec3& eye_local, const Vec3& pos_local) const
|
||||
{
|
||||
//Vec3 up_local(matrix(0,1),matrix(1,1),matrix(2,1));
|
||||
|
||||
@@ -222,7 +222,7 @@ const bool Billboard::computeMatrix(Matrix& modelview, const Vec3& eye_local, co
|
||||
|
||||
}
|
||||
|
||||
const bool Billboard::computeBound() const
|
||||
bool Billboard::computeBound() const
|
||||
{
|
||||
int i;
|
||||
int ngsets = _drawables.size();
|
||||
|
||||
@@ -15,5 +15,5 @@ BlendFunc::~BlendFunc()
|
||||
|
||||
void BlendFunc::apply(State&) const
|
||||
{
|
||||
glBlendFunc( (GLenum)_source_factor, (GLenum)_destination_factor );
|
||||
glBlendFunc( _source_factor, _destination_factor );
|
||||
}
|
||||
|
||||
@@ -94,9 +94,9 @@ Camera::~Camera()
|
||||
|
||||
|
||||
/** Set a orthographics projection. See glOrtho for further details.*/
|
||||
void Camera::setOrtho(const double left, const double right,
|
||||
const double bottom, const double top,
|
||||
const double zNear, const double zFar)
|
||||
void Camera::setOrtho(double left, double right,
|
||||
double bottom, double top,
|
||||
double zNear, double zFar)
|
||||
{
|
||||
_projectionType = ORTHO;
|
||||
_left = left;
|
||||
@@ -109,8 +109,8 @@ void Camera::setOrtho(const double left, const double right,
|
||||
|
||||
|
||||
/** Set a 2D orthographics projection. See gluOrtho2D for further details.*/
|
||||
void Camera::setOrtho2D(const double left, const double right,
|
||||
const double bottom, const double top)
|
||||
void Camera::setOrtho2D(double left, double right,
|
||||
double bottom, double top)
|
||||
{
|
||||
_projectionType = ORTHO2D;
|
||||
_left = left;
|
||||
@@ -123,9 +123,9 @@ void Camera::setOrtho2D(const double left, const double right,
|
||||
|
||||
|
||||
/** Set a perspective projection. See glFrustum for further details.*/
|
||||
void Camera::setFrustum(const double left, const double right,
|
||||
const double bottom, const double top,
|
||||
const double zNear, const double zFar)
|
||||
void Camera::setFrustum(double left, double right,
|
||||
double bottom, double top,
|
||||
double zNear, double zFar)
|
||||
{
|
||||
_projectionType = FRUSTUM;
|
||||
// note, in Frustum/Perspective mode these values are scaled
|
||||
@@ -142,8 +142,8 @@ void Camera::setFrustum(const double left, const double right,
|
||||
|
||||
|
||||
/** Set a sysmetical perspective projection, See gluPerspective for further details.*/
|
||||
void Camera::setPerspective(const double fovy,const double aspectRatio,
|
||||
const double zNear, const double zFar)
|
||||
void Camera::setPerspective(double fovy,double aspectRatio,
|
||||
double zNear, double zFar)
|
||||
{
|
||||
_projectionType = PERSPECTIVE;
|
||||
|
||||
@@ -163,8 +163,8 @@ void Camera::setPerspective(const double fovy,const double aspectRatio,
|
||||
}
|
||||
|
||||
/** Set a sysmetical perspective projection using field of view.*/
|
||||
void Camera::setFOV(const double fovx,const double fovy,
|
||||
const double zNear, const double zFar)
|
||||
void Camera::setFOV(double fovx,double fovy,
|
||||
double zNear, double zFar)
|
||||
{
|
||||
_projectionType = PERSPECTIVE;
|
||||
|
||||
@@ -185,7 +185,7 @@ void Camera::setFOV(const double fovx,const double fovy,
|
||||
}
|
||||
|
||||
/** Set the near and far clipping planes.*/
|
||||
void Camera::setNearFar(const double zNear, const double zFar)
|
||||
void Camera::setNearFar(double zNear, double zFar)
|
||||
{
|
||||
if (_projectionType==FRUSTUM || _projectionType==PERSPECTIVE)
|
||||
{
|
||||
@@ -208,7 +208,7 @@ void Camera::setNearFar(const double zNear, const double zFar)
|
||||
|
||||
/** Adjust the clipping planes to account for a new window aspcect ratio.
|
||||
* Typicall used after resizeing a window.*/
|
||||
void Camera::adjustAspectRatio(const double newAspectRatio, const AdjustAspectRatioMode aa)
|
||||
void Camera::adjustAspectRatio(double newAspectRatio, const AdjustAspectRatioMode aa)
|
||||
{
|
||||
if (newAspectRatio<0.01f || newAspectRatio>100.0f)
|
||||
{
|
||||
@@ -236,7 +236,7 @@ void Camera::adjustAspectRatio(const double newAspectRatio, const AdjustAspectRa
|
||||
/** Calculate and return the equivilant fovx for the current project setting.
|
||||
* This value is only valid for when a symetric persepctive projection exists.
|
||||
* i.e. getProjectionType()==PERSPECTIVE.*/
|
||||
const double Camera::calc_fovy() const
|
||||
double Camera::calc_fovy() const
|
||||
{
|
||||
// note, _right & _left are prescaled by znear so
|
||||
// no need to account for it.
|
||||
@@ -247,7 +247,7 @@ const double Camera::calc_fovy() const
|
||||
/** Calculate and return the equivilant fovy for the current project setting.
|
||||
* This value is only valid for when a symetric persepctive projection exists.
|
||||
* i.e. getProjectionType()==PERSPECTIVE.*/
|
||||
const double Camera::calc_fovx() const
|
||||
double Camera::calc_fovx() const
|
||||
{
|
||||
// note, _right & _left are prescaled by znear so
|
||||
// no need to account for it.
|
||||
@@ -256,14 +256,14 @@ const double Camera::calc_fovx() const
|
||||
|
||||
|
||||
/** Calculate and return the projection aspect ratio.*/
|
||||
const double Camera::calc_aspectRatio() const
|
||||
double Camera::calc_aspectRatio() const
|
||||
{
|
||||
double delta_x = _right-_left;
|
||||
double delta_y = _top-_bottom;
|
||||
return delta_x/delta_y;
|
||||
}
|
||||
|
||||
const Matrix Camera::getProjectionMatrix() const
|
||||
Matrix Camera::getProjectionMatrix() const
|
||||
{
|
||||
// set up the projection matrix.
|
||||
switch(_projectionType)
|
||||
@@ -316,9 +316,9 @@ void Camera::setLookAt(const Vec3& eye,
|
||||
}
|
||||
|
||||
|
||||
void Camera::setLookAt(const double eyeX, const double eyeY, const double eyeZ,
|
||||
const double centerX, const double centerY, const double centerZ,
|
||||
const double upX, const double upY, const double upZ)
|
||||
void Camera::setLookAt(double eyeX, double eyeY, double eyeZ,
|
||||
double centerX, double centerY, double centerZ,
|
||||
double upX, double upY, double upZ)
|
||||
{
|
||||
_lookAtType = USE_EYE_CENTER_AND_UP;
|
||||
_eye.set(eyeX,eyeY,eyeZ);
|
||||
@@ -342,14 +342,14 @@ void Camera::transformLookAt(const Matrix& matrix)
|
||||
_lookAtType=USE_EYE_CENTER_AND_UP;
|
||||
}
|
||||
|
||||
const Vec3 Camera::getLookVector() const
|
||||
Vec3 Camera::getLookVector() const
|
||||
{
|
||||
osg::Vec3 lv(_center-_eye);
|
||||
lv.normalize();
|
||||
return lv;
|
||||
}
|
||||
|
||||
const Vec3 Camera::getSideVector() const
|
||||
Vec3 Camera::getSideVector() const
|
||||
{
|
||||
osg::Vec3 lv(_center-_eye);
|
||||
lv.normalize();
|
||||
@@ -359,7 +359,7 @@ const Vec3 Camera::getSideVector() const
|
||||
}
|
||||
|
||||
|
||||
void Camera::attachTransform(const TransformMode mode, Matrix* matrix)
|
||||
void Camera::attachTransform(TransformMode mode, Matrix* matrix)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
@@ -414,7 +414,7 @@ void Camera::attachTransform(const TransformMode mode, Matrix* matrix)
|
||||
}
|
||||
}
|
||||
|
||||
Matrix* Camera::getTransform(const TransformMode mode)
|
||||
Matrix* Camera::getTransform(TransformMode mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
@@ -435,7 +435,7 @@ const Matrix* Camera::getTransform(const TransformMode mode) const
|
||||
}
|
||||
|
||||
|
||||
const Matrix Camera::getModelViewMatrix() const
|
||||
Matrix Camera::getModelViewMatrix() const
|
||||
{
|
||||
Matrix modelViewMatrix;
|
||||
|
||||
@@ -475,7 +475,7 @@ const Matrix Camera::getModelViewMatrix() const
|
||||
return modelViewMatrix;
|
||||
}
|
||||
|
||||
const float Camera::getFusionDistance() const
|
||||
float Camera::getFusionDistance() const
|
||||
{
|
||||
switch(_fusionDistanceMode)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using namespace osg;
|
||||
ClipNode::ClipNode()
|
||||
{
|
||||
_value = StateAttribute::ON;
|
||||
_dstate = osgNew StateSet;
|
||||
_stateset = osgNew StateSet;
|
||||
}
|
||||
|
||||
ClipNode::ClipNode(const ClipNode& cn, const CopyOp& copyop):Group(cn,copyop)
|
||||
@@ -42,7 +42,7 @@ void ClipNode::createClipBox(const BoundingBox& bb,unsigned int clipPlaneNumberB
|
||||
|
||||
// Add a ClipPlane to a ClipNode. Return true if plane is added,
|
||||
// return false if plane already exists in ClipNode, or clipplane is false.
|
||||
const bool ClipNode::addClipPlane(ClipPlane* clipplane)
|
||||
bool ClipNode::addClipPlane(ClipPlane* clipplane)
|
||||
{
|
||||
if (!clipplane) return false;
|
||||
|
||||
@@ -61,7 +61,7 @@ const bool ClipNode::addClipPlane(ClipPlane* clipplane)
|
||||
|
||||
// Remove ClipPlane from a ClipNode. Return true if plane is removed,
|
||||
// return false if plane does not exists in ClipNode.
|
||||
const bool ClipNode::removeClipPlane(ClipPlane* clipplane)
|
||||
bool ClipNode::removeClipPlane(ClipPlane* clipplane)
|
||||
{
|
||||
if (!clipplane) return false;
|
||||
|
||||
@@ -81,7 +81,7 @@ const bool ClipNode::removeClipPlane(ClipPlane* clipplane)
|
||||
|
||||
// Remove ClipPlane, at specified index, from a ClipNode. Return true if plane is removed,
|
||||
// return false if plane does not exists in ClipNode.
|
||||
const bool ClipNode::removeClipPlane(unsigned int pos)
|
||||
bool ClipNode::removeClipPlane(unsigned int pos)
|
||||
{
|
||||
if (pos<_planes.size())
|
||||
{
|
||||
@@ -108,12 +108,12 @@ void ClipNode::setStateSetModes(StateSet& stateset,const StateAttribute::GLModeV
|
||||
|
||||
void ClipNode::setLocalStateSetModes(const StateAttribute::GLModeValue value)
|
||||
{
|
||||
if (!_dstate) _dstate = osgNew StateSet;
|
||||
_dstate->setAllToInherit();
|
||||
setStateSetModes(*_dstate,value);
|
||||
if (!_stateset) _stateset = osgNew StateSet;
|
||||
_stateset->setAllToInherit();
|
||||
setStateSetModes(*_stateset,value);
|
||||
}
|
||||
|
||||
const bool ClipNode::computeBound() const
|
||||
bool ClipNode::computeBound() const
|
||||
{
|
||||
return Group::computeBound();
|
||||
}
|
||||
|
||||
@@ -72,12 +72,12 @@ void ClipPlane::getClipPlane(double* plane) const
|
||||
plane[3] = _clipPlane[3];
|
||||
}
|
||||
|
||||
void ClipPlane::setClipPlaneNum(const unsigned int num)
|
||||
void ClipPlane::setClipPlaneNum(unsigned int num)
|
||||
{
|
||||
_clipPlaneNum = num;
|
||||
}
|
||||
|
||||
const unsigned int ClipPlane::getClipPlaneNum() const
|
||||
unsigned int ClipPlane::getClipPlaneNum() const
|
||||
{
|
||||
return _clipPlaneNum;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ void DOFTransform::traverse(NodeVisitor& nv)
|
||||
Transform::traverse(nv);
|
||||
}
|
||||
|
||||
const bool DOFTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
bool DOFTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
//put the PUT matrix first:
|
||||
Matrix l2w(getPutMatrix());
|
||||
@@ -55,7 +55,7 @@ const bool DOFTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*)
|
||||
}
|
||||
|
||||
|
||||
const bool DOFTransform::computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
bool DOFTransform::computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
//put the PUT matrix first:
|
||||
Matrix w2l(getInversePutMatrix());
|
||||
|
||||
@@ -57,7 +57,7 @@ void DrawPixels::getSubImageDimensions(unsigned int& offsetX,unsigned int& offse
|
||||
}
|
||||
|
||||
|
||||
const bool DrawPixels::computeBound() const
|
||||
bool DrawPixels::computeBound() const
|
||||
{
|
||||
// really needs to be dependant of view poistion and projection... will implement simple version right now.
|
||||
_bbox.init();
|
||||
@@ -83,11 +83,13 @@ void DrawPixels::drawImmediateMode(State&)
|
||||
|
||||
if (_useSubImage)
|
||||
{
|
||||
const GLvoid* pixels = _image->data();
|
||||
const GLvoid* pixels = _image->data(_offsetX,_offsetY);
|
||||
glPixelStorei(GL_PACK_ROW_LENGTH,_image->s());
|
||||
glDrawPixels(_width,_height,
|
||||
(GLenum)_image->getPixelFormat(),
|
||||
(GLenum)_image->getDataType(),
|
||||
pixels);
|
||||
glPixelStorei(GL_PACK_ROW_LENGTH,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ Drawable::Drawable()
|
||||
Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop):
|
||||
Object(drawable,copyop),
|
||||
_parents(), // leave empty as parentList is managed by Geode
|
||||
_dstate(copyop(drawable._dstate.get())),
|
||||
_stateset(copyop(drawable._stateset.get())),
|
||||
_supportsDisplayList(drawable._supportsDisplayList),
|
||||
_useDisplayList(drawable._useDisplayList),
|
||||
_globjList(drawable._globjList),
|
||||
@@ -58,6 +58,12 @@ void Drawable::removeParent(osg::Node* node)
|
||||
if (pitr!=_parents.end()) _parents.erase(pitr);
|
||||
}
|
||||
|
||||
osg::StateSet* Drawable::getOrCreateStateSet()
|
||||
{
|
||||
if (!_stateset) _stateset = osgNew StateSet;
|
||||
return _stateset.get();
|
||||
}
|
||||
|
||||
void Drawable::dirtyBound()
|
||||
{
|
||||
if (_bbox_computed)
|
||||
@@ -96,9 +102,9 @@ void Drawable::compile(State& state)
|
||||
}
|
||||
|
||||
|
||||
if (_dstate.valid())
|
||||
if (_stateset.valid())
|
||||
{
|
||||
_dstate->compile(state);
|
||||
_stateset->compile(state);
|
||||
}
|
||||
|
||||
globj = glGenLists( 1 );
|
||||
@@ -113,7 +119,7 @@ void Drawable::compile(State& state)
|
||||
|
||||
}
|
||||
|
||||
void Drawable::setSupportsDisplayList(const bool flag)
|
||||
void Drawable::setSupportsDisplayList(bool flag)
|
||||
{
|
||||
// if value unchanged simply return.
|
||||
if (_supportsDisplayList==flag) return;
|
||||
@@ -134,7 +140,7 @@ void Drawable::setSupportsDisplayList(const bool flag)
|
||||
_supportsDisplayList=flag;
|
||||
}
|
||||
|
||||
void Drawable::setUseDisplayList(const bool flag)
|
||||
void Drawable::setUseDisplayList(bool flag)
|
||||
{
|
||||
// if value unchanged simply return.
|
||||
if (_useDisplayList==flag) return;
|
||||
@@ -288,7 +294,7 @@ struct ComputeBound : public Drawable::PrimitiveFunctor
|
||||
BoundingBox _bb;
|
||||
};
|
||||
|
||||
const bool Drawable::computeBound() const
|
||||
bool Drawable::computeBound() const
|
||||
{
|
||||
ComputeBound cb;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
const bool osg::isGLExtensionSupported(const char *extension)
|
||||
bool osg::isGLExtensionSupported(const char *extension)
|
||||
{
|
||||
typedef std::set<std::string> ExtensionSet;
|
||||
static ExtensionSet s_extensionSet;
|
||||
@@ -52,7 +52,7 @@ const bool osg::isGLExtensionSupported(const char *extension)
|
||||
return result;
|
||||
}
|
||||
|
||||
const bool osg::isGLUExtensionSupported(const char *extension)
|
||||
bool osg::isGLUExtensionSupported(const char *extension)
|
||||
{
|
||||
typedef std::set<std::string> ExtensionSet;
|
||||
static ExtensionSet s_extensionSet;
|
||||
|
||||
@@ -423,7 +423,7 @@ void GeoSet::computeNumVerts() const
|
||||
|
||||
|
||||
// just use the base Drawable's PrimitiveFunctor based implementation.
|
||||
const bool GeoSet::computeBound() const
|
||||
bool GeoSet::computeBound() const
|
||||
{
|
||||
_bbox.init();
|
||||
|
||||
@@ -536,7 +536,7 @@ const bool GeoSet::computeBound() const
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool GeoSet::check() const
|
||||
bool GeoSet::check() const
|
||||
{
|
||||
if( _coords == (Vec3 *)0 ) return false;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Geode::~Geode()
|
||||
}
|
||||
}
|
||||
|
||||
const bool Geode::addDrawable( Drawable *drawable )
|
||||
bool Geode::addDrawable( Drawable *drawable )
|
||||
{
|
||||
if (drawable && !containsDrawable(drawable))
|
||||
{
|
||||
@@ -56,7 +56,7 @@ const bool Geode::addDrawable( Drawable *drawable )
|
||||
}
|
||||
|
||||
|
||||
const bool Geode::removeDrawable( Drawable *drawable )
|
||||
bool Geode::removeDrawable( Drawable *drawable )
|
||||
{
|
||||
DrawableList::iterator itr = findDrawable(drawable);
|
||||
if (itr!=_drawables.end())
|
||||
@@ -80,7 +80,7 @@ const bool Geode::removeDrawable( Drawable *drawable )
|
||||
}
|
||||
|
||||
|
||||
const bool Geode::replaceDrawable( Drawable *origDrawable, Drawable *newDrawable )
|
||||
bool Geode::replaceDrawable( Drawable *origDrawable, Drawable *newDrawable )
|
||||
{
|
||||
if (newDrawable==NULL || origDrawable==newDrawable) return false;
|
||||
|
||||
@@ -115,7 +115,7 @@ const bool Geode::replaceDrawable( Drawable *origDrawable, Drawable *newDrawable
|
||||
}
|
||||
|
||||
|
||||
const bool Geode::computeBound() const
|
||||
bool Geode::computeBound() const
|
||||
{
|
||||
_bsphere.init();
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ bool Group::replaceChild( Node *origNode, Node *newNode )
|
||||
|
||||
}
|
||||
|
||||
const bool Group::computeBound() const
|
||||
bool Group::computeBound() const
|
||||
{
|
||||
|
||||
_bsphere_computed = true;
|
||||
|
||||
@@ -66,7 +66,7 @@ void Image::setFileName(const std::string& fileName)
|
||||
}
|
||||
|
||||
|
||||
const bool Image::isPackedType(GLenum type)
|
||||
bool Image::isPackedType(GLenum type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ const bool Image::isPackedType(GLenum type)
|
||||
}
|
||||
}
|
||||
|
||||
const unsigned int Image::computeNumComponents(GLenum format)
|
||||
unsigned int Image::computeNumComponents(GLenum format)
|
||||
{
|
||||
switch(format)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ const unsigned int Image::computeNumComponents(GLenum format)
|
||||
}
|
||||
|
||||
|
||||
const unsigned int Image::computePixelSizeInBits(GLenum format,GLenum type)
|
||||
unsigned int Image::computePixelSizeInBits(GLenum format,GLenum type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
@@ -144,7 +144,7 @@ const unsigned int Image::computePixelSizeInBits(GLenum format,GLenum type)
|
||||
|
||||
}
|
||||
|
||||
const unsigned int Image::computeRowWidthInBytes(int width,GLenum format,GLenum type,int packing)
|
||||
unsigned int Image::computeRowWidthInBytes(int width,GLenum format,GLenum type,int packing)
|
||||
{
|
||||
unsigned int pixelSize = computePixelSizeInBits(format,type);
|
||||
int widthInBits = width*pixelSize;
|
||||
@@ -152,7 +152,7 @@ const unsigned int Image::computeRowWidthInBytes(int width,GLenum format,GLenum
|
||||
return (widthInBits/packingInBits + ((widthInBits%packingInBits)?1:0))*packing;
|
||||
}
|
||||
|
||||
const unsigned int Image::computeNearestPowerOfTwo(unsigned int s,float bias)
|
||||
unsigned int Image::computeNearestPowerOfTwo(unsigned int s,float bias)
|
||||
{
|
||||
if ((s & (s-1))!=0)
|
||||
{
|
||||
@@ -174,7 +174,7 @@ void Image::setInternalTextureFormat(GLint internalFormat)
|
||||
_internalTextureFormat = internalFormat;
|
||||
}
|
||||
|
||||
void Image::setPixelFormat(const GLenum format)
|
||||
void Image::setPixelFormat(GLenum format)
|
||||
{
|
||||
if (_pixelFormat==format) return; // do nothing if the same.
|
||||
|
||||
@@ -272,7 +272,7 @@ void Image::readPixels(int x,int y,int width,int height,
|
||||
}
|
||||
|
||||
|
||||
void Image::scaleImage(const int s,const int t,const int r)
|
||||
void Image::scaleImage(int s,int t,int r)
|
||||
{
|
||||
if (_s==s && _t==t && _r==r) return;
|
||||
|
||||
@@ -486,7 +486,7 @@ Geode* osg::createGeodeForImage(osg::Image* image)
|
||||
}
|
||||
|
||||
|
||||
Geode* osg::createGeodeForImage(osg::Image* image,const float s,const float t)
|
||||
Geode* osg::createGeodeForImage(osg::Image* image,float s,float t)
|
||||
{
|
||||
if (image)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ void Impostor::addImpostorSprite(ImpostorSprite* is)
|
||||
}
|
||||
}
|
||||
|
||||
const bool Impostor::computeBound() const
|
||||
bool Impostor::computeBound() const
|
||||
{
|
||||
return LOD::computeBound();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ ImpostorSprite::~ImpostorSprite()
|
||||
}
|
||||
}
|
||||
|
||||
const float ImpostorSprite::calcPixelError(const Matrix& MVPW) const
|
||||
float ImpostorSprite::calcPixelError(const Matrix& MVPW) const
|
||||
{
|
||||
// find the maximum screen space pixel error between the control coords and the quad coners.
|
||||
float max_error_sqrd = 0.0f;
|
||||
@@ -85,7 +85,7 @@ void ImpostorSprite::drawImmediateMode(State&)
|
||||
|
||||
}
|
||||
|
||||
const bool ImpostorSprite::computeBound() const
|
||||
bool ImpostorSprite::computeBound() const
|
||||
{
|
||||
_bbox.init();
|
||||
_bbox.expandBy(_coords[0]);
|
||||
|
||||
@@ -29,7 +29,7 @@ void LOD::traverse(NodeVisitor& nv)
|
||||
}
|
||||
|
||||
|
||||
void LOD::setRange(const unsigned int index, const float range)
|
||||
void LOD::setRange(unsigned int index, float range)
|
||||
{
|
||||
if (index<_rangeList.size()) _rangeList[index] = range;
|
||||
else while (index>=_rangeList.size()) _rangeList.push_back(range);
|
||||
@@ -39,7 +39,7 @@ void LOD::setRange(const unsigned int index, const float range)
|
||||
}
|
||||
|
||||
|
||||
const int LOD::evaluateLODChild(const Vec3& eye_local, const float bias) const
|
||||
int LOD::evaluateLODChild(const Vec3& eye_local, float bias) const
|
||||
{
|
||||
// For cache coherency, use _rangeList2 exclusively
|
||||
if (_rangeList2.empty()) return -1;
|
||||
|
||||
@@ -7,7 +7,7 @@ LightSource::LightSource():
|
||||
{
|
||||
// switch off culling of light source nodes by default.
|
||||
setCullingActive(false);
|
||||
_dstate = osgNew StateSet;
|
||||
_stateset = osgNew StateSet;
|
||||
_light = osgNew Light;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ void LightSource::setLight(StateAttribute* light)
|
||||
}
|
||||
|
||||
// Set the GLModes on StateSet associated with the ClipPlanes.
|
||||
void LightSource::setStateSetModes(StateSet& stateset,const StateAttribute::GLModeValue value) const
|
||||
void LightSource::setStateSetModes(StateSet& stateset,StateAttribute::GLModeValue value) const
|
||||
{
|
||||
if (_light.valid())
|
||||
{
|
||||
@@ -33,14 +33,14 @@ void LightSource::setStateSetModes(StateSet& stateset,const StateAttribute::GLMo
|
||||
}
|
||||
}
|
||||
|
||||
void LightSource::setLocalStateSetModes(const StateAttribute::GLModeValue value)
|
||||
void LightSource::setLocalStateSetModes(StateAttribute::GLModeValue value)
|
||||
{
|
||||
if (!_dstate) _dstate = osgNew StateSet;
|
||||
_dstate->setAllToInherit();
|
||||
setStateSetModes(*_dstate,value);
|
||||
if (!_stateset) _stateset = osgNew StateSet;
|
||||
_stateset->setAllToInherit();
|
||||
setStateSetModes(*_stateset,value);
|
||||
}
|
||||
|
||||
const bool LightSource::computeBound() const
|
||||
bool LightSource::computeBound() const
|
||||
{
|
||||
Group::computeBound();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
using namespace osg;
|
||||
|
||||
const bool LineSegment::intersectAndClip(Vec3& s,Vec3& e,const BoundingBox& bb)
|
||||
bool LineSegment::intersectAndClip(Vec3& s,Vec3& e,const BoundingBox& bb)
|
||||
{
|
||||
// compate s and e against the xMin to xMax range of bb.
|
||||
if (s.x()<=e.x())
|
||||
@@ -122,7 +122,7 @@ const bool LineSegment::intersectAndClip(Vec3& s,Vec3& e,const BoundingBox& bb)
|
||||
}
|
||||
|
||||
|
||||
const bool LineSegment::intersect(const BoundingBox& bb) const
|
||||
bool LineSegment::intersect(const BoundingBox& bb) const
|
||||
{
|
||||
if (!bb.valid()) return false;
|
||||
|
||||
@@ -131,7 +131,7 @@ const bool LineSegment::intersect(const BoundingBox& bb) const
|
||||
}
|
||||
|
||||
|
||||
const bool LineSegment::intersect(const BoundingBox& bb,float& r1,float& r2) const
|
||||
bool LineSegment::intersect(const BoundingBox& bb,float& r1,float& r2) const
|
||||
{
|
||||
if (!bb.valid()) return false;
|
||||
|
||||
@@ -156,7 +156,7 @@ const bool LineSegment::intersect(const BoundingBox& bb,float& r1,float& r2) con
|
||||
}
|
||||
|
||||
|
||||
const bool LineSegment::intersect(const BoundingSphere& bs,float& r1,float& r2) const
|
||||
bool LineSegment::intersect(const BoundingSphere& bs,float& r1,float& r2) const
|
||||
{
|
||||
Vec3 sm = _s-bs._center;
|
||||
float c = sm.length2()-bs._radius*bs._radius;
|
||||
@@ -185,7 +185,7 @@ const bool LineSegment::intersect(const BoundingSphere& bs,float& r1,float& r2)
|
||||
}
|
||||
|
||||
|
||||
const bool LineSegment::intersect(const BoundingSphere& bs) const
|
||||
bool LineSegment::intersect(const BoundingSphere& bs) const
|
||||
{
|
||||
Vec3 sm = _s-bs._center;
|
||||
float c = sm.length2()-bs._radius*bs._radius;
|
||||
@@ -215,7 +215,7 @@ const bool LineSegment::intersect(const BoundingSphere& bs) const
|
||||
}
|
||||
|
||||
|
||||
const bool LineSegment::intersect(const Vec3& v1,const Vec3& v2,const Vec3& v3,float& r)
|
||||
bool LineSegment::intersect(const Vec3& v1,const Vec3& v2,const Vec3& v3,float& r)
|
||||
{
|
||||
if (v1==v2 || v2==v3 || v1==v3) return false;
|
||||
|
||||
|
||||
@@ -16,18 +16,18 @@ LineStipple::~LineStipple()
|
||||
{
|
||||
}
|
||||
|
||||
void LineStipple::setFactor(const int factor)
|
||||
void LineStipple::setFactor(GLint factor)
|
||||
{
|
||||
_factor = factor;
|
||||
_factor = factor;
|
||||
}
|
||||
|
||||
void LineStipple::setPattern(const unsigned short pattern)
|
||||
void LineStipple::setPattern(GLushort pattern)
|
||||
{
|
||||
_pattern = pattern;
|
||||
_pattern = pattern;
|
||||
}
|
||||
|
||||
void LineStipple::apply(State&) const
|
||||
{
|
||||
glLineStipple(_factor, _pattern);
|
||||
glLineStipple(_factor, _pattern);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ Material::~Material()
|
||||
}
|
||||
|
||||
|
||||
void Material::setAmbient( const Face face, const Vec4& ambient )
|
||||
void Material::setAmbient(Face face, const Vec4& ambient )
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ void Material::setAmbient( const Face face, const Vec4& ambient )
|
||||
}
|
||||
|
||||
|
||||
const Vec4& Material::getAmbient(const Face face) const
|
||||
const Vec4& Material::getAmbient(Face face) const
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ const Vec4& Material::getAmbient(const Face face) const
|
||||
}
|
||||
|
||||
|
||||
void Material::setDiffuse( const Face face, const Vec4& diffuse )
|
||||
void Material::setDiffuse(Face face, const Vec4& diffuse )
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ void Material::setDiffuse( const Face face, const Vec4& diffuse )
|
||||
}
|
||||
|
||||
|
||||
const Vec4& Material::getDiffuse(const Face face) const
|
||||
const Vec4& Material::getDiffuse(Face face) const
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -129,7 +129,7 @@ const Vec4& Material::getDiffuse(const Face face) const
|
||||
}
|
||||
|
||||
|
||||
void Material::setSpecular( const Face face, const Vec4& specular )
|
||||
void Material::setSpecular(Face face, const Vec4& specular )
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -156,7 +156,7 @@ void Material::setSpecular( const Face face, const Vec4& specular )
|
||||
}
|
||||
|
||||
|
||||
const Vec4& Material::getSpecular(const Face face) const
|
||||
const Vec4& Material::getSpecular(Face face) const
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -177,7 +177,7 @@ const Vec4& Material::getSpecular(const Face face) const
|
||||
}
|
||||
|
||||
|
||||
void Material::setEmission( const Face face, const Vec4& emission )
|
||||
void Material::setEmission(Face face, const Vec4& emission )
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -204,7 +204,7 @@ void Material::setEmission( const Face face, const Vec4& emission )
|
||||
}
|
||||
|
||||
|
||||
const Vec4& Material::getEmission(const Face face) const
|
||||
const Vec4& Material::getEmission(Face face) const
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ const Vec4& Material::getEmission(const Face face) const
|
||||
}
|
||||
|
||||
|
||||
void Material::setShininess( const Face face, float shininess )
|
||||
void Material::setShininess(Face face, float shininess )
|
||||
{
|
||||
clampBetweenRange(shininess,0.0f,128.0f,"Material::setShininess()");
|
||||
|
||||
@@ -251,7 +251,7 @@ void Material::setShininess( const Face face, float shininess )
|
||||
}
|
||||
|
||||
|
||||
const float Material::getShininess(const Face face) const
|
||||
float Material::getShininess(Face face) const
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -271,7 +271,7 @@ const float Material::getShininess(const Face face) const
|
||||
return _shininessFront;
|
||||
}
|
||||
|
||||
void Material::setTransparency(const Face face,float transparency)
|
||||
void Material::setTransparency(Face face,float transparency)
|
||||
{
|
||||
clampBetweenRange(transparency,0.0f,1.0f,"Material::setTransparency()");
|
||||
|
||||
@@ -292,7 +292,7 @@ void Material::setTransparency(const Face face,float transparency)
|
||||
}
|
||||
}
|
||||
|
||||
void Material::setAlpha(const Face face,float alpha)
|
||||
void Material::setAlpha(Face face,float alpha)
|
||||
{
|
||||
clampBetweenRange(alpha,0.0f,1.0f,"Material::setAlpha()");
|
||||
|
||||
|
||||
@@ -301,9 +301,9 @@ bool Matrix::invert( const Matrix& mat )
|
||||
return true;
|
||||
}
|
||||
|
||||
void Matrix::makeOrtho(const double left, const double right,
|
||||
const double bottom, const double top,
|
||||
const double zNear, const double zFar)
|
||||
void Matrix::makeOrtho(double left, double right,
|
||||
double bottom, double top,
|
||||
double zNear, double zFar)
|
||||
{
|
||||
// note transpose of Matrix wr.t OpenGL documentation, since the OSG use post multiplication rather than pre.
|
||||
double tx = -(right+left)/(right-left);
|
||||
@@ -315,9 +315,9 @@ void Matrix::makeOrtho(const double left, const double right,
|
||||
SET_ROW(3, tx, ty, tz, 1.0f )
|
||||
}
|
||||
|
||||
void Matrix::makeFrustum(const double left, const double right,
|
||||
const double bottom, const double top,
|
||||
const double zNear, const double zFar)
|
||||
void Matrix::makeFrustum(double left, double right,
|
||||
double bottom, double top,
|
||||
double zNear, double zFar)
|
||||
{
|
||||
// note transpose of Matrix wr.t OpenGL documentation, since the OSG use post multiplication rather than pre.
|
||||
double A = (right+left)/(right-left);
|
||||
@@ -331,8 +331,8 @@ void Matrix::makeFrustum(const double left, const double right,
|
||||
}
|
||||
|
||||
|
||||
void Matrix::makePerspective(const double fovy,const double aspectRatio,
|
||||
const double zNear, const double zFar)
|
||||
void Matrix::makePerspective(double fovy,double aspectRatio,
|
||||
double zNear, double zFar)
|
||||
{
|
||||
// calculate the appropriate left, right etc.
|
||||
double tan_fovy = tan(DegreesToRadians(fovy*0.5));
|
||||
|
||||
@@ -320,7 +320,7 @@ sMStats m_getMemoryStatistics()
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
static const char *ownerString(const char *sourceFile, const unsigned int sourceLine)
|
||||
static const char *ownerString(const char *sourceFile, unsigned int sourceLine)
|
||||
{
|
||||
static char str[90];
|
||||
memset(str, 0, sizeof(str));
|
||||
@@ -425,7 +425,7 @@ sMStats m_getMemoryStatistics()
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
static void wipeWithPattern(sAllocUnit *allocUnit, unsigned long pattern, const unsigned int originalReportedSize = 0)
|
||||
static void wipeWithPattern(sAllocUnit *allocUnit, unsigned long pattern, unsigned int originalReportedSize = 0)
|
||||
{
|
||||
// For a serious test run, we use wipes of random a random value. However, if this causes a crash, we don't want it to
|
||||
// crash in a differnt place each time, so we specifically DO NOT call srand. If, by chance your program calls srand(),
|
||||
@@ -740,7 +740,7 @@ sMStats m_getMemoryStatistics()
|
||||
// Used by the macros
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void m_setOwner(const char *file, const unsigned int line)
|
||||
void m_setOwner(const char *file, unsigned int line)
|
||||
{
|
||||
sourceFile = file;
|
||||
sourceLine = line;
|
||||
@@ -1014,7 +1014,7 @@ sMStats m_getMemoryStatistics()
|
||||
// Allocate memory and track it
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void *m_allocator(const char *sourceFile, const unsigned int sourceLine, const unsigned int allocationType, const size_t reportedSize)
|
||||
void *m_allocator(const char *sourceFile, unsigned int sourceLine, unsigned int allocationType, const size_t reportedSize)
|
||||
{
|
||||
|
||||
// check that exists allocated units havn't been damaged.
|
||||
@@ -1195,7 +1195,7 @@ sMStats m_getMemoryStatistics()
|
||||
// Reallocate memory and track it
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void *m_reallocator(const char *sourceFile, const unsigned int sourceLine, const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress)
|
||||
void *m_reallocator(const char *sourceFile, unsigned int sourceLine, unsigned int reallocationType, const size_t reportedSize, void *reportedAddress)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1390,7 +1390,7 @@ sMStats m_getMemoryStatistics()
|
||||
// Deallocate memory and track it
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void m_deallocator(const char *sourceFile, const unsigned int sourceLine, const unsigned int deallocationType, const void *reportedAddress)
|
||||
void m_deallocator(const char *sourceFile, unsigned int sourceLine, unsigned int deallocationType, const void *reportedAddress)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1604,7 +1604,7 @@ sMStats m_getMemoryStatistics()
|
||||
|
||||
unsigned int m_calcUnused(const sAllocUnit *allocUnit)
|
||||
{
|
||||
const unsigned long *ptr = (const unsigned long *) allocUnit->reportedAddress;
|
||||
unsigned long *ptr = (unsigned long *) allocUnit->reportedAddress;
|
||||
unsigned int count = 0;
|
||||
|
||||
for (unsigned int i = 0; i < allocUnit->reportedSize; i += sizeof(long), ptr++)
|
||||
@@ -1652,7 +1652,7 @@ sMStats m_getMemoryStatistics()
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void m_dumpMemoryReport(const char *filename, const bool overwrite)
|
||||
void m_dumpMemoryReport(const char *filename, bool overwrite)
|
||||
{
|
||||
// Open the report file
|
||||
|
||||
@@ -1726,17 +1726,17 @@ sMStats m_getMemoryStatistics()
|
||||
// dummy implementation for optimized build.
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void m_setOwner(const char *, const unsigned int ) { }
|
||||
void m_setOwner(const char *, unsigned int ) { }
|
||||
bool &m_breakOnRealloc(void *) { static bool result=false; return result; }
|
||||
bool &m_breakOnDealloc(void *) { static bool result=false; return result; }
|
||||
void m_breakOnAllocation(unsigned int ) {}
|
||||
|
||||
void *m_allocator(const char *, const unsigned int ,
|
||||
const unsigned int , const size_t ) { return 0L;}
|
||||
void *m_reallocator(const char *, const unsigned int ,
|
||||
const unsigned int , const size_t , void *) { return 0L;}
|
||||
void m_deallocator(const char *, const unsigned int ,
|
||||
const unsigned int , const void *) {}
|
||||
void *m_allocator(const char *, unsigned int ,
|
||||
unsigned int , const size_t ) { return 0L;}
|
||||
void *m_reallocator(const char *, unsigned int ,
|
||||
unsigned int , const size_t , void *) { return 0L;}
|
||||
void m_deallocator(const char *, unsigned int ,
|
||||
unsigned int , const void *) {}
|
||||
|
||||
bool m_validateAddress(const void *) { return true; }
|
||||
bool m_validateAllocUnit(const sAllocUnit *) { return true; }
|
||||
@@ -1746,7 +1746,7 @@ sMStats m_getMemoryStatistics()
|
||||
unsigned int m_calcAllUnused() { return 0; }
|
||||
|
||||
void m_dumpAllocUnit(const sAllocUnit *, const char *) {}
|
||||
void m_dumpMemoryReport(const char *, const bool ) {}
|
||||
void m_dumpMemoryReport(const char *, bool ) {}
|
||||
|
||||
#endif // OSG_USE_MEMORY_MANAGER
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Node::Node(const Node& node,const CopyOp& copyop):
|
||||
_numChildrenWithOccluderNodes(0),
|
||||
_nodeMask(node._nodeMask),
|
||||
_descriptions(node._descriptions),
|
||||
_dstate(copyop(node._dstate.get()))
|
||||
_stateset(copyop(node._stateset.get()))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -70,10 +70,10 @@ void Node::ascend(NodeVisitor& nv)
|
||||
std::for_each(_parents.begin(),_parents.end(),NodeAcceptOp(nv));
|
||||
}
|
||||
|
||||
osg::StateSet* Node::getValidStateSet()
|
||||
osg::StateSet* Node::getOrCreateStateSet()
|
||||
{
|
||||
if (!_dstate) _dstate = osgNew StateSet;
|
||||
return _dstate.get();
|
||||
if (!_stateset) _stateset = osgNew StateSet;
|
||||
return _stateset.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ void Node::setAppCallback(NodeCallback* nc)
|
||||
|
||||
}
|
||||
|
||||
void Node::setNumChildrenRequiringAppTraversal(const int num)
|
||||
void Node::setNumChildrenRequiringAppTraversal(unsigned int num)
|
||||
{
|
||||
// if no changes just return.
|
||||
if (_numChildrenRequiringAppTraversal==num) return;
|
||||
@@ -154,7 +154,7 @@ void Node::setNumChildrenRequiringAppTraversal(const int num)
|
||||
|
||||
}
|
||||
|
||||
void Node::setCullingActive(const bool active)
|
||||
void Node::setCullingActive(bool active)
|
||||
{
|
||||
// if no changes just return.
|
||||
if (_cullingActive == active) return;
|
||||
@@ -192,7 +192,7 @@ void Node::setCullingActive(const bool active)
|
||||
_cullingActive = active;
|
||||
}
|
||||
|
||||
void Node::setNumChildrenWithCullingDisabled(const int num)
|
||||
void Node::setNumChildrenWithCullingDisabled(unsigned int num)
|
||||
{
|
||||
// if no changes just return.
|
||||
if (_numChildrenWithCullingDisabled==num) return;
|
||||
@@ -229,7 +229,7 @@ void Node::setNumChildrenWithCullingDisabled(const int num)
|
||||
}
|
||||
|
||||
|
||||
void Node::setNumChildrenWithOccluderNodes(const int num)
|
||||
void Node::setNumChildrenWithOccluderNodes(unsigned int num)
|
||||
{
|
||||
// if no changes just return.
|
||||
if (_numChildrenWithOccluderNodes==num) return;
|
||||
@@ -266,12 +266,12 @@ void Node::setNumChildrenWithOccluderNodes(const int num)
|
||||
|
||||
}
|
||||
|
||||
const bool Node::containsOccluderNodes() const
|
||||
bool Node::containsOccluderNodes() const
|
||||
{
|
||||
return _numChildrenWithOccluderNodes>0 || dynamic_cast<const OccluderNode*>(this);
|
||||
}
|
||||
|
||||
const bool Node::computeBound() const
|
||||
bool Node::computeBound() const
|
||||
{
|
||||
_bsphere.init();
|
||||
return false;
|
||||
|
||||
@@ -99,7 +99,7 @@ class TransformVisitor : public NodeVisitor
|
||||
};
|
||||
|
||||
|
||||
const bool NodeVisitor::getLocalToWorldMatrix(Matrix& matrix, Node* node)
|
||||
bool NodeVisitor::getLocalToWorldMatrix(Matrix& matrix, Node* node)
|
||||
{
|
||||
TransformVisitor tv(matrix,TransformVisitor::LOCAL_TO_WORLD,this);
|
||||
for(NodePath::iterator itr=_nodePath.begin();
|
||||
@@ -112,7 +112,7 @@ const bool NodeVisitor::getLocalToWorldMatrix(Matrix& matrix, Node* node)
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool NodeVisitor::getWorldToLocalMatrix(Matrix& matrix, Node* node)
|
||||
bool NodeVisitor::getWorldToLocalMatrix(Matrix& matrix, Node* node)
|
||||
{
|
||||
TransformVisitor tv(matrix,TransformVisitor::WORLD_TO_LOCAL,this);
|
||||
for(NodePath::iterator itr=_nodePath.begin();
|
||||
|
||||
@@ -12,7 +12,7 @@ OccluderNode::OccluderNode(const OccluderNode& node,const CopyOp& copyop):
|
||||
{
|
||||
}
|
||||
|
||||
const bool OccluderNode::computeBound() const
|
||||
bool OccluderNode::computeBound() const
|
||||
{
|
||||
bool result = Group::computeBound();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ PolygonMode::~PolygonMode()
|
||||
{
|
||||
}
|
||||
|
||||
void PolygonMode::setMode(const Face face,const Mode mode)
|
||||
void PolygonMode::setMode(Face face,Mode mode)
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ void PolygonMode::setMode(const Face face,const Mode mode)
|
||||
}
|
||||
}
|
||||
|
||||
const PolygonMode::Mode PolygonMode::getMode(const Face face) const
|
||||
PolygonMode::Mode PolygonMode::getMode(Face face) const
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ PositionAttitudeTransform::PositionAttitudeTransform()
|
||||
{
|
||||
}
|
||||
|
||||
const bool PositionAttitudeTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
bool PositionAttitudeTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
if (_referenceFrame==RELATIVE_TO_PARENTS)
|
||||
{
|
||||
@@ -24,7 +24,7 @@ const bool PositionAttitudeTransform::computeLocalToWorldMatrix(Matrix& matrix,N
|
||||
}
|
||||
|
||||
|
||||
const bool PositionAttitudeTransform::computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
bool PositionAttitudeTransform::computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
if (_referenceFrame==RELATIVE_TO_PARENTS)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ void Sequence::setTime(int frame, float t)
|
||||
}
|
||||
}
|
||||
|
||||
const float Sequence::getTime(int frame) const
|
||||
float Sequence::getTime(int frame) const
|
||||
{
|
||||
if (frame >= 0 && frame < (int) _frameTime.size())
|
||||
return _frameTime[frame];
|
||||
|
||||
@@ -245,12 +245,12 @@ void State::apply()
|
||||
}
|
||||
}
|
||||
|
||||
void State::haveAppliedMode(const StateAttribute::GLMode mode,const StateAttribute::GLModeValue value)
|
||||
void State::haveAppliedMode(StateAttribute::GLMode mode,StateAttribute::GLModeValue value)
|
||||
{
|
||||
haveAppliedMode(_modeMap,mode,value);
|
||||
}
|
||||
|
||||
void State::haveAppliedMode(const StateAttribute::GLMode mode)
|
||||
void State::haveAppliedMode(StateAttribute::GLMode mode)
|
||||
{
|
||||
haveAppliedMode(_modeMap,mode);
|
||||
}
|
||||
@@ -260,28 +260,28 @@ void State::haveAppliedAttribute(const StateAttribute* attribute)
|
||||
haveAppliedAttribute(_attributeMap,attribute);
|
||||
}
|
||||
|
||||
void State::haveAppliedAttribute(const StateAttribute::Type type)
|
||||
void State::haveAppliedAttribute(StateAttribute::Type type)
|
||||
{
|
||||
haveAppliedAttribute(_attributeMap,type);
|
||||
}
|
||||
|
||||
const bool State::getLastAppliedMode(const StateAttribute::GLMode mode) const
|
||||
bool State::getLastAppliedMode(StateAttribute::GLMode mode) const
|
||||
{
|
||||
return getLastAppliedMode(_modeMap,mode);
|
||||
}
|
||||
|
||||
const StateAttribute* State::getLastAppliedAttribute(const StateAttribute::Type type) const
|
||||
const StateAttribute* State::getLastAppliedAttribute(StateAttribute::Type type) const
|
||||
{
|
||||
return getLastAppliedAttribute(_attributeMap,type);
|
||||
}
|
||||
|
||||
|
||||
void State::haveAppliedTextureMode(unsigned int unit,const StateAttribute::GLMode mode,const StateAttribute::GLModeValue value)
|
||||
void State::haveAppliedTextureMode(unsigned int unit,StateAttribute::GLMode mode,StateAttribute::GLModeValue value)
|
||||
{
|
||||
haveAppliedMode(getOrCreateTextureModeMap(unit),mode,value);
|
||||
}
|
||||
|
||||
void State::haveAppliedTextureMode(unsigned int unit,const StateAttribute::GLMode mode)
|
||||
void State::haveAppliedTextureMode(unsigned int unit,StateAttribute::GLMode mode)
|
||||
{
|
||||
haveAppliedMode(getOrCreateTextureModeMap(unit),mode);
|
||||
}
|
||||
@@ -291,25 +291,25 @@ void State::haveAppliedTextureAttribute(unsigned int unit,const StateAttribute*
|
||||
haveAppliedAttribute(getOrCreateTextureAttributeMap(unit),attribute);
|
||||
}
|
||||
|
||||
void State::haveAppliedTextureAttribute(unsigned int unit,const StateAttribute::Type type)
|
||||
void State::haveAppliedTextureAttribute(unsigned int unit,StateAttribute::Type type)
|
||||
{
|
||||
haveAppliedAttribute(getOrCreateTextureAttributeMap(unit),type);
|
||||
}
|
||||
|
||||
const bool State::getLastAppliedTextureMode(unsigned int unit,const StateAttribute::GLMode mode) const
|
||||
bool State::getLastAppliedTextureMode(unsigned int unit,StateAttribute::GLMode mode) const
|
||||
{
|
||||
if (unit>=_textureModeMapList.size()) return false;
|
||||
return getLastAppliedMode(_textureModeMapList[unit],mode);
|
||||
}
|
||||
|
||||
const StateAttribute* State::getLastAppliedTextureAttribute(unsigned int unit,const StateAttribute::Type type) const
|
||||
const StateAttribute* State::getLastAppliedTextureAttribute(unsigned int unit,StateAttribute::Type type) const
|
||||
{
|
||||
if (unit>=_textureAttributeMapList.size()) return false;
|
||||
return getLastAppliedAttribute(_textureAttributeMapList[unit],type);
|
||||
}
|
||||
|
||||
|
||||
void State::haveAppliedMode(ModeMap& modeMap,const StateAttribute::GLMode mode,const StateAttribute::GLModeValue value)
|
||||
void State::haveAppliedMode(ModeMap& modeMap,StateAttribute::GLMode mode,StateAttribute::GLModeValue value)
|
||||
{
|
||||
ModeStack& ms = modeMap[mode];
|
||||
|
||||
@@ -320,7 +320,7 @@ void State::haveAppliedMode(ModeMap& modeMap,const StateAttribute::GLMode mode,c
|
||||
}
|
||||
|
||||
/** mode has been set externally, update state to reflect this setting.*/
|
||||
void State::haveAppliedMode(ModeMap& modeMap,const StateAttribute::GLMode mode)
|
||||
void State::haveAppliedMode(ModeMap& modeMap,StateAttribute::GLMode mode)
|
||||
{
|
||||
ModeStack& ms = modeMap[mode];
|
||||
|
||||
@@ -346,7 +346,7 @@ void State::haveAppliedAttribute(AttributeMap& attributeMap,const StateAttribute
|
||||
}
|
||||
}
|
||||
|
||||
void State::haveAppliedAttribute(AttributeMap& attributeMap,const StateAttribute::Type type)
|
||||
void State::haveAppliedAttribute(AttributeMap& attributeMap,StateAttribute::Type type)
|
||||
{
|
||||
|
||||
AttributeMap::iterator itr = attributeMap.find(type);
|
||||
@@ -360,7 +360,7 @@ void State::haveAppliedAttribute(AttributeMap& attributeMap,const StateAttribute
|
||||
}
|
||||
}
|
||||
|
||||
const bool State::getLastAppliedMode(const ModeMap& modeMap,const StateAttribute::GLMode mode) const
|
||||
bool State::getLastAppliedMode(const ModeMap& modeMap,StateAttribute::GLMode mode) const
|
||||
{
|
||||
ModeMap::const_iterator itr = modeMap.find(mode);
|
||||
if (itr!=modeMap.end())
|
||||
@@ -374,7 +374,7 @@ const bool State::getLastAppliedMode(const ModeMap& modeMap,const StateAttribute
|
||||
}
|
||||
}
|
||||
|
||||
const StateAttribute* State::getLastAppliedAttribute(const AttributeMap& attributeMap,const StateAttribute::Type type) const
|
||||
const StateAttribute* State::getLastAppliedAttribute(const AttributeMap& attributeMap,StateAttribute::Type type) const
|
||||
{
|
||||
AttributeMap::const_iterator itr = attributeMap.find(type);
|
||||
if (itr!=attributeMap.end())
|
||||
|
||||
@@ -483,7 +483,7 @@ void StateSet::merge(const StateSet& rhs)
|
||||
}
|
||||
|
||||
|
||||
void StateSet::setMode(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
|
||||
void StateSet::setMode(StateAttribute::GLMode mode, StateAttribute::GLModeValue value)
|
||||
{
|
||||
if (!s_textureGLModeSet.isTextureMode(mode))
|
||||
{
|
||||
@@ -499,7 +499,7 @@ void StateSet::setMode(const StateAttribute::GLMode mode, const StateAttribute::
|
||||
}
|
||||
}
|
||||
|
||||
void StateSet::setModeToInherit(const StateAttribute::GLMode mode)
|
||||
void StateSet::setModeToInherit(StateAttribute::GLMode mode)
|
||||
{
|
||||
if (!s_textureGLModeSet.isTextureMode(mode))
|
||||
{
|
||||
@@ -516,7 +516,7 @@ void StateSet::setModeToInherit(const StateAttribute::GLMode mode)
|
||||
|
||||
}
|
||||
|
||||
const StateAttribute::GLModeValue StateSet::getMode(const StateAttribute::GLMode mode) const
|
||||
StateAttribute::GLModeValue StateSet::getMode(StateAttribute::GLMode mode) const
|
||||
{
|
||||
if (!s_textureGLModeSet.isTextureMode(mode))
|
||||
{
|
||||
@@ -532,7 +532,7 @@ const StateAttribute::GLModeValue StateSet::getMode(const StateAttribute::GLMode
|
||||
}
|
||||
}
|
||||
|
||||
void StateSet::setAttribute(StateAttribute *attribute, const StateAttribute::OverrideValue value)
|
||||
void StateSet::setAttribute(StateAttribute *attribute, StateAttribute::OverrideValue value)
|
||||
{
|
||||
if (attribute)
|
||||
{
|
||||
@@ -551,7 +551,7 @@ void StateSet::setAttribute(StateAttribute *attribute, const StateAttribute::Ove
|
||||
}
|
||||
}
|
||||
|
||||
void StateSet::setAttributeAndModes(StateAttribute *attribute, const StateAttribute::GLModeValue value)
|
||||
void StateSet::setAttributeAndModes(StateAttribute *attribute, StateAttribute::GLModeValue value)
|
||||
{
|
||||
if (attribute)
|
||||
{
|
||||
@@ -578,7 +578,7 @@ void StateSet::setAttributeAndModes(StateAttribute *attribute, const StateAttrib
|
||||
}
|
||||
}
|
||||
|
||||
void StateSet::setAttributeToInherit(const StateAttribute::Type type)
|
||||
void StateSet::setAttributeToInherit(StateAttribute::Type type)
|
||||
{
|
||||
AttributeList::iterator itr = _attributeList.find(type);
|
||||
if (itr!=_attributeList.end())
|
||||
@@ -588,28 +588,28 @@ void StateSet::setAttributeToInherit(const StateAttribute::Type type)
|
||||
}
|
||||
}
|
||||
|
||||
StateAttribute* StateSet::getAttribute(const StateAttribute::Type type)
|
||||
StateAttribute* StateSet::getAttribute(StateAttribute::Type type)
|
||||
{
|
||||
return getAttribute(_attributeList,type);
|
||||
}
|
||||
|
||||
const StateAttribute* StateSet::getAttribute(const StateAttribute::Type type) const
|
||||
const StateAttribute* StateSet::getAttribute(StateAttribute::Type type) const
|
||||
{
|
||||
return getAttribute(_attributeList,type);
|
||||
}
|
||||
|
||||
const StateSet::RefAttributePair* StateSet::getAttributePair(const StateAttribute::Type type) const
|
||||
const StateSet::RefAttributePair* StateSet::getAttributePair(StateAttribute::Type type) const
|
||||
{
|
||||
return getAttributePair(_attributeList,type);
|
||||
}
|
||||
|
||||
void StateSet::setAssociatedModes(const StateAttribute* attribute, const StateAttribute::GLModeValue value)
|
||||
void StateSet::setAssociatedModes(const StateAttribute* attribute, StateAttribute::GLModeValue value)
|
||||
{
|
||||
setAssociatedModes(_modeList,attribute,value);
|
||||
}
|
||||
|
||||
|
||||
void StateSet::setTextureMode(unsigned int unit,const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
|
||||
void StateSet::setTextureMode(unsigned int unit,StateAttribute::GLMode mode, StateAttribute::GLModeValue value)
|
||||
{
|
||||
if (s_textureGLModeSet.isTextureMode(mode))
|
||||
{
|
||||
@@ -625,7 +625,7 @@ void StateSet::setTextureMode(unsigned int unit,const StateAttribute::GLMode mod
|
||||
}
|
||||
}
|
||||
|
||||
void StateSet::setTextureModeToInherit(unsigned int unit,const StateAttribute::GLMode mode)
|
||||
void StateSet::setTextureModeToInherit(unsigned int unit,StateAttribute::GLMode mode)
|
||||
{
|
||||
if (s_textureGLModeSet.isTextureMode(mode))
|
||||
{
|
||||
@@ -643,7 +643,7 @@ void StateSet::setTextureModeToInherit(unsigned int unit,const StateAttribute::G
|
||||
}
|
||||
|
||||
|
||||
const StateAttribute::GLModeValue StateSet::getTextureMode(unsigned int unit,const StateAttribute::GLMode mode) const
|
||||
StateAttribute::GLModeValue StateSet::getTextureMode(unsigned int unit,StateAttribute::GLMode mode) const
|
||||
{
|
||||
if (s_textureGLModeSet.isTextureMode(mode))
|
||||
{
|
||||
@@ -679,7 +679,7 @@ void StateSet::setTextureAttribute(unsigned int unit,StateAttribute *attribute,
|
||||
}
|
||||
|
||||
|
||||
void StateSet::setTextureAttributeAndModes(unsigned int unit,StateAttribute *attribute, const StateAttribute::GLModeValue value)
|
||||
void StateSet::setTextureAttributeAndModes(unsigned int unit,StateAttribute *attribute, StateAttribute::GLModeValue value)
|
||||
{
|
||||
if (attribute)
|
||||
{
|
||||
@@ -707,7 +707,7 @@ void StateSet::setTextureAttributeAndModes(unsigned int unit,StateAttribute *att
|
||||
}
|
||||
|
||||
|
||||
void StateSet::setTextureAttributeToInherit(unsigned int unit,const StateAttribute::Type type)
|
||||
void StateSet::setTextureAttributeToInherit(unsigned int unit,StateAttribute::Type type)
|
||||
{
|
||||
if (unit>=_textureAttributeList.size()) return;
|
||||
AttributeList& attributeList = _textureAttributeList[unit];
|
||||
@@ -723,27 +723,27 @@ void StateSet::setTextureAttributeToInherit(unsigned int unit,const StateAttribu
|
||||
}
|
||||
|
||||
|
||||
StateAttribute* StateSet::getTextureAttribute(unsigned int unit,const StateAttribute::Type type)
|
||||
StateAttribute* StateSet::getTextureAttribute(unsigned int unit,StateAttribute::Type type)
|
||||
{
|
||||
if (unit>=_textureAttributeList.size()) return 0;
|
||||
return getAttribute(_textureAttributeList[unit],type);
|
||||
}
|
||||
|
||||
|
||||
const StateAttribute* StateSet::getTextureAttribute(unsigned int unit,const StateAttribute::Type type) const
|
||||
const StateAttribute* StateSet::getTextureAttribute(unsigned int unit,StateAttribute::Type type) const
|
||||
{
|
||||
if (unit>=_textureAttributeList.size()) return 0;
|
||||
return getAttribute(_textureAttributeList[unit],type);
|
||||
}
|
||||
|
||||
|
||||
const StateSet::RefAttributePair* StateSet::getTextureAttributePair(unsigned int unit,const StateAttribute::Type type) const
|
||||
const StateSet::RefAttributePair* StateSet::getTextureAttributePair(unsigned int unit,StateAttribute::Type type) const
|
||||
{
|
||||
if (unit>=_textureAttributeList.size()) return 0;
|
||||
return getAttributePair(_textureAttributeList[unit],type);
|
||||
}
|
||||
|
||||
void StateSet::setAssociatedTextureModes(unsigned int unit,const StateAttribute* attribute, const StateAttribute::GLModeValue value)
|
||||
void StateSet::setAssociatedTextureModes(unsigned int unit,const StateAttribute* attribute, StateAttribute::GLModeValue value)
|
||||
{
|
||||
setAssociatedModes(getOrCreateTextureModeList(unit),attribute,value);
|
||||
}
|
||||
@@ -798,13 +798,13 @@ void StateSet::setRendingBinToInherit()
|
||||
_binName = "";
|
||||
}
|
||||
|
||||
void StateSet::setMode(ModeList& modeList,const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
|
||||
void StateSet::setMode(ModeList& modeList,StateAttribute::GLMode mode, StateAttribute::GLModeValue value)
|
||||
{
|
||||
if ((value&StateAttribute::INHERIT)) setModeToInherit(modeList,mode);
|
||||
else modeList[mode] = value;
|
||||
}
|
||||
|
||||
void StateSet::setModeToInherit(ModeList& modeList,const StateAttribute::GLMode mode)
|
||||
void StateSet::setModeToInherit(ModeList& modeList,StateAttribute::GLMode mode)
|
||||
{
|
||||
ModeList::iterator itr = modeList.find(mode);
|
||||
if (itr!=modeList.end())
|
||||
@@ -813,7 +813,7 @@ void StateSet::setModeToInherit(ModeList& modeList,const StateAttribute::GLMode
|
||||
}
|
||||
}
|
||||
|
||||
const StateAttribute::GLModeValue StateSet::getMode(const ModeList& modeList,const StateAttribute::GLMode mode) const
|
||||
StateAttribute::GLModeValue StateSet::getMode(const ModeList& modeList,StateAttribute::GLMode mode) const
|
||||
{
|
||||
ModeList::const_iterator itr = modeList.find(mode);
|
||||
if (itr!=modeList.end())
|
||||
@@ -824,7 +824,7 @@ const StateAttribute::GLModeValue StateSet::getMode(const ModeList& modeList,con
|
||||
return StateAttribute::INHERIT;
|
||||
}
|
||||
|
||||
void StateSet::setAssociatedModes(ModeList& modeList,const StateAttribute* attribute, const StateAttribute::GLModeValue value)
|
||||
void StateSet::setAssociatedModes(ModeList& modeList,const StateAttribute* attribute, StateAttribute::GLModeValue value)
|
||||
{
|
||||
// get the associated modes.
|
||||
std::vector<StateAttribute::GLMode> modes;
|
||||
@@ -848,7 +848,7 @@ void StateSet::setAttribute(AttributeList& attributeList,StateAttribute *attribu
|
||||
}
|
||||
|
||||
|
||||
StateAttribute* StateSet::getAttribute(AttributeList& attributeList,const StateAttribute::Type type)
|
||||
StateAttribute* StateSet::getAttribute(AttributeList& attributeList,StateAttribute::Type type)
|
||||
{
|
||||
AttributeList::iterator itr = attributeList.find(type);
|
||||
if (itr!=attributeList.end())
|
||||
@@ -859,7 +859,7 @@ StateAttribute* StateSet::getAttribute(AttributeList& attributeList,const StateA
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const StateAttribute* StateSet::getAttribute(const AttributeList& attributeList,const StateAttribute::Type type) const
|
||||
const StateAttribute* StateSet::getAttribute(const AttributeList& attributeList,StateAttribute::Type type) const
|
||||
{
|
||||
AttributeList::const_iterator itr = attributeList.find(type);
|
||||
if (itr!=attributeList.end())
|
||||
@@ -870,7 +870,7 @@ const StateAttribute* StateSet::getAttribute(const AttributeList& attributeList,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const StateSet::RefAttributePair* StateSet::getAttributePair(const AttributeList& attributeList,const StateAttribute::Type type) const
|
||||
const StateSet::RefAttributePair* StateSet::getAttributePair(const AttributeList& attributeList,StateAttribute::Type type) const
|
||||
{
|
||||
AttributeList::const_iterator itr = attributeList.find(type);
|
||||
if (itr!=attributeList.end())
|
||||
|
||||
@@ -66,7 +66,7 @@ int Texture::compareTexture(const Texture& rhs) const
|
||||
}
|
||||
|
||||
|
||||
void Texture::setWrap(const WrapParameter which, const WrapMode wrap)
|
||||
void Texture::setWrap(WrapParameter which, WrapMode wrap)
|
||||
{
|
||||
switch( which )
|
||||
{
|
||||
@@ -79,7 +79,7 @@ void Texture::setWrap(const WrapParameter which, const WrapMode wrap)
|
||||
}
|
||||
|
||||
|
||||
const Texture::WrapMode Texture::getWrap(const WrapParameter which) const
|
||||
Texture::WrapMode Texture::getWrap(WrapParameter which) const
|
||||
{
|
||||
switch( which )
|
||||
{
|
||||
@@ -91,7 +91,7 @@ const Texture::WrapMode Texture::getWrap(const WrapParameter which) const
|
||||
}
|
||||
|
||||
|
||||
void Texture::setFilter(const FilterParameter which, const FilterMode filter)
|
||||
void Texture::setFilter(FilterParameter which, FilterMode filter)
|
||||
{
|
||||
switch( which )
|
||||
{
|
||||
@@ -102,7 +102,7 @@ void Texture::setFilter(const FilterParameter which, const FilterMode filter)
|
||||
}
|
||||
|
||||
|
||||
const Texture::FilterMode Texture::getFilter(const FilterParameter which) const
|
||||
Texture::FilterMode Texture::getFilter(FilterParameter which) const
|
||||
{
|
||||
switch( which )
|
||||
{
|
||||
|
||||
@@ -144,7 +144,7 @@ int TextureCubeMap::compare(const StateAttribute& sa) const
|
||||
}
|
||||
|
||||
|
||||
void TextureCubeMap::setImage( const Face face, Image* image)
|
||||
void TextureCubeMap::setImage( Face face, Image* image)
|
||||
{
|
||||
// Quick and dirty implementation committed by ABJ.
|
||||
if (face == 0)
|
||||
@@ -166,12 +166,12 @@ void TextureCubeMap::setImage( const Face face, Image* image)
|
||||
_images[face] = image;
|
||||
}
|
||||
|
||||
Image* TextureCubeMap::getImage(const Face face)
|
||||
Image* TextureCubeMap::getImage(Face face)
|
||||
{
|
||||
return _images[face].get();
|
||||
}
|
||||
|
||||
const Image* TextureCubeMap::getImage(const Face face) const
|
||||
const Image* TextureCubeMap::getImage(Face face) const
|
||||
{
|
||||
return _images[face].get();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ void Transform::setReferenceFrame(ReferenceFrame rf)
|
||||
else setCullingActive(true);
|
||||
}
|
||||
|
||||
const bool Transform::computeBound() const
|
||||
bool Transform::computeBound() const
|
||||
{
|
||||
if (!Group::computeBound()) return false;
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ class Logos: public osg::Drawable
|
||||
Logos& operator = (const Logos&) { return *this;}
|
||||
|
||||
virtual ~Logos() {}
|
||||
virtual const bool computeBound() const
|
||||
virtual bool computeBound() const
|
||||
{
|
||||
_bbox.set( -1, -1, -1, 1, 1, 1);
|
||||
return true;
|
||||
|
||||
@@ -147,7 +147,7 @@ bool Font::open(const char* font)
|
||||
}
|
||||
|
||||
bool Font::
|
||||
create(osg::State& state,int pointSize,const unsigned int res)
|
||||
create(osg::State& state,int pointSize,unsigned int res)
|
||||
{
|
||||
_pointSize=pointSize;
|
||||
_res=res;
|
||||
|
||||
@@ -127,8 +127,7 @@ setDefaults()
|
||||
_useDisplayList=false;
|
||||
}
|
||||
|
||||
const bool Text::
|
||||
computeBound() const
|
||||
bool Text::computeBound() const
|
||||
{
|
||||
if(!_init)
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ void DepthSortedBin::reset()
|
||||
|
||||
struct DepthSortFunctor2
|
||||
{
|
||||
const bool operator() (const RenderLeaf* lhs,const RenderLeaf* rhs)
|
||||
bool operator() (const RenderLeaf* lhs,const RenderLeaf* rhs)
|
||||
{
|
||||
return (lhs->_depth<rhs->_depth);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ void RenderBin::sort_local()
|
||||
|
||||
struct SortByStateFunctor
|
||||
{
|
||||
const bool operator() (const RenderGraph* lhs,const RenderGraph* rhs) const
|
||||
bool operator() (const RenderGraph* lhs,const RenderGraph* rhs) const
|
||||
{
|
||||
return (*(lhs->_stateset)<*(rhs->_stateset));
|
||||
}
|
||||
@@ -138,7 +138,7 @@ void RenderBin::sort_local_front_to_back()
|
||||
|
||||
struct BackToFrontSortFunctor
|
||||
{
|
||||
const bool operator() (const RenderLeaf* lhs,const RenderLeaf* rhs) const
|
||||
bool operator() (const RenderLeaf* lhs,const RenderLeaf* rhs) const
|
||||
{
|
||||
return (rhs->_depth<lhs->_depth);
|
||||
}
|
||||
@@ -299,7 +299,7 @@ void RenderBin::getPrims(osg::Statistics* primStats)
|
||||
|
||||
}
|
||||
|
||||
bool RenderBin::getPrims(osg::Statistics* primStats, const int nbin)
|
||||
bool RenderBin::getPrims(osg::Statistics* primStats, int nbin)
|
||||
{ // collect stats for array of bins, maximum nbin
|
||||
// (which will be modified on next call if array of primStats is too small);
|
||||
// return 1 for OK;
|
||||
|
||||
Reference in New Issue
Block a user