14 #ifndef OSGSIM_BLINKSQUENCE
15 #define OSGSIM_BLINKSQUENCE 1
17 #include <osgSim/Export>
23 #include <osg/ref_ptr>
57 inline void addPulse(
double length,
const osg::Vec4& color);
63 inline void getPulse(
unsigned int i,
double& length,
osg::Vec4& color)
const;
66 inline void setPulse(
unsigned int i,
double length,
const osg::Vec4& color);
87 inline double localTime(
double time)
const;
90 inline osg::Vec4 color(
double time,
double length)
const;
138 PulseData::const_iterator itr =
_pulseData.begin();
141 while (lt>itr->first)
150 if (lt+length<=itr->first)
161 double len = length-(itr->first-lt);
166 while (len>itr->first)
169 color += itr->second*itr->first;
175 color += itr->second*len;
osg::Vec4 color(double time, double length) const
SequenceGroup * getSequenceGroup()
void setPhaseShift(double ps)
osg::ref_ptr< SequenceGroup > _sequenceGroup
void getPulse(unsigned int i, double &length, osg::Vec4 &color) const
double getBaseTime() const
std::vector< IntervalColor > PulseData
#define META_Object(library, name)
double getPulsePeriod() const
std::pair< double, osg::Vec4 > IntervalColor
void setPulse(unsigned int i, double length, const osg::Vec4 &color)
double localTime(double time) const
const SequenceGroup * getSequenceGroup() const
void setSequenceGroup(SequenceGroup *sg)
double getPhaseShift() const
void setBaseTime(double t)
void addPulse(double length, const osg::Vec4 &color)