From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)."
This commit is contained in:
@@ -180,13 +180,13 @@ void IntersectVisitor::IntersectState::addLineSegment(osg::LineSegment* seg)
|
||||
IntersectVisitor::IntersectVisitor()
|
||||
{
|
||||
|
||||
// overide the default node visitor mode.
|
||||
// override the default node visitor mode.
|
||||
setTraversalMode(NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);
|
||||
|
||||
// Initialize eyepoint to 0,0,0
|
||||
setEyePoint(Vec3(0.0f,0.0f,0.0f));
|
||||
|
||||
setLODSelectionMode(USE_HIGHEST_LEVEL_OF_DETAIL); // orignal IntersectVisitor behavior
|
||||
setLODSelectionMode(USE_HIGHEST_LEVEL_OF_DETAIL); // original IntersectVisitor behavior
|
||||
//setLODSelectionMode(USE_SEGMENT_START_POINT_AS_EYE_POINT_FOR_LOD_LEVEL_SELECTION);
|
||||
|
||||
reset();
|
||||
|
||||
@@ -152,7 +152,7 @@ bool IntersectorGroup::containsIntersections()
|
||||
|
||||
IntersectionVisitor::IntersectionVisitor(Intersector* intersector, ReadCallback* readCallback)
|
||||
{
|
||||
// overide the default node visitor mode.
|
||||
// override the default node visitor mode.
|
||||
setTraversalMode(NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);
|
||||
|
||||
setIntersector(intersector);
|
||||
@@ -162,7 +162,7 @@ IntersectionVisitor::IntersectionVisitor(Intersector* intersector, ReadCallback*
|
||||
|
||||
void IntersectionVisitor::setIntersector(Intersector* intersector)
|
||||
{
|
||||
// keep refernce around just in case intersector is already in the _intersectorStack, otherwsie the clear could delete it.
|
||||
// keep reference around just in case intersector is already in the _intersectorStack, otherwise the clear could delete it.
|
||||
osg::ref_ptr<Intersector> temp = intersector;
|
||||
|
||||
_intersectorStack.clear();
|
||||
@@ -288,7 +288,7 @@ void IntersectionVisitor::apply(osg::Transform& transform)
|
||||
|
||||
popModelMatrix();
|
||||
|
||||
// tidy up an cached cull variabes in the current intersector.
|
||||
// tidy up an cached cull variables in the current intersector.
|
||||
leave();
|
||||
}
|
||||
|
||||
|
||||
@@ -2059,7 +2059,7 @@ bool Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode& geode)
|
||||
{
|
||||
// now need to clean up primitiveset so it no longer contains the rhs combined primitives.
|
||||
|
||||
// first swap with a empty primtiveSet to empty it completely.
|
||||
// first swap with a empty primitiveSet to empty it completely.
|
||||
osg::Geometry::PrimitiveSetList oldPrimitives;
|
||||
primitives.swap(oldPrimitives);
|
||||
|
||||
@@ -2162,7 +2162,7 @@ bool Optimizer::MergeGeometryVisitor::geometryContainsSharedArrays(osg::Geometry
|
||||
if (tex && tex->referenceCount()>1) return true;
|
||||
}
|
||||
|
||||
// shift the indices of the incomming primitives to account for the pre exisiting geometry.
|
||||
// shift the indices of the incoming primitives to account for the pre existing geometry.
|
||||
for(osg::Geometry::PrimitiveSetList::iterator primItr=geom.getPrimitiveSetList().begin();
|
||||
primItr!=geom.getPrimitiveSetList().end();
|
||||
++primItr)
|
||||
@@ -2387,7 +2387,7 @@ bool Optimizer::MergeGeometryVisitor::mergeGeometry(osg::Geometry& lhs,osg::Geom
|
||||
}
|
||||
|
||||
|
||||
// shift the indices of the incomming primitives to account for the pre exisiting geometry.
|
||||
// shift the indices of the incoming primitives to account for the pre existing geometry.
|
||||
for(osg::Geometry::PrimitiveSetList::iterator primItr=rhs.getPrimitiveSetList().begin();
|
||||
primItr!=rhs.getPrimitiveSetList().end();
|
||||
++primItr)
|
||||
|
||||
@@ -406,7 +406,7 @@ namespace PlaneIntersectorUtils
|
||||
{
|
||||
if (de<0.0)
|
||||
{
|
||||
// osg::notify(osg::NOTICE)<<"Disgard segment "<<std::endl;
|
||||
// osg::notify(osg::NOTICE)<<"Discard segment "<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -491,7 +491,7 @@ bool RenderBin::getStats(Statistics& stats) const
|
||||
|
||||
if (dw)
|
||||
{
|
||||
// then tot up the primtive types and no vertices.
|
||||
// then tot up the primitive types and no vertices.
|
||||
dw->accept(stats); // use sub-class to find the stats for each drawable
|
||||
}
|
||||
statsCollected = true;
|
||||
@@ -512,7 +512,7 @@ bool RenderBin::getStats(Statistics& stats) const
|
||||
if (rl->_modelview.get()) stats.addMatrix(); // number of matrices
|
||||
if (dw)
|
||||
{
|
||||
// then tot up the primtive types and no vertices.
|
||||
// then tot up the primitive types and no vertices.
|
||||
dw->accept(stats); // use sub-class to find the stats for each drawable
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,15 +221,15 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
osg::Camera::RenderTargetImplementation renderTargetImplemntation = _camera->getRenderTargetImplementation();
|
||||
osg::Camera::RenderTargetImplementation renderTargetFallback = _camera->getRenderTargetFallback();
|
||||
|
||||
osg::Camera::BufferAttachmentMap& bufferAttachements = _camera->getBufferAttachmentMap();
|
||||
osg::Camera::BufferAttachmentMap& bufferAttachments = _camera->getBufferAttachmentMap();
|
||||
|
||||
// compute the required dimensions
|
||||
int width = static_cast<int>(_viewport->x() + _viewport->width());
|
||||
int height = static_cast<int>(_viewport->y() + _viewport->height());
|
||||
int depth = 1;
|
||||
osg::Camera::BufferAttachmentMap::iterator itr;
|
||||
for(itr = bufferAttachements.begin();
|
||||
itr != bufferAttachements.end();
|
||||
for(itr = bufferAttachments.begin();
|
||||
itr != bufferAttachments.end();
|
||||
++itr)
|
||||
{
|
||||
width = osg::maximum(width,itr->second.width());
|
||||
@@ -241,8 +241,8 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
// osg::notify(osg::NOTICE)<<"RenderStage::runCameraSetUp computed "<<width<<" "<<height<<" "<<depth<<std::endl;
|
||||
|
||||
// attach an images that need to be copied after the stage is drawn.
|
||||
for(itr = bufferAttachements.begin();
|
||||
itr != bufferAttachements.end();
|
||||
for(itr = bufferAttachments.begin();
|
||||
itr != bufferAttachments.end();
|
||||
++itr)
|
||||
{
|
||||
// if one exist attach image to the RenderStage.
|
||||
@@ -331,8 +331,8 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
bool colorAttached = false;
|
||||
bool depthAttached = false;
|
||||
bool stencilAttached = false;
|
||||
for(osg::Camera::BufferAttachmentMap::iterator itr = bufferAttachements.begin();
|
||||
itr != bufferAttachements.end();
|
||||
for(osg::Camera::BufferAttachmentMap::iterator itr = bufferAttachments.begin();
|
||||
itr != bufferAttachments.end();
|
||||
++itr)
|
||||
{
|
||||
|
||||
@@ -423,7 +423,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
renderTargetImplemntation = osg::Camera::PIXEL_BUFFER;
|
||||
}
|
||||
|
||||
// if any of the renderTargetImplementations require a seperate graphics context such as with pbuffer try in turn to
|
||||
// if any of the renderTargetImplementations require a separate graphics context such as with pbuffer try in turn to
|
||||
// set up, but if each level fails then resort to the next level down.
|
||||
while (!getGraphicsContext() &&
|
||||
(renderTargetImplemntation==osg::Camera::PIXEL_BUFFER_RTT ||
|
||||
@@ -454,8 +454,8 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
bool colorAttached = false;
|
||||
bool depthAttached = false;
|
||||
bool stencilAttached = false;
|
||||
for(osg::Camera::BufferAttachmentMap::iterator itr = bufferAttachements.begin();
|
||||
itr != bufferAttachements.end();
|
||||
for(osg::Camera::BufferAttachmentMap::iterator itr = bufferAttachments.begin();
|
||||
itr != bufferAttachments.end();
|
||||
++itr)
|
||||
{
|
||||
|
||||
@@ -585,7 +585,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Failed to aquire Graphics Context"<<std::endl;
|
||||
osg::notify(osg::INFO)<<"Failed to acquire Graphics Context"<<std::endl;
|
||||
|
||||
if (renderTargetImplemntation==osg::Camera::PIXEL_BUFFER_RTT)
|
||||
{
|
||||
@@ -609,8 +609,8 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Setting up osg::Camera::FRAME_BUFFER"<<std::endl;
|
||||
|
||||
for(osg::Camera::BufferAttachmentMap::iterator itr = bufferAttachements.begin();
|
||||
itr != bufferAttachements.end();
|
||||
for(osg::Camera::BufferAttachmentMap::iterator itr = bufferAttachments.begin();
|
||||
itr != bufferAttachments.end();
|
||||
++itr)
|
||||
{
|
||||
// assign the texture...
|
||||
@@ -860,7 +860,7 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous)
|
||||
useThread = useContext->getGraphicsThread();
|
||||
useRenderInfo.setState(useState);
|
||||
|
||||
// syncronize the frame stamps
|
||||
// synchronize the frame stamps
|
||||
useState->setFrameStamp(const_cast<osg::FrameStamp*>(state.getFrameStamp()));
|
||||
|
||||
// map the DynamicObjectCount across to the new window
|
||||
@@ -989,7 +989,7 @@ void RenderStage::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& pr
|
||||
return;
|
||||
}
|
||||
|
||||
// push the stages camera so that drawing code can querry it
|
||||
// push the stages camera so that drawing code can query it
|
||||
if (_camera) renderInfo.pushCamera(_camera);
|
||||
|
||||
// set up the back buffer.
|
||||
|
||||
@@ -356,7 +356,7 @@ public:
|
||||
void addTriangle(Triangle* triangle)
|
||||
{
|
||||
_triangles.insert(triangle);
|
||||
// if (_triangles.size()>2) osg::notify(osg::NOTICE)<<"Warning too many traingles ("<<_triangles.size()<<") sharing edge "<<std::endl;
|
||||
// if (_triangles.size()>2) osg::notify(osg::NOTICE)<<"Warning too many triangles ("<<_triangles.size()<<") sharing edge "<<std::endl;
|
||||
}
|
||||
|
||||
bool isBoundaryEdge() const
|
||||
@@ -464,7 +464,7 @@ public:
|
||||
return osg::Plane(p1->_vertex,p2->_vertex,p3->_vertex);
|
||||
}
|
||||
|
||||
// note return 1 - dotproduct, so that deviation is in the range of 0.0 to 2.0, where 0 is coincendent, 1.0 is 90 degrees, and 2.0 is 180 degrees.
|
||||
// note return 1 - dotproduct, so that deviation is in the range of 0.0 to 2.0, where 0 is coincident, 1.0 is 90 degrees, and 2.0 is 180 degrees.
|
||||
float computeNormalDeviationOnEdgeCollapse(Edge* edge,Point* pNew) const
|
||||
{
|
||||
const Point* p1 = (_p1==edge->_p1 || _p1==edge->_p2) ? pNew : _p1.get();
|
||||
@@ -601,7 +601,7 @@ public:
|
||||
triangle->_e2 = replaceEdgePoint(triangle->_e2.get(),pOriginal,pNew);
|
||||
triangle->_e3 = replaceEdgePoint(triangle->_e3.get(),pOriginal,pNew);
|
||||
|
||||
// remove the triangle form the orignal point, and possibly the point if its the last triangle to use it
|
||||
// remove the triangle form the original point, and possibly the point if its the last triangle to use it
|
||||
removePoint(triangle, pOriginal);
|
||||
|
||||
// add the triangle to that point
|
||||
|
||||
@@ -622,7 +622,7 @@ unsigned int _computeNumberOfPrimitives(const osg::Geometry& geom)
|
||||
default: primLength=0; break; // compute later when =0.
|
||||
}
|
||||
|
||||
// draw primtives by the more flexible "slow" path,
|
||||
// draw primitives by the more flexible "slow" path,
|
||||
// sending OpenGL glBegin/glVertex.../glEnd().
|
||||
switch(primitiveset->getType())
|
||||
{
|
||||
|
||||
@@ -216,7 +216,7 @@ void TriStripVisitor::stripify(Geometry& geom)
|
||||
geom.copyToAndOptimize(geom);
|
||||
}
|
||||
|
||||
// check for the existance of surface primitives
|
||||
// check for the existence of surface primitives
|
||||
unsigned int numSurfacePrimitives = 0;
|
||||
unsigned int numNonSurfacePrimitives = 0;
|
||||
Geometry::PrimitiveSetList& primitives = geom.getPrimitiveSetList();
|
||||
|
||||
Reference in New Issue
Block a user