31 LVecBase4 _start_color;
40 UnalignedLMatrix4 _transform;
72class EXPCL_DIRECT_MOTIONTRAIL
CMotionTrail :
public TypedReferenceCount {
83 void add_vertex(LVector4 *vertex, LVector4 *start_color, LVector4 *end_color, PN_stdfloat v);
85 void set_parameters(PN_stdfloat sampling_time, PN_stdfloat time_window,
bool use_texture,
bool calculate_relative_matrix,
bool use_nurbs, PN_stdfloat resolution_distance);
92 void begin_geometry();
93 void begin_geometry(
int num_quads);
94 void add_geometry_quad(LVector3 &v0, LVector3 &v1, LVector3 &v2, LVector3 &v3, LVector4 &c0, LVector4 &c1, LVector4 &c2, LVector4 &c3, LVector2 &t0, LVector2 &t1, LVector2 &t2, LVector2 &t3);
95 void add_geometry_quad(LVector4 &v0, LVector4 &v1, LVector4 &v2, LVector4 &v3, LVector4 &c0, LVector4 &c1, LVector4 &c2, LVector4 &c3, LVector2 &t0, LVector2 &t1, LVector2 &t2, LVector2 &t3);
102 PN_stdfloat _pause_time;
106 PN_stdfloat _fade_time;
107 PN_stdfloat _fade_start_time;
108 PN_stdfloat _fade_color_scale;
110 PN_stdfloat _last_update_time;
112 typedef epvector<CMotionTrailVertex> VertexList;
113 VertexList _vertex_list;
115 FrameList _frame_list;
118 PN_stdfloat _color_scale;
119 PN_stdfloat _sampling_time;
120 PN_stdfloat _time_window;
123 int _calculate_relative_matrix;
127 PN_stdfloat _resolution_distance;
146 static void init_type() {
147 TypedReferenceCount::init_type();
149 TypedReferenceCount::get_class_type());
152 return get_class_type();
154 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
void reset()
Reset the frame sample history.
void update_motion_trail(PN_stdfloat current_time, LMatrix4 *transform)
See class header comments.
int check_for_update(PN_stdfloat current_time)
Check if a sample can be submitted.
void enable(bool enable)
Enable/disable the motion trail.
void set_parameters(PN_stdfloat sampling_time, PN_stdfloat time_window, bool use_texture, bool calculate_relative_matrix, bool use_nurbs, PN_stdfloat resolution_distance)
Set motion trail parameters.
void reset_vertex_list()
Reset the vertex list.
void set_geom_node(GeomNode *geom_node)
Set the GeomNode.
void add_geometry_quad(LVector3 &v0, LVector3 &v1, LVector3 &v2, LVector3 &v3, LVector4 &c0, LVector4 &c1, LVector4 &c2, LVector4 &c3, LVector2 &t0, LVector2 &t1, LVector2 &t2, LVector2 &t3)
LVector3 vertex version.
void add_vertex(LVector4 *vertex, LVector4 *start_color, LVector4 *end_color, PN_stdfloat v)
Add a vertex.
CMotionTrail()
Constructor.
A node that holds Geom objects, renderable pieces of geometry.
Defines a series of disconnected triangles.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
This class is an abstraction for evaluating NURBS curves.
TypeHandle is the identifier used to differentiate C++ class types.
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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(),...