54class EXPCL_PANDA_GRUTIL
MeshDrawer :
public TypedObject {
65 INLINE
void tri(
const LVector3 &v1,
const LVector4 &c1,
const LVector2 &uv1,
66 const LVector3 &v2,
const LVector4 &c2,
const LVector2 &uv2,
67 const LVector3 &v3,
const LVector4 &c3,
const LVector2 &uv3);
69 void particle(
const LVector3 &pos,
const LVector4 &frame, PN_stdfloat size,
const LVector4 &color, PN_stdfloat rotation);
70 void blended_particle(
const LVector3 &pos,
const LVector4 &frame1,
const LVector4 &frame2,
71 PN_stdfloat blend, PN_stdfloat size,
const LVector4 &color, PN_stdfloat rotation);
72 void billboard(
const LVector3 &pos,
const LVector4 &frame, PN_stdfloat size,
const LVector4 &color);
73 void segment(
const LVector3 &start,
const LVector3 &stop,
const LVector4 &frame, PN_stdfloat thickness,
const LVector4 &color);
74 void cross_segment(
const LVector3 &start,
const LVector3 &stop,
const LVector4 &frame, PN_stdfloat thickness,
const LVector4 &color);
76 const LVector4 &frame, PN_stdfloat thickness_start,
const LVector4 &color_start,
77 PN_stdfloat thickness_stop,
const LVector4 &color_stop);
79 void link_segment(
const LVector3 &pos,
const LVector4 &frame, PN_stdfloat thickness,
const LVector4 &color);
82 void explosion(
const LVector3 &pos,
const LVector4 &frame, PN_stdfloat size,
const LVector4 &color,
83 int seed,
int number, PN_stdfloat distance);
84 void stream(
const LVector3 &start,
const LVector3 &stop,
const LVector4 &frame, PN_stdfloat size,
const LVector4 &color,
85 int number, PN_stdfloat offset);
111 LVector3 _b1, _b2, _b3, _b4;
112 LVector3 _up, _right;
115 int _last_clear_index, _start_clear_index, _end_clear_index, _clear_index;
119 LVector3 _last_v1,_last_v2,_last_v3,_last_v4,_last_pos;
120 PN_stdfloat _last_thickness;
121 LVector4 _last_color;
127 void generator(
int budget);
136 TypedObject::get_class_type());
139 return get_class_type();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
A node that holds Geom objects, renderable pieces of geometry.
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
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 the functionality of both a GeomVertexReader and a GeomVertexWriter,...
A container for geometry primitives.
void particle(const LVector3 &pos, const LVector4 &frame, PN_stdfloat size, const LVector4 &color, PN_stdfloat rotation)
Draws a particle that is sort of like a bill board but has an extra rotation component.
void link_segment_end(const LVector4 &frame, const LVector4 &color)
Finish drawing linked segments, needs at least two calls to link_segment before it can end the linked...
void explosion(const LVector3 &pos, const LVector4 &frame, PN_stdfloat size, const LVector4 &color, int seed, int number, PN_stdfloat distance)
Draws number of particles in a sphere like emitter.
NodePath get_root()
Returns the root NodePath.
void billboard(const LVector3 &pos, const LVector4 &frame, PN_stdfloat size, const LVector4 &color)
Draws a billboard - particle with no rotation.
void uneven_segment(const LVector3 &start, const LVector3 &stop, const LVector4 &frame, PN_stdfloat thickness_start, const LVector4 &color_start, PN_stdfloat thickness_stop, const LVector4 &color_stop)
Draws a segment a line with different thickness and color on both sides.
void geometry(NodePath node)
Draws the geometry that is inside this node path into the MeshDrawer object.
void cross_segment(const LVector3 &start, const LVector3 &stop, const LVector4 &frame, PN_stdfloat thickness, const LVector4 &color)
Draws a segment a line with a thickness.
void begin(NodePath camera, NodePath render)
Pass the current camera node and the root node.
void set_budget(int budget)
Sets the total triangle budget of the drawer.
void blended_particle(const LVector3 &pos, const LVector4 &frame1, const LVector4 &frame2, PN_stdfloat blend, PN_stdfloat size, const LVector4 &color, PN_stdfloat rotation)
Works just like particle but accepts 2 frames and a blend (from 0 to 1) component between them Frame ...
void end()
Finish the drawing and clearing off the remaining vertexes.
MeshDrawer()
Creates the MeshDrawer low level system.
void tri(const LVector3 &v1, const LVector4 &c1, const LVector2 &uv1, const LVector3 &v2, const LVector4 &c2, const LVector2 &uv2, const LVector3 &v3, const LVector4 &c3, const LVector2 &uv3)
Draws a triangle with the given parameters.
int get_budget()
Gets the total triangle budget of the drawer.
void link_segment(const LVector3 &pos, const LVector4 &frame, PN_stdfloat thickness, const LVector4 &color)
Stars or continues linked segment.
void segment(const LVector3 &start, const LVector3 &stop, const LVector4 &frame, PN_stdfloat thickness, const LVector4 &color)
Draws a segment a line with a thickness.
void stream(const LVector3 &start, const LVector3 &stop, const LVector4 &frame, PN_stdfloat size, const LVector4 &color, int number, PN_stdfloat offset)
Draws a number of particles in a big line with a shift dictated by the offset.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
TypeHandle is the identifier used to differentiate C++ class types.
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
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.
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(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.