Panda3D

Loading...
Searching...
No Matches
physxScene.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 physxScene.h
10 * @author enn0x
11 * @date 2009-09-14
12 */
13
14#ifndef PHYSXSCENE_H
15#define PHYSXSCENE_H
16
17#include "pandabase.h"
18#include "luse.h"
19#include "callbackObject.h"
20
21#include "physxObject.h"
22#include "physxObjectCollection.h"
23#include "physxEnums.h"
24#include "physxContactReport.h"
25#include "physxControllerReport.h"
26#include "physxTriggerReport.h"
27#include "physxOverlapReport.h"
28#include "physxMask.h"
29#include "physxGroupsMask.h"
30#include "physx_includes.h"
31
32 class PhysxActor;
33 class PhysxActorDesc;
34 class PhysxController;
35 class PhysxControllerDesc;
36 class PhysxConstraintDominance;
37 class PhysxDebugGeomNode;
38 class PhysxForceField;
39 class PhysxForceFieldDesc;
40 class PhysxForceFieldShapeGroup;
41 class PhysxForceFieldShapeGroupDesc;
42 class PhysxJoint;
43 class PhysxJointDesc;
44 class PhysxMaterial;
45 class PhysxMaterialDesc;
46 class PhysxOverlapReport;
47 class PhysxRay;
48 class PhysxRaycastHit;
49 class PhysxRaycastReport;
50 class PhysxSceneStats2;
51 class PhysxVehicle;
52 class PhysxVehicleDesc;
53 class PhysxCloth;
54 class PhysxClothDesc;
55 class PhysxSoftBody;
56 class PhysxSoftBodyDesc;
57
58/**
59 * A scene is a collection of bodies, constraints, and effectors which can
60 * interact.
61 *
62 * The scene simulates the behavior of these objects over time. Several
63 * scenes may exist at the same time, but each body, constraint, or effector
64 * object is specific to a scene -- they may not be shared.
65 *
66 * For example, attempting to create a joint in one scene and then using it to
67 * attach bodies from a different scene results in undefined behavior.
68 */
69 class EXPCL_PANDAPHYSX PhysxScene : public PhysxObject, public PhysxEnums {
70
71PUBLISHED:
72 INLINE PhysxScene();
73 INLINE ~PhysxScene();
74
75 void simulate(float dt);
76 void fetch_results();
77 void set_timing_variable();
78 void set_timing_fixed(float maxTimestep=1.0f/60.0f, unsigned int maxIter=8);
79
80 PhysxDebugGeomNode *get_debug_geom_node();
81
82 void enable_contact_reporting(bool enabled);
83 bool is_contact_reporting_enabled() const;
84 void enable_trigger_reporting(bool enabled);
85 bool is_trigger_reporting_enabled() const;
86 void enable_controller_reporting(bool enabled);
87 bool is_controller_reporting_enabled() const;
88
89 INLINE void set_controller_shape_hit_callback(PT(CallbackObject) cbobj);
90 INLINE void set_controller_controller_hit_callback(PT(CallbackObject) cbobj);
91
92 void set_gravity(const LVector3f &gravity);
93
94 LVector3f get_gravity() const;
95 PhysxSceneStats2 get_stats2() const;
96 bool get_flag(PhysxSceneFlag flag) const;
97 bool is_hardware_scene() const;
98
99 // Actors
100 unsigned int get_num_actors() const;
101 PhysxActor *create_actor(PhysxActorDesc &desc);
102 PhysxActor *get_actor(unsigned int idx) const;
103 MAKE_SEQ(get_actors, get_num_actors, get_actor);
104
105 // Joints
106 unsigned int get_num_joints() const;
107 PhysxJoint *create_joint(PhysxJointDesc &desc);
108 PhysxJoint *get_joint(unsigned int idx) const;
109 MAKE_SEQ(get_joints, get_num_joints, get_joint);
110
111 // Materials
112 unsigned int get_num_materials() const;
113 unsigned int get_hightest_material_index() const;
114 PhysxMaterial *create_material(PhysxMaterialDesc &desc);
115 PhysxMaterial *create_material();
116 PhysxMaterial *get_material(unsigned int idx) const;
117 PhysxMaterial *get_material_from_index(unsigned int idx) const;
118 MAKE_SEQ(get_materials, get_num_materials, get_material);
119
120 // Controllers
121 unsigned int get_num_controllers() const;
122 PhysxController *create_controller(PhysxControllerDesc &controllerDesc);
123 PhysxController *get_controller(unsigned int idx) const;
124 MAKE_SEQ(get_controllers, get_num_controllers, get_controller);
125
126 // Force fields
127 unsigned int get_num_force_fields() const;
128 PhysxForceField *create_force_field(PhysxForceFieldDesc &desc);
129 PhysxForceField *get_force_field(unsigned int idx) const;
130 MAKE_SEQ(get_force_fields, get_num_force_fields, get_force_field);
131
132 // Force field shape groups
133 unsigned int get_num_force_field_shape_groups() const;
134 PhysxForceFieldShapeGroup *create_force_field_shape_group(PhysxForceFieldShapeGroupDesc &desc);
135 PhysxForceFieldShapeGroup *get_force_field_shape_group(unsigned int idx) const;
136 MAKE_SEQ(get_force_field_shape_groups, get_num_force_field_shape_groups, get_force_field_shape_group);
137
138 // Cloths
139 unsigned int get_num_cloths() const;
140 PhysxCloth *create_cloth(PhysxClothDesc &desc);
141 PhysxCloth *get_cloth(unsigned int idx) const;
142 MAKE_SEQ(get_cloths, get_num_cloths, get_cloth);
143
144 // Soft bodies
145 unsigned int get_num_soft_bodies() const;
146 PhysxSoftBody *create_soft_body(PhysxSoftBodyDesc &desc);
147 PhysxSoftBody *get_soft_body(unsigned int idx) const;
148 MAKE_SEQ(get_soft_bodies, get_num_soft_bodies, get_soft_body);
149
150 // Vehicles
151 unsigned int get_num_vehicles() const;
152 PhysxVehicle *create_vehicle(PhysxVehicleDesc &desc);
153 PhysxVehicle *get_vehicle(unsigned int idx) const;
154 MAKE_SEQ(get_vehicles, get_num_vehicles, get_vehicle);
155
156 // Raycast queries
157 bool raycast_any_shape(const PhysxRay &ray,
158 PhysxShapesType shapesType=ST_all,
159 PhysxMask mask=PhysxMask::all_on(),
160 PhysxGroupsMask *groups=nullptr) const;
161
162 PhysxRaycastHit raycast_closest_shape(const PhysxRay &ray,
163 PhysxShapesType shapesType=ST_all,
164 PhysxMask mask=PhysxMask::all_on(),
165 PhysxGroupsMask *groups=nullptr, bool smoothNormal=true) const;
166
167 PhysxRaycastReport raycast_all_shapes(const PhysxRay &ray,
168 PhysxShapesType shapesType=ST_all,
169 PhysxMask mask=PhysxMask::all_on(),
170 PhysxGroupsMask *groups=nullptr, bool smoothNormal=true) const;
171
172 bool raycast_any_bounds(const PhysxRay &ray,
173 PhysxShapesType shapesType=ST_all,
174 PhysxMask mask=PhysxMask::all_on(),
175 PhysxGroupsMask *groups=nullptr) const;
176
177 PhysxRaycastHit raycast_closest_bounds(const PhysxRay &ray,
178 PhysxShapesType shapesType=ST_all,
179 PhysxMask mask=PhysxMask::all_on(),
180 PhysxGroupsMask *groups=nullptr, bool smoothNormal=true) const;
181
182 PhysxRaycastReport raycast_all_bounds(const PhysxRay &ray,
183 PhysxShapesType shapesType=ST_all,
184 PhysxMask mask=PhysxMask::all_on(),
185 PhysxGroupsMask *groups=nullptr, bool smoothNormal=true) const;
186
187 // Overlap queries
188 PhysxOverlapReport overlap_sphere_shapes(const LPoint3f &center, float radius,
189 PhysxShapesType shapesType=ST_all,
190 PhysxMask mask=PhysxMask::all_on(), bool accurateCollision=true) const;
191
192 PhysxOverlapReport overlap_capsule_shapes(const LPoint3f &p0, const LPoint3f &p1, float radius,
193 PhysxShapesType shapesType=ST_all,
194 PhysxMask mask=PhysxMask::all_on(), bool accurateCollision=true) const;
195
196 // Filters
197 void set_actor_pair_flag(PhysxActor &actorA, PhysxActor &actorB, PhysxContactPairFlag flag, bool value);
198 void set_shape_pair_flag(PhysxShape &shapeA, PhysxShape &shapeB, bool value);
199 void set_actor_group_pair_flag(unsigned int g1, unsigned int g2, PhysxContactPairFlag flag, bool value);
200 void set_group_collision_flag(unsigned int g1, unsigned int g2, bool enable);
201 void set_filter_ops(PhysxFilterOp op0, PhysxFilterOp op1, PhysxFilterOp op2);
202 void set_filter_bool(bool flag);
203 void set_filter_constant0(const PhysxGroupsMask &mask);
204 void set_filter_constant1(const PhysxGroupsMask &mask);
205 void set_dominance_group_pair(unsigned int g1, unsigned int g2, PhysxConstraintDominance dominance);
206
207 bool get_actor_pair_flag(PhysxActor &actorA, PhysxActor &actorB, PhysxContactPairFlag flag);
208 bool get_shape_pair_flag(PhysxShape &shapeA, PhysxShape &shapeB);
209 bool get_actor_group_pair_flag(unsigned int g1, unsigned int g2, PhysxContactPairFlag flag);
210 bool get_group_collision_flag(unsigned int g1, unsigned int g2);
211 bool get_filter_bool() const;
212 PhysxGroupsMask get_filter_constant0() const;
213 PhysxGroupsMask get_filter_constant1() const;
214 PhysxFilterOp get_filter_op0() const;
215 PhysxFilterOp get_filter_op1() const;
216 PhysxFilterOp get_filter_op2() const;
217 PhysxConstraintDominance get_dominance_group_pair(unsigned int g1, unsigned int g2);
218
219PUBLISHED:
220 void release();
221
222 INLINE void ls() const;
223 INLINE void ls(std::ostream &out, int indent_level=0) const;
224
225 public:
226 INLINE NxScene *ptr() const { return _ptr; };
227 INLINE NxControllerManager *cm() const { return _cm; };
228
229 void link(NxScene *ptr);
230 void unlink();
231
232 PhysxObjectCollection<PhysxMaterial> _materials;
233 PhysxObjectCollection<PhysxActor> _actors;
234 PhysxObjectCollection<PhysxJoint> _joints;
235 PhysxObjectCollection<PhysxForceField> _forcefields;
236 PhysxObjectCollection<PhysxForceFieldShapeGroup> _ffgroups;
237 PhysxObjectCollection<PhysxController> _controllers;
238 PhysxObjectCollection<PhysxVehicle> _vehicles;
239 PhysxObjectCollection<PhysxCloth> _cloths;
240 PhysxObjectCollection<PhysxSoftBody> _softbodies;
241
242 PhysxMaterial *get_wheel_shape_material();
243
244 private:
245 NxScene *_ptr;
246 NxControllerManager *_cm;
247 PT(PhysxDebugGeomNode) _debugNode;
248 PT(PhysxMaterial) _wheelShapeMaterial;
249
250 PhysxContactReport _contact_report;
251 PhysxControllerReport _controller_report;
252 PhysxTriggerReport _trigger_report;
253
254 static PStatCollector _pcollector_fetch_results;
255 static PStatCollector _pcollector_update_transforms;
256 static PStatCollector _pcollector_debug_renderer;
257 static PStatCollector _pcollector_simulate;
258 static PStatCollector _pcollector_cloth;
259 static PStatCollector _pcollector_softbody;
260
261 public:
262 static TypeHandle get_class_type() {
263 return _type_handle;
264 }
265 static void init_type() {
266 PhysxObject::init_type();
267 register_type(_type_handle, "PhysxScene",
268 PhysxObject::get_class_type());
269 }
270 virtual TypeHandle get_type() const {
271 return get_class_type();
272 }
273 virtual TypeHandle force_init_type() {
274 init_type();
275 return get_class_type();
276 }
277
278 private:
279 static TypeHandle _type_handle;
280};
281
282#include "physxScene.I"
283
284#endif // PHYSXSCENE_H
callbackObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CallbackObject
This is a generic object that can be assigned to a callback at various points in the rendering proces...
Definition callbackObject.h:28
PhysxActorDesc
Descriptor for PhysxActor.
Definition physxActorDesc.h:28
PhysxActor
Actors are the main simulation objects.
Definition physxActor.h:44
PhysxClothDesc
Descriptor for PhysxCloth.
Definition physxClothDesc.h:28
PhysxCloth
Definition physxCloth.h:32
PhysxConstraintDominance
Expresses the dominance relationship of a constraint.
Definition physxConstraintDominance.h:32
PhysxControllerDesc
Descriptor class for a character controller.
Definition physxControllerDesc.h:25
PhysxController
Abstract base class for character controllers.
Definition physxController.h:30
PhysxDebugGeomNode
Renderable geometry which represents visualizations of physics objects.
Definition physxDebugGeomNode.h:34
PhysxEnums
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition physxEnums.h:355
PhysxForceFieldDesc
Descriptor class for force fields.
Definition physxForceFieldDesc.h:30
PhysxForceFieldShapeGroupDesc
Definition physxForceFieldShapeGroupDesc.h:27
PhysxForceFieldShapeGroup
Definition physxForceFieldShapeGroup.h:33
PhysxForceField
A force field effector.
Definition physxForceField.h:33
PhysxGroupsMask
128-bit bitmask class.
Definition physxGroupsMask.h:24
PhysxJointDesc
Abstract base class for joint descriptors.
Definition physxJointDesc.h:28
PhysxJoint
Abstract base class for the different types of joints.
Definition physxJoint.h:32
PhysxMask
32-bit bitmask class.
Definition physxMask.h:24
PhysxMask::all_on
static PhysxMask all_on()
Returns a PhysxMask whose bits are all on.
Definition physxMask.cxx:20
PhysxMaterialDesc
Descriptor class for materials.
Definition physxMaterialDesc.h:25
PhysxMaterial
A class for describing a shape's surface properties.
Definition physxMaterial.h:44
PhysxOverlapReport
Objects of this class are returned by the 'overlap shape' methods, for example overlapSphereShapes.
Definition physxOverlapReport.h:33
PhysxRay
Represents an ray as an origin and direction.
Definition physxRay.h:26
PhysxRaycastHit
This structure captures results for a single raycast query.
Definition physxRaycastHit.h:28
PhysxRaycastReport
Objects of this class are returned by the 'raycast all' methods.
Definition physxRaycastReport.h:28
PhysxSceneStats2
Definition physxSceneStats2.h:24
PhysxScene::get_vehicle
get_vehicle
Returns the n-th vehicle from the array of all the vehicles in the scene.
Definition physxScene.h:154
PhysxScene::get_hightest_material_index
unsigned int get_hightest_material_index() const
Returns current highest valid material index.
Definition physxScene.cxx:556
PhysxScene::create_soft_body
PhysxSoftBody * create_soft_body(PhysxSoftBodyDesc &desc)
Creates a soft body in this scene.
Definition physxScene.cxx:861
PhysxScene::set_group_collision_flag
void set_group_collision_flag(unsigned int g1, unsigned int g2, bool enable)
Specifies if collision should be performed by a pair of shape groups.
Definition physxScene.cxx:1422
PhysxScene::get_num_force_fields
get_num_force_fields
Gets the number of force fields in the scene.
Definition physxScene.h:130
PhysxScene::set_timing_fixed
void set_timing_fixed(float maxTimestep=1.0f/60.0f, unsigned int maxIter=8)
Sets simulation timing parameters used in simulate.
Definition physxScene.cxx:309
PhysxScene::get_num_controllers
get_num_controllers
Return the number of controllers in the scene.
Definition physxScene.h:124
PhysxScene::get_soft_body
get_soft_body
Returns the n-th soft body from the array of all the soft bodies in the scene.
Definition physxScene.h:148
PhysxScene::create_force_field
PhysxForceField * create_force_field(PhysxForceFieldDesc &desc)
Creates a force field in this scene.
Definition physxScene.cxx:719
PhysxScene::set_filter_constant0
void set_filter_constant0(const PhysxGroupsMask &mask)
Setups filtering's K0 value.
Definition physxScene.cxx:1300
PhysxScene::is_hardware_scene
bool is_hardware_scene() const
Returns TRUE if the the scene is simulated in hardware.
Definition physxScene.cxx:1460
PhysxScene::get_cloth
get_cloth
Returns the n-th cloth from the array of all the cloths in the scene.
Definition physxScene.h:142
PhysxScene::get_filter_constant1
PhysxGroupsMask get_filter_constant1() const
Gets filtering constant K1.
Definition physxScene.cxx:1346
PhysxScene::set_filter_constant1
void set_filter_constant1(const PhysxGroupsMask &mask)
Setups filtering's K1 value.
Definition physxScene.cxx:1310
PhysxScene::overlap_sphere_shapes
PhysxOverlapReport overlap_sphere_shapes(const LPoint3f &center, float radius, PhysxShapesType shapesType=ST_all, PhysxMask mask=PhysxMask::all_on(), bool accurateCollision=true) const
Returns the set of shapes overlapped by the world-space sphere.
Definition physxScene.cxx:1102
PhysxScene::simulate
void simulate(float dt)
Advances the simulation by an elapsedTime time.
Definition physxScene.cxx:189
PhysxScene::get_actor_group_pair_flag
bool get_actor_group_pair_flag(unsigned int g1, unsigned int g2, PhysxContactPairFlag flag)
Retrieves a single flag set with PhysxScene::set_actor_group_pair_flag()
Definition physxScene.cxx:1268
PhysxScene::set_shape_pair_flag
void set_shape_pair_flag(PhysxShape &shapeA, PhysxShape &shapeB, bool value)
Disables or enables contact generation for a pair of shapes.
Definition physxScene.cxx:1195
PhysxScene::set_actor_pair_flag
void set_actor_pair_flag(PhysxActor &actorA, PhysxActor &actorB, PhysxContactPairFlag flag, bool value)
Sets the pair flags for the given pair of actors.
Definition physxScene.cxx:1152
PhysxScene::get_actor_pair_flag
bool get_actor_pair_flag(PhysxActor &actorA, PhysxActor &actorB, PhysxContactPairFlag flag)
Retrieves a single flag for the given pair of actors.
Definition physxScene.cxx:1177
PhysxScene::get_num_materials
get_num_materials
Return the number of materials in the scene.
Definition physxScene.h:118
PhysxScene::get_group_collision_flag
bool get_group_collision_flag(unsigned int g1, unsigned int g2)
Determines if collision detection is performed between a pair of groups.
Definition physxScene.cxx:1436
PhysxScene::set_dominance_group_pair
void set_dominance_group_pair(unsigned int g1, unsigned int g2, PhysxConstraintDominance dominance)
Specifies the dominance behavior of constraints between two actors with two certain dominance groups.
Definition physxScene.cxx:1506
PhysxScene::fetch_results
void fetch_results()
Waits until the simulation has finished, and then updates the scene graph with with simulation result...
Definition physxScene.cxx:226
PhysxScene::create_force_field_shape_group
PhysxForceFieldShapeGroup * create_force_field_shape_group(PhysxForceFieldShapeGroupDesc &desc)
Creates a new force field shape group in this scene.
Definition physxScene.cxx:769
PhysxScene::get_filter_op1
PhysxFilterOp get_filter_op1() const
Retrieves the op1 filtering operation.
Definition physxScene.cxx:1379
PhysxScene::get_dominance_group_pair
PhysxConstraintDominance get_dominance_group_pair(unsigned int g1, unsigned int g2)
Samples the dominance matrix.
Definition physxScene.cxx:1520
PhysxScene::raycast_closest_shape
PhysxRaycastHit raycast_closest_shape(const PhysxRay &ray, PhysxShapesType shapesType=ST_all, PhysxMask mask=PhysxMask::all_on(), PhysxGroupsMask *groups=nullptr, bool smoothNormal=true) const
Returns the first shape that is hit along the ray.
Definition physxScene.cxx:963
PhysxScene::set_timing_variable
void set_timing_variable()
Sets simulation timing parameters used in simulate.
Definition physxScene.cxx:290
PhysxScene::get_filter_op2
PhysxFilterOp get_filter_op2() const
Retrieves the op2 filtering operation.
Definition physxScene.cxx:1396
PhysxScene::get_material_from_index
PhysxMaterial * get_material_from_index(unsigned int idx) const
Retrieves the material with the given material index.
Definition physxScene.cxx:571
PhysxScene::get_material
get_material
Retrieves the n-th material from the array of materials.
Definition physxScene.h:118
PhysxScene::raycast_all_shapes
PhysxRaycastReport raycast_all_shapes(const PhysxRay &ray, PhysxShapesType shapesType=ST_all, PhysxMask mask=PhysxMask::all_on(), PhysxGroupsMask *groups=nullptr, bool smoothNormal=true) const
Returns a PhysxRaycastReport object which can be used to iterate over all shapes that have been hit b...
Definition physxScene.cxx:994
PhysxScene::raycast_any_bounds
bool raycast_any_bounds(const PhysxRay &ray, PhysxShapesType shapesType=ST_all, PhysxMask mask=PhysxMask::all_on(), PhysxGroupsMask *groups=nullptr) const
Returns true if any axis aligned bounding box enclosing a shape is intersected by the ray.
Definition physxScene.cxx:1024
PhysxScene::get_force_field
get_force_field
Returns the n-th force field from the array of all the force fields in the scene.
Definition physxScene.h:130
PhysxScene::set_filter_ops
void set_filter_ops(PhysxFilterOp op0, PhysxFilterOp op1, PhysxFilterOp op2)
Setups filtering operations.
Definition physxScene.cxx:1280
PhysxScene::get_controller
get_controller
Retrieves the n-th controller within the scene.
Definition physxScene.h:124
PhysxScene::get_filter_op0
PhysxFilterOp get_filter_op0() const
Retrieves the op0 filtering operation.
Definition physxScene.cxx:1362
PhysxScene::get_filter_constant0
PhysxGroupsMask get_filter_constant0() const
Gets filtering constant K0.
Definition physxScene.cxx:1330
PhysxScene::create_joint
PhysxJoint * create_joint(PhysxJointDesc &desc)
Creates a joint in this scene.
Definition physxScene.cxx:669
PhysxScene::create_cloth
PhysxCloth * create_cloth(PhysxClothDesc &desc)
Creates a cloth in this scene.
Definition physxScene.cxx:817
PhysxScene::create_vehicle
PhysxVehicle * create_vehicle(PhysxVehicleDesc &desc)
Creates a vehicle in this scene.
Definition physxScene.cxx:906
PhysxScene::create_material
PhysxMaterial * create_material(PhysxMaterialDesc &desc)
Creates a new PhysxMaterial.
Definition physxScene.cxx:511
PhysxScene::get_num_cloths
get_num_cloths
Gets the number of cloths in the scene.
Definition physxScene.h:142
PhysxScene::get_gravity
LVector3f get_gravity() const
Retrieves the current gravity setting.
Definition physxScene.cxx:331
PhysxScene::raycast_all_bounds
PhysxRaycastReport raycast_all_bounds(const PhysxRay &ray, PhysxShapesType shapesType=ST_all, PhysxMask mask=PhysxMask::all_on(), PhysxGroupsMask *groups=nullptr, bool smoothNormal=true) const
Returns a PhysxRaycastReport object which can be used to iterate over all shapes that have been enclo...
Definition physxScene.cxx:1072
PhysxScene::get_flag
bool get_flag(PhysxSceneFlag flag) const
Return the specified scene flag flag.
Definition physxScene.cxx:1449
PhysxScene::set_filter_bool
void set_filter_bool(bool flag)
Setups filtering's boolean value.
Definition physxScene.cxx:1290
PhysxScene::raycast_any_shape
bool raycast_any_shape(const PhysxRay &ray, PhysxShapesType shapesType=ST_all, PhysxMask mask=PhysxMask::all_on(), PhysxGroupsMask *groups=nullptr) const
Returns true if any shape is intersected by the ray.
Definition physxScene.cxx:945
PhysxScene::get_filter_bool
bool get_filter_bool() const
Retrieves filtering's boolean value.
Definition physxScene.cxx:1320
PhysxScene::set_actor_group_pair_flag
void set_actor_group_pair_flag(unsigned int g1, unsigned int g2, PhysxContactPairFlag flag, bool value)
With this method one can set contact reporting flags between actors belonging to a pair of groups.
Definition physxScene.cxx:1249
PhysxScene::get_joint
get_joint
Retrieve the n-th joint from the array of all the joints in the scene.
Definition physxScene.h:109
PhysxScene::get_num_soft_bodies
get_num_soft_bodies
Gets the number of soft bodies in the scene.
Definition physxScene.h:148
PhysxScene::create_controller
PhysxController * create_controller(PhysxControllerDesc &controllerDesc)
Creates a new character controller.
Definition physxScene.cxx:619
PhysxScene::get_num_vehicles
get_num_vehicles
Returns the number of vehicles in the scene.
Definition physxScene.h:154
PhysxScene::raycast_closest_bounds
PhysxRaycastHit raycast_closest_bounds(const PhysxRay &ray, PhysxShapesType shapesType=ST_all, PhysxMask mask=PhysxMask::all_on(), PhysxGroupsMask *groups=nullptr, bool smoothNormal=true) const
Returns the first axis aligned bounding box enclosing a shape that is hit along the ray.
Definition physxScene.cxx:1043
PhysxScene::overlap_capsule_shapes
PhysxOverlapReport overlap_capsule_shapes(const LPoint3f &p0, const LPoint3f &p1, float radius, PhysxShapesType shapesType=ST_all, PhysxMask mask=PhysxMask::all_on(), bool accurateCollision=true) const
Returns the set of shapes overlapped by the world-space capsule.
Definition physxScene.cxx:1123
PhysxScene::get_debug_geom_node
PhysxDebugGeomNode * get_debug_geom_node()
Retrieves the debug geom node for this scene.
Definition physxScene.cxx:396
PhysxScene::get_num_joints
get_num_joints
Returns the number of joints in the scene (excluding "dead" joints).
Definition physxScene.h:109
PhysxScene::get_force_field_shape_group
get_force_field_shape_group
Returns the n-th force field shape group in this scene.
Definition physxScene.h:136
PhysxScene::get_shape_pair_flag
bool get_shape_pair_flag(PhysxShape &shapeA, PhysxShape &shapeB)
Returns /true/ if contact generation between a pair of shapes is enabled, and /false/ if contact gene...
Definition physxScene.cxx:1220
PhysxScene::set_gravity
void set_gravity(const LVector3f &gravity)
Sets a constant gravity for the entire scene.
Definition physxScene.cxx:319
PhysxScene::get_num_force_field_shape_groups
get_num_force_field_shape_groups
Gets the number of force field shape groups in the scene.
Definition physxScene.h:136
PhysxShape
Abstract base class for shapes.
Definition physxShape.h:39
PhysxSoftBodyDesc
Descriptor for PhysxSoftBody.
Definition physxSoftBodyDesc.h:28
PhysxSoftBody
Definition physxSoftBody.h:32
PhysxVehicleDesc
Definition physxVehicleDesc.h:24
PhysxVehicle
Definition physxVehicle.h:31
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxContactReport.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxControllerReport.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxEnums.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxGroupsMask.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxMask.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxObjectCollection.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxOverlapReport.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxScene.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxTriggerReport.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physx_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition register_type.I:22