Added GL_LIBS to the osgText/Makefile for OSX build.

Fixed typo in IntersectVisitor.

Fixed warnings in osgimpsotor demo.
This commit is contained in:
Robert Osfield 2002-11-08 11:00:16 +00:00
parent 5db3229b5f
commit 9816a51bc7
4 changed files with 17 additions and 19 deletions

View File

@ -109,12 +109,12 @@ class OSGUTIL_EXPORT IntersectVisitor : public osg::NodeVisitor
typedef std::vector< LineSegmentPair > LineSegmentList;
LineSegmentList _segList;
typedef unsigned int LineSegmentmentMask;
typedef std::vector<LineSegmentmentMask> LineSegmentmentMaskStack;
LineSegmentmentMaskStack _segmentMaskStack;
typedef unsigned int LineSegmentMask;
typedef std::vector<LineSegmentMask> LineSegmentMaskStack;
LineSegmentMaskStack _segmentMaskStack;
bool isCulled(const osg::BoundingSphere& bs,LineSegmentmentMask& segMaskOut);
bool isCulled(const osg::BoundingBox& bb,LineSegmentmentMask& segMaskOut);
bool isCulled(const osg::BoundingSphere& bs,LineSegmentMask& segMaskOut);
bool isCulled(const osg::BoundingBox& bb,LineSegmentMask& segMaskOut);
void addLineSegmentPair(osg::LineSegment* first,osg::LineSegment* second)
{

View File

@ -51,9 +51,8 @@ void TestManipulator::home(const GUIEventAdapter& ,GUIActionAdapter& us)
const osg::BoundingSphere& boundingSphere=_node->getBound();
_camera->setView(
osg::Vec3(0.0f, 0.0f, 20.0f),
osg::Vec3(0.0f, 1.0f, 20.0f),
_camera->setView(boundingSphere.center()+osg::Vec3(0.0f, 0.0f, 20.0f),
boundingSphere.center()+osg::Vec3(0.0f, 1.0f, 20.0f),
osg::Vec3(0.0f, 0.0f, 1.0f));
computeLocalDataFromCamera();
@ -253,7 +252,6 @@ bool TestManipulator::calcMovement()
// return if there is no movement.
if (dx==0 && dy==0) return false;
float focalLength = (_camera->getCenterPoint()-_camera->getEyePoint()).length();
unsigned int buttonMask = _ga_t1->getButtonMask();
if (buttonMask==GUIEventAdapter::LEFT_MOUSE_BUTTON)
{

View File

@ -27,7 +27,7 @@ CXXFILES =\
LIBS += $(OSG_LIBS) $(FREETYPE_LIB) $(OTHER_LIBS)
LIBS += $(OSG_LIBS) $(GL_LIBS) $(FREETYPE_LIB) $(OTHER_LIBS)
DEF += -DOSGTEXT_LIBRARY

View File

@ -92,12 +92,12 @@ IntersectVisitor::IntersectState::~IntersectState()
}
bool IntersectVisitor::IntersectState::isCulled(const BoundingSphere& bs,LineSegmentmentMask& segMaskOut)
bool IntersectVisitor::IntersectState::isCulled(const BoundingSphere& bs,LineSegmentMask& segMaskOut)
{
bool hit = false;
LineSegmentmentMask mask = 0x00000001;
LineSegmentMask mask = 0x00000001;
segMaskOut = 0x00000000;
LineSegmentmentMask segMaskIn = _segmentMaskStack.back();
LineSegmentMask segMaskIn = _segmentMaskStack.back();
// notify(INFO) << << "IntersectState::isCulled() mask in "<<segMaskIn<<" ";
for(IntersectState::LineSegmentList::iterator sitr=_segList.begin();
sitr!=_segList.end();
@ -116,12 +116,12 @@ bool IntersectVisitor::IntersectState::isCulled(const BoundingSphere& bs,LineSeg
}
bool IntersectVisitor::IntersectState::isCulled(const BoundingBox& bb,LineSegmentmentMask& segMaskOut)
bool IntersectVisitor::IntersectState::isCulled(const BoundingBox& bb,LineSegmentMask& segMaskOut)
{
bool hit = false;
LineSegmentmentMask mask = 0x00000001;
LineSegmentMask mask = 0x00000001;
segMaskOut = 0x00000000;
LineSegmentmentMask segMaskIn = _segmentMaskStack.back();
LineSegmentMask segMaskIn = _segmentMaskStack.back();
for(IntersectState::LineSegmentList::iterator sitr=_segList.begin();
sitr!=_segList.end();
++sitr)
@ -226,8 +226,8 @@ void IntersectVisitor::pushMatrix(const Matrix& matrix)
inverse_world->invert(*(nis->_matrix));
nis->_inverse = inverse_world;
IntersectState::LineSegmentmentMask segMaskIn = cis->_segmentMaskStack.back();
IntersectState::LineSegmentmentMask mask = 0x00000001;
IntersectState::LineSegmentMask segMaskIn = cis->_segmentMaskStack.back();
IntersectState::LineSegmentMask mask = 0x00000001;
for(IntersectState::LineSegmentList::iterator sitr=cis->_segList.begin();
sitr!=cis->_segList.end();
++sitr)
@ -260,7 +260,7 @@ bool IntersectVisitor::enterNode(Node& node)
if (bs.valid())
{
IntersectState* cis = _intersectStateStack.back().get();
IntersectState::LineSegmentmentMask sm=0xffffffff;
IntersectState::LineSegmentMask sm=0xffffffff;
if (cis->isCulled(bs,sm)) return false;
cis->_segmentMaskStack.push_back(sm);
_nodePath.push_back(&node);