Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,7 @@ class OSGSIM_EXPORT SequenceGroup : public osg::Object
|
||||
SequenceGroup(double baseTime);
|
||||
|
||||
META_Object(osgSim,SequenceGroup);
|
||||
|
||||
|
||||
inline void setBaseTime( double t ) { _baseTime = t; }
|
||||
inline double getBaseTime() const { return _baseTime; }
|
||||
|
||||
@@ -80,7 +80,7 @@ class OSGSIM_EXPORT BlinkSequence : public osg::Object
|
||||
/** set the phase shift of the blink sequence, this would be used to shift a sequence within a sequence group.*/
|
||||
inline void setPhaseShift(double ps) { _phaseShift = ps; }
|
||||
|
||||
/** get the pahse shift.*/
|
||||
/** get the pahse shift.*/
|
||||
inline double getPhaseShift() const { return _phaseShift; }
|
||||
|
||||
/** compute the local time clamped to this BlinkSequences period, and accounting for the phase shift and sequence group.*/
|
||||
@@ -88,14 +88,14 @@ class OSGSIM_EXPORT BlinkSequence : public osg::Object
|
||||
|
||||
/** compute the color for the time interval sepecifed. Averages the colors if the length is greater than the current pulse.*/
|
||||
inline osg::Vec4 color(double time,double length) const;
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
typedef std::pair<double,osg::Vec4> IntervalColor;
|
||||
typedef std::vector<IntervalColor> PulseData;
|
||||
|
||||
|
||||
double _pulsePeriod;
|
||||
double _phaseShift;
|
||||
PulseData _pulseData;
|
||||
@@ -145,7 +145,7 @@ inline osg::Vec4 BlinkSequence::color(double time,double length) const
|
||||
if (itr==_pulseData.end()) itr = _pulseData.begin();
|
||||
}
|
||||
|
||||
// if time interval fits inside the current pulse
|
||||
// if time interval fits inside the current pulse
|
||||
// then simply return this pulses color value.
|
||||
if (lt+length<=itr->first)
|
||||
{
|
||||
@@ -174,7 +174,7 @@ inline osg::Vec4 BlinkSequence::color(double time,double length) const
|
||||
// add remaining part of the final pulse.
|
||||
color += itr->second*len;
|
||||
|
||||
// normalise the time waited color.
|
||||
// normalise the time waited color.
|
||||
color /= length;
|
||||
|
||||
return color;
|
||||
|
||||
@@ -41,13 +41,13 @@ public:
|
||||
/** Constructor for a ColorRange
|
||||
@param min minimum scalar value
|
||||
@param max maximum scalar value
|
||||
@param colors optional range of colors,
|
||||
@param colors optional range of colors,
|
||||
*/
|
||||
ColorRange(float min, float max, const std::vector<osg::Vec4>& colors);
|
||||
|
||||
/** Set the range of colors. */
|
||||
void setColors(const std::vector<osg::Vec4>& colors);
|
||||
|
||||
|
||||
/** Get the range of colors */
|
||||
const std::vector<osg::Vec4>& getColors() const { return _colors; }
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -33,34 +33,34 @@ class OSGSIM_EXPORT ElevationSlice
|
||||
{
|
||||
public :
|
||||
|
||||
|
||||
|
||||
ElevationSlice();
|
||||
|
||||
/** Set the start point of the slice.*/
|
||||
|
||||
/** Set the start point of the slice.*/
|
||||
void setStartPoint(const osg::Vec3d& startPoint) { _startPoint = startPoint; }
|
||||
|
||||
/** Get the start point of the slice.*/
|
||||
/** Get the start point of the slice.*/
|
||||
const osg::Vec3d& getStartPoint() const { return _startPoint; }
|
||||
|
||||
/** Set the end point of the slice.*/
|
||||
|
||||
/** Set the end point of the slice.*/
|
||||
void setEndPoint(const osg::Vec3d& endPoint) { _endPoint = endPoint; }
|
||||
|
||||
/** Get the end point of the slice.*/
|
||||
/** Get the end point of the slice.*/
|
||||
const osg::Vec3d& getEndPoint() const { return _endPoint; }
|
||||
|
||||
|
||||
|
||||
typedef std::vector<osg::Vec3d> Vec3dList;
|
||||
|
||||
|
||||
/** Get the intersections in the form of a vector of Vec3d. */
|
||||
const Vec3dList& getIntersections() const { return _intersections; }
|
||||
|
||||
typedef std::pair<double,double> DistanceHeight;
|
||||
typedef std::vector<DistanceHeight> DistanceHeightList;
|
||||
|
||||
|
||||
/** Get the intersections in the form a vector of pair<double,double> representing distance along the slice and height. */
|
||||
const DistanceHeightList& getDistanceHeightIntersections() const { return _distanceHeightIntersections; }
|
||||
|
||||
|
||||
|
||||
|
||||
/** Compute the intersections with the specified scene graph, the results are stored in vectors of Vec3d.
|
||||
* Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric,
|
||||
* with the up vector defined by the EllipsoidModel attached to the CoordinateSystemNode.
|
||||
@@ -69,8 +69,8 @@ class OSGSIM_EXPORT ElevationSlice
|
||||
|
||||
/** Compute the vertical distance between the specified scene graph and a single HAT point.*/
|
||||
static Vec3dList computeElevationSlice(osg::Node* scene, const osg::Vec3d& startPoint, const osg::Vec3d& endPoint, osg::Node::NodeMask traversalMask=0xffffffff);
|
||||
|
||||
|
||||
|
||||
|
||||
/** Clear the database cache.*/
|
||||
void clearDatabaseCache() { if (_dcrc.valid()) _dcrc->clearDatabaseCache(); }
|
||||
|
||||
@@ -83,13 +83,13 @@ class OSGSIM_EXPORT ElevationSlice
|
||||
DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); }
|
||||
|
||||
protected :
|
||||
|
||||
|
||||
|
||||
|
||||
osg::Vec3d _startPoint;
|
||||
osg::Vec3d _endPoint;
|
||||
Vec3dList _intersections;
|
||||
DistanceHeightList _distanceHeightIntersections;
|
||||
|
||||
|
||||
osg::ref_ptr<DatabaseCacheReadCallback> _dcrc;
|
||||
osgUtil::IntersectionVisitor _intersectionVisitor;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
# endif
|
||||
#else
|
||||
# define OSGSIM_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define NULL pointer value */
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -33,19 +33,19 @@ class OSGSIM_EXPORT HeightAboveTerrain
|
||||
{
|
||||
public :
|
||||
|
||||
|
||||
|
||||
HeightAboveTerrain();
|
||||
|
||||
|
||||
|
||||
|
||||
/** Clear the internal HAT List so it contains no height above terrain tests.*/
|
||||
void clear();
|
||||
|
||||
|
||||
/** Add a height above terrain test point in the CoordinateFrame.*/
|
||||
unsigned int addPoint(const osg::Vec3d& point);
|
||||
|
||||
/** Get the number of height above terrain tests.*/
|
||||
unsigned int getNumPoints() const { return _HATList.size(); }
|
||||
|
||||
|
||||
/** Set the source point of single height above terrain test.*/
|
||||
void setPoint(unsigned int i, const osg::Vec3d& point) { _HATList[i]._point = point; }
|
||||
|
||||
@@ -53,7 +53,7 @@ class OSGSIM_EXPORT HeightAboveTerrain
|
||||
const osg::Vec3d& getPoint(unsigned int i) const { return _HATList[i]._point; }
|
||||
|
||||
/** Get the intersection height for a single height above terrain test.
|
||||
* Note, you must call computeIntersections(..) before you can query the HeightAboveTerrain.
|
||||
* Note, you must call computeIntersections(..) before you can query the HeightAboveTerrain.
|
||||
* If no intersections are found then height returned will be the height above mean sea level. */
|
||||
double getHeightAboveTerrain(unsigned int i) const { return _HATList[i]._hat; }
|
||||
|
||||
@@ -63,7 +63,7 @@ class OSGSIM_EXPORT HeightAboveTerrain
|
||||
|
||||
/** Get the lowest height that the should be tested for.*/
|
||||
double getLowestHeight() const { return _lowestHeight; }
|
||||
|
||||
|
||||
/** Compute the HAT intersections with the specified scene graph.
|
||||
* The results are all stored in the form of a single height above terrain value per HAT test.
|
||||
* Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric,
|
||||
@@ -73,8 +73,8 @@ class OSGSIM_EXPORT HeightAboveTerrain
|
||||
|
||||
/** Compute the vertical distance between the specified scene graph and a single HAT point. */
|
||||
static double computeHeightAboveTerrain(osg::Node* scene, const osg::Vec3d& point, osg::Node::NodeMask traversalMask=0xffffffff);
|
||||
|
||||
|
||||
|
||||
|
||||
/** Clear the database cache.*/
|
||||
void clearDatabaseCache() { if (_dcrc.valid()) _dcrc->clearDatabaseCache(); }
|
||||
|
||||
@@ -85,26 +85,26 @@ class OSGSIM_EXPORT HeightAboveTerrain
|
||||
|
||||
/** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/
|
||||
DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); }
|
||||
|
||||
|
||||
protected :
|
||||
|
||||
|
||||
struct HAT
|
||||
{
|
||||
HAT(const osg::Vec3d& point):
|
||||
_point(point),
|
||||
_hat(0.0) {}
|
||||
|
||||
|
||||
osg::Vec3d _point;
|
||||
double _hat;
|
||||
};
|
||||
|
||||
|
||||
typedef std::vector<HAT> HATList;
|
||||
|
||||
|
||||
|
||||
double _lowestHeight;
|
||||
HATList _HATList;
|
||||
|
||||
|
||||
|
||||
osg::ref_ptr<DatabaseCacheReadCallback> _dcrc;
|
||||
osgUtil::IntersectionVisitor _intersectionVisitor;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -23,19 +23,19 @@
|
||||
|
||||
namespace osgSim {
|
||||
|
||||
/** Impostor - is a form of Level Of Detail group node which allows both switching
|
||||
/** Impostor - is a form of Level Of Detail group node which allows both switching
|
||||
* between children depending on distance from eye point and image caching.
|
||||
*
|
||||
* The principle behind Imposters is that they cache an image of real geometry and then the image is drawn
|
||||
*
|
||||
* The principle behind Imposters is that they cache an image of real geometry and then the image is drawn
|
||||
* in subsequent frames instead of the real geometry. It's a bit like a
|
||||
* Billboard *but* is updated at runtime and w.r.t view point. By drawing
|
||||
* just the texture mapped quad you can cut down scene complexity and
|
||||
* improve performance.
|
||||
*
|
||||
*
|
||||
* For more details have a look at:
|
||||
*
|
||||
*
|
||||
* http://grail.cs.washington.edu/projects/hic/
|
||||
*
|
||||
*
|
||||
* The OSG doesn't implement exactly the same technique as above, but its
|
||||
* should be a good starting place. The OSG's impostors are much less
|
||||
* intrusive since you don't need to restructure your whole scene to use
|
||||
@@ -47,8 +47,8 @@ namespace osgSim {
|
||||
* the Impostor's image caching should cut in. The osg::CullVisitor
|
||||
* automatically handles all the setting of pre-rendering stages to
|
||||
* calculate the required ImpostorSprites (which encapsulates the image
|
||||
* cache and quad), and updates them as the view point changes. If you
|
||||
* use osg::SceneView/CullVisitor all the complexity of supporting
|
||||
* cache and quad), and updates them as the view point changes. If you
|
||||
* use osg::SceneView/CullVisitor all the complexity of supporting
|
||||
* Impostor will be nicely hidden away.
|
||||
*
|
||||
* TODO:
|
||||
@@ -69,9 +69,9 @@ class OSGSIM_EXPORT Impostor : public osg::LOD
|
||||
Impostor(const Impostor& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
||||
osg::LOD(es,copyop),
|
||||
_impostorThreshold(es._impostorThreshold) {}
|
||||
|
||||
|
||||
META_Node(osgSim, Impostor);
|
||||
|
||||
|
||||
virtual void traverse(osg::NodeVisitor& nv);
|
||||
|
||||
typedef std::vector< osg::ref_ptr<ImpostorSprite> > ImpostorSpriteList;
|
||||
@@ -81,7 +81,7 @@ class OSGSIM_EXPORT Impostor : public osg::LOD
|
||||
* otherwise the LOD children as chosen as per a standard LOD node.
|
||||
*/
|
||||
inline void setImpostorThreshold(float distance) { _impostorThreshold = distance; }
|
||||
|
||||
|
||||
/* Get the Impostor threshold distance. */
|
||||
inline float getImpostorThreshold() const { return _impostorThreshold; }
|
||||
|
||||
@@ -92,7 +92,7 @@ class OSGSIM_EXPORT Impostor : public osg::LOD
|
||||
|
||||
/** Find the ImposterSprite which fits the current eye point best. */
|
||||
ImpostorSprite* findBestImpostorSprite(unsigned int contextID, const osg::Vec3& currLocalEyePoint) const;
|
||||
|
||||
|
||||
/** Add an ImpostorSprite to the Impostor. */
|
||||
void addImpostorSprite(unsigned int contextID, ImpostorSprite* is);
|
||||
|
||||
@@ -103,13 +103,13 @@ class OSGSIM_EXPORT Impostor : public osg::LOD
|
||||
inline const ImpostorSpriteList& getImpostorSpriteList(unsigned int contexID) const { return _impostorSpriteListBuffer[contexID]; }
|
||||
|
||||
virtual osg::BoundingSphere computeBound() const;
|
||||
|
||||
|
||||
protected :
|
||||
|
||||
virtual ~Impostor() {}
|
||||
|
||||
mutable osg::buffered_object<ImpostorSpriteList> _impostorSpriteListBuffer;
|
||||
|
||||
|
||||
ImpostorSprite* createImpostorSprite(osgUtil::CullVisitor* cv);
|
||||
|
||||
float _impostorThreshold;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
/** Clone an object of the same type as an ImpostorSprite. */
|
||||
virtual osg::Object* cloneType() const { return new ImpostorSprite(); }
|
||||
|
||||
/** Clone on ImpostorSprite just returns a clone of type,
|
||||
/** Clone on ImpostorSprite just returns a clone of type,
|
||||
* since it is not appropriate to share data of an ImpostorSprite.
|
||||
*/
|
||||
virtual osg::Object* clone(const osg::CopyOp&) const { return new ImpostorSprite(); }
|
||||
@@ -52,7 +52,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
virtual const char* libraryName() const { return "osgSim"; }
|
||||
virtual const char* className() const { return "ImpostorSprite"; }
|
||||
|
||||
/** Set the parent, which must be an Impostor.
|
||||
/** Set the parent, which must be an Impostor.
|
||||
* Unlike conventional Drawables, ImpostorSprites can only ever have
|
||||
* one parent.
|
||||
*/
|
||||
@@ -69,19 +69,19 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
|
||||
/** Get the eye point for when the ImpostorSprite was snapped. */
|
||||
inline const osg::Vec3& getStoredLocalEyePoint() const { return _storedLocalEyePoint; }
|
||||
|
||||
|
||||
/** Set the frame number for when the ImpostorSprite was last used in rendering. */
|
||||
inline void setLastFrameUsed(unsigned int frameNumber) { _lastFrameUsed = frameNumber; }
|
||||
|
||||
|
||||
/** Get the frame number for when the ImpostorSprite was last used in rendering. */
|
||||
inline unsigned int getLastFrameUsed() const { return _lastFrameUsed; }
|
||||
|
||||
|
||||
|
||||
/** Get the coordinates of the corners of the quad.
|
||||
* Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.
|
||||
*/
|
||||
inline osg::Vec3* getCoords() { return _coords; }
|
||||
|
||||
|
||||
/** Get the const coordinates of the corners of the quad. */
|
||||
inline const osg::Vec3* getCoords() const { return _coords; }
|
||||
|
||||
@@ -91,7 +91,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
* Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.
|
||||
*/
|
||||
inline osg::Vec2* getTexCoords() { return _texcoords; }
|
||||
|
||||
|
||||
/** Get the const texture coordinates of the corners of the quad. */
|
||||
inline const osg::Vec2* getTexCoords() const { return _texcoords; }
|
||||
|
||||
@@ -108,7 +108,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
* Stored in the order, [0] - top_left, [1] - bottom_left, [2] - bottom_right, [3] - top_left.
|
||||
*/
|
||||
inline osg::Vec3* getControlCoords() { return _controlcoords; }
|
||||
|
||||
|
||||
/** Get the const control coordinates of the corners of the quad. */
|
||||
inline const osg::Vec3* getControlCoords() const { return _controlcoords; }
|
||||
|
||||
@@ -121,7 +121,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
void setTexture(osg::Texture2D* tex,int s,int t);
|
||||
osg::Texture2D* getTexture() { return _texture; }
|
||||
const osg::Texture2D* getTexture() const { return _texture; }
|
||||
|
||||
|
||||
int s() const { return _s; }
|
||||
int t() const { return _t; }
|
||||
|
||||
@@ -150,7 +150,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
osg::Vec4 _color;
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
|
||||
|
||||
/** Set the camera node to use for pre rendering the impostor sprite's texture.*/
|
||||
void setCamera(osg::Camera* camera) { _camera = camera; }
|
||||
|
||||
@@ -170,7 +170,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
Impostor* _parent;
|
||||
|
||||
friend class osgSim::ImpostorSpriteManager;
|
||||
|
||||
|
||||
// camera node for doing the pre rendering.
|
||||
osg::ref_ptr<osg::Camera> _camera;
|
||||
|
||||
@@ -179,45 +179,45 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
ImpostorSpriteManager* _ism;
|
||||
ImpostorSprite* _previous;
|
||||
ImpostorSprite* _next;
|
||||
|
||||
|
||||
unsigned int _lastFrameUsed;
|
||||
|
||||
osg::Vec3 _storedLocalEyePoint;
|
||||
|
||||
|
||||
osg::Vec3 _coords[4];
|
||||
osg::Vec2 _texcoords[4];
|
||||
osg::Vec3 _controlcoords[4];
|
||||
|
||||
|
||||
osg::Texture2D* _texture;
|
||||
int _s;
|
||||
int _t;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
/** Helper class for managing the reuse of ImpostorSprite resources. */
|
||||
class OSGSIM_EXPORT ImpostorSpriteManager : public osg::Referenced
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ImpostorSpriteManager();
|
||||
|
||||
|
||||
bool empty() const { return _first==0; }
|
||||
|
||||
ImpostorSprite* first() { return _first; }
|
||||
|
||||
|
||||
ImpostorSprite* last() { return _last; }
|
||||
|
||||
|
||||
void push_back(ImpostorSprite* is);
|
||||
|
||||
|
||||
void remove(ImpostorSprite* is);
|
||||
|
||||
|
||||
ImpostorSprite* createOrReuseImpostorSprite(int s,int t,unsigned int frameNumber);
|
||||
|
||||
osg::StateSet* createOrReuseStateSet();
|
||||
|
||||
void reset();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ class OSGSIM_EXPORT ImpostorSpriteManager : public osg::Referenced
|
||||
|
||||
ImpostorSprite* _first;
|
||||
ImpostorSprite* _last;
|
||||
|
||||
|
||||
typedef std::vector< osg::ref_ptr<osg::StateSet> > StateSetList;
|
||||
StateSetList _stateSetList;
|
||||
unsigned int _reuseStateSetIndex;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ class OSGSIM_EXPORT InsertImpostorsVisitor : public osg::NodeVisitor
|
||||
|
||||
/** Default to traversing all children. */
|
||||
InsertImpostorsVisitor();
|
||||
|
||||
|
||||
META_NodeVisitor("osgSim","InsertImpostorsVisitor")
|
||||
|
||||
void setImpostorThresholdRatio(float ratio) { _impostorThresholdRatio = ratio; }
|
||||
@@ -37,7 +37,7 @@ class OSGSIM_EXPORT InsertImpostorsVisitor : public osg::NodeVisitor
|
||||
void setMaximumNumberOfNestedImpostors(unsigned int num) { _maximumNumNestedImpostors = num; }
|
||||
unsigned int getMaximumNumberOfNestedImpostors() const { return _maximumNumNestedImpostors; }
|
||||
|
||||
/** Empty visitor, make it ready for next traversal. */
|
||||
/** Empty visitor, make it ready for next traversal. */
|
||||
void reset();
|
||||
|
||||
virtual void apply(osg::Node& node);
|
||||
@@ -48,14 +48,14 @@ class OSGSIM_EXPORT InsertImpostorsVisitor : public osg::NodeVisitor
|
||||
|
||||
/* Insert the required impostors into the scene graph. */
|
||||
void insertImpostors();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
typedef std::vector< osg::Group* > GroupList;
|
||||
typedef std::vector< osg::LOD* > LODList;
|
||||
|
||||
|
||||
GroupList _groupList;
|
||||
LODList _lodList;
|
||||
LODList _lodList;
|
||||
|
||||
float _impostorThresholdRatio;
|
||||
unsigned int _maximumNumNestedImpostors;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -34,12 +34,12 @@ class OSGSIM_EXPORT LightPoint
|
||||
ADDITIVE,
|
||||
BLENDED
|
||||
};
|
||||
|
||||
|
||||
LightPoint();
|
||||
|
||||
|
||||
LightPoint(const osg::Vec3& position,
|
||||
const osg::Vec4& color);
|
||||
|
||||
|
||||
LightPoint(bool on,
|
||||
const osg::Vec3& position,
|
||||
const osg::Vec4& color,
|
||||
@@ -48,10 +48,10 @@ class OSGSIM_EXPORT LightPoint
|
||||
Sector* sector=0,
|
||||
BlinkSequence* blinkSequence=0,
|
||||
BlendingMode blendingMode=BLENDED);
|
||||
|
||||
|
||||
|
||||
LightPoint(const LightPoint& lp);
|
||||
|
||||
|
||||
LightPoint& operator = (const LightPoint& lp);
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ class OSGSIM_EXPORT LightPointNode : public osg::Node
|
||||
typedef std::vector< LightPoint > LightPointList;
|
||||
|
||||
LightPointNode();
|
||||
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
LightPointNode(const LightPointNode&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
@@ -50,14 +50,14 @@ class OSGSIM_EXPORT LightPointNode : public osg::Node
|
||||
|
||||
|
||||
unsigned int addLightPoint(const LightPoint& lp);
|
||||
|
||||
|
||||
void removeLightPoint(unsigned int pos);
|
||||
|
||||
|
||||
LightPoint& getLightPoint(unsigned int pos) { return _lightPointList[pos]; }
|
||||
|
||||
const LightPoint& getLightPoint(unsigned int pos) const { return _lightPointList[pos]; }
|
||||
|
||||
|
||||
|
||||
void setLightPointList(const LightPointList& lpl) { _lightPointList=lpl; }
|
||||
|
||||
@@ -67,17 +67,17 @@ class OSGSIM_EXPORT LightPointNode : public osg::Node
|
||||
|
||||
|
||||
void setMinPixelSize(float minPixelSize) { _minPixelSize = minPixelSize; }
|
||||
|
||||
|
||||
float getMinPixelSize() const { return _minPixelSize; }
|
||||
|
||||
void setMaxPixelSize(float maxPixelSize) { _maxPixelSize = maxPixelSize; }
|
||||
|
||||
|
||||
float getMaxPixelSize() const { return _maxPixelSize; }
|
||||
|
||||
void setMaxVisibleDistance2(float maxVisibleDistance2) { _maxVisibleDistance2 = maxVisibleDistance2; }
|
||||
|
||||
|
||||
float getMaxVisibleDistance2() const { return _maxVisibleDistance2; }
|
||||
|
||||
|
||||
void setLightPointSystem( osgSim::LightPointSystem* lps) { _lightSystem = lps; }
|
||||
|
||||
osgSim::LightPointSystem* getLightPointSystem() { return _lightSystem.get(); }
|
||||
@@ -94,7 +94,7 @@ class OSGSIM_EXPORT LightPointNode : public osg::Node
|
||||
~LightPointNode() {}
|
||||
|
||||
// used to cache the bouding box of the lightpoints as a tighter
|
||||
// view frustum check.
|
||||
// view frustum check.
|
||||
mutable osg::BoundingBox _bbox;
|
||||
|
||||
LightPointList _lightPointList;
|
||||
@@ -103,8 +103,8 @@ class OSGSIM_EXPORT LightPointNode : public osg::Node
|
||||
float _maxPixelSize;
|
||||
float _maxVisibleDistance2;
|
||||
|
||||
osg::ref_ptr<osgSim::LightPointSystem> _lightSystem;
|
||||
|
||||
osg::ref_ptr<osgSim::LightPointSystem> _lightSystem;
|
||||
|
||||
bool _pointSprites;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -38,7 +38,7 @@ class LightPointSystem : public osg::Object
|
||||
{ }
|
||||
|
||||
META_Object( osgSim, LightPointSystem );
|
||||
|
||||
|
||||
typedef enum {
|
||||
ANIMATION_ON,
|
||||
ANIMATION_OFF,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -24,27 +24,27 @@ class OSGSIM_EXPORT DatabaseCacheReadCallback : public osgUtil::IntersectionVisi
|
||||
{
|
||||
public:
|
||||
DatabaseCacheReadCallback();
|
||||
|
||||
|
||||
void setMaximumNumOfFilesToCache(unsigned int maxNumFilesToCache) { _maxNumFilesToCache = maxNumFilesToCache; }
|
||||
unsigned int getMaximumNumOfFilesToCache() const { return _maxNumFilesToCache; }
|
||||
|
||||
|
||||
void clearDatabaseCache();
|
||||
|
||||
|
||||
void pruneUnusedDatabaseCache();
|
||||
|
||||
virtual osg::Node* readNodeFile(const std::string& filename);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
typedef std::map<std::string, osg::ref_ptr<osg::Node> > FileNameSceneMap;
|
||||
|
||||
|
||||
unsigned int _maxNumFilesToCache;
|
||||
OpenThreads::Mutex _mutex;
|
||||
FileNameSceneMap _filenameSceneMap;
|
||||
};
|
||||
|
||||
/** Helper class for setting up and acquiring line of sight intersections with terrain.
|
||||
* By default assigns a osgSim::DatabaseCacheReadCallback that enables automatic loading
|
||||
* By default assigns a osgSim::DatabaseCacheReadCallback that enables automatic loading
|
||||
* of external PagedLOD tiles to ensure that the highest level of detail is used in intersections.
|
||||
* This automatic loading of tiles is done by the intersection traversal that is done within
|
||||
* the computeIntersections(..) method, so can result in long intersection times when external
|
||||
@@ -54,18 +54,18 @@ class OSGSIM_EXPORT DatabaseCacheReadCallback : public osgUtil::IntersectionVisi
|
||||
class OSGSIM_EXPORT LineOfSight
|
||||
{
|
||||
public :
|
||||
|
||||
|
||||
LineOfSight();
|
||||
|
||||
/** Clear the internal LOS List so it contains no line of sight tests.*/
|
||||
void clear();
|
||||
|
||||
|
||||
/** Add a line of sight test, consisting of start and end point. Returns the index number of the newly adding LOS test.*/
|
||||
unsigned int addLOS(const osg::Vec3d& start, const osg::Vec3d& end);
|
||||
|
||||
|
||||
/** Get the number of line of sight tests.*/
|
||||
unsigned int getNumLOS() const { return _LOSList.size(); }
|
||||
|
||||
|
||||
/** Set the start point of single line of sight test.*/
|
||||
void setStartPoint(unsigned int i, const osg::Vec3d& start) { _LOSList[i]._start = start; }
|
||||
|
||||
@@ -77,7 +77,7 @@ class OSGSIM_EXPORT LineOfSight
|
||||
|
||||
/** Get the end point of single line of sight test.*/
|
||||
const osg::Vec3d& getEndPoint(unsigned int i) const { return _LOSList[i]._end; }
|
||||
|
||||
|
||||
typedef std::vector<osg::Vec3d> Intersections;
|
||||
|
||||
/** Get the intersection points for a single line of sight test.*/
|
||||
@@ -89,8 +89,8 @@ class OSGSIM_EXPORT LineOfSight
|
||||
|
||||
/** Compute the intersection between the specified scene graph and a single LOS start,end pair. Returns an IntersectionList, of all the points intersected.*/
|
||||
static Intersections computeIntersections(osg::Node* scene, const osg::Vec3d& start, const osg::Vec3d& end, osg::Node::NodeMask traversalMask=0xffffffff);
|
||||
|
||||
|
||||
|
||||
|
||||
/** Clear the database cache.*/
|
||||
void clearDatabaseCache() { if (_dcrc.valid()) _dcrc->clearDatabaseCache(); }
|
||||
|
||||
@@ -101,24 +101,24 @@ class OSGSIM_EXPORT LineOfSight
|
||||
|
||||
/** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/
|
||||
DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); }
|
||||
|
||||
|
||||
protected :
|
||||
|
||||
|
||||
struct LOS
|
||||
{
|
||||
LOS(const osg::Vec3d& start, const osg::Vec3d& end):
|
||||
_start(start),
|
||||
_end(end) {}
|
||||
|
||||
|
||||
|
||||
|
||||
osg::Vec3d _start;
|
||||
osg::Vec3d _end;
|
||||
Intersections _intersections;
|
||||
};
|
||||
|
||||
|
||||
typedef std::vector<LOS> LOSList;
|
||||
LOSList _LOSList;
|
||||
|
||||
|
||||
osg::ref_ptr<DatabaseCacheReadCallback> _dcrc;
|
||||
osgUtil::IntersectionVisitor _intersectionVisitor;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace osgSim {
|
||||
class OSGSIM_EXPORT MultiSwitch : public osg::Group
|
||||
{
|
||||
public :
|
||||
|
||||
|
||||
|
||||
MultiSwitch();
|
||||
|
||||
@@ -35,9 +35,9 @@ class OSGSIM_EXPORT MultiSwitch : public osg::Group
|
||||
META_Node(osgSim, MultiSwitch);
|
||||
|
||||
virtual void traverse(osg::NodeVisitor& nv);
|
||||
|
||||
|
||||
void setNewChildDefaultValue(bool value) { _newChildDefaultValue = value; }
|
||||
|
||||
|
||||
bool getNewChildDefaultValue() const { return _newChildDefaultValue; }
|
||||
|
||||
virtual bool addChild( osg::Node *child );
|
||||
@@ -51,28 +51,28 @@ class OSGSIM_EXPORT MultiSwitch : public osg::Group
|
||||
bool getValue(unsigned int switchSet, unsigned int pos) const;
|
||||
|
||||
void setChildValue(const osg::Node* child,unsigned int switchSet, bool value);
|
||||
|
||||
|
||||
bool getChildValue(const osg::Node* child,unsigned int switchSet) const;
|
||||
|
||||
/** Set all the children off (false), and set the new default child value to off (false).*/
|
||||
bool setAllChildrenOff(unsigned int switchSet);
|
||||
|
||||
|
||||
/** Set all the children on (true), and set the new default child value to on (true).*/
|
||||
bool setAllChildrenOn(unsigned int switchSet);
|
||||
|
||||
|
||||
/** Set a single child to be on, MultiSwitch off all other children.*/
|
||||
bool setSingleChildOn(unsigned int switchSet, unsigned int pos);
|
||||
|
||||
|
||||
/** Set which of the available switch set lists to use.*/
|
||||
void setActiveSwitchSet(unsigned int switchSet) { _activeSwitchSet = switchSet; }
|
||||
|
||||
|
||||
/** Get which of the available switch set lists to use.*/
|
||||
unsigned int getActiveSwitchSet() const { return _activeSwitchSet; }
|
||||
|
||||
typedef std::vector<bool> ValueList;
|
||||
typedef std::vector<ValueList> SwitchSetList;
|
||||
typedef std::vector<std::string> SwitchSetNameList;
|
||||
|
||||
|
||||
/** Set the compile set of different values.*/
|
||||
void setSwitchSetList(const SwitchSetList& switchSetList);
|
||||
|
||||
@@ -90,9 +90,9 @@ class OSGSIM_EXPORT MultiSwitch : public osg::Group
|
||||
const std::string& getValueName(unsigned int switchSet) const { return _valueNames[switchSet]; }
|
||||
|
||||
protected :
|
||||
|
||||
|
||||
virtual ~MultiSwitch() {}
|
||||
|
||||
|
||||
void expandToEncompassSwitchSet(unsigned int switchSet);
|
||||
|
||||
// this is effectively a list of bit mask.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -42,9 +42,9 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
OverlayNode(OverlayTechnique technique=OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY);
|
||||
|
||||
OverlayNode(const OverlayNode& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Node(osgSim, OverlayNode);
|
||||
|
||||
|
||||
virtual void traverse(osg::NodeVisitor& nv);
|
||||
|
||||
|
||||
@@ -56,17 +56,17 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
|
||||
/** Set the overlay subgraph which will be rendered to texture.*/
|
||||
void setOverlaySubgraph(osg::Node* node);
|
||||
|
||||
|
||||
/** Get the overlay subgraph which will be rendered to texture.*/
|
||||
osg::Node* getOverlaySubgraph() { return _overlaySubgraph.get(); }
|
||||
|
||||
/** Get the const overlay subgraph which will be render to texture.*/
|
||||
const osg::Node* getOverlaySubgraph() const { return _overlaySubgraph.get(); }
|
||||
|
||||
|
||||
|
||||
/** Inform the OverlayNode that the overlay texture needs to be updated.*/
|
||||
void dirtyOverlayTexture();
|
||||
|
||||
|
||||
/** Set whether the OverlayNode should update the overlay texture on every frame.*/
|
||||
void setContinuousUpdate(bool update) { _continuousUpdate = update; }
|
||||
|
||||
@@ -91,7 +91,7 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
|
||||
/** Set the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.*/
|
||||
void setTexEnvMode(GLenum mode);
|
||||
|
||||
|
||||
/** Get the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.*/
|
||||
GLenum getTexEnvMode() const { return _texEnvMode; }
|
||||
|
||||
@@ -100,14 +100,14 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
|
||||
/** Get the texture unit that the texture should be assigned to.*/
|
||||
unsigned int getOverlayTextureUnit() const { return _textureUnit; }
|
||||
|
||||
|
||||
/** Set the texture size hint. The size hint is used to request a texture of specified size.*/
|
||||
void setOverlayTextureSizeHint(unsigned int size);
|
||||
|
||||
/** Get the texture size hint.*/
|
||||
unsigned int getOverlayTextureSizeHint() const { return _textureSizeHint; }
|
||||
|
||||
|
||||
|
||||
|
||||
/** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/
|
||||
virtual void setThreadSafeRefUnref(bool threadSafe);
|
||||
|
||||
@@ -122,12 +122,12 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
protected :
|
||||
|
||||
virtual ~OverlayNode() {}
|
||||
|
||||
|
||||
void init();
|
||||
void init_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY();
|
||||
void init_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY();
|
||||
void init_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY();
|
||||
|
||||
|
||||
void traverse_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVisitor& nv);
|
||||
void traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVisitor& nv);
|
||||
void traverse_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY(osg::NodeVisitor& nv);
|
||||
@@ -136,7 +136,7 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
void updateMainSubgraphStateSet();
|
||||
|
||||
typedef osg::buffered_value< int > TextureObjectValidList;
|
||||
|
||||
|
||||
mutable TextureObjectValidList _textureObjectValidList;
|
||||
|
||||
OverlayTechnique _overlayTechnique;
|
||||
@@ -147,7 +147,7 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
|
||||
osg::ref_ptr<osg::StateSet> _overlayStateSet;
|
||||
osg::ref_ptr<osg::StateSet> _mainStateSet;
|
||||
|
||||
|
||||
// texture to render to, and to read from.
|
||||
GLenum _texEnvMode;
|
||||
unsigned int _textureUnit;
|
||||
@@ -157,7 +157,7 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
bool _continuousUpdate;
|
||||
double _overlayBaseHeight;
|
||||
bool _updateCamera;
|
||||
|
||||
|
||||
osg::Camera::RenderTargetImplementation _renderTargetImpl;
|
||||
|
||||
struct OverlayData : public osg::Referenced
|
||||
@@ -176,18 +176,18 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
|
||||
osg::ref_ptr<osg::Geode> _geode;
|
||||
|
||||
osg::ref_ptr<osg::Program> _mainSubgraphProgram;
|
||||
|
||||
|
||||
osg::ref_ptr<osg::Uniform> _y0;
|
||||
osg::ref_ptr<osg::Uniform> _lightingEnabled;
|
||||
};
|
||||
|
||||
|
||||
typedef std::map<osgUtil::CullVisitor*, osg::ref_ptr<OverlayData> > OverlayDataMap;
|
||||
|
||||
|
||||
OpenThreads::Mutex _overlayDataMapMutex;
|
||||
OverlayDataMap _overlayDataMap;
|
||||
|
||||
|
||||
OverlayNode::OverlayData* getOverlayData(osgUtil::CullVisitor* cv);
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
|
||||
/** Set the position of scalar bar's lower left corner.*/
|
||||
void setPosition(const osg::Vec3& pos);
|
||||
|
||||
|
||||
/** Get the position of scalar bar.*/
|
||||
const osg::Vec3& getPosition() const { return _position; }
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -28,16 +28,16 @@ namespace osgSim {
|
||||
class Sector : public osg::Object
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
Sector() {}
|
||||
|
||||
|
||||
Sector(const Sector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||
osg::Object(copy,copyop) {}
|
||||
|
||||
virtual const char *libraryName() const { return "osgSim"; }
|
||||
virtual const char *className() const { return "Sector"; }
|
||||
virtual bool isSameKindAs(const osg::Object *obj) const { return dynamic_cast<const Sector *>(obj) != 0; }
|
||||
|
||||
|
||||
virtual float operator() (const osg::Vec3& /*eyeLocal*/) const = 0;
|
||||
|
||||
protected:
|
||||
@@ -54,7 +54,7 @@ class OSGSIM_EXPORT AzimRange
|
||||
_sinAzim(0.0f),
|
||||
_cosAngle(-1.0f),
|
||||
_cosFadeAngle(-1.0f) {}
|
||||
|
||||
|
||||
void setAzimuthRange(float minAzimuth,float maxAzimuth,float fadeAngle=0.0f);
|
||||
void getAzimuthRange(float& minAzimuth, float& maxAzimuth, float& fadeAngle) const;
|
||||
|
||||
@@ -80,16 +80,16 @@ class OSGSIM_EXPORT AzimRange
|
||||
class OSGSIM_EXPORT ElevationRange
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
|
||||
|
||||
ElevationRange():
|
||||
_cosMinElevation(-1.0f),
|
||||
_cosMinFadeElevation(-1.0f),
|
||||
_cosMaxElevation(1.0),
|
||||
_cosMaxFadeElevation(1.0) {}
|
||||
|
||||
|
||||
void setElevationRange(float minElevation,float maxElevation,float fadeAngle=0.0f);
|
||||
|
||||
|
||||
float getMinElevation() const;
|
||||
|
||||
float getMaxElevation() const;
|
||||
@@ -114,7 +114,7 @@ class OSGSIM_EXPORT ElevationRange
|
||||
}
|
||||
return 1.0f; // fully in sector
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
float _cosMinElevation;
|
||||
@@ -126,11 +126,11 @@ class OSGSIM_EXPORT ElevationRange
|
||||
class OSGSIM_EXPORT AzimSector : public Sector, public AzimRange
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AzimSector():
|
||||
Sector(),
|
||||
AzimRange() {}
|
||||
|
||||
|
||||
AzimSector(const AzimSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||
Sector(copy,copyop),
|
||||
AzimRange(copy) {}
|
||||
@@ -150,22 +150,22 @@ class OSGSIM_EXPORT AzimSector : public Sector, public AzimRange
|
||||
class OSGSIM_EXPORT ElevationSector : public Sector, public ElevationRange
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
|
||||
|
||||
ElevationSector():
|
||||
Sector(),
|
||||
ElevationRange() {}
|
||||
|
||||
|
||||
ElevationSector(const ElevationSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||
Sector(copy,copyop),
|
||||
ElevationRange(copy) {}
|
||||
|
||||
|
||||
ElevationSector(float minElevation,float maxElevation,float fadeAngle=0.0f);
|
||||
|
||||
|
||||
META_Object(osgSim,ElevationSector);
|
||||
|
||||
virtual float operator() (const osg::Vec3& eyeLocal) const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~ElevationSector() {}
|
||||
@@ -175,12 +175,12 @@ class OSGSIM_EXPORT ElevationSector : public Sector, public ElevationRange
|
||||
class OSGSIM_EXPORT AzimElevationSector : public Sector, public AzimRange, public ElevationRange
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AzimElevationSector():
|
||||
Sector(),
|
||||
AzimRange(),
|
||||
ElevationRange() {}
|
||||
|
||||
|
||||
AzimElevationSector(const AzimElevationSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||
Sector(copy,copyop),
|
||||
AzimRange(copy),
|
||||
@@ -201,7 +201,7 @@ class OSGSIM_EXPORT AzimElevationSector : public Sector, public AzimRange, publi
|
||||
class OSGSIM_EXPORT ConeSector : public Sector
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ConeSector():
|
||||
Sector(),
|
||||
_axis(0.0f,0.0f,1.0f),
|
||||
@@ -219,13 +219,13 @@ class OSGSIM_EXPORT ConeSector : public Sector
|
||||
META_Object(osgSim,ConeSector);
|
||||
|
||||
void setAxis(const osg::Vec3& axis);
|
||||
|
||||
|
||||
const osg::Vec3& getAxis() const;
|
||||
|
||||
void setAngle(float angle,float fadeangle=0.0f);
|
||||
|
||||
|
||||
float getAngle() const;
|
||||
|
||||
|
||||
float getFadeAngle() const;
|
||||
|
||||
virtual float operator() (const osg::Vec3& eyeLocal) const;
|
||||
@@ -233,7 +233,7 @@ class OSGSIM_EXPORT ConeSector : public Sector
|
||||
protected:
|
||||
|
||||
virtual ~ConeSector() {}
|
||||
|
||||
|
||||
osg::Vec3 _axis;
|
||||
float _cosAngle;
|
||||
float _cosAngleFade;
|
||||
@@ -248,7 +248,7 @@ class OSGSIM_EXPORT ConeSector : public Sector
|
||||
class OSGSIM_EXPORT DirectionalSector : public Sector
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
DirectionalSector():
|
||||
Sector(),
|
||||
_direction(0.0f, 0.0f, 1.0f),
|
||||
@@ -273,23 +273,23 @@ class OSGSIM_EXPORT DirectionalSector : public Sector
|
||||
META_Object(osgSim,DirectionalSector);
|
||||
|
||||
void setDirection(const osg::Vec3& direction);
|
||||
|
||||
|
||||
const osg::Vec3& getDirection() const;
|
||||
|
||||
void setHorizLobeAngle(float angle);
|
||||
|
||||
|
||||
float getHorizLobeAngle() const;
|
||||
|
||||
|
||||
void setLobeRollAngle(float angle);
|
||||
|
||||
|
||||
float getLobeRollAngle() const;
|
||||
|
||||
|
||||
void setVertLobeAngle(float angle);
|
||||
|
||||
|
||||
float getVertLobeAngle() const;
|
||||
|
||||
|
||||
void setFadeAngle(float angle);
|
||||
|
||||
|
||||
float getFadeAngle() const;
|
||||
|
||||
virtual float operator() (const osg::Vec3& eyeLocal) const;
|
||||
@@ -299,7 +299,7 @@ class OSGSIM_EXPORT DirectionalSector : public Sector
|
||||
protected:
|
||||
|
||||
virtual ~DirectionalSector() {}
|
||||
|
||||
|
||||
osg::Vec3 _direction ;
|
||||
float _rollAngle ;
|
||||
osg::Matrix _local_to_LP ;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace osgSim
|
||||
class OSGSIM_EXPORT ShapeAttribute
|
||||
{
|
||||
public:
|
||||
/// ShapeAttribute data type.
|
||||
/// ShapeAttribute data type.
|
||||
enum Type
|
||||
{
|
||||
UNKNOWN,
|
||||
@@ -33,21 +33,21 @@ class OSGSIM_EXPORT ShapeAttribute
|
||||
DOUBLE,
|
||||
STRING
|
||||
};
|
||||
|
||||
|
||||
ShapeAttribute();
|
||||
ShapeAttribute(const char * name);
|
||||
ShapeAttribute(const char * name, int value);
|
||||
ShapeAttribute(const char * name, double value);
|
||||
|
||||
|
||||
/** Note, ShapeAttribute takes a copy of both name and value, the calling code should manage its own clean up of the original strings.*/
|
||||
ShapeAttribute(const char * name, const char * value);
|
||||
|
||||
|
||||
ShapeAttribute(const ShapeAttribute & sa);
|
||||
|
||||
|
||||
~ShapeAttribute();
|
||||
|
||||
|
||||
ShapeAttribute& operator = (const ShapeAttribute& sa);
|
||||
|
||||
|
||||
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
|
||||
int compare(const osgSim::ShapeAttribute& sa) const;
|
||||
|
||||
@@ -63,7 +63,7 @@ class OSGSIM_EXPORT ShapeAttribute
|
||||
|
||||
/// Get the attribute data type.
|
||||
const Type getType() const { return _type; }
|
||||
|
||||
|
||||
/// Get the attribute data as an int.
|
||||
int getInt() const { return _integer; }
|
||||
|
||||
@@ -72,7 +72,7 @@ class OSGSIM_EXPORT ShapeAttribute
|
||||
|
||||
/// Get the attribute data as a string.
|
||||
const char * getString() const { return _string; }
|
||||
|
||||
|
||||
/// Set an integer attribute data.
|
||||
void setValue(int value) { free(); _type = INTEGER; _integer = value; }
|
||||
|
||||
@@ -82,15 +82,15 @@ class OSGSIM_EXPORT ShapeAttribute
|
||||
/// Set a string attribute data.
|
||||
void setValue(const char * value);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
void free();
|
||||
void copy(const ShapeAttribute& sa);
|
||||
|
||||
|
||||
std::string _name;
|
||||
Type _type;
|
||||
|
||||
|
||||
union
|
||||
{
|
||||
int _integer;
|
||||
@@ -103,11 +103,11 @@ class OSGSIM_EXPORT ShapeAttributeList : public osg::Object, public osg::MixinVe
|
||||
{
|
||||
public:
|
||||
META_Object(osgSim, ShapeAttributeList)
|
||||
|
||||
|
||||
ShapeAttributeList():
|
||||
Object()
|
||||
{}
|
||||
|
||||
|
||||
/** Copy constructor, optional CopyOp object can be used to control
|
||||
* shallow vs deep copying of dynamic data.*/
|
||||
ShapeAttributeList(const ShapeAttributeList& sal,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
||||
@@ -115,10 +115,10 @@ class OSGSIM_EXPORT ShapeAttributeList : public osg::Object, public osg::MixinVe
|
||||
osg::MixinVector<ShapeAttribute>(sal)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
|
||||
virtual int compare(const osgSim::ShapeAttributeList& sal) const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual ~ShapeAttributeList() {}
|
||||
};
|
||||
|
||||
@@ -227,10 +227,10 @@ public:
|
||||
void setAllColors(const osg::Vec4& c);
|
||||
|
||||
META_Node(osgSim, SphereSegment);
|
||||
|
||||
|
||||
/** A list of vertex arrays representing a list of lines.*/
|
||||
typedef std::vector< osg::ref_ptr<osg::Vec3Array> > LineList;
|
||||
|
||||
|
||||
/** Compute the interesection lines between subgraph and this sphere segment.
|
||||
* The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment.
|
||||
* The resulting intersections are in the coordinate frame of the sphere segment. */
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace osgSim {
|
||||
class OSGSIM_EXPORT VisibilityGroup : public osg::Group
|
||||
{
|
||||
public :
|
||||
|
||||
|
||||
VisibilityGroup();
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
@@ -62,7 +62,7 @@ class OSGSIM_EXPORT VisibilityGroup : public osg::Group
|
||||
|
||||
/** Get the length of the intersection segment.*/
|
||||
float getSegmentLength() const { return _segmentLength; }
|
||||
|
||||
|
||||
protected :
|
||||
|
||||
virtual ~VisibilityGroup() {}
|
||||
|
||||
Reference in New Issue
Block a user