14 #ifndef __BULLET_DEBUG_NODE_H__ 15 #define __BULLET_DEBUG_NODE_H__ 34 virtual void draw_mask_changed();
36 INLINE
void show_wireframe(
bool show);
37 INLINE
void show_constraints(
bool show);
38 INLINE
void show_bounding_boxes(
bool show);
39 INLINE
void show_normals(
bool show);
40 INLINE
bool get_show_wireframe()
const;
41 INLINE
bool get_show_constraints()
const;
42 INLINE
bool get_show_bounding_boxes()
const;
43 INLINE
bool get_show_normals()
const;
45 MAKE_PROPERTY(wireframe, get_show_wireframe, show_wireframe);
46 MAKE_PROPERTY(constraints, get_show_constraints, show_constraints);
47 MAKE_PROPERTY(bounding_boxes, get_show_bounding_boxes, show_bounding_boxes);
48 MAKE_PROPERTY(normals, get_show_normals, show_normals);
62 void do_sync_b2p(btDynamicsWorld *world);
67 UnalignedLVecBase4 _color;
74 UnalignedLVecBase4 _color;
77 class DebugDraw :
public btIDebugDraw {
82 virtual void setDebugMode(
int mode);
83 virtual int getDebugMode()
const;
84 virtual void reportErrorWarning(
const char *warning);
86 virtual void drawLine(
const btVector3 &from,
const btVector3 &to,
87 const btVector3 &color);
88 virtual void drawContactPoint(
const btVector3 &point,
89 const btVector3 &normal, btScalar distance,
int lifetime,
90 const btVector3 &color);
91 virtual void draw3dText(
const btVector3 &location,
const char *text);
92 virtual void drawTriangle(
const btVector3 &v0,
const btVector3 &v1,
93 const btVector3 &v2,
const btVector3 &color, btScalar);
94 virtual void drawTriangle(
const btVector3 &v0,
const btVector3 &v1,
95 const btVector3 &v2,
const btVector3 &n0,
const btVector3 &n1,
96 const btVector3 &n2,
const btVector3 &color, btScalar alpha);
97 virtual void drawSphere(btScalar radius,
const btTransform &transform,
98 const btVector3 &color);
111 btDynamicsWorld *_debug_world;
112 PT(
Geom) _debug_lines;
113 PT(
Geom) _debug_triangles;
135 static void init_type() {
136 PandaNode::init_type();
138 PandaNode::get_class_type());
141 return get_class_type();
145 return get_class_type();
154 #endif // __BULLET_DEBUG_NODE_H__ PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
virtual bool safe_to_modify_transform() const
Returns true if it is safe to automatically adjust the transform on this kind of node.
Base class for objects that can be written to and read from Bam files.
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.
virtual bool safe_to_combine_children() const
Returns true if it is generally safe to combine the children of this PandaNode with each other.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
virtual bool safe_to_combine() const
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A lightweight class that represents a single element that may be timed and/or counted via stats.
A container for geometry primitives.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual void add_for_draw(CullTraverser *trav, CullTraverserData &data)
Adds the node's contents to the CullResult we are building up during the cull traversal,...
virtual bool safe_to_flatten_below() const
Returns true if a flatten operation may safely continue past this node, or false if nodes below this ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
virtual bool safe_to_transform() const
Returns true if it is generally safe to transform this particular kind of PandaNode by calling the xf...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating ...