From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14832 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
// Search in str for all occurences of spat and replace them with rpat.
|
||||
// Search in str for all occurrences of spat and replace them with rpat.
|
||||
void searchAndReplace(std::string& str, const std::string& spat, const std::string& rpat)
|
||||
{
|
||||
std::string::size_type pos = 0;
|
||||
|
||||
@@ -71,7 +71,7 @@ int main (int argc, char* argv[])
|
||||
osg::ref_ptr<osg::Geode> geode = new osg::Geode;
|
||||
geode->addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f,0.0f,0.0f),0.5)));
|
||||
|
||||
//Tranformation to be manipulated by the animation
|
||||
//Transformation to be manipulated by the animation
|
||||
osg::ref_ptr<osg::MatrixTransform> trans = new osg::MatrixTransform();
|
||||
trans->setName("AnimatedNode");
|
||||
//Dynamic object, has to be updated during update traversal
|
||||
@@ -84,7 +84,7 @@ int main (int argc, char* argv[])
|
||||
//The second element modifies the rotation around x-axis
|
||||
updatecb->getStackedTransforms().push_back(new osgAnimation::StackedTranslateElement("position"));
|
||||
updatecb->getStackedTransforms().push_back(new osgAnimation::StackedRotateAxisElement("euler",osg::Vec3(1,0,0),0));
|
||||
//connect the UpdateMatrixTransform callback to the MatrixTRanform
|
||||
//connect the UpdateMatrixTransform callback to the MatrixTransform
|
||||
trans->setUpdateCallback(updatecb);
|
||||
//initialize MatrixTranform
|
||||
trans->setMatrix(osg::Matrix::identity());
|
||||
@@ -102,7 +102,7 @@ int main (int argc, char* argv[])
|
||||
//add the rest of the scene to the grp node
|
||||
grp->addChild(root);
|
||||
|
||||
// And we finaly define our channel for linear Vector interpolation
|
||||
// And we finally define our channel for linear Vector interpolation
|
||||
osgAnimation::Vec3LinearChannel* channelAnimation1 = new osgAnimation::Vec3LinearChannel;
|
||||
//name of the AnimationUpdateCallback
|
||||
channelAnimation1->setTargetName("AnimatedCallback");
|
||||
|
||||
@@ -98,9 +98,9 @@ struct ExampleTimelineUsage : public osgGA::GUIEventHandler
|
||||
{
|
||||
// we add a scratch head priority 1 each 10 second
|
||||
// note:
|
||||
// it's possible to add the same instance more then once on the timeline
|
||||
// it's possible to add the same instance more than once on the timeline
|
||||
// the only things you need to take care is if you remove it. It will remove
|
||||
// all instance that exist on the timeline. If you need to differtiate
|
||||
// all instance that exist on the timeline. If you need to differentiate
|
||||
// it's better to create a new instance
|
||||
tml->addActionAt(5.0 + 10.0 * i, _scratchHead.get(), 1);
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ int main( int argc, char **argv )
|
||||
viewer.renderingTraversals();
|
||||
|
||||
osg::Timer_t afterRenderTick = osg::Timer::instance()->tick();
|
||||
std::cout<<"Rendring time = "<<osg::Timer::instance()->delta_s(beforeRenderTick, afterRenderTick) <<" seconds"<<std::endl;
|
||||
std::cout<<"Rendering time = "<<osg::Timer::instance()->delta_s(beforeRenderTick, afterRenderTick) <<" seconds"<<std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ osg::Node* createModel()
|
||||
// create the root node which will hold the model.
|
||||
osg::Group* root = new osg::Group();
|
||||
|
||||
// add the drawable into a single goede to be shared...
|
||||
// add the drawable into a single geode to be shared...
|
||||
osg::Billboard* center = new osg::Billboard();
|
||||
center->setMode(osg::Billboard::POINT_ROT_EYE);
|
||||
center->addDrawable(
|
||||
|
||||
@@ -304,7 +304,7 @@ int main( int argc, char **argv )
|
||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(object.get());
|
||||
if (view)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Read config file succesfully"<<std::endl;
|
||||
osg::notify(osg::NOTICE)<<"Read config file successfully"<<std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ osg::Node* decorate_with_clip_node(osg::Node* subgraph)
|
||||
rootnode->addChild(wireframe_subgraph);
|
||||
|
||||
/*
|
||||
// simple approach to adding a clipnode above a subrgaph.
|
||||
// simple approach to adding a clipnode above a subgraph.
|
||||
|
||||
// create clipped part.
|
||||
osg::ClipNode* clipped_subgraph = new osg::ClipNode;
|
||||
@@ -78,7 +78,7 @@ osg::Node* decorate_with_clip_node(osg::Node* subgraph)
|
||||
|
||||
|
||||
// more complex approach to managing ClipNode, allowing
|
||||
// ClipNode node to be transformed independantly from the subgraph
|
||||
// ClipNode node to be transformed independently from the subgraph
|
||||
// that it is clipping.
|
||||
|
||||
osg::MatrixTransform* transform= new osg::MatrixTransform;
|
||||
|
||||
@@ -211,7 +211,7 @@ int main( int argc, char **argv )
|
||||
|
||||
// ------------- Start of copy specific code -------------------------------------------------------
|
||||
|
||||
// do a deep copy, using MyCopyOp to reveal whats going on under the good,
|
||||
// do a deep copy, using MyCopyOp to reveal whats going on under the hood,
|
||||
// in your own code you'd typically just use the basic osg::CopyOp something like
|
||||
osg::ref_ptr<osg::Node> mycopy = dynamic_cast<osg::Node*>(rootnode->clone(osg::CopyOp::DEEP_COPY_ALL));
|
||||
std::cout << "Doing a deep copy of scene graph"<<std::endl;
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
OSG_NOTICE<<" WindowWidth="<<ea.getWindowWidth()<<std::endl;
|
||||
OSG_NOTICE<<" WindowHeight="<<ea.getWindowHeight()<<std::endl;
|
||||
|
||||
// reset the Camera viewpoer and associated Texture's to make sure it tracks the new window size.
|
||||
// reset the Camera viewport and associated Texture's to make sure it tracks the new window size.
|
||||
camera->resize(ea.getWindowWidth(), ea.getWindowHeight());
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
// wraps OpenGL very thinly and therefore uses all the same enum and naming conventions. The coordinate data is also
|
||||
// wrapped around OpenGL's vertex arrays and draw arrays/elements calls. Familiarity with
|
||||
// OpenGL will help you understand the osg::Geometry class which encapsulate all this, or if you
|
||||
// havn't learned OpenGL yet, learning osg::Geometry will help you understand how OpenGL
|
||||
// haven't learned OpenGL yet, learning osg::Geometry will help you understand how OpenGL
|
||||
// works!
|
||||
|
||||
// The osg::Geometry class "is a" subclass of osg::Drawable base class, so is an object that provides
|
||||
|
||||
@@ -56,7 +56,7 @@ void createFountainEffect( osgParticle::ModularEmitter* emitter, osgParticle::Mo
|
||||
// Bounce particles off objects defined by one or more domains.
|
||||
// Supported domains include triangle, rectangle, plane, disk and sphere.
|
||||
// Since a bounce always happens instantaneously, it will not work correctly with unstable delta-time.
|
||||
// At present, even the floating error of dt (which are applied to ParticleSystem and Operator seperately)
|
||||
// At present, even the floating error of dt (which are applied to ParticleSystem and Operator separately)
|
||||
// causes wrong bounce results. Some one else may have better solutions for this.
|
||||
osg::ref_ptr<osgParticle::BounceOperator> bounce = new osgParticle::BounceOperator;
|
||||
bounce->setFriction( -0.05 );
|
||||
@@ -191,7 +191,7 @@ int main( int argc, char** argv )
|
||||
|
||||
// A floating error of delta-time should be explained here:
|
||||
// The particles emitter, program and updater all use a 'dt' to compute the time value in every frame.
|
||||
// Because the 'dt' is a double value, it is not suitable to keep three copies of it seperately, which
|
||||
// Because the 'dt' is a double value, it is not suitable to keep three copies of it separately, which
|
||||
// is the previous implementation. The small error makes some opeartors unable to work correctly, e.g.
|
||||
// the BounceOperator.
|
||||
// Now we make use of the getDeltaTime() of ParticleSystem to maintain and dispatch the delta time. But..
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
// A simple demo demonstrating planar reflections using multiple renderings
|
||||
// of a subgraph, overriding of state attribures and use of the stencil buffer.
|
||||
//
|
||||
// The multipass system implemented here is a variation if Mark Kilgard's
|
||||
// The multipass system implemented here is a variation of Mark Kilgard's
|
||||
// paper "Improving Shadows and Reflections via the Stencil Buffer" which
|
||||
// can be found on the developer parts of the NVidia web site.
|
||||
//
|
||||
@@ -52,7 +52,7 @@
|
||||
// world poking through the mirror to be seen in the final rendering and
|
||||
// also obscures the world correctly when on the reverse side of the mirror.
|
||||
// Although there is still some unresolved issue with the clip plane needing
|
||||
// to be flipped when looking at the reverse side of the mirror. Niether
|
||||
// to be flipped when looking at the reverse side of the mirror. Neither
|
||||
// of these issues are mentioned in the Mark's paper, but trip us up when
|
||||
// we apply them.
|
||||
|
||||
@@ -322,7 +322,7 @@ osg::Node* createMirroredScene(osg::Node* model)
|
||||
//
|
||||
// create the viewer
|
||||
// load a model
|
||||
// decoate the model so it renders using a multipass stencil buffer technique for planar reflections.
|
||||
// decorate the model so it renders using a multipass stencil buffer technique for planar reflections.
|
||||
// release the viewer
|
||||
// run main loop.
|
||||
//
|
||||
|
||||
@@ -173,7 +173,7 @@ int main( int argc, char **argv )
|
||||
}
|
||||
else
|
||||
{
|
||||
// use new #pragama(tic) shader composition.
|
||||
// use new #pragma(tic) shader composition.
|
||||
osg::ref_ptr<osg::Node> scenegraph = createNewShaderCompositionScene(arguments);
|
||||
if (!scenegraph) return 1;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ osg::StateSet* createState(osg::ArgumentParser& arguments)
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_NOTICE<<"Assigned all images to Texture2DArray seperately."<<std::endl;
|
||||
OSG_NOTICE<<"Assigned all images to Texture2DArray separately."<<std::endl;
|
||||
|
||||
texture->setImage(0, image_0.get());
|
||||
texture->setImage(1, image_1.get());
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <iostream>
|
||||
|
||||
//
|
||||
// A simple demo demonstrating use osg::Texture3D to create a blended animation between four seperate images packed together into a 3d texture
|
||||
// A simple demo demonstrating use osg::Texture3D to create a blended animation between four separate images packed together into a 3d texture
|
||||
//
|
||||
|
||||
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
|
||||
|
||||
@@ -96,7 +96,7 @@ int main( int argc, char **argv )
|
||||
}
|
||||
|
||||
|
||||
// optimize the scene graph, remove rendundent nodes and state etc.
|
||||
// optimize the scene graph, remove redundant nodes and state etc.
|
||||
osgUtil::Optimizer optimizer;
|
||||
optimizer.optimize(loadedModel.get());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user