From Ulrich Hertlein, spelling corrections and a few Doxgen comments.
This commit is contained in:
@@ -18,7 +18,7 @@ using namespace osg;
|
||||
CameraNode::CameraNode():
|
||||
_clearColor(osg::Vec4(0.0f,0.0f,0.0f,1.0f)),
|
||||
_clearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT),
|
||||
_transformOrder(PRE_MULTIPLE),
|
||||
_transformOrder(PRE_MULTIPLY),
|
||||
_renderOrder(POST_RENDER),
|
||||
_drawBuffer(GL_NONE),
|
||||
_readBuffer(GL_NONE),
|
||||
@@ -236,7 +236,7 @@ bool CameraNode::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
{
|
||||
if (_referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
if (_transformOrder==PRE_MULTIPLE)
|
||||
if (_transformOrder==PRE_MULTIPLY)
|
||||
{
|
||||
matrix.preMult(_viewMatrix);
|
||||
}
|
||||
@@ -258,7 +258,7 @@ bool CameraNode::computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor*) const
|
||||
|
||||
if (_referenceFrame==RELATIVE_RF)
|
||||
{
|
||||
if (_transformOrder==PRE_MULTIPLE)
|
||||
if (_transformOrder==PRE_MULTIPLY)
|
||||
{
|
||||
// note doing inverse so pre becomes post.
|
||||
matrix.postMult(inverse);
|
||||
|
||||
@@ -71,8 +71,11 @@ bool CameraNode_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
if (fr.matchSequence("transformOrder %w"))
|
||||
{
|
||||
if (fr[1].matchWord("PRE_MULTIPLE")) camera.setTransformOrder(osg::CameraNode::PRE_MULTIPLE);
|
||||
else if (fr[1].matchWord("POST_MULTIPLE")) camera.setTransformOrder(osg::CameraNode::POST_MULTIPLE);
|
||||
if (fr[1].matchWord("PRE_MULTIPLY")) camera.setTransformOrder(osg::CameraNode::PRE_MULTIPLY);
|
||||
else if (fr[1].matchWord("POST_MULTIPLY")) camera.setTransformOrder(osg::CameraNode::POST_MULTIPLY);
|
||||
// the following are for backwards compatibility.
|
||||
else if (fr[1].matchWord("PRE_MULTIPLE")) camera.setTransformOrder(osg::CameraNode::PRE_MULTIPLY);
|
||||
else if (fr[1].matchWord("POST_MULTIPLE")) camera.setTransformOrder(osg::CameraNode::POST_MULTIPLY);
|
||||
|
||||
fr += 2;
|
||||
iteratorAdvanced = true;
|
||||
@@ -235,8 +238,8 @@ bool CameraNode_writeLocalData(const Object& obj, Output& fw)
|
||||
fw.indent()<<"transformOrder ";
|
||||
switch(camera.getTransformOrder())
|
||||
{
|
||||
case(osg::CameraNode::PRE_MULTIPLE): fw <<"PRE_MULTIPLE"<<std::endl; break;
|
||||
case(osg::CameraNode::POST_MULTIPLE): fw <<"POST_MULTIPLE"<<std::endl; break;
|
||||
case(osg::CameraNode::PRE_MULTIPLY): fw <<"PRE_MULTIPLY"<<std::endl; break;
|
||||
case(osg::CameraNode::POST_MULTIPLY): fw <<"POST_MULTIPLY"<<std::endl; break;
|
||||
}
|
||||
|
||||
writeMatrix(camera.getProjectionMatrix(),fw,"ProjectionMatrix");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
#include <osg/Geode>
|
||||
#include <osg/Group>
|
||||
@@ -223,6 +224,18 @@ void ReaderWriterPFB::initPerformer()
|
||||
// }
|
||||
pfdInitConverter(".pfb");
|
||||
|
||||
/*
|
||||
* Tell Performer to look in OSG search path
|
||||
*/
|
||||
const osgDB::FilePathList& filePath = osgDB::Registry::instance()->getDataFilePathList();
|
||||
std::string path = "";
|
||||
for (unsigned int i = 0; i < filePath.size(); i++) {
|
||||
if (i != 0)
|
||||
path += ":";
|
||||
path += filePath[i];
|
||||
}
|
||||
pfFilePath(path.c_str());
|
||||
|
||||
pfConfig();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ OverlayNode::OverlayNode():
|
||||
_texEnvMode(GL_DECAL),
|
||||
_textureUnit(1),
|
||||
_textureSizeHint(1024),
|
||||
_continousUpdate(false)
|
||||
_continuousUpdate(false)
|
||||
{
|
||||
init();
|
||||
}
|
||||
@@ -37,7 +37,7 @@ OverlayNode::OverlayNode(const OverlayNode& copy, const osg::CopyOp& copyop):
|
||||
_texEnvMode(copy._texEnvMode),
|
||||
_textureUnit(copy._textureUnit),
|
||||
_textureSizeHint(copy._textureSizeHint),
|
||||
_continousUpdate(copy._continousUpdate)
|
||||
_continuousUpdate(copy._continuousUpdate)
|
||||
{
|
||||
init();
|
||||
}
|
||||
@@ -109,7 +109,7 @@ void OverlayNode::traverse(osg::NodeVisitor& nv)
|
||||
unsigned int contextID = cv->getState()!=0 ? cv->getState()->getContextID() : 0;
|
||||
|
||||
// if we need to redraw then do cull traversal on camera.
|
||||
if (!_textureObjectValidList[contextID] || _continousUpdate)
|
||||
if (!_textureObjectValidList[contextID] || _continuousUpdate)
|
||||
{
|
||||
|
||||
// now compute the camera's view and projection matrix to point at the shadower (the camera's children)
|
||||
|
||||
@@ -1081,12 +1081,12 @@ void CullVisitor::apply(osg::CameraNode& camera)
|
||||
pushProjectionMatrix(createOrReuseMatrix(camera.getProjectionMatrix()));
|
||||
pushModelViewMatrix(createOrReuseMatrix(camera.getViewMatrix()));
|
||||
}
|
||||
else if (camera.getTransformOrder()==osg::CameraNode::POST_MULTIPLE)
|
||||
else if (camera.getTransformOrder()==osg::CameraNode::POST_MULTIPLY)
|
||||
{
|
||||
pushProjectionMatrix(createOrReuseMatrix(getProjectionMatrix()*camera.getProjectionMatrix()));
|
||||
pushModelViewMatrix(createOrReuseMatrix(getModelViewMatrix()*camera.getViewMatrix()));
|
||||
}
|
||||
else // pre multiple
|
||||
else // pre multiply
|
||||
{
|
||||
pushProjectionMatrix(createOrReuseMatrix(camera.getProjectionMatrix()*getProjectionMatrix()));
|
||||
pushModelViewMatrix(createOrReuseMatrix(camera.getViewMatrix()*getModelViewMatrix()));
|
||||
|
||||
@@ -812,7 +812,7 @@ void PickVisitor::apply(osg::CameraNode& camera)
|
||||
camera.getViewMatrix(),
|
||||
_mx, _my );
|
||||
}
|
||||
else if (camera.getTransformOrder()==osg::CameraNode::POST_MULTIPLE)
|
||||
else if (camera.getTransformOrder()==osg::CameraNode::POST_MULTIPLY)
|
||||
{
|
||||
runNestedPickVisitor( camera,
|
||||
camera.getViewport() ? camera.getViewport() : _lastViewport.get(),
|
||||
@@ -820,7 +820,7 @@ void PickVisitor::apply(osg::CameraNode& camera)
|
||||
_lastViewMatrix * camera.getViewMatrix(),
|
||||
_mx, _my );
|
||||
}
|
||||
else // PRE_MULTIPLE
|
||||
else // PRE_MULTIPLY
|
||||
{
|
||||
runNestedPickVisitor( camera,
|
||||
camera.getViewport() ? camera.getViewport() : _lastViewport.get(),
|
||||
|
||||
Reference in New Issue
Block a user