14#ifndef CLERPNODEPATHINTERVAL_H
15#define CLERPNODEPATHINTERVAL_H
29 BlendType blend_type,
bool bake_in_start,
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();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void priv_step(double t)
Advances the time on the interval.
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_initialize(double t)
Similar to priv_initialize(), but this is called when the interval is being played backwards; it indi...
virtual void priv_reverse_instant()
This is called in lieu of priv_reverse_initialize() .
virtual void priv_instant()
This is called in lieu of priv_initialize() .
void set_start_scale(const LVecBase3 &scale)
Indicates the initial scale of the lerped node.
void set_start_color_scale(const LVecBase4 &color_scale)
Indicates the initial color scale of the lerped node.
void set_start_hpr(const LVecBase3 &hpr)
Indicates the initial rotation of the lerped node.
void set_end_quat(const LVecBase3 &hpr)
Indicates that the rotation of the node should be lerped, and specifies the final rotation of the nod...
const NodePath & get_node() const
Returns the node being lerped.
int get_override() const
Returns the override value that will be associated with any state changes applied by the lerp.
void set_start_color(const LVecBase4 &color)
Indicates the initial color of the lerped node.
void set_end_pos(const LVecBase3 &pos)
Indicates that the position of the node should be lerped, and specifies the final position of the nod...
void set_start_tex_offset(const LVecBase2 &tex_offset)
Indicates the initial UV offset of the lerped node.
void set_start_tex_scale(const LVecBase2 &tex_scale)
Indicates the initial UV scale of the lerped node.
void set_end_tex_offset(const LVecBase2 &tex_offset)
Indicates that the UV offset of the node should be lerped, and specifies the final UV offset of the n...
void set_override(int override)
Changes the override value that will be associated with any state changes applied by the lerp.
void set_end_scale(const LVecBase3 &scale)
Indicates that the scale of the node should be lerped, and specifies the final scale of the node.
CLerpNodePathInterval(const std::string &name, double duration, BlendType blend_type, bool bake_in_start, bool fluid, const NodePath &node, const NodePath &other)
Constructs a lerp interval that will lerp some properties on the indicated node, possibly relative to...
void set_start_quat(const LQuaternion &quat)
Indicates the initial rotation of the lerped node.
void set_start_tex_rotate(PN_stdfloat tex_rotate)
Indicates the initial UV rotate of the lerped node.
void set_texture_stage(TextureStage *stage)
Indicates the texture stage that is adjusted by tex_offset, tex_rotate, and/or tex_scale.
const NodePath & get_other() const
Returns the "other" node, which the lerped node is being moved relative to.
void set_end_shear(const LVecBase3 &shear)
Indicates that the shear of the node should be lerped, and specifies the final shear of the node.
void set_start_pos(const LVecBase3 &pos)
Indicates the initial position of the lerped node.
void set_end_tex_scale(const LVecBase2 &tex_scale)
Indicates that the UV scale of the node should be lerped, and specifies the final UV scale of the nod...
void set_end_tex_rotate(PN_stdfloat tex_rotate)
Indicates that the UV rotate of the node should be lerped, and specifies the final UV rotate of the n...
void set_end_color_scale(const LVecBase4 &color_scale)
Indicates that the color scale of the node should be lerped, and specifies the final color scale of t...
void set_start_shear(const LVecBase3 &shear)
Indicates the initial shear of the lerped node.
void set_end_hpr(const LVecBase3 &hpr)
Indicates that the rotation of the node should be lerped, and specifies the final rotation of the nod...
void set_end_color(const LVecBase4 &color)
Indicates that the color of the node should be lerped, and specifies the final color of the node.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Defines the properties of a named stage of the multitexture pipeline.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.