UPdates to CullVisitor so that it keeps in sync with the new method paramter

change in osg::Billboard.

Removed in instance of an object being passed () brackets, have removed the
brackets to avoid an amiguity with the compiler intepreting it as a function.
This commit is contained in:
Robert Osfield
2002-01-18 22:36:56 +00:00
parent 58f72ee2d7
commit acf256c466
6 changed files with 12 additions and 33 deletions

View File

@@ -924,7 +924,8 @@ void CullVisitor::apply(Billboard& node)
StateSet* node_state = node.getStateSet();
if (node_state) pushStateSet(node_state);
Vec3 eye_local = getEyeLocal();
const Vec3& eye_local = getEyeLocal();
const Vec3& up_local = getUpLocal();
Matrix* matrix = getCurrentMatrix();
for(int i=0;i<node.getNumDrawables();++i)
@@ -950,7 +951,7 @@ void CullVisitor::apply(Billboard& node)
*/
Matrix* billboard_matrix = createOrReuseMatrix();
node.calcTransform(eye_local,pos,*billboard_matrix);
node.calcTransform(eye_local,up_local,pos,*billboard_matrix);
StateSet* stateset = drawable->getStateSet();

View File

@@ -536,33 +536,7 @@ void IntersectVisitor::apply(Geode& geode)
void IntersectVisitor::apply(Billboard& node)
{
if (!enterNode(node)) return;
// Vec3 eye_local = getEyeLocal();
// for(int i=0;i<node.getNumGeosets();++i)
// {
// Vec3 pos;
// node.getPos(i,pos);
//
// GeoSet* gset = node.getGeoSet(i);
//
// Matrix local_mat;
// node.calcTransform(eye_local,pos,local_mat);
//
// Matrix* matrix = NULL;
// Matrix* currMatrix = getCurrentMatrix();
// if (currMatrix)
// {
// matrix = new Matrix();
// matrix->mult(local_mat,*(currMatrix));
// }
// else
// {
// matrix = new Matrix(local_mat);
// }
//
// matrix->ref();
// matrix->unref();
//
// }
leaveNode();
}

View File

@@ -82,12 +82,12 @@ void SceneView::setDefaults()
_globalState->setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
// set up an alphafunc by default to speed up blending operations.
osg::AlphaFunc* alphafunc = new osg::AlphaFunc();
osg::AlphaFunc* alphafunc = new osg::AlphaFunc;
alphafunc->setFunction(osg::AlphaFunc::GREATER,0.0f);
_globalState->setAttributeAndModes(alphafunc, osg::StateAttribute::ON);
// set up an alphafunc by default to speed up blending operations.
osg::TexEnv* texenv = new osg::TexEnv();
osg::TexEnv* texenv = new osg::TexEnv;
texenv->setMode(osg::TexEnv::MODULATE);
_globalState->setAttributeAndModes(texenv, osg::StateAttribute::ON);