14 #ifndef CLERPNODEPATHINTERVAL_H 15 #define CLERPNODEPATHINTERVAL_H 29 BlendType blend_type,
bool bake_in_start,
33 INLINE
const NodePath &get_node()
const;
34 INLINE
const NodePath &get_other()
const;
36 INLINE
void set_start_pos(
const LVecBase3 &pos);
37 INLINE
void set_end_pos(
const LVecBase3 &pos);
38 INLINE
void set_start_hpr(
const LVecBase3 &hpr);
39 INLINE
void set_end_hpr(
const LVecBase3 &hpr);
40 INLINE
void set_end_hpr(
const LQuaternion &quat);
41 INLINE
void set_start_quat(
const LQuaternion &quat);
42 INLINE
void set_end_quat(
const LVecBase3 &hpr);
43 INLINE
void set_end_quat(
const LQuaternion &quat);
44 INLINE
void set_start_scale(
const LVecBase3 &scale);
45 INLINE
void set_start_scale(PN_stdfloat scale);
46 INLINE
void set_end_scale(
const LVecBase3 &scale);
47 INLINE
void set_end_scale(PN_stdfloat scale);
48 INLINE
void set_start_shear(
const LVecBase3 &shear);
49 INLINE
void set_end_shear(
const LVecBase3 &shear);
50 INLINE
void set_start_color(
const LVecBase4 &color);
51 INLINE
void set_end_color(
const LVecBase4 &color);
52 INLINE
void set_start_color_scale(
const LVecBase4 &color_scale);
53 INLINE
void set_end_color_scale(
const LVecBase4 &color_scale);
55 INLINE
void set_start_tex_offset(
const LVecBase2 &tex_offset);
56 INLINE
void set_end_tex_offset(
const LVecBase2 &tex_offset);
57 INLINE
void set_start_tex_rotate(PN_stdfloat tex_rotate);
58 INLINE
void set_end_tex_rotate(PN_stdfloat tex_rotate);
59 INLINE
void set_start_tex_scale(
const LVecBase2 &tex_scale);
60 INLINE
void set_end_tex_scale(
const LVecBase2 &tex_scale);
62 INLINE
void set_override(
int override);
63 INLINE
int get_override()
const;
71 virtual void output(std::ostream &out)
const;
80 F_end_pos = 0x00000001,
81 F_end_hpr = 0x00000002,
82 F_end_quat = 0x00000004,
83 F_end_scale = 0x00000008,
84 F_end_color = 0x00000010,
85 F_end_color_scale = 0x00000020,
86 F_end_shear = 0x00000040,
87 F_end_tex_offset = 0x00000080,
88 F_end_tex_rotate = 0x00000100,
89 F_end_tex_scale = 0x00000200,
91 F_start_pos = 0x00010000,
92 F_start_hpr = 0x00020000,
93 F_start_quat = 0x00040000,
94 F_start_scale = 0x00080000,
95 F_start_color = 0x00100000,
96 F_start_color_scale = 0x00200000,
97 F_start_shear = 0x00400000,
98 F_start_tex_offset = 0x00800000,
99 F_start_tex_rotate = 0x01000000,
100 F_start_tex_scale = 0x02000000,
102 F_fluid = 0x10000000,
103 F_bake_in_start = 0x20000000,
105 F_slerp_setup = 0x40000000,
109 LPoint3 _start_pos, _end_pos;
110 LVecBase3 _start_hpr, _end_hpr;
111 LQuaternion _start_quat, _end_quat;
112 LVecBase3 _start_scale, _end_scale;
113 LVecBase3 _start_shear, _end_shear;
114 LColor _start_color, _end_color;
115 LVecBase4 _start_color_scale, _end_color_scale;
117 LVecBase2 _start_tex_offset, _end_tex_offset;
118 PN_stdfloat _start_tex_rotate, _end_tex_rotate;
119 LVecBase2 _start_tex_scale, _end_tex_scale;
123 PN_stdfloat _slerp_angle;
124 PN_stdfloat _slerp_denom;
125 LQuaternion _slerp_c;
127 void slerp_basic(LQuaternion &result, PN_stdfloat t)
const;
128 void slerp_angle_0(LQuaternion &result, PN_stdfloat t)
const;
129 void slerp_angle_180(LQuaternion &result, PN_stdfloat t)
const;
138 static void init_type() {
139 CLerpInterval::init_type();
141 CLerpInterval::get_class_type());
144 return get_class_type();
146 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
virtual void priv_step(double t)
Advances the time on the interval.
virtual void priv_instant()
This is called in lieu of priv_initialize() .
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void priv_reverse_initialize(double t)
Similar to priv_initialize(), but this is called when the interval is being played backwards; it indi...
An interval that lerps one or more properties (like pos, hpr, etc.) on a NodePath over time.
virtual void priv_initialize(double t)
This replaces the first call to priv_step(), and indicates that the interval has just begun.
virtual void priv_reverse_instant()
This is called in lieu of priv_reverse_initialize() .
TypeHandle is the identifier used to differentiate C++ class types.
Defines the properties of a named stage of the multitexture pipeline.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
The base class for a family of intervals that linearly interpolate one or more numeric values over ti...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.