A scene is a collection of bodies, constraints, and effectors which can interact. More...
#include "physxScene.h"
Public Member Functions | |
NxControllerManager * | cm () const |
PhysxActor * | create_actor (PhysxActorDesc &desc) |
PhysxCloth * | create_cloth (PhysxClothDesc &desc) |
Creates a cloth in this scene. More... | |
PhysxController * | create_controller (PhysxControllerDesc &controllerDesc) |
Creates a new character controller. More... | |
PhysxForceField * | create_force_field (PhysxForceFieldDesc &desc) |
Creates a force field in this scene. More... | |
PhysxForceFieldShapeGroup * | create_force_field_shape_group (PhysxForceFieldShapeGroupDesc &desc) |
Creates a new force field shape group in this scene. More... | |
PhysxJoint * | create_joint (PhysxJointDesc &desc) |
Creates a joint in this scene. More... | |
PhysxMaterial * | create_material (PhysxMaterialDesc &desc) |
Creates a new PhysxMaterial. More... | |
PhysxMaterial * | create_material () |
Creates a new PhysxMaterial using the default settings of PhysxMaterialDesc. More... | |
PhysxSoftBody * | create_soft_body (PhysxSoftBodyDesc &desc) |
Creates a soft body in this scene. More... | |
PhysxVehicle * | create_vehicle (PhysxVehicleDesc &desc) |
Creates a vehicle in this scene. More... | |
void | enable_contact_reporting (bool enabled) |
void | enable_controller_reporting (bool enabled) |
void | enable_trigger_reporting (bool enabled) |
void | fetch_results () |
Waits until the simulation has finished, and then updates the scene graph with with simulation results. More... | |
virtual TypeHandle | force_init_type () |
PhysxActor * | get_actor (unsigned int idx) const |
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() More... | |
bool | get_actor_pair_flag (PhysxActor &actorA, PhysxActor &actorB, PhysxContactPairFlag flag) |
Retrieves a single flag for the given pair of actors. More... | |
PhysxCloth * | get_cloth (unsigned int idx) const |
PhysxController * | get_controller (unsigned int idx) const |
PhysxDebugGeomNode * | get_debug_geom_node () |
Retrieves the debug geom node for this scene. More... | |
PhysxConstraintDominance | get_dominance_group_pair (unsigned int g1, unsigned int g2) |
Samples the dominance matrix. More... | |
bool | get_filter_bool () const |
Retrieves filtering's boolean value. More... | |
PhysxGroupsMask | get_filter_constant0 () const |
Gets filtering constant K0. More... | |
PhysxGroupsMask | get_filter_constant1 () const |
Gets filtering constant K1. More... | |
PhysxFilterOp | get_filter_op0 () const |
Retrieves the op0 filtering operation. More... | |
PhysxFilterOp | get_filter_op1 () const |
Retrieves the op1 filtering operation. More... | |
PhysxFilterOp | get_filter_op2 () const |
Retrieves the op2 filtering operation. More... | |
bool | get_flag (PhysxSceneFlag flag) const |
Return the specified scene flag flag. More... | |
PhysxForceField * | get_force_field (unsigned int idx) const |
PhysxForceFieldShapeGroup * | get_force_field_shape_group (unsigned int idx) const |
LVector3f | get_gravity () const |
Retrieves the current gravity setting. More... | |
bool | get_group_collision_flag (unsigned int g1, unsigned int g2) |
Determines if collision detection is performed between a pair of groups. More... | |
unsigned int | get_hightest_material_index () const |
Returns current highest valid material index. More... | |
PhysxJoint * | get_joint (unsigned int idx) const |
PhysxMaterial * | get_material (unsigned int idx) const |
PhysxMaterial * | get_material_from_index (unsigned int idx) const |
Retrieves the material with the given material index. More... | |
unsigned int | get_num_actors () const |
unsigned int | get_num_cloths () const |
unsigned int | get_num_controllers () const |
unsigned int | get_num_force_field_shape_groups () const |
unsigned int | get_num_force_fields () const |
unsigned int | get_num_joints () const |
unsigned int | get_num_materials () const |
unsigned int | get_num_soft_bodies () const |
unsigned int | get_num_vehicles () const |
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 generation is disables. More... | |
PhysxSoftBody * | get_soft_body (unsigned int idx) const |
PhysxSceneStats2 | get_stats2 () const |
virtual TypeHandle | get_type () const |
PhysxVehicle * | get_vehicle (unsigned int idx) const |
PhysxMaterial * | get_wheel_shape_material () |
Gets the shared material for all wheel shapes. More... | |
bool | is_contact_reporting_enabled () const |
bool | is_controller_reporting_enabled () const |
bool | is_hardware_scene () const |
Returns TRUE if the the scene is simulated in hardware. More... | |
bool | is_trigger_reporting_enabled () const |
void | link (NxScene *ptr) |
void | ls () const |
void | ls (std::ostream &out, int indent_level=0) const |
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. More... | |
PhysxOverlapReport | overlap_sphere_shapes (const LPoint3f ¢er, 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. More... | |
NxScene * | ptr () const |
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 enclosed by axis aligned bounding boxes hit by the ray. More... | |
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 by the ray. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | release () |
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. More... | |
void | set_actor_pair_flag (PhysxActor &actorA, PhysxActor &actorB, PhysxContactPairFlag flag, bool value) |
Sets the pair flags for the given pair of actors. More... | |
void | set_controller_controller_hit_callback (PT(CallbackObject) cbobj) |
void | set_controller_shape_hit_callback (PT(CallbackObject) cbobj) |
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. More... | |
void | set_filter_bool (bool flag) |
Setups filtering's boolean value. More... | |
void | set_filter_constant0 (const PhysxGroupsMask &mask) |
Setups filtering's K0 value. More... | |
void | set_filter_constant1 (const PhysxGroupsMask &mask) |
Setups filtering's K1 value. More... | |
void | set_filter_ops (PhysxFilterOp op0, PhysxFilterOp op1, PhysxFilterOp op2) |
Setups filtering operations. More... | |
void | set_gravity (const LVector3f &gravity) |
Sets a constant gravity for the entire scene. More... | |
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. More... | |
void | set_shape_pair_flag (PhysxShape &shapeA, PhysxShape &shapeB, bool value) |
Disables or enables contact generation for a pair of shapes. More... | |
void | set_timing_fixed (float maxTimestep=1.0f/60.0f, unsigned int maxIter=8) |
Sets simulation timing parameters used in simulate. More... | |
void | set_timing_variable () |
Sets simulation timing parameters used in simulate. More... | |
void | simulate (float dt) |
Advances the simulation by an elapsedTime time. More... | |
void | unlink () |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. More... | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. More... | |
TypedObject & | operator= (const TypedObject ©)=default |
![]() | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. More... | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
PhysxObjectCollection< PhysxActor > | _actors |
PhysxObjectCollection< PhysxCloth > | _cloths |
PhysxObjectCollection< PhysxController > | _controllers |
PhysxObjectCollection< PhysxForceFieldShapeGroup > | _ffgroups |
PhysxObjectCollection< PhysxForceField > | _forcefields |
PhysxObjectCollection< PhysxJoint > | _joints |
PhysxObjectCollection< PhysxMaterial > | _materials |
PhysxObjectCollection< PhysxSoftBody > | _softbodies |
PhysxObjectCollection< PhysxVehicle > | _vehicles |
get_actor | |
get_cloth | |
Returns the n-th cloth from the array of all the cloths in the scene. More... | |
get_controller | |
Retrieves the n-th controller within the scene. More... | |
get_force_field | |
Returns the n-th force field from the array of all the force fields in the scene. More... | |
get_force_field_shape_group | |
Returns the n-th force field shape group in this scene. More... | |
get_joint | |
Retrieve the n-th joint from the array of all the joints in the scene. More... | |
get_material | |
Retrieves the n-th material from the array of materials. More... | |
get_num_actors | |
get_num_cloths | |
Gets the number of cloths in the scene. More... | |
get_num_controllers | |
Return the number of controllers in the scene. More... | |
get_num_force_field_shape_groups | |
Gets the number of force field shape groups in the scene. More... | |
get_num_force_fields | |
Gets the number of force fields in the scene. More... | |
get_num_joints | |
Returns the number of joints in the scene (excluding "dead" joints). More... | |
get_num_materials | |
Return the number of materials in the scene. More... | |
get_num_soft_bodies | |
Gets the number of soft bodies in the scene. More... | |
get_num_vehicles | |
Returns the number of vehicles in the scene. More... | |
get_soft_body | |
Returns the n-th soft body from the array of all the soft bodies in the scene. More... | |
get_vehicle | |
Returns the n-th vehicle from the array of all the vehicles in the scene. More... | |
![]() | |
get_type | |
![]() | |
get_ref_count | |
Returns the current reference count. More... | |
Additional Inherited Members | |
![]() | |
enum | PhysxActorFlag { AF_disable_collision = NX_AF_DISABLE_COLLISION, AF_disable_response = NX_AF_DISABLE_RESPONSE, AF_lock_com = NX_AF_LOCK_COM, AF_fluid_disable_collision = NX_AF_FLUID_DISABLE_COLLISION, AF_contact_modification = NX_AF_CONTACT_MODIFICATION, AF_force_cone_friction = NX_AF_FORCE_CONE_FRICTION, AF_user_actor_pair_filtering = NX_AF_USER_ACTOR_PAIR_FILTERING } |
enum | PhysxBodyFlag { BF_disable_gravity = NX_BF_DISABLE_GRAVITY, Bf_frozen_pos_x = NX_BF_FROZEN_POS_X, BF_frozen_pos_y = NX_BF_FROZEN_POS_Y, BF_frozen_pos_z = NX_BF_FROZEN_POS_Z, BF_frozen_rot_x = NX_BF_FROZEN_ROT_X, BF_frozen_rot_y = NX_BF_FROZEN_ROT_Y, BF_frozen_rot_z = NX_BF_FROZEN_ROT_Z, BF_frozen_pos = NX_BF_FROZEN_POS, BF_frozen_rot = NX_BF_FROZEN_ROT, BF_frozen = NX_BF_FROZEN, BF_kinematic = NX_BF_KINEMATIC, BF_visualization = NX_BF_VISUALIZATION, BF_filter_sleep_vel = NX_BF_FILTER_SLEEP_VEL, BF_energy_sleep_test = NX_BF_ENERGY_SLEEP_TEST } |
enum | PhysxBroadPhaseType { BPT_sap_single = NX_BP_TYPE_SAP_SINGLE, BPT_sap_multi = NX_BP_TYPE_SAP_MULTI } |
enum | PhysxClothFlag { CLF_pressure = NX_CLF_PRESSURE, CLF_static = NX_CLF_STATIC, CLF_disable_collision = NX_CLF_DISABLE_COLLISION, CLF_selfcollision = NX_CLF_SELFCOLLISION, CLF_visualization = NX_CLF_VISUALIZATION, CLF_gravity = NX_CLF_GRAVITY, CLF_bending = NX_CLF_BENDING, CLF_bending_ortho = NX_CLF_BENDING_ORTHO, CLF_damping = NX_CLF_DAMPING, CLF_collision_twoway = NX_CLF_COLLISION_TWOWAY, CLF_triangle_collision = NX_CLF_TRIANGLE_COLLISION, CLF_tearable = NX_CLF_TEARABLE, CLF_hardware = NX_CLF_HARDWARE, CLF_comdamping = NX_CLF_COMDAMPING, CLF_validbounds = NX_CLF_VALIDBOUNDS, CLF_fluid_collision = NX_CLF_FLUID_COLLISION, CLF_disable_dynamic_ccd = NX_CLF_DISABLE_DYNAMIC_CCD, CLF_adhere = NX_CLF_ADHERE } |
enum | PhysxCombineMode { CM_average = NX_CM_AVERAGE, CM_min = NX_CM_MIN, CM_multiply = NX_CM_MULTIPLY, CM_max = NX_CM_MAX } |
enum | PhysxContactPairFlag { CPF_ignore_pair = NX_IGNORE_PAIR, CPF_notify_on_start_touch = NX_NOTIFY_ON_START_TOUCH, CPF_notify_on_end_touch = NX_NOTIFY_ON_END_TOUCH, CPF_notify_on_touch = NX_NOTIFY_ON_TOUCH, CPF_notify_on_impact = NX_NOTIFY_ON_IMPACT, CPF_notify_on_roll = NX_NOTIFY_ON_ROLL, CPF_notify_on_slide = NX_NOTIFY_ON_SLIDE, CPF_notify_forces = NX_NOTIFY_FORCES, CPF_notify_on_start_touch_threshold = NX_NOTIFY_ON_START_TOUCH_FORCE_THRESHOLD, CPF_notify_on_end_touch_threshold = NX_NOTIFY_ON_END_TOUCH_FORCE_THRESHOLD, CPF_notify_on_touch_threshold = NX_NOTIFY_ON_TOUCH_FORCE_THRESHOLD, CPF_notify_contact_modifications = NX_NOTIFY_CONTACT_MODIFICATION } |
enum | PhysxD6JointDriveType { D6_joint_drive_position = NX_D6JOINT_DRIVE_POSITION, D6_joint_drive_velocity = NX_D6JOINT_DRIVE_VELOCITY } |
enum | PhysxD6JointFlag { D6_joint_slerp_drive = NX_D6JOINT_SLERP_DRIVE, D6_joint_gear_disabled = NX_D6JOINT_GEAR_ENABLED } |
enum | PhysxD6JointMotion { D6_joint_motion_locked = NX_D6JOINT_MOTION_LOCKED, D6_joint_motion_limited = NX_D6JOINT_MOTION_LIMITED, D6_joint_motion_free = NX_D6JOINT_MOTION_FREE } |
enum | PhysxDistanceJointFlag { DJF_max_distance_enabled = NX_DJF_MAX_DISTANCE_ENABLED, DJF_mix_distance_enabled = NX_DJF_MIN_DISTANCE_ENABLED, DJF_spring_enabled = NX_DJF_SPRING_ENABLED } |
enum | PhysxFilterOp { FO_and = NX_FILTEROP_AND, FO_or = NX_FILTEROP_OR, FO_xor = NX_FILTEROP_XOR, FO_nand = NX_FILTEROP_NAND, FO_nor = NX_FILTEROP_NOR, FO_nxor = NX_FILTEROP_NXOR, FO_swap_and = NX_FILTEROP_SWAP_AND } |
enum | PhysxForceFieldCoordinates { FFC_cartesian, FFC_spherical, FFC_cylindrical, FFC_toroidal } |
enum | PhysxForceFieldShapeGroupFlag { FFSG_exclude_group = NX_FFSG_EXCLUDE_GROUP } |
enum | PhysxForceMode { FM_force = NX_FORCE, FM_impulse = NX_IMPULSE, FM_velocity_change = NX_VELOCITY_CHANGE, FM_smooth_impulse = NX_SMOOTH_IMPULSE, FM_smooth_velocity_change = NX_SMOOTH_VELOCITY_CHANGE, FM_acceleration = NX_ACCELERATION } |
enum | PhysxJointFlag { JF_collision_enabled = NX_JF_COLLISION_ENABLED, JF_visualization = NX_JF_VISUALIZATION } |
enum | PhysxMaterialFlag { MF_anisotropic = NX_MF_ANISOTROPIC, MF_disable_friction = NX_MF_DISABLE_FRICTION, MF_disable_strong_friction = NX_MF_DISABLE_STRONG_FRICTION } |
enum | PhysxParameter { P_penalty_force = NX_PENALTY_FORCE, P_skin_width = NX_SKIN_WIDTH, P_default_sleep_lin_vel_squared = NX_DEFAULT_SLEEP_LIN_VEL_SQUARED, P_default_sleep_ang_vel_squared = NX_DEFAULT_SLEEP_ANG_VEL_SQUARED, P_bounce_threshold = NX_BOUNCE_THRESHOLD, P_dyn_frict_scaling = NX_DYN_FRICT_SCALING, P_sta_frict_scaling = NX_STA_FRICT_SCALING, P_max_angular_velocity = NX_MAX_ANGULAR_VELOCITY, P_continuous_cd = NX_CONTINUOUS_CD, P_visualization_scale = NX_VISUALIZATION_SCALE, P_adaptive_force = NX_ADAPTIVE_FORCE, P_coll_veta_jointed = NX_COLL_VETO_JOINTED, P_trigger_trigger_callback = NX_TRIGGER_TRIGGER_CALLBACK, P_select_hw_algo = NX_SELECT_HW_ALGO, P_ccd_epsilon = NX_CCD_EPSILON, P_solver_convergence_threshold = NX_SOLVER_CONVERGENCE_THRESHOLD, P_bbox_noise_level = NX_BBOX_NOISE_LEVEL, P_implicit_sweep_cache_size = NX_IMPLICIT_SWEEP_CACHE_SIZE, P_default_sleep_energy = NX_DEFAULT_SLEEP_ENERGY, P_constant_fluid_max_packets = NX_CONSTANT_FLUID_MAX_PACKETS, P_constant_fluid_max_particles_per_step = NX_CONSTANT_FLUID_MAX_PARTICLES_PER_STEP, P_asynchronous_mesh_creation = NX_ASYNCHRONOUS_MESH_CREATION, P_force_field_custom_kernel_epsilon = NX_FORCE_FIELD_CUSTOM_KERNEL_EPSILON, P_improved_spring_solver = NX_IMPROVED_SPRING_SOLVER, P_visualize_world_axes = NX_VISUALIZE_WORLD_AXES, P_visualize_body_axes = NX_VISUALIZE_BODY_AXES, P_visualize_body_mass_axes = NX_VISUALIZE_BODY_MASS_AXES, P_visualize_body_lin_velocity = NX_VISUALIZE_BODY_LIN_VELOCITY, P_visualize_body_ang_velocity = NX_VISUALIZE_BODY_ANG_VELOCITY, P_visualize_body_joint_groups = NX_VISUALIZE_BODY_JOINT_GROUPS, P_visualize_joint_local_axes = NX_VISUALIZE_JOINT_LOCAL_AXES, P_visualize_joint_world_axes = NX_VISUALIZE_JOINT_WORLD_AXES, P_visualize_joint_limits = NX_VISUALIZE_JOINT_LIMITS, P_visualize_contact_point = NX_VISUALIZE_CONTACT_POINT, P_visualize_contact_normal = NX_VISUALIZE_CONTACT_NORMAL, P_visualize_contact_error = NX_VISUALIZE_CONTACT_ERROR, P_visualize_contact_force = NX_VISUALIZE_CONTACT_FORCE, P_visualize_actor_axes = NX_VISUALIZE_ACTOR_AXES, P_visualize_collision_aabbs = NX_VISUALIZE_COLLISION_AABBS, P_visualize_collision_shapes = NX_VISUALIZE_COLLISION_SHAPES, P_visualize_collision_axes = NX_VISUALIZE_COLLISION_AXES, P_visualize_collision_compounds = NX_VISUALIZE_COLLISION_COMPOUNDS, P_visualize_collision_vnormals = NX_VISUALIZE_COLLISION_VNORMALS, P_visualize_collision_fnormals = NX_VISUALIZE_COLLISION_FNORMALS, P_visualize_collision_edges = NX_VISUALIZE_COLLISION_EDGES, P_visualize_collision_spheres = NX_VISUALIZE_COLLISION_SPHERES, P_visualize_collision_static = NX_VISUALIZE_COLLISION_STATIC, P_visualize_collision_dynamic = NX_VISUALIZE_COLLISION_DYNAMIC, P_visualize_collision_free = NX_VISUALIZE_COLLISION_FREE, P_visualize_collision_ccd = NX_VISUALIZE_COLLISION_CCD, P_visualize_collision_skeletons = NX_VISUALIZE_COLLISION_SKELETONS, P_visualize_fluid_emitters = NX_VISUALIZE_FLUID_EMITTERS, P_visualize_fluid_position = NX_VISUALIZE_FLUID_POSITION, P_visualize_fluid_velocity = NX_VISUALIZE_FLUID_VELOCITY, P_visualize_fluid_kernel_radius = NX_VISUALIZE_FLUID_KERNEL_RADIUS, P_visualize_fluid_bounds = NX_VISUALIZE_FLUID_BOUNDS, P_visualize_fluid_packets = NX_VISUALIZE_FLUID_PACKETS, P_visualize_fluid_motion_limit = NX_VISUALIZE_FLUID_MOTION_LIMIT, P_visualize_fluid_dyn_collision = NX_VISUALIZE_FLUID_DYN_COLLISION, P_visualize_fluid_stc_collision = NX_VISUALIZE_FLUID_STC_COLLISION, P_visualize_fluid_mesh_packets = NX_VISUALIZE_FLUID_MESH_PACKETS, P_visualize_fluid_drains = NX_VISUALIZE_FLUID_DRAINS, P_visualize_fluid_packet_data = NX_VISUALIZE_FLUID_PACKET_DATA, P_visualize_cloth_mesh = NX_VISUALIZE_CLOTH_MESH, P_visualize_cloth_collisions = NX_VISUALIZE_CLOTH_COLLISIONS, P_visualize_cloth_selfcollisions = NX_VISUALIZE_CLOTH_SELFCOLLISIONS, P_visualize_cloth_workpackets = NX_VISUALIZE_CLOTH_WORKPACKETS, P_visualize_cloth_sleep = NX_VISUALIZE_CLOTH_SLEEP, P_visualize_cloth_sleep_vertex = NX_VISUALIZE_CLOTH_SLEEP_VERTEX, P_visualize_cloth_tearable_vertices = NX_VISUALIZE_CLOTH_TEARABLE_VERTICES, P_visualize_cloth_tearing = NX_VISUALIZE_CLOTH_TEARING, P_visualize_cloth_attachment = NX_VISUALIZE_CLOTH_ATTACHMENT, P_visualize_cloth_validbounds = NX_VISUALIZE_CLOTH_VALIDBOUNDS, P_visualize_softbody_mesh = NX_VISUALIZE_SOFTBODY_MESH, P_visualize_softbody_collisions = NX_VISUALIZE_SOFTBODY_COLLISIONS, P_visualize_softbody_workpackets = NX_VISUALIZE_SOFTBODY_WORKPACKETS, P_visualize_softbody_sleep = NX_VISUALIZE_SOFTBODY_SLEEP, P_visualize_softbody_sleep_vertex = NX_VISUALIZE_SOFTBODY_SLEEP_VERTEX, P_visualize_softbody_tearable_vertices = NX_VISUALIZE_SOFTBODY_TEARABLE_VERTICES, P_visualize_softbody_tearing = NX_VISUALIZE_SOFTBODY_TEARING, P_visualize_softbody_attachment = NX_VISUALIZE_SOFTBODY_ATTACHMENT, P_visualize_softbody_validbounds = NX_VISUALIZE_SOFTBODY_VALIDBOUNDS, P_visualize_active_vertices = NX_VISUALIZE_ACTIVE_VERTICES, P_visualize_force_fields = NX_VISUALIZE_FORCE_FIELDS } |
enum | PhysxProjectionMode { PM_none = NX_JPM_NONE, PM_point_mindist = NX_JPM_POINT_MINDIST, PM_linear_mindist = NX_JPM_LINEAR_MINDIST } |
enum | PhysxPruningStructure { PS_none = NX_PRUNING_NONE, PS_octree = NX_PRUNING_OCTREE, PS_quadtree = NX_PRUNING_QUADTREE, PS_dynamic_aabb_tree = NX_PRUNING_DYNAMIC_AABB_TREE, PS_static_aabb_tree = NX_PRUNING_STATIC_AABB_TREE } |
enum | PhysxPulleyJointFlag { PJF_is_rigid = NX_PJF_IS_RIGID, PJF_motor_enabled = NX_PJF_MOTOR_ENABLED } |
enum | PhysxRevoluteJointFlag { RJF_limit_enabled = NX_RJF_LIMIT_ENABLED, RJF_motor_enabled = NX_RJF_MOTOR_ENABLED, RJF_spring_enabled = NX_RJF_SPRING_ENABLED } |
enum | PhysxSceneFlag { SF_disable_sse = NX_SF_DISABLE_SSE, SF_disable_collisions = NX_SF_DISABLE_COLLISIONS, SF_restricted_scene = NX_SF_RESTRICTED_SCENE, SF_disable_scene_mutex = NX_SF_DISABLE_SCENE_MUTEX, SF_force_cone_friction = NX_SF_FORCE_CONE_FRICTION, SF_sequential_primary = NX_SF_SEQUENTIAL_PRIMARY, SF_fluid_performance_hint = NX_SF_FLUID_PERFORMANCE_HINT } |
enum | PhysxShapeFlag { SF_trigger_on_enter = NX_TRIGGER_ON_ENTER, SF_trigger_on_leave = NX_TRIGGER_ON_LEAVE, SF_trigger_on_stay = NX_TRIGGER_ON_STAY, SF_trigger_enable = NX_TRIGGER_ENABLE, SF_visualization = NX_SF_VISUALIZATION, SF_disable_collision = NX_SF_DISABLE_COLLISION, SF_disable_raycasting = NX_SF_DISABLE_RAYCASTING, SF_disable_response = NX_SF_DISABLE_RESPONSE, SF_disable_scene_queries = NX_SF_DISABLE_SCENE_QUERIES, SF_point_contact_force = NX_SF_POINT_CONTACT_FORCE, SF_feature_indices = NX_SF_FEATURE_INDICES, SF_dynamic_dynamic_ccd = NX_SF_DYNAMIC_DYNAMIC_CCD, SF_fluid_drain = NX_SF_FLUID_DRAIN, SF_fluid_disable_collision = NX_SF_FLUID_DISABLE_COLLISION, SF_fluid_twoway = NX_SF_FLUID_TWOWAY, SF_cloth_drain = NX_SF_CLOTH_DRAIN, SF_cloth_disable_collision = NX_SF_CLOTH_DISABLE_COLLISION, SF_cloth_twoway = NX_SF_CLOTH_TWOWAY, SF_softbody_drain = NX_SF_SOFTBODY_DRAIN, SF_softbody_disable_collision = NX_SF_SOFTBODY_DISABLE_COLLISION, SF_softbody_twoway = NX_SF_SOFTBODY_TWOWAY } |
enum | PhysxShapesType { ST_static = NX_STATIC_SHAPES, ST_dynamic = NX_DYNAMIC_SHAPES, ST_all = NX_ALL_SHAPES } |
enum | PhysxSoftBodyFlag { SBF_static = NX_SBF_STATIC, SBF_disable_collision = NX_SBF_DISABLE_COLLISION, SBF_selfcollision = NX_SBF_SELFCOLLISION, SBF_visualization = NX_SBF_VISUALIZATION, SBF_gravity = NX_SBF_GRAVITY, SBF_volume_conservtion = NX_SBF_VOLUME_CONSERVATION, SBF_damping = NX_SBF_DAMPING, SBF_collision_twoway = NX_SBF_COLLISION_TWOWAY, SBF_tearable = NX_SBF_TEARABLE, SBF_hardware = NX_SBF_HARDWARE, SBF_comdamping = NX_SBF_COMDAMPING, SBF_validbounds = NX_SBF_VALIDBOUNDS, SBF_fluid_collision = NX_SBF_FLUID_COLLISION, SBF_disable_dynamic_ccd = NX_SBF_DISABLE_DYNAMIC_CCD, SBF_adhere = NX_SBF_ADHERE } |
enum | PhysxSphericalJointFlag { SJF_twist_limit_enabled = NX_SJF_TWIST_LIMIT_ENABLED, SJF_swing_limit_enabled = NX_SJF_SWING_LIMIT_ENABLED, SJF_twist_spring_enabled = NX_SJF_TWIST_SPRING_ENABLED, SJF_swing_spring_enabled = NX_SJF_SWING_SPRING_ENABLED, SJF_joint_spring_enabled = NX_SJF_JOINT_SPRING_ENABLED, SJF_perpendicular_dir_constraints = NX_SJF_PERPENDICULAR_DIR_CONSTRAINTS } |
enum | PhysxUpAxis { X_up = NX_X, Y_up = NX_Y, Z_up = NX_Z } |
enum | PhysxVertexAttachmentStatus { VAS_none = NX_CLOTH_VERTEX_ATTACHMENT_NONE, VAS_global = NX_CLOTH_VERTEX_ATTACHMENT_GLOBAL, VAS_shape = NX_CLOTH_VERTEX_ATTACHMENT_SHAPE } |
enum | PhysxWheelFlag { WF_steerable_input = 1<<0, WF_steerable_auto = 1<<1, WF_affected_by_handbrake = 1<<2, WF_accelerated = 1<<3 } |
enum | PhysxWheelShapeFlag { WSF_wheel_axis_contact_normal = NX_WF_WHEEL_AXIS_CONTACT_NORMAL, WSF_input_lat_slipvelocity = NX_WF_INPUT_LAT_SLIPVELOCITY, WSF_input_lng_slipvelocity = NX_WF_INPUT_LNG_SLIPVELOCITY, WSF_unscaled_spring_behavior = NX_WF_UNSCALED_SPRING_BEHAVIOR, WSF_axle_speed_override = NX_WF_AXLE_SPEED_OVERRIDE, WSF_emulate_legacy_wheel = NX_WF_EMULATE_LEGACY_WHEEL, WSF_clamped_friction = NX_WF_CLAMPED_FRICTION } |
A scene is a collection of bodies, constraints, and effectors which can interact.
The scene simulates the behavior of these objects over time. Several scenes may exist at the same time, but each body, constraint, or effector object is specific to a scene – they may not be shared.
For example, attempting to create a joint in one scene and then using it to attach bodies from a different scene results in undefined behavior.
Definition at line 69 of file physxScene.h.
PhysxCloth * PhysxScene::create_cloth | ( | PhysxClothDesc & | desc | ) |
Creates a cloth in this scene.
Definition at line 817 of file physxScene.cxx.
PhysxController * PhysxScene::create_controller | ( | PhysxControllerDesc & | controllerDesc | ) |
Creates a new character controller.
Definition at line 619 of file physxScene.cxx.
PhysxForceField * PhysxScene::create_force_field | ( | PhysxForceFieldDesc & | desc | ) |
Creates a force field in this scene.
Definition at line 719 of file physxScene.cxx.
PhysxForceFieldShapeGroup * PhysxScene::create_force_field_shape_group | ( | PhysxForceFieldShapeGroupDesc & | desc | ) |
Creates a new force field shape group in this scene.
Definition at line 769 of file physxScene.cxx.
PhysxJoint * PhysxScene::create_joint | ( | PhysxJointDesc & | desc | ) |
Creates a joint in this scene.
Definition at line 669 of file physxScene.cxx.
PhysxMaterial * PhysxScene::create_material | ( | PhysxMaterialDesc & | desc | ) |
Creates a new PhysxMaterial.
The material library consists of an array of material objects. Each material has a well defined index that can be used to refer to it. If an object references an undefined material, the default material with index 0 is used instead.
Definition at line 511 of file physxScene.cxx.
PhysxMaterial * PhysxScene::create_material | ( | ) |
Creates a new PhysxMaterial using the default settings of PhysxMaterialDesc.
Definition at line 532 of file physxScene.cxx.
PhysxSoftBody * PhysxScene::create_soft_body | ( | PhysxSoftBodyDesc & | desc | ) |
Creates a soft body in this scene.
Definition at line 861 of file physxScene.cxx.
PhysxVehicle * PhysxScene::create_vehicle | ( | PhysxVehicleDesc & | desc | ) |
Creates a vehicle in this scene.
Definition at line 906 of file physxScene.cxx.
void PhysxScene::fetch_results | ( | ) |
Waits until the simulation has finished, and then updates the scene graph with with simulation results.
It is not allowed to modify the physics scene in between the simulate(dt) and the fetch_results calls! But it is allowed to read from the scene and do additional computations, e. g. AI, in between these calls.
Definition at line 226 of file physxScene.cxx.
bool PhysxScene::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 at line 1268 of file physxScene.cxx.
bool PhysxScene::get_actor_pair_flag | ( | PhysxActor & | actorA, |
PhysxActor & | actorB, | ||
PhysxContactPairFlag | flag | ||
) |
Retrieves a single flag for the given pair of actors.
The two actor references must not reference the same actor.
Definition at line 1177 of file physxScene.cxx.
PhysxDebugGeomNode * PhysxScene::get_debug_geom_node | ( | ) |
Retrieves the debug geom node for this scene.
The debug geom node is used to visualize information about the physical scene which can be useful for debugging an application.
The debug geom node geometry is generated in global coordinates. In order to see correct information it is important not to dislocate the debug node. Reparent it to render and leave position at (0,0,0).
Definition at line 396 of file physxScene.cxx.
PhysxConstraintDominance PhysxScene::get_dominance_group_pair | ( | unsigned int | g1, |
unsigned int | g2 | ||
) |
Samples the dominance matrix.
Definition at line 1520 of file physxScene.cxx.
bool PhysxScene::get_filter_bool | ( | ) | const |
Retrieves filtering's boolean value.
Definition at line 1320 of file physxScene.cxx.
PhysxGroupsMask PhysxScene::get_filter_constant0 | ( | ) | const |
Gets filtering constant K0.
Definition at line 1330 of file physxScene.cxx.
PhysxGroupsMask PhysxScene::get_filter_constant1 | ( | ) | const |
Gets filtering constant K1.
Definition at line 1346 of file physxScene.cxx.
PhysxEnums::PhysxFilterOp PhysxScene::get_filter_op0 | ( | ) | const |
Retrieves the op0 filtering operation.
Definition at line 1362 of file physxScene.cxx.
PhysxEnums::PhysxFilterOp PhysxScene::get_filter_op1 | ( | ) | const |
Retrieves the op1 filtering operation.
Definition at line 1379 of file physxScene.cxx.
PhysxEnums::PhysxFilterOp PhysxScene::get_filter_op2 | ( | ) | const |
Retrieves the op2 filtering operation.
Definition at line 1396 of file physxScene.cxx.
bool PhysxScene::get_flag | ( | PhysxSceneFlag | flag | ) | const |
Return the specified scene flag flag.
Definition at line 1449 of file physxScene.cxx.
LVector3f PhysxScene::get_gravity | ( | ) | const |
Retrieves the current gravity setting.
Definition at line 331 of file physxScene.cxx.
bool PhysxScene::get_group_collision_flag | ( | unsigned int | g1, |
unsigned int | g2 | ||
) |
Determines if collision detection is performed between a pair of groups.
Collision groups are integers between 0 and 31.
Definition at line 1436 of file physxScene.cxx.
unsigned int PhysxScene::get_hightest_material_index | ( | ) | const |
Returns current highest valid material index.
Note that not all indices below this are valid if some of them belong to meshes that have beed freed.
Definition at line 556 of file physxScene.cxx.
PhysxMaterial * PhysxScene::get_material_from_index | ( | unsigned int | idx | ) | const |
Retrieves the material with the given material index.
There is always at least one material in the Scene, the default material (index 0). If the specified material index is out of range (larger than get_hightest_material_index) or belongs to a material that has been released, then the default material is returned, but no error is reported.
Definition at line 571 of file physxScene.cxx.
bool PhysxScene::get_shape_pair_flag | ( | PhysxShape & | shapeA, |
PhysxShape & | shapeB | ||
) |
Returns /true/ if contact generation between a pair of shapes is enabled, and /false/ if contact generation is disables.
The two shape references must not reference the same shape.
Definition at line 1220 of file physxScene.cxx.
PhysxMaterial * PhysxScene::get_wheel_shape_material | ( | ) |
Gets the shared material for all wheel shapes.
If this material is not already created then calling this method will create the material.
Normally users don't need to call this method. It is used internally by PhysWheel::create_wheel.
Definition at line 1542 of file physxScene.cxx.
bool PhysxScene::is_hardware_scene | ( | ) | const |
Returns TRUE if the the scene is simulated in hardware.
FALSE if the scene is simulated in software.
Definition at line 1460 of file physxScene.cxx.
PhysxOverlapReport PhysxScene::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.
You can test against static and/or dynamic objects by adjusting 'shapeType'.
Definition at line 1123 of file physxScene.cxx.
PhysxOverlapReport PhysxScene::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.
You can test against static and/or dynamic objects by adjusting 'shapeType'.
Definition at line 1102 of file physxScene.cxx.
PhysxRaycastReport PhysxScene::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 enclosed by axis aligned bounding boxes hit by the ray.
Definition at line 1072 of file physxScene.cxx.
PhysxRaycastReport PhysxScene::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 by the ray.
Definition at line 994 of file physxScene.cxx.
bool PhysxScene::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 at line 1024 of file physxScene.cxx.
bool PhysxScene::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 at line 945 of file physxScene.cxx.
PhysxRaycastHit PhysxScene::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.
If not shape is hit then an empty raycast hit is returned (is_empty() == true).
Definition at line 1043 of file physxScene.cxx.
PhysxRaycastHit PhysxScene::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.
If not shape is hit then an empty raycast hit is returned (is_empty() == true).
Definition at line 963 of file physxScene.cxx.
void PhysxScene::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.
It is possible to assign each actor to a group using PhysxActor::set_group(). This is a different set of groups from the shape groups despite the similar name. Here up to 0xffff different groups are permitted, With this method one can set contact reporting flags between actors belonging to a pair of groups.
The following flags are permitted: - CPF_start_touch - CPF_end_touch - CPF_touch - CPF_start_touch_treshold - CPF_end_touch_treshold - CPF_touch_treshold
Note that finer grain control of pairwise flags is possible using the function PhysxScene::set_actor_pair_flags().
Definition at line 1249 of file physxScene.cxx.
void PhysxScene::set_actor_pair_flag | ( | PhysxActor & | actorA, |
PhysxActor & | actorB, | ||
PhysxContactPairFlag | flag, | ||
bool | value | ||
) |
Sets the pair flags for the given pair of actors.
Calling this on an actor that has no shape(s) has no effect. The two actor references must not reference the same actor.
It is important to note that the engine stores pair flags per shape, even for actor pair flags. This means that shapes should be created before actor pair flags are set, otherwise the pair flags will be ignored.
Definition at line 1152 of file physxScene.cxx.
void PhysxScene::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.
It is possible to assign each actor to a dominance groups using PhysxActor::set_dominance_group().
With dominance groups one can have all constraints (contacts and joints) created between actors act in one direction only. This is useful if you want to make sure that the movement of the rider of a vehicle or the pony tail of a character doesn't influence the object it is attached to, while keeping the motion of both inherently physical.
Whenever a constraint (i.e. joint or contact) between two actors (a0, a1) needs to be solved, the groups (g0, g1) of both actors are retrieved. Then the constraint dominance setting for this group pair is retrieved.
In the constraint, PhysxConstraintDominance::get_0() becomes the dominance setting for a0, and PhysxConstraintDominance::get_1() becomes the dominance setting for a1. A dominance setting of 1.0f, the default, will permit the actor to be pushed or pulled by the other actor. A dominance setting of 0.0f will however prevent the actor to be pushed or pulled by the other actor. Thus, a PhysxConstraintDominance of (1.0f, 0.0f) makes the interaction one-way.
The dominance matrix is initialised by default such that: - if g1 == g2, then (1.0f, 1.0f) is returned - if g1 < g2, then (0.0f, 1.0f) is returned - if g1 > g2, then (1.0f, 0.0f) is returned
In other words, actors in higher groups can be pushed around by actors in lower groups by default.
These settings should cover most applications, and in fact not overriding these settings may likely result in higher performance.
Dominance settings are currently specified as floats 0.0f or 1.0f because in the future PhysX may permit arbitrary fractional settings to express 'partly-one-way' interactions.
Definition at line 1506 of file physxScene.cxx.
void PhysxScene::set_filter_bool | ( | bool | flag | ) |
Setups filtering's boolean value.
Definition at line 1290 of file physxScene.cxx.
void PhysxScene::set_filter_constant0 | ( | const PhysxGroupsMask & | mask | ) |
Setups filtering's K0 value.
Definition at line 1300 of file physxScene.cxx.
void PhysxScene::set_filter_constant1 | ( | const PhysxGroupsMask & | mask | ) |
Setups filtering's K1 value.
Definition at line 1310 of file physxScene.cxx.
void PhysxScene::set_filter_ops | ( | PhysxFilterOp | op0, |
PhysxFilterOp | op1, | ||
PhysxFilterOp | op2 | ||
) |
Setups filtering operations.
Definition at line 1280 of file physxScene.cxx.
void PhysxScene::set_gravity | ( | const LVector3f & | gravity | ) |
Sets a constant gravity for the entire scene.
Definition at line 319 of file physxScene.cxx.
void PhysxScene::set_group_collision_flag | ( | unsigned int | g1, |
unsigned int | g2, | ||
bool | enable | ||
) |
Specifies if collision should be performed by a pair of shape groups.
It is possible to assign each shape to a collision groups using PhysxShape::set_group(). With this method one can set whether collisions should be detected between shapes belonging to a given pair of groups. Initially all pairs are enabled.
Fluids can be assigned to collision groups as well.
Collision groups are integers between 0 and 31.
Definition at line 1422 of file physxScene.cxx.
void PhysxScene::set_shape_pair_flag | ( | PhysxShape & | shapeA, |
PhysxShape & | shapeB, | ||
bool | value | ||
) |
Disables or enables contact generation for a pair of shapes.
The two shape references must not reference the same shape.
Definition at line 1195 of file physxScene.cxx.
void PhysxScene::set_timing_fixed | ( | float | maxTimestep = 1.0f/60.0f , |
unsigned int | maxIter = 8 |
||
) |
Sets simulation timing parameters used in simulate.
The elapsed time (parameter "dt" in simulate()) is internally subdivided into up to maxIter substeps no larger than maxTimestep. If the elapsed time is not a multiple of maxTimestep then any remaining time is accumulated to be added onto the elapsed time for the next time step. If more sub steps than maxIter are needed to advance the simulation by elapsed time, then the remaining time is also accumulated for the next call to simulate().
This timing method is strongly preferred for stable, reproducible simulation.
Definition at line 309 of file physxScene.cxx.
void PhysxScene::set_timing_variable | ( | ) |
Sets simulation timing parameters used in simulate.
Definition at line 290 of file physxScene.cxx.
void PhysxScene::simulate | ( | float | dt | ) |
Advances the simulation by an elapsedTime time.
The elapsed time has to be in the range (0, inf).
It is not allowed to modify the physics scene in between the simulate(dt) and the fetch_results calls! But it is allowed to read from the scene and do additional computations, e. g. AI, in between these calls.
Definition at line 189 of file physxScene.cxx.
PhysxCloth * PhysxScene::get_cloth |
Returns the n-th cloth from the array of all the cloths in the scene.
Definition at line 142 of file physxScene.h.
PhysxController * PhysxScene::get_controller |
Retrieves the n-th controller within the scene.
Definition at line 124 of file physxScene.h.
PhysxForceField * PhysxScene::get_force_field |
Returns the n-th force field from the array of all the force fields in the scene.
Definition at line 130 of file physxScene.h.
PhysxForceFieldShapeGroup * PhysxScene::get_force_field_shape_group |
Returns the n-th force field shape group in this scene.
Definition at line 136 of file physxScene.h.
PhysxJoint * PhysxScene::get_joint |
Retrieve the n-th joint from the array of all the joints in the scene.
Definition at line 109 of file physxScene.h.
PhysxMaterial * PhysxScene::get_material |
Retrieves the n-th material from the array of materials.
See also get_material_from_index, which retrieves a material by it's material index.
Definition at line 118 of file physxScene.h.
unsigned int PhysxScene::get_num_cloths |
Gets the number of cloths in the scene.
Definition at line 142 of file physxScene.h.
unsigned int PhysxScene::get_num_controllers |
Return the number of controllers in the scene.
Definition at line 124 of file physxScene.h.
unsigned int PhysxScene::get_num_force_field_shape_groups |
Gets the number of force field shape groups in the scene.
Definition at line 136 of file physxScene.h.
unsigned int PhysxScene::get_num_force_fields |
Gets the number of force fields in the scene.
Definition at line 130 of file physxScene.h.
unsigned int PhysxScene::get_num_joints |
Returns the number of joints in the scene (excluding "dead" joints).
Note that this includes compartments.
Definition at line 109 of file physxScene.h.
unsigned int PhysxScene::get_num_materials |
Return the number of materials in the scene.
Note that the returned value is not related to material indices. Those may not be allocated continuously, and its values may be higher than get_num_materials(). This will also include the default material which exists without having to be created.
Definition at line 118 of file physxScene.h.
unsigned int PhysxScene::get_num_soft_bodies |
Gets the number of soft bodies in the scene.
Definition at line 148 of file physxScene.h.
unsigned int PhysxScene::get_num_vehicles |
Returns the number of vehicles in the scene.
Definition at line 154 of file physxScene.h.
PhysxSoftBody * PhysxScene::get_soft_body |
Returns the n-th soft body from the array of all the soft bodies in the scene.
Definition at line 148 of file physxScene.h.
PhysxVehicle * PhysxScene::get_vehicle |
Returns the n-th vehicle from the array of all the vehicles in the scene.
Definition at line 154 of file physxScene.h.