Changed ABSOLUTE and RELATIVE to ABSOLUTE_RF and RELATIVE_RF to avoid stooppid Win32 #define
This commit is contained in:
@@ -45,7 +45,7 @@ bool AutoTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
if (_matrixDirty) computeMatrix();
|
||||
|
||||
if (_referenceFrame==RELATIVE)
|
||||
if (_referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
matrix.preMult(_cachedMatrix);
|
||||
}
|
||||
@@ -59,7 +59,7 @@ bool AutoTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
|
||||
bool AutoTransform::computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
if (_referenceFrame==RELATIVE)
|
||||
if (_referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
matrix.postMult(osg::Matrix::translate(-_position)*
|
||||
osg::Matrix::rotate(_rotation.inverse())*
|
||||
|
||||
@@ -360,7 +360,7 @@ bool Group::computeBound() const
|
||||
++itr)
|
||||
{
|
||||
const osg::Transform* transform = (*itr)->asTransform();
|
||||
if (!transform || transform->getReferenceFrame()==osg::Transform::RELATIVE)
|
||||
if (!transform || transform->getReferenceFrame()==osg::Transform::RELATIVE_RF)
|
||||
{
|
||||
bb.expandBy((*itr)->getBound());
|
||||
}
|
||||
@@ -379,7 +379,7 @@ bool Group::computeBound() const
|
||||
++itr)
|
||||
{
|
||||
const osg::Transform* transform = (*itr)->asTransform();
|
||||
if (!transform || transform->getReferenceFrame()==osg::Transform::RELATIVE)
|
||||
if (!transform || transform->getReferenceFrame()==osg::Transform::RELATIVE_RF)
|
||||
{
|
||||
_bsphere.expandRadiusBy((*itr)->getBound());
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ using namespace osg;
|
||||
|
||||
LightSource::LightSource():
|
||||
_value(StateAttribute::ON),
|
||||
_referenceFrame(RELATIVE)
|
||||
_referenceFrame(RELATIVE_RF)
|
||||
{
|
||||
// switch off culling of light source nodes by default.
|
||||
setCullingActive(false);
|
||||
@@ -33,7 +33,7 @@ LightSource::~LightSource()
|
||||
void LightSource::setReferenceFrame(ReferenceFrame rf)
|
||||
{
|
||||
_referenceFrame = rf;
|
||||
setCullingActive(_referenceFrame==RELATIVE);
|
||||
setCullingActive(_referenceFrame==RELATIVE_RF);
|
||||
}
|
||||
|
||||
void LightSource::setLight(Light* light)
|
||||
@@ -62,7 +62,7 @@ bool LightSource::computeBound() const
|
||||
{
|
||||
Group::computeBound();
|
||||
|
||||
if (_light.valid() && _referenceFrame==RELATIVE)
|
||||
if (_light.valid() && _referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
const Vec4& pos = _light->getPosition();
|
||||
if (pos[3]!=0.0f)
|
||||
|
||||
@@ -29,7 +29,7 @@ MatrixTransform::MatrixTransform(const MatrixTransform& transform,const CopyOp&
|
||||
|
||||
MatrixTransform::MatrixTransform(const Matrix& mat )
|
||||
{
|
||||
_referenceFrame = RELATIVE;
|
||||
_referenceFrame = RELATIVE_RF;
|
||||
|
||||
_matrix = mat;
|
||||
_inverseDirty = false;
|
||||
@@ -42,7 +42,7 @@ MatrixTransform::~MatrixTransform()
|
||||
|
||||
bool MatrixTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
if (_referenceFrame==RELATIVE)
|
||||
if (_referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
matrix.preMult(_matrix);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ bool MatrixTransform::computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) con
|
||||
{
|
||||
const Matrix& inverse = getInverseMatrix();
|
||||
|
||||
if (_referenceFrame==RELATIVE)
|
||||
if (_referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
matrix.postMult(inverse);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ PositionAttitudeTransform::PositionAttitudeTransform():
|
||||
|
||||
bool PositionAttitudeTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
if (_referenceFrame==RELATIVE)
|
||||
if (_referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
matrix.preMult(osg::Matrix::translate(-_pivotPoint)*
|
||||
osg::Matrix::scale(_scale)*
|
||||
@@ -41,7 +41,7 @@ bool PositionAttitudeTransform::computeLocalToWorldMatrix(Matrix& matrix,NodeVis
|
||||
|
||||
bool PositionAttitudeTransform::computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
if (_referenceFrame==RELATIVE)
|
||||
if (_referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
matrix.postMult(osg::Matrix::translate(-_position)*
|
||||
osg::Matrix::rotate(_attitude.inverse())*
|
||||
|
||||
@@ -98,7 +98,7 @@ Matrix osg::computeEyeToLocal(const Matrix& modelview,const NodePath& nodePath)
|
||||
|
||||
Transform::Transform()
|
||||
{
|
||||
_referenceFrame = RELATIVE;
|
||||
_referenceFrame = RELATIVE_RF;
|
||||
}
|
||||
|
||||
Transform::Transform(const Transform& transform,const CopyOp& copyop):
|
||||
@@ -118,7 +118,7 @@ void Transform::setReferenceFrame(ReferenceFrame rf)
|
||||
_referenceFrame = rf;
|
||||
|
||||
// switch off culling if transform is absolute.
|
||||
if (_referenceFrame==RELATIVE) setCullingActive(false);
|
||||
if (_referenceFrame==RELATIVE_RF) setCullingActive(false);
|
||||
else setCullingActive(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user