15 #ifndef CMOTIONTRAIL_H
16 #define CMOTIONTRAIL_H
18 #include "directbase.h"
21 #include "geomVertexData.h"
22 #include "geomVertexWriter.h"
23 #include "geomTriangles.h"
25 #include "nurbsCurveEvaluator.h"
91 void reset_vertex_list();
93 void enable(
bool enable);
95 void set_geom_node(
GeomNode *geom_node);
98 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);
100 int check_for_update(PN_stdfloat current_time);
101 void update_motion_trail(PN_stdfloat current_time,
LMatrix4 *transform);
105 void begin_geometry();
106 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);
107 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);
114 PN_stdfloat _pause_time;
118 PN_stdfloat _fade_time;
119 PN_stdfloat _fade_start_time;
120 PN_stdfloat _fade_color_scale;
122 PN_stdfloat _last_update_time;
124 typedef epvector<CMotionTrailVertex> VertexList;
125 VertexList _vertex_list;
130 PN_stdfloat _color_scale;
131 PN_stdfloat _sampling_time;
132 PN_stdfloat _time_window;
135 int _calculate_relative_matrix;
139 PN_stdfloat _resolution_distance;
158 static void init_type() {
159 TypedReferenceCount::init_type();
160 register_type(_type_handle,
"CMotionTrail",
161 TypedReferenceCount::get_class_type());
164 return get_class_type();
166 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
This is an "unaligned" LMatrix4.
This class is an abstraction for evaluating NURBS curves.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a 4-by-4 transform matrix.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
This is a four-component vector distance.
This is the base class for all three-component vectors and points.
This is a two-component vector offset.
This is a four-component point in space.
Defines a series of disconnected triangles.
TypeHandle is the identifier used to differentiate C++ class types.
A node that holds Geom objects, renderable pieces of geometry.
The method used in creating the motion trail is based on taking samples of time and transformations (...