Panda3D
Loading...
Searching...
No Matches
physxDebugGeomNode.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file physxDebugGeomNode.h
10 * @author enn0x
11 * @date 2009-09-15
12 */
13
14#ifndef PHYSXDEBUGGEOMNODE_H
15#define PHYSXDEBUGGEOMNODE_H
16
17#include "pandabase.h"
18#include "pointerTo.h"
19#include "geomNode.h"
20#include "transformState.h"
21#include "geom.h"
22#include "geomVertexData.h"
23#include "geomLines.h"
24#include "geomTriangles.h"
25
26#include "physx_includes.h"
27
28class PhysxScene;
29
30/**
31 * Renderable geometry which represents visualizations of physics objects.
32 * Intended to help with debugging code.
33 */
34class EXPCL_PANDAPHYSX PhysxDebugGeomNode : public GeomNode {
35
36PUBLISHED:
37 INLINE PhysxDebugGeomNode();
38 INLINE ~PhysxDebugGeomNode();
39
40 void on();
41 void off();
42 void toggle();
43
44 INLINE void visualize_world_axes(bool value);
45 INLINE void visualize_body_axes(bool value);
46 INLINE void visualize_body_mass_axes(bool value);
47 INLINE void visualize_body_lin_velocity(bool value);
48 INLINE void visualize_body_ang_velocity(bool value);
49 INLINE void visualize_body_joint_groups(bool value);
50 INLINE void visualize_joint_local_axes(bool value);
51 INLINE void visualize_joint_world_axes(bool value);
52 INLINE void visualize_joint_limits(bool value);
53 INLINE void visualize_contact_point(bool value);
54 INLINE void visualize_contact_normal(bool value);
55 INLINE void visualize_contact_error(bool value);
56 INLINE void visualize_contact_force(bool value);
57 INLINE void visualize_actor_axes(bool value);
58 INLINE void visualize_collision_aabbs(bool value);
59 INLINE void visualize_collision_shapes(bool value);
60 INLINE void visualize_collision_axes(bool value);
61 INLINE void visualize_collision_compounds(bool value);
62 INLINE void visualize_collision_vnormals(bool value);
63 INLINE void visualize_collision_fnormals(bool value);
64 INLINE void visualize_collision_edges(bool value);
65 INLINE void visualize_collision_spheres(bool value);
66 INLINE void visualize_collision_static(bool value);
67 INLINE void visualize_collision_dynamic(bool value);
68 INLINE void visualize_collision_free(bool value);
69 INLINE void visualize_collision_ccd(bool value);
70 INLINE void visualize_collision_skeletons(bool value);
71 INLINE void visualize_cloth_mesh(bool value);
72 INLINE void visualize_cloth_validbounds(bool value);
73 INLINE void visualize_softbody_mesh(bool value);
74 INLINE void visualize_softbody_validbounds(bool value);
75 INLINE void visualize_force_fields(bool value);
76
77public:
78 void update(NxScene *scenePtr);
79
80private:
81 float _scale;
82
83 PT(GeomVertexData) _vdata;
84 PT(Geom) _geom_lines;
85 PT(GeomLines) _prim_lines;
86 PT(Geom) _geom_triangles;
87 PT(GeomTriangles) _prim_triangles;
88
89public:
90 static TypeHandle get_class_type() {
91 return _type_handle;
92 }
93 static void init_type() {
94 GeomNode::init_type();
95 register_type(_type_handle, "PhysxDebugGeomNode",
96 GeomNode::get_class_type());
97 }
98 virtual TypeHandle get_type() const {
99 return get_class_type();
100 }
101 virtual TypeHandle force_init_type() {
102 init_type();
103 return get_class_type();
104 }
105
106private:
107 static TypeHandle _type_handle;
108};
109
110#include "physxDebugGeomNode.I"
111
112#endif // PHYSXDEBUGGEOMNODE_H
Defines a series of disconnected line segments.
Definition geomLines.h:23
A node that holds Geom objects, renderable pieces of geometry.
Definition geomNode.h:34
Defines a series of disconnected triangles.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A container for geometry primitives.
Definition geom.h:54
Renderable geometry which represents visualizations of physics objects.
A scene is a collection of bodies, constraints, and effectors which can interact.
Definition physxScene.h:69
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
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.