21 #ifndef _OF_MARKERARTIST_ 22 #define _OF_MARKERARTIST_ 65 const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY );
69 virtual Object* clone(
const osg::CopyOp& copyop)
const {
return new MarkerArtist(*
this,copyop); }
70 virtual bool isSameKindAs(
const osg::Object* obj)
const {
return dynamic_cast<const MarkerArtist*
>(obj)!=NULL; }
71 virtual const char* libraryName()
const {
return "OpenFrames"; }
72 virtual const char* className()
const {
return "MarkerArtist"; }
75 virtual void setTrajectory(
const Trajectory *traj);
78 bool setXData(
const Trajectory::DataSource &src);
79 bool setYData(
const Trajectory::DataSource &src);
80 bool setZData(
const Trajectory::DataSource &src);
83 void setMarkers(
unsigned int markers );
84 void setMarkerColor(
unsigned int markers,
float r,
float g,
float b);
85 void setMarkerSize(
unsigned int size);
86 bool setMarkerImage(
const std::string &fname );
87 bool setMarkerShader(
const std::string &fname );
91 void setAutoAttenuate(
bool attenuate);
92 bool getAutoAttenuate()
const;
95 void setIntermediateType(IntermediateType type);
98 void setIntermediateSpacing(
double spacing);
103 void setIntermediateDirection(DrawnMarkers direction);
106 virtual void drawImplementation(osg::RenderInfo& renderInfo)
const;
109 virtual void dataCleared(Trajectory* traj);
112 virtual void dataAdded(Trajectory* traj);
115 void computeAttenuation();
118 virtual ~MarkerArtist();
121 virtual osg::BoundingBox computeBoundingBox()
const;
124 void verifyData()
const;
127 void resetMarkerShader();
130 Trajectory::DataSource _dataSource[3];
132 unsigned int _markers;
134 IntermediateType _intermediateType;
135 double _intermediateSpacing;
136 DrawnMarkers _intermediateDirection;
138 float _startColor[3];
140 float _intermediateColor[3];
142 mutable bool _dataValid;
143 mutable bool _dataZero;
144 mutable bool _shouldAttenuate;
146 osg::ref_ptr<osg::Shader> _fragShader;
DrawnMarkers
Definition: MarkerArtist.hpp:44
This class draws markers at trajectory points.
Definition: MarkerArtist.hpp:39
Abstract class for Trajectory objects.
Definition: TrajectoryArtist.hpp:42
Definition: CoordinateAxes.hpp:29
Holds a collection of data vectors.
Definition: Trajectory.hpp:42
IntermediateType
Definition: MarkerArtist.hpp:53
virtual Object * cloneType() const
Definition: MarkerArtist.hpp:68