75 void simulate(
float dt);
77 void set_timing_variable();
78 void set_timing_fixed(
float maxTimestep=1.0f/60.0f,
unsigned int maxIter=8);
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;
89 INLINE
void set_controller_shape_hit_callback(PT(
CallbackObject) cbobj);
90 INLINE
void set_controller_controller_hit_callback(PT(
CallbackObject) cbobj);
92 void set_gravity(
const LVector3f &gravity);
94 LVector3f get_gravity()
const;
96 bool get_flag(PhysxSceneFlag flag)
const;
97 bool is_hardware_scene()
const;
100 unsigned int get_num_actors()
const;
102 PhysxActor *get_actor(
unsigned int idx)
const;
103 MAKE_SEQ(get_actors, get_num_actors, get_actor);
106 unsigned int get_num_joints()
const;
108 PhysxJoint *get_joint(
unsigned int idx)
const;
109 MAKE_SEQ(get_joints, get_num_joints, get_joint);
112 unsigned int get_num_materials()
const;
113 unsigned int get_hightest_material_index()
const;
117 PhysxMaterial *get_material_from_index(
unsigned int idx)
const;
118 MAKE_SEQ(get_materials, get_num_materials, get_material);
121 unsigned int get_num_controllers()
const;
124 MAKE_SEQ(get_controllers, get_num_controllers, get_controller);
127 unsigned int get_num_force_fields()
const;
130 MAKE_SEQ(get_force_fields, get_num_force_fields, get_force_field);
133 unsigned int get_num_force_field_shape_groups()
const;
136 MAKE_SEQ(get_force_field_shape_groups, get_num_force_field_shape_groups, get_force_field_shape_group);
139 unsigned int get_num_cloths()
const;
141 PhysxCloth *get_cloth(
unsigned int idx)
const;
142 MAKE_SEQ(get_cloths, get_num_cloths, get_cloth);
145 unsigned int get_num_soft_bodies()
const;
148 MAKE_SEQ(get_soft_bodies, get_num_soft_bodies, get_soft_body);
151 unsigned int get_num_vehicles()
const;
154 MAKE_SEQ(get_vehicles, get_num_vehicles, get_vehicle);
157 bool raycast_any_shape(
const PhysxRay &ray,
158 PhysxShapesType shapesType=ST_all,
163 PhysxShapesType shapesType=ST_all,
168 PhysxShapesType shapesType=ST_all,
172 bool raycast_any_bounds(
const PhysxRay &ray,
173 PhysxShapesType shapesType=ST_all,
178 PhysxShapesType shapesType=ST_all,
183 PhysxShapesType shapesType=ST_all,
189 PhysxShapesType shapesType=ST_all,
192 PhysxOverlapReport overlap_capsule_shapes(
const LPoint3f &p0,
const LPoint3f &p1,
float radius,
193 PhysxShapesType shapesType=ST_all,
197 void set_actor_pair_flag(
PhysxActor &actorA,
PhysxActor &actorB, PhysxContactPairFlag flag,
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);
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;
214 PhysxFilterOp get_filter_op0()
const;
215 PhysxFilterOp get_filter_op1()
const;
216 PhysxFilterOp get_filter_op2()
const;
222 INLINE
void ls()
const;
223 INLINE
void ls(std::ostream &out,
int indent_level=0)
const;
226 INLINE NxScene *ptr()
const {
return _ptr; };
227 INLINE NxControllerManager *cm()
const {
return _cm; };
229 void link(NxScene *ptr);
246 NxControllerManager *_cm;
265 static void init_type() {
266 PhysxObject::init_type();
268 PhysxObject::get_class_type());
271 return get_class_type();
275 return get_class_type();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a generic object that can be assigned to a callback at various points in the rendering proces...
A lightweight class that represents a single element that may be timed and/or counted via stats.
Descriptor for PhysxActor.
Actors are the main simulation objects.
Descriptor for PhysxCloth.
Expresses the dominance relationship of a constraint.
Descriptor class for a character controller.
Implementation of the NxUserControllerHitReport interface.
Abstract base class for character controllers.
Renderable geometry which represents visualizations of physics objects.
This class exists just to provide scoping for the enums shared by PhysX classes.
Descriptor class for force fields.
Abstract base class for joint descriptors.
Abstract base class for the different types of joints.
static PhysxMask all_on()
Returns a PhysxMask whose bits are all on.
Descriptor class for materials.
A class for describing a shape's surface properties.
Objects of this class are returned by the 'overlap shape' methods, for example overlapSphereShapes.
Represents an ray as an origin and direction.
This structure captures results for a single raycast query.
Objects of this class are returned by the 'raycast all' methods.
A scene is a collection of bodies, constraints, and effectors which can interact.
Abstract base class for shapes.
Descriptor for PhysxSoftBody.
Implementation of the NxUserTriggerReport interface.
TypeHandle is the identifier used to differentiate C++ class types.
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(),...