diff --git a/include/osg/MatrixTransform b/include/osg/MatrixTransform index 8bd9dd924..711f6f0fd 100644 --- a/include/osg/MatrixTransform +++ b/include/osg/MatrixTransform @@ -20,7 +20,7 @@ namespace osg { /** MatrixTransform - is a subclass of Transform which has an osg::Matrix - * which represent a 4x4 transformation of its children from local cordinates + * which represents a 4x4 transformation of its children from local coordinates * into the Transform's parent coordinates. */ class SG_EXPORT MatrixTransform : public Transform @@ -47,10 +47,10 @@ class SG_EXPORT MatrixTransform : public Transform /** Get the matrix. */ inline const Matrix& getMatrix() const { return _matrix; } - /** pre multiply the transforms matrix.*/ + /** pre multiply the transform's matrix.*/ void preMult(const Matrix& mat) { _matrix.preMult(mat); _inverseDirty=true; dirtyBound(); } - /** post multiply the transforms matrix.*/ + /** post multiply the transform's matrix.*/ void postMult(const Matrix& mat) { _matrix.postMult(mat); _inverseDirty=true; dirtyBound(); } /** Get the inverse matrix. */ diff --git a/include/osg/Multisample b/include/osg/Multisample index c968841af..5de751387 100644 --- a/include/osg/Multisample +++ b/include/osg/Multisample @@ -65,7 +65,7 @@ class SG_EXPORT Multisample : public StateAttribute virtual int compare(const StateAttribute& sa) const { // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Paramter macro's below. + // used by the COMPARE_StateAttribute_Parameter macro's below. COMPARE_StateAttribute_Types(Multisample,sa) // compare each paramter in turn against the rhs. @@ -73,7 +73,7 @@ class SG_EXPORT Multisample : public StateAttribute COMPARE_StateAttribute_Parameter(_invert) COMPARE_StateAttribute_Parameter(_mode) - return 0; // passed all the above comparison macro's, must be equal. + return 0; // passed all the above comparison macros, must be equal. } void setSampleCoverage(float coverage, bool invert) @@ -89,8 +89,8 @@ class SG_EXPORT Multisample : public StateAttribute virtual void apply(State& state) const; - /** Extensions class which encapsulates the querring of extensions and - * associated function pointers, and provide convinience wrappers to + /** Extensions class which encapsulates the querying of extensions and + * associated function pointers, and provide convenience wrappers to * check for the extensions or use the associated functions.*/ class SG_EXPORT Extensions : public osg::Referenced { @@ -122,15 +122,15 @@ class SG_EXPORT Multisample : public StateAttribute }; /** Function to call to get the extension of a specified context. - * If the Exentsion object for that context has not yet been created then + * If the Exentsion object for that context has not yet been created * and the 'createIfNotInitalized' flag been set to false then returns NULL. * If 'createIfNotInitalized' is true then the Extensions object is - * automatically created. However, in this case the extension object + * automatically created. However, in this case the extension object will * only be created with the graphics context associated with ContextID..*/ static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); /** setExtensions allows users to override the extensions across graphics contexts. - * typically used when you have different extensions supported across graphics pipes + * Typically used when you have different extensions supported across graphics pipes * but need to ensure that they all use the same low common denominator extensions.*/ static void setExtensions(unsigned int contextID,Extensions* extensions); diff --git a/include/osg/Node b/include/osg/Node index 6a631b20a..3416bb32a 100644 --- a/include/osg/Node +++ b/include/osg/Node @@ -31,7 +31,7 @@ class Transform; /** META_Node macro define the standard clone, isSameKindAs, className * and accept methods. Use when subclassing from Node to make it - * more convinient to define the required pure virtual methods.*/ + * more convenient to define the required pure virtual methods.*/ #define META_Node(library,name) \ virtual osg::Object* cloneType() const { return new name (); } \ virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ @@ -56,7 +56,7 @@ class SG_EXPORT Node : public Object /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ Node(const Node&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); - /** clone the an object of the same type as the node.*/ + /** clone an object of the same type as the node.*/ virtual Object* cloneType() const { return new Node(); } /** return a clone of a node, with Object* return type.*/ @@ -78,7 +78,7 @@ class SG_EXPORT Node : public Object * Equivalent to dynamic_cast(this).*/ virtual const Group* asGroup() const { return 0; } - /** convert 'this' into a Transform pointer if Node is a Transform, otherwise return 0. + /** Convert 'this' into a Transform pointer if Node is a Transform, otherwise return 0. * Equivalent to dynamic_cast(this).*/ virtual Transform* asTransform() { return 0; } /** convert 'const this' into a const Transform pointer if Node is a Transform, otherwise return 0. @@ -150,11 +150,11 @@ class SG_EXPORT Node : public Object inline const NodeCallback* getCullCallback() const { return _cullCallback.get(); } /** Set the view frustum/small feature culling of this node to be active or inactive. - * The default value to true for _cullingActive. Used a guide + * The default value is true for _cullingActive. Used as a guide * to the cull traversal.*/ void setCullingActive(bool active); - /** Get the view frustum/small feature _cullingActive flag for this node. Used a guide + /** Get the view frustum/small feature _cullingActive flag for this node. Used as a guide * to the cull traversal.*/ inline bool getCullingActive() const { return _cullingActive; } @@ -162,7 +162,7 @@ class SG_EXPORT Node : public Object inline unsigned int getNumChildrenWithCullingDisabled() const { return _numChildrenWithCullingDisabled; } /** Return true if this node can be culled by view frustum, occlusion or small feature culling during the cull traversal. - * note, return true only if no children have culling disabled, and the local _cullingActive flag is true.*/ + * Note, returns true only if no children have culling disabled, and the local _cullingActive flag is true.*/ inline bool isCullingActive() const { return _numChildrenWithCullingDisabled==0 && _cullingActive && getBound().valid(); } /** Get the number of Children of this node which are or have OccluderNode's.*/ @@ -198,7 +198,7 @@ class SG_EXPORT Node : public Object void addDescription(const std::string& desc) { _descriptions.push_back(desc); } - /** set the node's StateSet.*/ + /** Set the node's StateSet.*/ inline void setStateSet(osg::StateSet* dstate) { _stateset = dstate; } /** return the node's StateSet, if one does not already exist create it @@ -206,10 +206,10 @@ class SG_EXPORT Node : public Object * that a valid StateSet is always returned and can be used directly.*/ osg::StateSet* getOrCreateStateSet(); - /** return the node's StateSet. returns NULL if a stateset is not attached.*/ + /** Return the node's StateSet. returns NULL if a stateset is not attached.*/ inline osg::StateSet* getStateSet() { return _stateset.get(); } - /** return the node's const StateSet. returns NULL if a stateset is not attached.*/ + /** return the node's const StateSet. Returns NULL if a stateset is not attached.*/ inline const osg::StateSet* getStateSet() const { return _stateset.get(); } /** get the bounding sphere of node. @@ -232,7 +232,7 @@ class SG_EXPORT Node : public Object be deleted other than by being dereferenced and the reference count being zero (see osg::Referenced), preventing the deletion of nodes which are still in use. This also means that - Node's cannot be created on stack i.e Node node will not compile, + Nodes cannot be created on stack i.e Node node will not compile, forcing all nodes to be created on the heap i.e Node* node = new Node().*/ virtual ~Node(); diff --git a/include/osg/NodeCallback b/include/osg/NodeCallback index d49ce400e..21d86d188 100644 --- a/include/osg/NodeCallback +++ b/include/osg/NodeCallback @@ -36,11 +36,11 @@ class SG_EXPORT NodeCallback : public virtual Object { META_Object(osg,NodeCallback) - /** Callback method call by the NodeVisitor when visiting a node.*/ + /** Callback method called by the NodeVisitor when visiting a node.*/ virtual void operator()(Node* node, NodeVisitor* nv) { - // note, callback is repsonsible for scenegraph traversal so - // should always include call the traverse(node,nv) to ensure + // note, callback is responsible for scenegraph traversal so + // should always include call traverse(node,nv) to ensure // that the rest of cullbacks and the scene graph are traversed. traverse(node,nv); } diff --git a/include/osg/NodeVisitor b/include/osg/NodeVisitor index eedd86b3b..68b633597 100644 --- a/include/osg/NodeVisitor +++ b/include/osg/NodeVisitor @@ -39,14 +39,14 @@ class OccluderNode; class Sequence; class CoordinateSystemNode; -/** Visitor for type safe operations on osg::Node's. +/** Visitor for type safe operations on osg::Nodes. Based on GOF's Visitor pattern. The NodeVisitor is useful for developing type safe operations to nodes in the scene graph (as per Visitor pattern), and adds to this support for optional scene graph traversal to allow operations to be applied to whole scenes at once. The Visitor pattern uses a technique of double dispatch as a mechanism to - called the appropriate apply(..) method of the NodeVisitor. To + call the appropriate apply(..) method of the NodeVisitor. To use this feature one must use the Node::accept(NodeVisitor) which is extended in each Node subclass, rather than the NodeVisitor apply directly. So use root->accept(myVisitor); instead of @@ -79,14 +79,14 @@ class SG_EXPORT NodeVisitor : public virtual Referenced virtual ~NodeVisitor(); - /** Method to call to reset visitor. Useful for your visitor accumulates + /** Method to call to reset visitor. Useful if your visitor accumulates state during a traversal, and you plan to reuse the visitor. - To flush that state for the next traversal than call reset() prior + To flush that state for the next traversal: call reset() prior to each traversal.*/ virtual void reset() {} - /** Set the VisitorType, used to distingush different visitors during + /** Set the VisitorType, used to distinguish different visitors during * traversal of the scene, typically used in the Node::traverse() method * to select which behaviour to use for different types of traversal/visitors.*/ inline void setVisitorType(VisitorType type) { _visitorType = type; } @@ -100,20 +100,20 @@ class SG_EXPORT NodeVisitor : public virtual Referenced /** Get the traversal number. Typically used to denote the frame count.*/ inline int getTraversalNumber() const { return _traversalNumber; } - /** Set the FrameStamp that this traversal is assoicated with.*/ + /** Set the FrameStamp that this traversal is associated with.*/ inline void setFrameStamp(FrameStamp* fs) { _frameStamp = fs; } - /** Get the FrameStamp that this traversal is assoicated with.*/ + /** Get the FrameStamp that this traversal is associated with.*/ inline const FrameStamp* getFrameStamp() const { return _frameStamp.get(); } /** Set the TraversalMask of this NodeVisitor. * The TraversalMask is used by the NodeVisitor::validNodeMask() method * to determine whether to operate on a node and its subgraph. - * validNodeMask() is called automaticaly in the Node::accept() method before + * validNodeMask() is called automatically in the Node::accept() method before * any call to NodeVisitor::apply(), apply() is only ever called if validNodeMask * returns true. Note, if NodeVisitor::_traversalMask is 0 then all operations - * will be swithced off for all nodes. Whereas setting both _traversalMask and + * will be switched off for all nodes. Whereas setting both _traversalMask and * _nodeMaskOverride to 0xffffffff will allow a visitor to work on all nodes * regardless of their own Node::_nodeMask state.*/ inline void setTraversalMask(Node::NodeMask mask) { _traversalMask = mask; } @@ -132,7 +132,7 @@ class SG_EXPORT NodeVisitor : public virtual Referenced inline Node::NodeMask getNodeMaskOverride() const { return _nodeMaskOverride; } /** Method to called by Node and its subclass' Node::accept() method, if the result is true - * to be used to cull operations of nodes and their subgraphs. + * it is used to cull operations of nodes and their subgraphs. * Return true if the result of a bit wise and of the NodeVisitor::_traversalMask * with the bit or between NodeVistor::_nodeMaskOverride and the Node::_nodeMask. * default values for _traversalMask is 0xffffffff, _nodeMaskOverride is 0x0, @@ -154,8 +154,8 @@ class SG_EXPORT NodeVisitor : public virtual Referenced /** * Set user data, data must be subclased from Referenced to allow - * automatic memory handling. If you own data isn't directly - * subclassed from Referenced then create and adapter object + * automatic memory handling. If your own data isn't directly + * subclassed from Referenced then create an adapter object * which points to your own objects and handles the memory addressing. */ inline void setUserData(Referenced* obj) { _userData = obj; } @@ -178,7 +178,7 @@ class SG_EXPORT NodeVisitor : public virtual Referenced } /** Method called by osg::Node::accept() method before - * a call the NodeVisitor::apply(..). The back of the list will, + * a call to the NodeVisitor::apply(..). The back of the list will, * therefore, be the current node being visited inside the apply(..), * and the rest of the list will be the parental sequence of nodes * from the top most node applied down the graph to the current node. @@ -186,8 +186,8 @@ class SG_EXPORT NodeVisitor : public virtual Referenced * will be called automatically by the Node::accept() method.*/ inline void pushOntoNodePath(Node* node) { if (_traversalMode!=TRAVERSE_PARENTS) _nodePath.push_back(node); else _nodePath.insert(_nodePath.begin(),node); } - /** Method callby osg::Node::accept() method after - * a call the NodeVisitor::apply(..). + /** Method called by osg::Node::accept() method after + * a call to NodeVisitor::apply(..). * Note, the user does not typically call pushNodeOnPath() as it * will be called automatically by the Node::accept() method.*/ inline void popFromNodePath() { if (_traversalMode!=TRAVERSE_PARENTS) _nodePath.pop_back(); else _nodePath.erase(_nodePath.begin()); } @@ -206,12 +206,12 @@ class SG_EXPORT NodeVisitor : public virtual Referenced /** Get the distance from a point to the eye point, distance value in local coordinate system. * Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement. - * If the getDistianceFromEyePoint(pos) is not implmented than a default value of 0.0 is returned.*/ + * If the getDistanceFromEyePoint(pos) is not implemented then a default value of 0.0 is returned.*/ virtual float getDistanceToEyePoint(const Vec3& /*pos*/, bool /*useLODScale*/) const { return 0.0f; } /** Get the distance of a point from the eye point, distance value in the eye coordinate system. * Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement. - * If the getDistianceFromEyePoint(pos) is not implmented than a default value of 0.0 is returned.*/ + * If the getDistanceFromEyePoint(pos) is not implemented than a default value of 0.0 is returned.*/ virtual float getDistanceFromEyePoint(const Vec3& /*pos*/, bool /*useLODScale*/) const { return 0.0f; } virtual void apply(Node& node) { traverse(node);} @@ -242,7 +242,7 @@ class SG_EXPORT NodeVisitor : public virtual Referenced virtual void apply(OccluderNode& node) { apply((Group&)node); } - /** callback for managing database paging, such as generated by PagedLOD nodes.*/ + /** Callback for managing database paging, such as generated by PagedLOD nodes.*/ class DatabaseRequestHandler : public osg::Referenced { public: diff --git a/include/osg/Notify b/include/osg/Notify index ccd439f5e..124a5b8ca 100644 --- a/include/osg/Notify +++ b/include/osg/Notify @@ -36,7 +36,7 @@ enum NotifySeverity { DEBUG_FP=6 }; -/** set the notify level, overriding the default or value set by +/** set the notify level, overriding the default or the value set by * the environmental variable OSGNOTIFYLEVEL. */ extern SG_EXPORT void setNotifyLevel(NotifySeverity severity); @@ -53,7 +53,7 @@ extern SG_EXPORT bool initNotifyLevel(); * application or via the an environmental variable. For instance * setenv OSGNOTIFYLEVEL DEBUG (for tsh), export OSGNOTIFYLEVEL=DEBUG * (for bourne shell) or set OSGNOTIFYLEVEL=DEBUG (for Windows) all - * set tell the osg to redirect all debugging and more important messages + * tell the osg to redirect all debugging and more important messages * to the console (useful for debugging :-) setting ALWAYS will force * all messages to be absorbed, which might be appropriate for final * applications. Default NotifyLevel is NOTICE. Check the enum diff --git a/include/osg/Object b/include/osg/Object index c7a35d457..149da0542 100644 --- a/include/osg/Object +++ b/include/osg/Object @@ -21,7 +21,7 @@ namespace osg { /** META_Object macro define the standard clone, isSameKindAs and className methods. - * Use when subclassing from Object to make it more convinient to define + * Use when subclassing from Object to make it more convenient to define * the standard pure virtual clone, isSameKindAs and className methods * which are required for all Object subclasses.*/ #define META_Object(library,name) \ @@ -55,15 +55,15 @@ class SG_EXPORT Object : public Referenced Must be defined by derived classes.*/ virtual Object* cloneType() const = 0; - /** Clone the an object, with Object* return type. + /** Clone an object, with Object* return type. Must be defined by derived classes.*/ virtual Object* clone(const CopyOp&) const = 0; virtual bool isSameKindAs(const Object*) const { return true; } /** return the name of the object's library. Must be defined - by derived classes. The OpenSceneGraph convention the is - that the namspace of a library is the same as the library name.*/ + by derived classes. The OpenSceneGraph convention is that the + namespace of a library is the same as the library name.*/ virtual const char* libraryName() const = 0; /** return the name of the object's class type. Must be defined @@ -80,7 +80,7 @@ class SG_EXPORT Object : public Referenced /** Set the data variance of this object. * Can be set to either STATIC for values that do not change over the lifetime of the object, * or DYNAMIC for values that vary over the lifetime of the object. The DataVariance value - * can be used be routines such as optimzation codes that wish to share static data.*/ + * can be used by routines such as optimzation codes that wish to share static data.*/ inline void setDataVariance(DataVariance dv) { _dataVariance = dv; } /** Get the data variance of this object.*/ @@ -88,10 +88,10 @@ class SG_EXPORT Object : public Referenced /** - * Set user data, data must be subclased from Referenced to allow - * automatic memory handling. If you own data isn't directly - * subclassed from Referenced then create and adapter object - * which points to your own objects and handles the memory addressing. + * Set user data, data must be subclassed from Referenced to allow + * automatic memory handling. If your own data isn't directly + * subclassed from Referenced then create an adapter object + * which points to your own object and handles the memory addressing. */ inline void setUserData(Referenced* obj) { _userData = obj; } @@ -108,7 +108,7 @@ class SG_EXPORT Object : public Referenced be deleted other than by being dereferenced and the reference count being zero (see osg::Referenced), preventing the deletion of nodes which are still in use. This also means that - Node's cannot be created on stack i.e Node node will not compile, + Nodes cannot be created on stack i.e Node node will not compile, forcing all nodes to be created on the heap i.e Node* node = new Node().*/ virtual ~Object() {} diff --git a/include/osg/OccluderNode b/include/osg/OccluderNode index 638b5097b..77ffc85d6 100644 --- a/include/osg/OccluderNode +++ b/include/osg/OccluderNode @@ -50,7 +50,7 @@ class SG_EXPORT OccluderNode : public Group virtual ~OccluderNode() {} - /** Override's Group's computeBound.*/ + /** Overrides Group's computeBound.*/ virtual bool computeBound() const; ref_ptr _occluder; diff --git a/include/osg/PagedLOD b/include/osg/PagedLOD index 9ef5bf44f..b3d996a65 100644 --- a/include/osg/PagedLOD +++ b/include/osg/PagedLOD @@ -77,15 +77,15 @@ class SG_EXPORT PagedLOD : public LOD unsigned int getNumTimeStamps() const { return _perRangeDataList.size(); } - /** Set the number of children that the PagedLOD must keep around, even if thay are older than their expiry time.*/ + /** Set the number of children that the PagedLOD must keep around, even if they are older than their expiry time.*/ inline void setNumChildrenThatCannotBeExpired(unsigned int num) { _numChildrenThatCannotBeExpired = num; } - /** Get the number of children that the PagedLOD must keep around, even if thay are older than their expiry time.*/ + /** Get the number of children that the PagedLOD must keep around, even if they are older than their expiry time.*/ unsigned int getNumChildrenThatCannotBeExpired() const { return _numChildrenThatCannotBeExpired; } - /** Remove the children from the PagedLOD which haven't be visited since specified expiry time. - The removed children are added the removeChildren list passed into the method, - this allows the children to be deleted later at the callers discression.*/ + /** Remove the children from the PagedLOD which haven't been visited since specified expiry time. + The removed children are added to the removeChildren list passed into the method, + this allows the children to be deleted later at the caller's discretion.*/ virtual void removeExpiredChildren(double expiryTime,NodeList& removedChildren); protected : diff --git a/include/osg/Plane b/include/osg/Plane index 5da864bee..094558a06 100644 --- a/include/osg/Plane +++ b/include/osg/Plane @@ -183,9 +183,9 @@ class SG_EXPORT Plane } - /** Transform the plane by matrix. Note, this operations carries out - * the calculation of the inverse of the matrix since to transforms - * planes must be multiplied my the inverse transposed. This + /** Transform the plane by matrix. Note, this operation carries out + * the calculation of the inverse of the matrix since a plane + * must be multiplied by the inverse transposed to transform it. This * make this operation expensive. If the inverse has been already * calculated elsewhere then use transformProvidingInverse() instead. * See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf*/ @@ -196,7 +196,7 @@ class SG_EXPORT Plane transformProvidingInverse(inverse); } - /** Transform the plane by provide a pre inverted matrix. + /** Transform the plane by providing a pre inverted matrix. * see transform for details. */ inline void transformProvidingInverse(const osg::Matrix& matrix) { diff --git a/include/osg/Point b/include/osg/Point index 2337f6a50..1ba64b116 100644 --- a/include/osg/Point +++ b/include/osg/Point @@ -41,10 +41,10 @@ class SG_EXPORT Point : public StateAttribute virtual int compare(const StateAttribute& sa) const { // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Paramter macro's below. + // used by the COMPARE_StateAttribute_Parameter macros below. COMPARE_StateAttribute_Types(Point,sa) - // compare each paramter in turn against the rhs. + // compare each parameter in turn against the rhs. COMPARE_StateAttribute_Parameter(_size) COMPARE_StateAttribute_Parameter(_fadeThresholdSize) COMPARE_StateAttribute_Parameter(_distanceAttenuation) diff --git a/include/osg/PolygonMode b/include/osg/PolygonMode index 6c91eddbd..f5eb43995 100644 --- a/include/osg/PolygonMode +++ b/include/osg/PolygonMode @@ -19,7 +19,7 @@ namespace osg { -/** Class to for setting OpenGL's polygon culling mode. +/** State Class for setting OpenGL's polygon culling mode. */ class SG_EXPORT PolygonMode : public StateAttribute { @@ -40,7 +40,7 @@ class SG_EXPORT PolygonMode : public StateAttribute virtual int compare(const StateAttribute& sa) const { // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Paramter macro's below. + // used by the COMPARE_StateAttribute_Parameter macros below. COMPARE_StateAttribute_Types(PolygonMode,sa) // compare each paramter in turn against the rhs. @@ -48,7 +48,7 @@ class SG_EXPORT PolygonMode : public StateAttribute COMPARE_StateAttribute_Parameter(_modeFront) COMPARE_StateAttribute_Parameter(_modeBack) - return 0; // passed all the above comparison macro's, must be equal. + return 0; // passed all the above comparison macros, must be equal. } enum Face { diff --git a/include/osg/PolygonOffset b/include/osg/PolygonOffset index d633a5f1f..fab9de4dd 100644 --- a/include/osg/PolygonOffset +++ b/include/osg/PolygonOffset @@ -39,14 +39,14 @@ class SG_EXPORT PolygonOffset : public StateAttribute virtual int compare(const StateAttribute& sa) const { // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Paramter macro's below. + // used by the COMPARE_StateAttribute_Parameter macros below. COMPARE_StateAttribute_Types(PolygonOffset,sa) // compare each paramter in turn against the rhs. COMPARE_StateAttribute_Parameter(_factor) COMPARE_StateAttribute_Parameter(_units) - return 0; // passed all the above comparison macro's, must be equal. + return 0; // passed all the above comparison macros, must be equal. } virtual bool getModeUsage(ModeUsage& usage) const diff --git a/include/osg/Polytope b/include/osg/Polytope index 967e740f9..25e47a6ef 100644 --- a/include/osg/Polytope +++ b/include/osg/Polytope @@ -20,7 +20,7 @@ namespace osg { -/** A Polytope class for representing convex clipping volumes made up. +/** A Polytope class for representing convex clipping volumes made up of a set of planes. * When adding planes, their normals should point inwards (into the volume) */ class SG_EXPORT Polytope { @@ -56,7 +56,7 @@ class SG_EXPORT Polytope return *this; } - /** Create a Polytope with is cube, centered at 0,0,0, with sides of 2 units.*/ + /** Create a Polytope which is a cube, centered at 0,0,0, with sides of 2 units.*/ void setToUnitFrustum(bool withNear=true, bool withFar=true) { _planeList.erase(_planeList.begin(),_planeList.end()); @@ -86,7 +86,7 @@ class SG_EXPORT Polytope unsigned int numActivePlanes = 0; - // count number active planes. + // count number of active planes. PlaneList::const_iterator itr; for(itr=pt._planeList.begin(); itr!=pt._planeList.end(); @@ -178,7 +178,7 @@ class SG_EXPORT Polytope _maskStack.pop_back(); } - /** Check whether a vertex is contained with clipping set.*/ + /** Check whether a vertex is contained within clipping set.*/ inline bool contains(const osg::Vec3& v) const { if (!_maskStack.back()) return true; @@ -194,7 +194,7 @@ class SG_EXPORT Polytope return true; } - /** Check whether any part of vertex list is contained with clipping set.*/ + /** Check whether any part of vertex list is contained within clipping set.*/ inline bool contains(const std::vector& vertices) { if (!_maskStack.back()) return true; @@ -342,9 +342,9 @@ class SG_EXPORT Polytope /** Transform the clipping set by matrix. Note, this operations carries out - * the calculation of the inverse of the matrix since to transforms - * planes must be multiplied my the inverse transposed. This - * make this operation expensive. If the inverse has been already + * the calculation of the inverse of the matrix since a plane must + * be multiplied by the inverse transposed to transform it. This + * makes this operation expensive. If the inverse has been already * calculated elsewhere then use transformProvidingInverse() instead. * See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf*/ inline void transform(const osg::Matrix& matrix) diff --git a/include/osg/PositionAttitudeTransform b/include/osg/PositionAttitudeTransform index 02ce19a56..edf19cffc 100644 --- a/include/osg/PositionAttitudeTransform +++ b/include/osg/PositionAttitudeTransform @@ -22,8 +22,8 @@ namespace osg { -/** PositionAttitideTransform - is Transform the set the coordinates transform - up via a Vec3 position and Quat attitude. +/** PositionAttitudeTransform - is a Transform. Sets the coordinate transform + via a Vec3 position and Quat attitude. */ class SG_EXPORT PositionAttitudeTransform : public Transform { diff --git a/include/osg/Projection b/include/osg/Projection index 0495e1720..69fc826c9 100644 --- a/include/osg/Projection +++ b/include/osg/Projection @@ -19,7 +19,7 @@ namespace osg { -/** Projection nodes set up the frustum/orthographic projection used when rendering the scene . +/** Projection nodes set up the frustum/orthographic projection used when rendering the scene. */ class SG_EXPORT Projection : public Group { diff --git a/include/osg/Quat b/include/osg/Quat index 5ca3bfdff..45ee68852 100644 --- a/include/osg/Quat +++ b/include/osg/Quat @@ -331,13 +331,13 @@ class SG_EXPORT Quat value_type angle3, const Vec3d& axis3); /** Make a rotation Quat which will rotate vec1 to vec2. - Generally take adot product to get the angle between these + Generally take a dot product to get the angle between these and then use a cross product to get the rotation axis - Watch out for the two special cases of when the vectors + Watch out for the two special cases when the vectors are co-incident or opposite in direction.*/ void makeRotate( const Vec3f& vec1, const Vec3f& vec2 ); /** Make a rotation Quat which will rotate vec1 to vec2. - Generally take adot product to get the angle between these + Generally take a dot product to get the angle between these and then use a cross product to get the rotation axis Watch out for the two special cases of when the vectors are co-incident or opposite in direction.*/ diff --git a/include/osg/ShadeModel b/include/osg/ShadeModel index 633623c8f..ed6ff8a4c 100644 --- a/include/osg/ShadeModel +++ b/include/osg/ShadeModel @@ -39,13 +39,13 @@ class SG_EXPORT ShadeModel : public StateAttribute virtual int compare(const StateAttribute& sa) const { // check the types are equal and then create the rhs variable - // used by the COMPARE_StateAttribute_Paramter macro's below. + // used by the COMPARE_StateAttribute_Parameter macros below. COMPARE_StateAttribute_Types(ShadeModel,sa) - // compare each paramter in turn against the rhs. + // compare each parameter in turn against the rhs. COMPARE_StateAttribute_Parameter(_mode) - return 0; // passed all the above comparison macro's, must be equal. + return 0; // passed all the above comparison macros, must be equal. } enum Mode { diff --git a/include/osg/ShadowVolumeOccluder b/include/osg/ShadowVolumeOccluder index 5dd670644..6e569b88e 100644 --- a/include/osg/ShadowVolumeOccluder +++ b/include/osg/ShadowVolumeOccluder @@ -54,7 +54,7 @@ class SG_EXPORT ShadowVolumeOccluder inline void popCurrentMask(); - /** return true if the matrix passed in matches the projection matrix that this ShaowVolumeOccluder is + /** return true if the matrix passed in matches the projection matrix that this ShadowVolumeOccluder is * associated with.*/ bool matchProjectionMatrix(const osg::Matrix& matrix) const { @@ -63,8 +63,8 @@ class SG_EXPORT ShadowVolumeOccluder } - /** Set the NodePath which describes the which node in the scene graph - * that this occluder was attached to.*/ + /** Set the NodePath which describes which node in the scene graph + * that this occluder is attached to. */ inline void setNodePath(NodePath& nodePath) { _nodePath = nodePath; } inline NodePath& getNodePath() { return _nodePath; } inline const NodePath& getNodePath() const { return _nodePath; } @@ -87,11 +87,11 @@ class SG_EXPORT ShadowVolumeOccluder const HoleList& getHoleList() const { return _holeList; } - /** return true if the specified vertex list is contaned entirely + /** return true if the specified vertex list is contained entirely * within this shadow occluder volume.*/ bool contains(const std::vector& vertices); - /** return true if the specified bounding sphere is contaned entirely + /** return true if the specified bounding sphere is contained entirely * within this shadow occluder volume.*/ bool contains(const BoundingSphere& bound); diff --git a/include/osg/Shape b/include/osg/Shape index 71be534b0..fcddfd310 100644 --- a/include/osg/Shape +++ b/include/osg/Shape @@ -29,7 +29,7 @@ class ConstShapeVisitor; /** META_StateAttribute macro define the standard clone, isSameKindAs, * className and getType methods. - * Use when subclassing from Object to make it more convinient to define + * Use when subclassing from Object to make it more convenient to define * the standard pure virtual methods which are required for all Object * subclasses.*/ #define META_Shape(library,name) \ @@ -85,7 +85,7 @@ class SG_EXPORT Shape : public Object virtual ~Shape(); }; -// forward declartions of Shape types. +// forward declarations of Shape types. class Sphere; class Box; class Cone; @@ -521,8 +521,8 @@ class SG_EXPORT HeightField : public Shape /** Set the height of the skirt to render around the edge of HeightField. - * The skirt is used as a means of disguising edge boundaries between adjacent HeightField, particular - * of ones with different resolutions.*/ + * The skirt is used as a means of disguising edge boundaries between adjacent HeightField, + * particularly of ones with different resolutions.*/ void setSkirtHeight(float skirtHeight) { _skirtHeight = skirtHeight; } /** Get the height of the skirt to render around the edge of HeightField.*/ @@ -541,17 +541,19 @@ class SG_EXPORT HeightField : public Shape inline Matrix getRotationMatrix() const { return Matrix(_rotation); } inline bool zeroRotation() const { return _rotation.zeroRotation(); } - + /* set a single height point in the height field */ inline void setHeight(unsigned int c,unsigned int r,float value) { _heights[c+r*_columns] = value; } + /* Get address of single height point in the height field, allows user to change. */ inline float& getHeight(unsigned int c,unsigned int r) { return _heights[c+r*_columns]; } + /* Get value of single height point in the height field, not editable. */ inline float getHeight(unsigned int c,unsigned int r) const { return _heights[c+r*_columns]; @@ -631,7 +633,7 @@ class CompositeShape : public Shape void removeChild(unsigned int i) { _children.erase(_children.begin()+i); } /** find the index number of child, if child is not found then it returns getNumChildren(), - * so should be used in similar sytle of STL's result!=end().*/ + * so should be used in similar style to STL's result!=end().*/ unsigned int findChildNo(Shape* shape) const { for (unsigned int childNo=0;childNo<_children.size();++childNo) diff --git a/include/osg/ShapeDrawable b/include/osg/ShapeDrawable index 3cbfdf83f..e4fb2a812 100644 --- a/include/osg/ShapeDrawable +++ b/include/osg/ShapeDrawable @@ -155,13 +155,13 @@ class SG_EXPORT ShapeDrawable : public Drawable /** return true, osg::ShapeDrawable does support accept(ConstAttributeFunctor&).*/ virtual bool supports(ConstAttributeFunctor&) const { return true; } - /** accept an ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.*/ + /** accept a ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.*/ virtual void accept(ConstAttributeFunctor& af) const; /** return true, osg::ShapeDrawable does support accept(PrimitiveFunctor&) .*/ virtual bool supports(PrimitiveFunctor&) const { return true; } - /** accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has.*/ + /** accept a PrimtiveFunctor and call its methods to tell it about the internal primitives that this Drawable has.*/ virtual void accept(PrimitiveFunctor& pf) const; protected: diff --git a/include/osg/State b/include/osg/State index 0143ab6cb..f884cfa41 100644 --- a/include/osg/State +++ b/include/osg/State @@ -48,7 +48,7 @@ namespace osg { #endif #endif -/** macro for use with osg::StateAttrbiute::apply methods for detected and +/** macro for use with osg::StateAttrbiute::apply methods for detecting and * reporting OpenGL error messages.*/ #define OSG_GL_DEBUG(message) \ if (state.getFineGrainedErrorDetection()) \ @@ -75,7 +75,7 @@ class SG_EXPORT State : public Referenced /** pop stateset off state stack.*/ void popStateSet(); - /** pop all stateset's off state stack, ensuring its empty ready for the next frame. + /** pop all statesets off state stack, ensuring it is empty ready for the next frame. * note, to return OpenGL to default state, one should do any state.popAllStatSets(); state.apply().*/ void popAllStateSets(); @@ -260,17 +260,17 @@ class SG_EXPORT State : public Referenced /** Attribute has been applied externally, * and therefore this attribute type has been dirtied - * and will need to be re-appplied on next osg::State.apply(..). + * and will need to be re-applied on next osg::State.apply(..). * note, if you have an osg::StateAttribute which you have applied externally - * then use the have_applied(attribute) method as this will the osg::State to - * track the current state more accuratly and enable lazy state updating such + * then use the have_applied(attribute) method as this will cause the osg::State to + * track the current state more accurately and enable lazy state updating such * that only changed state will be applied.*/ void haveAppliedAttribute(StateAttribute::Type type); /** Get whether the current specified mode is enabled (true) or disabled (false).*/ bool getLastAppliedMode(StateAttribute::GLMode mode) const; - /** Get the current specified attribute, return NULL is one has not yet been applied.*/ + /** Get the current specified attribute, return NULL if one has not yet been applied.*/ const StateAttribute* getLastAppliedAttribute(StateAttribute::Type type) const; @@ -290,14 +290,14 @@ class SG_EXPORT State : public Referenced * and will need to be re-appplied on next osg::State.apply(..). * note, if you have an osg::StateAttribute which you have applied externally * then use the have_applied(attribute) method as this will the osg::State to - * track the current state more accuratly and enable lazy state updating such + * track the current state more accurately and enable lazy state updating such * that only changed state will be applied.*/ void haveAppliedTextureAttribute(unsigned int unit, StateAttribute::Type type); /** Get whether the current specified texture mode is enabled (true) or disabled (false).*/ bool getLastAppliedTextureMode(unsigned int unit, StateAttribute::GLMode mode) const; - /** Get the current specified texture attribute, return NULL is one has not yet been applied.*/ + /** Get the current specified texture attribute, return NULL if one has not yet been applied.*/ const StateAttribute* getLastAppliedTextureAttribute(unsigned int unit, StateAttribute::Type type) const; @@ -310,7 +310,7 @@ class SG_EXPORT State : public Referenced /** disable the vertex, normal, color, tex coords, secenday color, fog coord and index arrays.*/ void disableAllVertexArrays(); - /** dirty the vertex, normal, color, tex coords, secenday color, fog coord and index arrays.*/ + /** dirty the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.*/ void dirtyAllVertexArrays(); @@ -338,7 +338,7 @@ class SG_EXPORT State : public Referenced _vertexArray._dirty = false; } - /** wrapper glDisableClientState(GL_VERTEX_ARRAY). + /** wrapper around glDisableClientState(GL_VERTEX_ARRAY). * note, only updates values that change.*/ inline void disableVertexPointer() { @@ -596,12 +596,14 @@ class SG_EXPORT State : public Referenced } } - /** set the current tex coord array texture unit, return true if selected, false if selection failed such as when multitexturing is not supported. + /** set the current tex coord array texture unit, return true if selected, + * false if selection failed such as when multitexturing is not supported. * note, only updates values that change.*/ bool setClientActiveTextureUnit( unsigned int unit ); - /** set the current texture unit, return true if selected, false if selection failed such as when multitexturing is not supported. + /** set the current texture unit, return true if selected, + * false if selection failed such as when multitexturing is not supported. * note, only updates values that change.*/ bool setActiveTextureUnit( unsigned int unit ); @@ -634,9 +636,9 @@ class SG_EXPORT State : public Referenced /** Set the current OpenGL context uniqueID. Note, it is the application developers responsibility to set up unique ID for each OpenGL context. This value is - then used by osg::StateAttribure's and osg::Drawable's to + then used by osg::StateAttribute's and osg::Drawable's to help manage OpenGL display list and texture binds appropriate - for each context, the contextID simply acts as an index local + for each context, the contextID simply acts as an index in local arrays that they maintain for the purpose. Typical settings for contextID are 0,1,2,3... up to the maximum number of graphics contexts you have setup. @@ -654,7 +656,7 @@ class SG_EXPORT State : public Referenced inline const FrameStamp* getFrameStamp() const { return _frameStamp.get(); } - /** Set the DisplaySettings. Note, nothing is applied, the visual settings are just used + /** Set the DisplaySettings. Note, nothing is applied, the visual settings are just * used in the State object to pass the current visual settings to Drawables * during rendering. */ inline void setDisplaySettings(DisplaySettings* vs) { _displaySettings = vs; } @@ -885,21 +887,21 @@ inline void State::pushModeList(ModeMap& modeMap,const StateSet::ModeList& modeL mitr!=modeList.end(); ++mitr) { - // get the mode stack for incomming GLmode {mitr->first}. + // get the mode stack for incoming GLmode {mitr->first}. ModeStack& ms = modeMap[mitr->first]; if (ms.valueVec.empty()) { - // first pair so simply push incomming pair to back. + // first pair so simply push incoming pair to back. ms.valueVec.push_back(mitr->second); } else if ((ms.valueVec.back() & StateAttribute::OVERRIDE) && !(mitr->second & StateAttribute::PROTECTED)) // check the existing override flag { - // push existing back since override keeps the previoius value. + // push existing back since override keeps the previous value. ms.valueVec.push_back(ms.valueVec.back()); } else { - // no override on so simply push incomming pair to back. + // no override on so simply push incoming pair to back. ms.valueVec.push_back(mitr->second); } ms.changed = true; @@ -912,22 +914,22 @@ inline void State::pushAttributeList(AttributeMap& attributeMap,const StateSet:: aitr!=attributeList.end(); ++aitr) { - // get the attribute stack for incomming type {aitr->first}. + // get the attribute stack for incoming type {aitr->first}. AttributeStack& as = attributeMap[aitr->first]; if (as.attributeVec.empty()) { - // first pair so simply push incomming pair to back. + // first pair so simply push incoming pair to back. as.attributeVec.push_back( AttributePair(aitr->second.first.get(),aitr->second.second)); } else if ((as.attributeVec.back().second & StateAttribute::OVERRIDE) && !(aitr->second.second & StateAttribute::PROTECTED)) // check the existing override flag { - // push existing back since override keeps the previoius value. + // push existing back since override keeps the previous value. as.attributeVec.push_back(as.attributeVec.back()); } else { - // no override on so simply push incomming pair to back. + // no override on so simply push incoming pair to back. as.attributeVec.push_back( AttributePair(aitr->second.first.get(),aitr->second.second)); } @@ -941,7 +943,7 @@ inline void State::popModeList(ModeMap& modeMap,const StateSet::ModeList& modeLi mitr!=modeList.end(); ++mitr) { - // get the mode stack for incomming GLmode {mitr->first}. + // get the mode stack for incoming GLmode {mitr->first}. ModeStack& ms = modeMap[mitr->first]; if (!ms.valueVec.empty()) { @@ -957,7 +959,7 @@ inline void State::popAttributeList(AttributeMap& attributeMap,const StateSet::A aitr!=attributeList.end(); ++aitr) { - // get the attribute stack for incomming type {aitr->first}. + // get the attribute stack for incoming type {aitr->first}. AttributeStack& as = attributeMap[aitr->first]; if (!as.attributeVec.empty()) { @@ -1017,8 +1019,8 @@ inline void State::applyModeList(ModeMap& modeMap,const StateSet::ModeList& mode } else { - // this_mitr & ds_mitr refer to the same mode, check the overide - // if any otherwise just apply the incomming mode. + // this_mitr & ds_mitr refer to the same mode, check the override + // if any otherwise just apply the incoming mode. ModeStack& ms = this_mitr->second; @@ -1036,7 +1038,7 @@ inline void State::applyModeList(ModeMap& modeMap,const StateSet::ModeList& mode } else { - // no override on or no previous entry, therefore consider incomming mode. + // no override on or no previous entry, therefore consider incoming mode. bool new_value = ds_mitr->second & StateAttribute::ON; if (applyMode(ds_mitr->first,new_value,ms)) { @@ -1074,7 +1076,7 @@ inline void State::applyModeList(ModeMap& modeMap,const StateSet::ModeList& mode } } - // iterator over the remaining incomming modes to apply any new mode. + // iterator over the remaining incoming modes to apply any new mode. for(; ds_mitr!=modeList.end(); ++ds_mitr) @@ -1137,8 +1139,8 @@ inline void State::applyAttributeList(AttributeMap& attributeMap,const StateSet: } else { - // this_mitr & ds_mitr refer to the same attribute, check the overide - // if any otherwise just apply the incomming attribute + // this_mitr & ds_mitr refer to the same attribute, check the override + // if any otherwise just apply the incoming attribute AttributeStack& as = this_aitr->second; @@ -1155,7 +1157,7 @@ inline void State::applyAttributeList(AttributeMap& attributeMap,const StateSet: } else { - // no override on or no previous entry, therefore consider incomming mode. + // no override on or no previous entry, therefore consider incoming mode. const StateAttribute* new_attr = ds_aitr->second.first.get(); if (applyAttribute(new_attr,as)) { @@ -1190,7 +1192,7 @@ inline void State::applyAttributeList(AttributeMap& attributeMap,const StateSet: } } - // iterator over the remaining incomming modes to apply any new mode. + // iterator over the remaining incoming modes to apply any new mode. for(; ds_aitr!=attributeList.end(); ++ds_aitr) diff --git a/include/osg/StateAttribute b/include/osg/StateAttribute index d7522971b..ac64a4d60 100644 --- a/include/osg/StateAttribute +++ b/include/osg/StateAttribute @@ -31,7 +31,7 @@ class StateSet; /** META_StateAttribute macro define the standard clone, isSameKindAs, * className and getType methods. - * Use when subclassing from Object to make it more convinient to define + * Use when subclassing from Object to make it more convenient to define * the standard pure virtual methods which are required for all Object * subclasses.*/ #define META_StateAttribute(library,name,type) \ @@ -42,7 +42,7 @@ class StateSet; virtual const char* className() const { return #name; } \ virtual Type getType() const { return type; } -/** COMPARE_StateAttribute_Types macro is a helper for implementing the StatateAtribute::compare(..) method.*/ +/** COMPARE_StateAttribute_Types macro is a helper for implementing the StateAtribute::compare(..) method.*/ #define COMPARE_StateAttribute_Types(TYPE,rhs_attribute) \ if (this==&rhs_attribute) return 0;\ const std::type_info* type_lhs = &typeid(*this);\ @@ -53,7 +53,7 @@ class StateSet; /** COMPARE_StateAttribute_Parameter macro is a helper for implementing the StatateAtribute::compare(..) method. - * Macro assumes that variable rhs has been corrected defined by code preceesing + * Macro assumes that variable rhs has been correctly defined by preceding code * macro.*/ #define COMPARE_StateAttribute_Parameter(parameter) \ if (parameter (const ref_ptr& rp) const { return (_ptr>rp._ptr); } - // comparion operator for const T*. + // comparison operator for const T*. inline bool operator == (const T* ptr) const { return (_ptr==ptr); } inline bool operator != (const T* ptr) const { return (_ptr!=ptr); } inline bool operator < (const T* ptr) const { return (_ptr