139 return _color_inter_func;
176 return _is_modulated;
211 _color_inter_func =
function;
225 _t_total = _t_end-_t_begin;
239 _t_total = _t_end-_t_begin;
252 _is_modulated = flag;
287 for(iter = _i_segs.begin();iter != _i_segs.end();++iter)
288 if( seg_id == (*iter)->get_id() )
306 for(iter = _i_segs.begin();iter != _i_segs.end();++iter)
307 output << (*iter)->get_id() <<
" ";
309 string str = output.str();
310 return str.substr(0, str.length()-1);
void set_width_a(const PN_stdfloat w)
Sets the primary width of the function.
PN_stdfloat get_time_begin() const
Returns the point in the particle's lifetime at which this segment begins its effect.
PN_stdfloat get_time_end() const
Returns the point in the particle's lifetime at which this segment's effect stops.
void set_width_b(const PN_stdfloat w)
Sets the secondary width of the function.
PN_stdfloat get_width_a() const
Returns the primary width of the function.
bool is_modulated() const
Returns whether the function is additive or modulated.
A single unit of interpolation.
LColor get_color_a() const
Returns the primary color of the function.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
void set_enabled(const bool enabled)
Sets whether the segments effects should be applied.
void set_time_end(const PN_stdfloat time)
Sets the point in the particle's lifetime at which this segment's effect ends.
void set_period(const PN_stdfloat p)
Sets the time to transition from A to B then back to A again.
void set_default_color(const LColor &c)
Sets the color to used if no segments are present.
This is our own Panda specialization on the default STL vector.
void set_function(ColorInterpolationFunction *function)
Sets the function that the segment will use for its interpolation calculations.
string get_segment_id_list()
Returns a space delimited list of all of the ids in the manager at the time.
void set_is_modulated(const bool flag)
Sets how the function is applied to the final color.
TypedReferenceCount * get_function() const
Returns a reference to the function object corresponding to this segment.
int get_id() const
Returns the id assigned to this segment by the manager that created it.
Abstract class from which all other functions should inherit.
This is the base class for all three-component vectors and points.
void set_color_a(const LColor &c)
Sets the primary color of the function.
ColorInterpolationSegment * get_segment(const int seg_id)
Returns the segment that corresponds to 'seg_id'.
void set_color_b(const LColor &c)
Sets the secondary color of the function.
LColor get_color_b() const
Returns the secondary color of the function.
PN_stdfloat get_width_b() const
Returns the secondary width of the function.
bool is_enabled() const
Returns whether the segments effects are being applied.
void set_time_begin(const PN_stdfloat time)
Sets the point in the particle's lifetime at which this segment begins its effect.
PN_stdfloat get_period() const
Returns the time to transition from A to B then back to A again.