From Geoff Michel, speeling and typo fixes in osgUtil
This commit is contained in:
parent
f347703370
commit
a9e19fde9c
@ -25,8 +25,8 @@ namespace osgUtil
|
||||
{
|
||||
|
||||
/**
|
||||
This class generates three arrays containing tangent-space basis vectors. It takes
|
||||
a texture-mapped Geometry object as input, traverses its primitive sets and computes
|
||||
The TangentSpaceGenerator class generates three arrays containing tangent-space basis vectors.
|
||||
It takes a texture-mapped Geometry object as input, traverses its primitive sets and computes
|
||||
Tangent, Normal and Binormal vectors for each vertex, storing them into arrays.
|
||||
The resulting arrays can be used as vertex program varying (per-vertex) parameters,
|
||||
enabling advanced effects like bump-mapping.
|
||||
|
@ -27,12 +27,12 @@ class OSGUTIL_EXPORT TransformAttributeFunctor : public osg::Drawable::Attribute
|
||||
{
|
||||
public:
|
||||
|
||||
/** construct a functor to transform a drawable's vertex and normal attributes by specified matrix.*/
|
||||
/** Construct a functor to transform a drawable's vertex and normal attributes by specified matrix.*/
|
||||
TransformAttributeFunctor(const osg::Matrix& m);
|
||||
|
||||
virtual ~TransformAttributeFunctor();
|
||||
|
||||
/** do the work of transforming vertex and normal attributes. */
|
||||
/** Do the work of transforming vertex and normal attributes. */
|
||||
virtual void apply(osg::Drawable::AttributeType type,unsigned int count,osg::Vec3* begin);
|
||||
|
||||
osg::Matrix _m;
|
||||
|
@ -25,7 +25,7 @@
|
||||
namespace osgUtil {
|
||||
|
||||
/** A tri stripping visitor for converting Geometry surface primitives into tri strips.
|
||||
* The current implemention is based up Tanguy Fautre's triangulation code.
|
||||
* The current implemention is based upon Tanguy Fautre's triangulation code.
|
||||
*/
|
||||
class OSGUTIL_EXPORT TriStripVisitor : public osg::NodeVisitor
|
||||
{
|
||||
@ -45,10 +45,10 @@ class OSGUTIL_EXPORT TriStripVisitor : public osg::NodeVisitor
|
||||
*/
|
||||
void stripify(osg::Geometry& drawable);
|
||||
|
||||
/** Stripfy the accumulated list of Geometry drawables.*/
|
||||
/** Stripify (make into strips of tria or quads) the accumulated list of Geometry drawables.*/
|
||||
void stripify();
|
||||
|
||||
/// accumulate the Geometry drawables to stripify
|
||||
/// Accumulate the Geometry drawables to make into strips.
|
||||
virtual void apply(osg::Geode& geode);
|
||||
|
||||
inline void setCacheSize( unsigned int size )
|
||||
|
@ -32,7 +32,7 @@ namespace osgUtil {
|
||||
|
||||
/**
|
||||
* Basic UpdateVisitor implementation for animating a scene.
|
||||
* This visitor traverses the scene graph, call each nodes appCallback if
|
||||
* This visitor traverses the scene graph, calling each nodes appCallback if
|
||||
* it exists.
|
||||
*/
|
||||
class OSGUTIL_EXPORT UpdateVisitor : public osg::NodeVisitor
|
||||
@ -44,6 +44,7 @@ class OSGUTIL_EXPORT UpdateVisitor : public osg::NodeVisitor
|
||||
|
||||
virtual void reset();
|
||||
|
||||
/** During traversal each type of node calls its callbacks and its children traversed. */
|
||||
virtual void apply(osg::Node& node) { handle_callbacks_and_traverse(node); }
|
||||
|
||||
virtual void apply(osg::Geode& node) { handle_geode_callbacks(node); }
|
||||
@ -62,10 +63,10 @@ class OSGUTIL_EXPORT UpdateVisitor : public osg::NodeVisitor
|
||||
|
||||
protected:
|
||||
|
||||
// /** prevent unwanted copy construction.*/
|
||||
// /** Prevent unwanted copy construction.*/
|
||||
// UpdateVisitor(const UpdateVisitor&):osg::NodeVisitor() {}
|
||||
|
||||
/** prevent unwanted copy operator.*/
|
||||
/** Prevent unwanted copy operator.*/
|
||||
UpdateVisitor& operator = (const UpdateVisitor&) { return *this; }
|
||||
|
||||
inline void handle_callbacks_and_traverse(osg::Node& node)
|
||||
@ -79,14 +80,15 @@ class OSGUTIL_EXPORT UpdateVisitor : public osg::NodeVisitor
|
||||
{
|
||||
osg::NodeCallback* callback = node.getUpdateCallback();
|
||||
if (callback) (*callback)(&node,this);
|
||||
/*else if (node.getNumChildrenRequiringUpdateTraversal()>0)*/ traverseGeode(node);
|
||||
/*else if (node.getNumChildrenRequiringUpdateTraversal()>0)*/
|
||||
traverseGeode(node);
|
||||
}
|
||||
|
||||
inline void traverseGeode(osg::Geode& geode)
|
||||
{
|
||||
traverse((osg::Node&)geode);
|
||||
|
||||
// call the app callbacks on the drawables.
|
||||
// Call the app callbacks on the drawables.
|
||||
for(unsigned int i=0;i<geode.getNumDrawables();++i)
|
||||
{
|
||||
osg::Drawable::UpdateCallback* callback = geode.getDrawable(i)->getUpdateCallback();
|
||||
|
@ -20,8 +20,8 @@
|
||||
extern "C" {
|
||||
|
||||
/**
|
||||
* getVersion_osgUtil() returns the library version number.
|
||||
* Numbering convention : osg_src-0.8-31 will return 0.8.31 from getVersion_osgUtil.
|
||||
* osgUtilGetVersion() returns the library version number.
|
||||
* Numbering convention : osg_src-0.8-31 will return 0.8.31 from osgUtilGetVersion.
|
||||
*
|
||||
* This C function can be also used to check for the existence of the OpenSceneGraph
|
||||
* library using autoconf and its m4 macro AC_CHECK_LIB.
|
||||
@ -38,7 +38,7 @@ extern "C" {
|
||||
extern OSGUTIL_EXPORT const char* osgUtilGetVersion();
|
||||
|
||||
/**
|
||||
* getLibraryName_osgUtil() returns the library name in human friendly form.
|
||||
* osgUtilGetLibraryName() returns the library name in human friendly form.
|
||||
*/
|
||||
extern OSGUTIL_EXPORT const char* osgUtilGetLibraryName();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user