Code comments, log strings and some variable spell fixes.

This commit is contained in:
Alberto Luaces
2020-10-28 17:05:06 +01:00
committed by Robert Osfield
parent 300ba7aa02
commit 2ade061ced
88 changed files with 143 additions and 143 deletions

View File

@@ -312,7 +312,7 @@ int main( int argc, char **argv )
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(loadedModel.get());
if(!csn) return 1;
// Compute eye point in world coordiantes
// Compute eye point in world coordinates
osg::Vec3d eye;
csn->getEllipsoidModel()->convertLatLongHeightToXYZ(lat, lon, alt, eye.x(), eye.y(), eye.z());

View File

@@ -184,7 +184,7 @@ int main( int argc, char **argv )
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// set the osgDB::Registy read file callback to catch all requests for reading files.
// set the osgDB::Registry read file callback to catch all requests for reading files.
osgDB::Registry::instance()->setReadFileCallback(new MyReadFileCallback());
// initialize the viewer.

View File

@@ -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 hood,
// do a deep copy, using MyCopyOp to reveal what's 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;

View File

@@ -77,7 +77,7 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->addCommandLineOption("-o <filename>","Base output filename of the images, recommended to use something like Images/image.png");
arguments.getApplicationUsage()->addCommandLineOption("--cs <filename>","Load pre-generated configuration file for run.");
arguments.getApplicationUsage()->addCommandLineOption("--ouput-cs <filename>","Output configuration file with settings provided on commandline.");
arguments.getApplicationUsage()->addCommandLineOption("-p <filename>","Use specificied camera path file to control camera position.");
arguments.getApplicationUsage()->addCommandLineOption("-p <filename>","Use specified camera path file to control camera position.");
arguments.getApplicationUsage()->addCommandLineOption("--offscreen","Use an pbuffer to render the images offscreen.");
arguments.getApplicationUsage()->addCommandLineOption("--screen","Use an window to render the images.");
arguments.getApplicationUsage()->addCommandLineOption("--width <width>","Window/output image width.");

View File

@@ -148,7 +148,7 @@ osg::Node* createScene()
// create a Vec3Array and add to it all my coordinates.
// Like all the *Array variants (see include/osg/Array) , Vec3Array is derived from both osg::Array
// and std::vector<>. osg::Array's are reference counted and hence sharable,
// and std::vector<>. osg::Array's are reference counted and hence shareable,
// which std::vector<> provides all the convenience, flexibility and robustness
// of the most popular of all STL containers.
osg::Vec3Array* vertices = new osg::Vec3Array;

View File

@@ -64,7 +64,7 @@ void KeyboardModel::keyChange(int key, int virtualKey, int value)
{
osg::notify(osg::INFO) << "key value change, code="<<std::hex << key << "\t value="<< value << std::dec << std::endl;
// toggle the keys graphical representation on or off via osg::Swithc
// toggle the keys graphical representation on or off via osg::Switch
KeyModelMap::iterator itr = _keyModelMap.find(virtualKey);
if (itr!=_keyModelMap.end())
{

View File

@@ -167,7 +167,7 @@ public:
{
osg::notify(osg::NOTICE)<<"Using window coordinates for picking"<<std::endl;
} else {
osg::notify(osg::NOTICE)<<"Using projection coordiates for picking"<<std::endl;
osg::notify(osg::NOTICE)<<"Using projection coordinates for picking"<<std::endl;
}
}
else if (ea.getKey()=='a')
@@ -401,7 +401,7 @@ public:
if (cmtsv._group->getNumChildren()>0)
{
std::cout<<"Writing selected compoents to 'selected_model.osgt'"<<std::endl;
std::cout<<"Writing selected components to 'selected_model.osgt'"<<std::endl;
osgDB::writeNodeFile(*cmtsv._group, "selected_model.osgt");
}
}

View File

@@ -175,7 +175,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 separately, which
// is the previous implementation. The small error makes some opeartors unable to work correctly, e.g.
// is the previous implementation. The small error makes some operators 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..
// it is not the best solution so far, since there are still very few particles acting unexpectedly.

View File

@@ -76,7 +76,7 @@ void computeViewMatrixOnEarth( osg::Camera* camera, osg::Node* scene,
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(scene);
if ( !csn ) return;
// Compute eye point in world coordiantes
// Compute eye point in world coordinates
osg::Vec3d eye;
csn->getEllipsoidModel()->convertLatLongHeightToXYZ(
latLongHeight.x(), latLongHeight.y(), latLongHeight.z(), eye.x(), eye.y(), eye.z() );

View File

@@ -39,7 +39,7 @@
//
// A simple demo demonstrating planar reflections using multiple renderings
// of a subgraph, overriding of state attribures and use of the stencil buffer.
// of a subgraph, overriding of state attributes and use of the stencil buffer.
//
// The multipass system implemented here is a variation of Mark Kilgard's
// paper "Improving Shadows and Reflections via the Stencil Buffer" which

View File

@@ -99,19 +99,19 @@ class WindowCaptureCallback : public osg::Camera::DrawCallback
switch(_mode)
{
case(READ_PIXELS):
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with out PixelBufferObject."<<std::endl;
osg::notify(osg::NOTICE)<<"Reading window using glReadPixels, with out PixelBufferObject."<<std::endl;
break;
case(SINGLE_PBO):
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a single PixelBufferObject."<<std::endl;
osg::notify(osg::NOTICE)<<"Reading window using glReadPixels, with a single PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
break;
case(DOUBLE_PBO):
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a double buffer PixelBufferObject."<<std::endl;
osg::notify(osg::NOTICE)<<"Reading window using glReadPixels, with a double buffer PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);
break;
case(TRIPLE_PBO):
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a triple buffer PixelBufferObject."<<std::endl;
osg::notify(osg::NOTICE)<<"Reading window using glReadPixels, with a triple buffer PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);

View File

@@ -69,7 +69,7 @@ osg::Node* createTextGroup(const char** text)
// loop through all children
seq->setInterval(osg::Sequence::LOOP, 0,-1);
// real-time playback, repeat indefinitively
// real-time playback, repeat indefinitely
seq->setDuration(1.0f, -1);
// must be started explicitly
@@ -157,7 +157,7 @@ osg::Sequence* createSequence(osg::ArgumentParser& arguments)
// loop through all children
seq->setInterval(osg::Sequence::LOOP, 0,-1);
// real-time playback, repeat indefinitively
// real-time playback, repeat indefinitely
seq->setDuration(1.0f, -1);
seq->setMode(osg::Sequence::START);
@@ -244,7 +244,7 @@ int main( int argc, char **argv )
"- is subclassed from osg::Switch",
"- assigns a display duration to each child",
"- can loop or swing through an interval of it's children",
"- can repeat the interval a number of times or indefinitively",
"- can repeat the interval a number of times or indefinitely",
"- press 's' to start/pause/resume",
"- press 'l' to toggle loop/swing mode",
NULL

View File

@@ -99,7 +99,7 @@ osg::Node* createOldShaderCompositionScene(osg::ArgumentParser& arguments)
group->addChild(pat);
}
// resuse the first ShaderAttribute's type and ShaderComponent, just use new uniform
// reuse the first ShaderAttribute's type and ShaderComponent, just use new uniform
{
osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform;
pat->setPosition(position);
@@ -119,7 +119,7 @@ osg::Node* createOldShaderCompositionScene(osg::ArgumentParser& arguments)
}
// resuse the first ShaderAttribute's type and ShaderComponent, just use new uniform
// reuse the first ShaderAttribute's type and ShaderComponent, just use new uniform
{
osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform;
pat->setPosition(position);

View File

@@ -314,7 +314,7 @@ int main(int, char **)
osg::ref_ptr<TestSupportOperation> testSupportOperation = new TestSupportOperation;
#if 0
// temporily commenting out as its causing the viewer to crash... no clue yet to why
// temporarily commenting out as its causing the viewer to crash... no clue yet to why
viewer.setRealizeOperation(testSupportOperation.get());
#endif
// create the windows and run the threads.

View File

@@ -470,7 +470,7 @@ osg::Geometry *makePols (void) {
gtess->setStateSet( stateset );
int nstart=0;
// the contours accepoted are polygons; quads & tris. Trifans can bve added later.
// the contours accepted are polygons; quads & tris. Trifans can be added later.
gtess->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,nstart,12));nstart+=12;
gtess->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,nstart,12));nstart+=12;
gtess->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POLYGON,nstart,16));nstart+=16;

View File

@@ -1,9 +1,9 @@
/* A demonstration of Tessellation Shaders in OpenScenegraph.
*
* Instructions:
* Press plus to increase tesselation and minus to decrease it.
* Press right arrow to increase inner tesselation and left arrow to decrease it.
* Press up arrow to increase outer tesselation and down arrow to decrease it.
* Press plus to increase tessellation and minus to decrease it.
* Press right arrow to increase inner tessellation and left arrow to decrease it.
* Press up arrow to increase outer tessellation and down arrow to decrease it.
*
* Original code by Philip Rideout
* Adapted to OpenScenegraph by John Kaniarz

View File

@@ -683,7 +683,7 @@ int main(int argc, char** argv)
text->setFont("fonts/times.ttf");
text->setAxisAlignment(osgText::Text::XZ_PLANE);
text->setAlignment(osgText::Text::RIGHT_TOP);
text->setText("Alingment\nBefore:");
text->setText("Alignment\nBefore:");
group->addChild(text);
}
@@ -691,7 +691,7 @@ int main(int argc, char** argv)
osg::ref_ptr<osgText::Text> text = new osgText::Text;
text->setFont("fonts/times.ttf");
text->setAxisAlignment(osgText::Text::XZ_PLANE);
text->setText("Alingment\nAfter:");
text->setText("Alignment\nAfter:");
text->setAlignment(osgText::Text::LEFT_TOP);
group->addChild(text);
}

View File

@@ -543,7 +543,7 @@ public:
// now assign the appropriate portion data from the originalImage
subImage->setImage(originalImage->s()/2, originalImage->t()/2, originalImage->r(), // half the width and height
originalImage->getInternalTextureFormat(), // same internal texture format
originalImage->getPixelFormat(),originalImage->getDataType(), // same pixel foramt and data type
originalImage->getPixelFormat(),originalImage->getDataType(), // same pixel format and data type
originalImage->data(originalImage->s()/4,originalImage->t()/4), // offset the start point to 1/4 into the image
osg::Image::NO_DELETE, // don't attempt to delete the image data, leave this to the originalImage
originalImage->getPacking(), // use the same packing

View File

@@ -124,7 +124,7 @@ int main(int argc, char** argv)
if (arguments.argc()<=1)
{
std::cout<<"Please supply an image filename on the commnand line."<<std::endl;
std::cout<<"Please supply an image filename on the command line."<<std::endl;
return 1;
}

View File

@@ -215,7 +215,7 @@ void testGetQuatFromMatrix(const osg::Vec3d& scale)
double yaw2stop = 360.0;
double yaw2step = 20.0;
#else
// focussed range
// focused range
double rol1start = 0.0;
double rol1stop = 0.0;
double rol1step = 0.1;