Panda3D
|
The central interface to the PhysX subsystem. More...
#include "physxManager.h"
Classes | |
class | PhysxOutputStream |
Public Member Functions | |
PhysxHeightField * | create_height_field (PhysxHeightFieldDesc &desc) |
PhysxScene * | create_scene (PhysxSceneDesc &desc) |
PhysxClothMesh * | get_cloth_mesh (unsigned int idx) |
PhysxConvexMesh * | get_convex_mesh (unsigned int idx) |
PhysxHeightField * | get_height_field (unsigned int idx) |
unsigned int | get_hw_version () |
Reports the available revision of the PhysX Hardware. | |
const char * | get_internal_version () |
Reports the internal API version number of the SDK. | |
unsigned int | get_num_cloth_meshes () |
unsigned int | get_num_convex_meshes () |
unsigned int | get_num_height_fields () |
unsigned int | get_num_ppus () |
Reports the number of PPUs installed in the host system. | |
unsigned int | get_num_scenes () const |
unsigned int | get_num_soft_body_meshes () |
unsigned int | get_num_triangle_meshes () |
float | get_parameter (PhysxParameter param) |
PhysxScene * | get_scene (unsigned int idx) const |
NxPhysicsSDK * | get_sdk () const |
Returns a pointer to the NxPhysicsSDK. | |
PhysxSoftBodyMesh * | get_soft_body_mesh (unsigned int idx) |
PhysxTriangleMesh * | get_triangle_mesh (unsigned int idx) |
bool | is_hardware_available () |
Returns TRUE if a physcis hardware is available on the host system. | |
void | ls (ostream &out, int indent_level=0) const |
void | ls () const |
MAKE_SEQ (get_height_fields, get_num_height_fields, get_height_field) | |
MAKE_SEQ (get_triangle_meshes, get_num_triangle_meshes, get_triangle_mesh) | |
MAKE_SEQ (get_cloth_meshes, get_num_cloth_meshes, get_cloth_mesh) | |
MAKE_SEQ (get_convex_meshes, get_num_convex_meshes, get_convex_mesh) | |
MAKE_SEQ (get_soft_body_meshes, get_num_soft_body_meshes, get_soft_body_mesh) | |
MAKE_SEQ (get_scenes, get_num_scenes, get_scene) | |
void | set_parameter (PhysxParameter param, float value) |
Static Public Member Functions | |
static PhysxManager * | get_global_ptr () |
Returns a pointer to the global PhysxManager object. | |
static NxMat33 | mat3_to_nxMat33 (const LMatrix3f &m) |
Converts from LMatrix3f to NxMat33. | |
static NxMat34 | mat4_to_nxMat34 (const LMatrix4f &m) |
Converts from LMatrix4f to NxMat34. | |
static LPoint3f | nxExtVec3_to_point3 (const NxExtendedVec3 &p) |
Converts from NxExtendedVec3 to LPoint3f. | |
static LVector3f | nxExtVec3_to_vec3 (const NxExtendedVec3 &v) |
Converts from NxExtendedVec3 to LVector3f. | |
static LMatrix3f | nxMat33_to_mat3 (const NxMat33 &m) |
Converts from NxMat33 to LMatrix3f. | |
static LMatrix4f | nxMat34_to_mat4 (const NxMat34 &m) |
Converts from NxMat34 to LMatrix4f. | |
static LQuaternionf | nxQuat_to_quat (const NxQuat &q) |
Converts from NxQuat to LQuaternionf. | |
static LPoint3f | nxVec3_to_point3 (const NxVec3 &p) |
Converts from NxVec3 to LPoint3f. | |
static LVector3f | nxVec3_to_vec3 (const NxVec3 &v) |
Converts from NxVec3 to LVector3f. | |
static NxExtendedVec3 | point3_to_nxExtVec3 (const LPoint3f &p) |
Converts from LPoint3f to NxExtendedVec3. | |
static NxVec3 | point3_to_nxVec3 (const LPoint3f &p) |
Converts from LPoint3f to NxVec3. | |
static NxQuat | quat_to_nxQuat (const LQuaternionf &q) |
Converts from LQuaternionf to NxQuat. | |
static void | update_point3_from_nxVec3 (LPoint3f &p, const NxVec3 &nVec) |
static void | update_vec3_from_nxVec3 (LVector3f &v, const NxVec3 &nVec) |
static NxExtendedVec3 | vec3_to_nxExtVec3 (const LVector3f &v) |
Converts from LVector3f to NxExtendedVec3. | |
static NxVec3 | vec3_to_nxVec3 (const LVector3f &v) |
Converts from LVector3f to NxVec3. | |
Public Attributes | |
PhysxObjectCollection < PhysxClothMesh > | _cloth_meshes |
PhysxObjectCollection < PhysxConvexMesh > | _convex_meshes |
PhysxObjectCollection < PhysxHeightField > | _heightfields |
PhysxObjectCollection< PhysxScene > | _scenes |
PhysxObjectCollection < PhysxSoftBodyMesh > | _softbody_meshes |
PhysxObjectCollection < PhysxTriangleMesh > | _triangle_meshes |
The central interface to the PhysX subsystem.
Used e. g. for setting/retrieving global parameters or for creating scenes.
Definition at line 42 of file physxManager.h.
PhysxManager * PhysxManager::get_global_ptr | ( | ) | [static] |
Returns a pointer to the global PhysxManager object.
Definition at line 104 of file physxManager.cxx.
unsigned int PhysxManager::get_hw_version | ( | ) |
Reports the available revision of the PhysX Hardware.
Returns 0 if there is no hardware present in the machine, 1 for the PhysX Athena revision 1.0 card.
Definition at line 355 of file physxManager.cxx.
const char * PhysxManager::get_internal_version | ( | ) |
Reports the internal API version number of the SDK.
Definition at line 366 of file physxManager.cxx.
unsigned int PhysxManager::get_num_ppus | ( | ) |
Reports the number of PPUs installed in the host system.
Definition at line 341 of file physxManager.cxx.
NxPhysicsSDK * PhysxManager::get_sdk | ( | ) | const [inline] |
Returns a pointer to the NxPhysicsSDK.
Definition at line 22 of file physxManager.I.
bool PhysxManager::is_hardware_available | ( | ) |
Returns TRUE if a physcis hardware is available on the host system.
Definition at line 329 of file physxManager.cxx.
NxMat33 PhysxManager::mat3_to_nxMat33 | ( | const LMatrix3f & | m | ) | [inline, static] |
Converts from LMatrix3f to NxMat33.
Definition at line 169 of file physxManager.I.
References LMatrix3f::get_data().
Referenced by PhysxBounds3::bounds_of_obb(), PhysxUtilLib::box_box_intersect(), mat4_to_nxMat34(), PhysxUtilLib::point_obb_sqr_dist(), PhysxUtilLib::ray_obb_intersect(), PhysxUtilLib::segment_obb_intersect(), PhysxActor::set_c_mass_global_orientation(), PhysxActor::set_c_mass_offset_global_orientation(), PhysxActor::set_c_mass_offset_local_orientation(), PhysxActorDesc::set_global_hpr(), PhysxBox::set_rot(), and PhysxBounds3::transform().
NxMat34 PhysxManager::mat4_to_nxMat34 | ( | const LMatrix4f & | m | ) | [inline, static] |
Converts from LMatrix4f to NxMat34.
Definition at line 145 of file physxManager.I.
References LMatrix4f::get_row3(), LMatrix4f::get_upper_3(), mat3_to_nxMat33(), and vec3_to_nxVec3().
Referenced by PhysxUtilLib::create_box(), PhysxActor::move_global_mat(), PhysxBox::rotate(), PhysxActor::set_c_mass_global_mat(), PhysxActor::set_c_mass_offset_global_mat(), PhysxActor::set_c_mass_offset_local_mat(), PhysxActorDesc::set_global_mat(), PhysxActor::set_global_mat(), PhysxShape::set_local_mat(), PhysxBodyDesc::set_mass_local_mat(), PhysxForceFieldShape::set_mat(), PhysxWheelShapeDesc::set_to_default(), and PhysxHeightFieldShapeDesc::set_to_default().
LPoint3f PhysxManager::nxExtVec3_to_point3 | ( | const NxExtendedVec3 & | p | ) | [inline, static] |
Converts from NxExtendedVec3 to LPoint3f.
Definition at line 110 of file physxManager.I.
Referenced by PhysxControllerDesc::get_pos(), and PhysxController::get_pos().
LVector3f PhysxManager::nxExtVec3_to_vec3 | ( | const NxExtendedVec3 & | v | ) | [inline, static] |
Converts from NxExtendedVec3 to LVector3f.
Definition at line 66 of file physxManager.I.
LMatrix3f PhysxManager::nxMat33_to_mat3 | ( | const NxMat33 & | m | ) | [inline, static] |
Converts from NxMat33 to LMatrix3f.
Definition at line 182 of file physxManager.I.
Referenced by PhysxUtilLib::find_rotation_matrix(), PhysxActor::get_c_mass_global_orientation(), PhysxActor::get_c_mass_local_orientation(), PhysxActor::get_global_inertia_tensor(), PhysxActor::get_global_inertia_tensor_inverse(), PhysxBox::get_rot(), and nxMat34_to_mat4().
LMatrix4f PhysxManager::nxMat34_to_mat4 | ( | const NxMat34 & | m | ) | [inline, static] |
Converts from NxMat34 to LMatrix4f.
Definition at line 158 of file physxManager.I.
References nxMat33_to_mat3(), and nxVec3_to_vec3().
Referenced by PhysxScene::fetch_results(), PhysxActor::get_c_mass_global_mat(), PhysxActor::get_c_mass_local_mat(), PhysxActorDesc::get_global_mat(), PhysxActor::get_global_mat(), PhysxShape::get_local_mat(), PhysxBodyDesc::get_mass_local_mat(), and PhysxForceFieldShape::get_mat().
LQuaternionf PhysxManager::nxQuat_to_quat | ( | const NxQuat & | q | ) | [inline, static] |
Converts from NxQuat to LQuaternionf.
Definition at line 134 of file physxManager.I.
Referenced by PhysxActor::get_global_quat().
LPoint3f PhysxManager::nxVec3_to_point3 | ( | const NxVec3 & | p | ) | [inline, static] |
Converts from NxVec3 to LPoint3f.
Definition at line 88 of file physxManager.I.
Referenced by PhysxActor::get_c_mass_global_pos(), PhysxActor::get_c_mass_local_pos(), PhysxBox::get_center(), PhysxBounds3::get_center(), PhysxJoint::get_global_anchor(), PhysxActorDesc::get_global_pos(), PhysxActor::get_global_pos(), PhysxShape::get_local_pos(), PhysxBounds3::get_max(), PhysxBounds3::get_min(), PhysxSegment::get_origin(), PhysxRay::get_origin(), PhysxCapsule::get_origin(), PhysxContactPoint::get_point(), PhysxForceFieldShape::get_pos(), and PhysxCloth::get_vertex_attachment_pos().
LVector3f PhysxManager::nxVec3_to_vec3 | ( | const NxVec3 & | v | ) | [inline, static] |
Converts from NxVec3 to LVector3f.
Definition at line 44 of file physxManager.I.
Referenced by PhysxUtilLib::compute_box_inertia_tensor(), PhysxUtilLib::compute_box_world_edge_normal(), PhysxUtilLib::compute_sphere_inertia_tensor(), PhysxActor::get_angular_momentum(), PhysxBodyDesc::get_angular_velocity(), PhysxActor::get_angular_velocity(), PhysxSphere::get_center(), PhysxBoxShapeDesc::get_dimensions(), PhysxBoxShape::get_dimensions(), PhysxBoxForceFieldShapeDesc::get_dimensions(), PhysxBoxForceFieldShape::get_dimensions(), PhysxBounds3::get_dimensions(), PhysxMaterialDesc::get_dir_of_anisotropy(), PhysxMaterial::get_dir_of_anisotropy(), PhysxRay::get_direction(), PhysxBoxControllerDesc::get_extents(), PhysxBoxController::get_extents(), PhysxBox::get_extents(), PhysxCloth::get_external_acceleration(), PhysxJoint::get_global_axis(), PhysxSceneDesc::get_gravity(), PhysxScene::get_gravity(), PhysxActor::get_linear_momentum(), PhysxBodyDesc::get_linear_velocity(), PhysxActor::get_linear_velocity(), PhysxActor::get_local_point_velocity(), PhysxBodyDesc::get_mass_space_inertia(), PhysxActor::get_mass_space_inertia_tensor(), PhysxContactPoint::get_normal(), PhysxSegment::get_p0(), PhysxCapsule::get_p0(), PhysxSegment::get_p1(), PhysxCapsule::get_p1(), PhysxActor::get_point_velocity(), PhysxContactPair::get_sum_friction_force(), PhysxContactPair::get_sum_normal_force(), PhysxCloth::get_wind_acceleration(), and nxMat34_to_mat4().
NxExtendedVec3 PhysxManager::point3_to_nxExtVec3 | ( | const LPoint3f & | p | ) | [inline, static] |
Converts from LPoint3f to NxExtendedVec3.
Definition at line 99 of file physxManager.I.
Referenced by PhysxControllerDesc::set_pos(), and PhysxController::set_pos().
NxVec3 PhysxManager::point3_to_nxVec3 | ( | const LPoint3f & | p | ) | [inline, static] |
Converts from LPoint3f to NxVec3.
Definition at line 77 of file physxManager.I.
Referenced by PhysxCloth::add_directed_force_at_pos(), PhysxActor::add_force_at_local_pos(), PhysxCloth::add_force_at_pos(), PhysxActor::add_force_at_pos(), PhysxJoint::add_limit_plane(), PhysxActor::add_local_force_at_local_pos(), PhysxActor::add_local_force_at_pos(), PhysxCloth::attach_vertex_to_global_pos(), PhysxCloth::attach_vertex_to_shape(), PhysxBounds3::bounds_of_obb(), PhysxUtilLib::box_box_intersect(), PhysxUtilLib::box_contains_point(), PhysxSegment::compute_direction(), PhysxCapsule::compute_direction(), PhysxUtilLib::compute_distance_squared(), PhysxSegment::compute_point(), PhysxCapsule::compute_point(), PhysxUtilLib::compute_square_distance(), PhysxBounds3::contain(), PhysxActor::get_local_point_velocity(), PhysxActor::get_point_velocity(), PhysxBounds3::include(), PhysxActor::move_global_pos(), PhysxScene::overlap_capsule_shapes(), PhysxScene::overlap_sphere_shapes(), PhysxUtilLib::point_obb_sqr_dist(), PhysxUtilLib::ray_aabb_intersect(), PhysxUtilLib::ray_capsule_intersect(), PhysxUtilLib::ray_obb_intersect(), PhysxUtilLib::ray_sphere_intersect(), PhysxUtilLib::ray_tri_intersect(), PhysxUtilLib::segment_aabb_intersect(), PhysxUtilLib::segment_box_intersect(), PhysxUtilLib::segment_obb_intersect(), PhysxBounds3::set(), PhysxActor::set_c_mass_global_pos(), PhysxActor::set_c_mass_offset_global_pos(), PhysxActor::set_c_mass_offset_local_pos(), PhysxBounds3::set_center_extents(), PhysxClothMeshDesc::set_from_node_path(), PhysxJointDesc::set_global_anchor(), PhysxJoint::set_global_anchor(), PhysxActorDesc::set_global_pos(), PhysxActor::set_global_pos(), PhysxJoint::set_limit_point(), PhysxJointDesc::set_local_anchor(), PhysxShape::set_local_pos(), PhysxBounds3::set_max(), PhysxBounds3::set_min(), PhysxRay::set_origin(), PhysxSegment::set_origin_direction(), PhysxCapsule::set_origin_direction(), PhysxForceFieldShape::set_pos(), PhysxPulleyJointDesc::set_pulley(), PhysxTriangleMeshDesc::set_vertex(), PhysxSoftBodyMeshDesc::set_vertex(), PhysxConvexMeshDesc::set_vertex(), PhysxClothMeshDesc::set_vertex(), PhysxBounds3::transform(), and PhysxUtilLib::tri_box_intersect().
NxQuat PhysxManager::quat_to_nxQuat | ( | const LQuaternionf & | q | ) | [inline, static] |
Converts from LQuaternionf to NxQuat.
Definition at line 121 of file physxManager.I.
Referenced by PhysxActor::move_global_hpr(), and PhysxActor::set_global_hpr().
NxExtendedVec3 PhysxManager::vec3_to_nxExtVec3 | ( | const LVector3f & | v | ) | [inline, static] |
Converts from LVector3f to NxExtendedVec3.
Definition at line 55 of file physxManager.I.
NxVec3 PhysxManager::vec3_to_nxVec3 | ( | const LVector3f & | v | ) | [inline, static] |
Converts from LVector3f to NxVec3.
Definition at line 33 of file physxManager.I.
Referenced by PhysxCloth::add_directed_force_at_pos(), PhysxActor::add_force(), PhysxActor::add_force_at_local_pos(), PhysxActor::add_force_at_pos(), PhysxCloth::add_force_at_vertex(), PhysxJoint::add_limit_plane(), PhysxActor::add_local_force(), PhysxActor::add_local_force_at_local_pos(), PhysxActor::add_local_force_at_pos(), PhysxActor::add_local_torque(), PhysxActor::add_torque(), PhysxBounds3::bounds_of_obb(), PhysxUtilLib::box_box_intersect(), PhysxUtilLib::compute_box_density(), PhysxUtilLib::compute_box_mass(), PhysxUtilLib::compute_ellipsoid_density(), PhysxUtilLib::compute_ellipsoid_mass(), PhysxSphere::contains(), PhysxUtilLib::find_rotation_matrix(), mat4_to_nxMat34(), PhysxUtilLib::normal_to_tangents(), PhysxUtilLib::point_obb_sqr_dist(), PhysxUtilLib::ray_aabb_intersect(), PhysxUtilLib::ray_capsule_intersect(), PhysxUtilLib::ray_sphere_intersect(), PhysxUtilLib::ray_tri_intersect(), PhysxUtilLib::segment_obb_intersect(), PhysxActor::set_angular_momentum(), PhysxActor::set_angular_velocity(), PhysxBodyDesc::set_angular_velocity(), PhysxBox::set_center(), PhysxSphere::set_center(), PhysxBounds3::set_center_extents(), PhysxBoxForceFieldShapeDesc::set_dimensions(), PhysxBoxShapeDesc::set_dimensions(), PhysxBoxForceFieldShape::set_dimensions(), PhysxBoxShape::set_dimensions(), PhysxMaterial::set_dir_of_anisotropy(), PhysxMaterialDesc::set_dir_of_anisotropy(), PhysxRay::set_direction(), PhysxBox::set_extents(), PhysxBoxController::set_extents(), PhysxBoxControllerDesc::set_extents(), PhysxCloth::set_external_acceleration(), PhysxJoint::set_global_axis(), PhysxJointDesc::set_global_axis(), PhysxScene::set_gravity(), PhysxSceneDesc::set_gravity(), PhysxActor::set_linear_momentum(), PhysxBodyDesc::set_linear_velocity(), PhysxActor::set_linear_velocity(), PhysxJointDesc::set_local_axis(), PhysxJointDesc::set_local_normal(), PhysxBodyDesc::set_mass_space_inertia(), PhysxActor::set_mass_space_inertia_tensor(), PhysxCapsule::set_origin_direction(), PhysxSegment::set_origin_direction(), PhysxSegment::set_p0(), PhysxCapsule::set_p0(), PhysxSegment::set_p1(), PhysxCapsule::set_p1(), PhysxPlaneShapeDesc::set_plane(), PhysxPlaneShape::set_plane(), PhysxSphericalJointDesc::set_swing_axis(), PhysxCloth::set_wind_acceleration(), PhysxUtilLib::sweep_box_box(), PhysxUtilLib::sweep_box_capsule(), PhysxUtilLib::sweep_box_sphere(), PhysxUtilLib::sweep_capsule_capsule(), PhysxUtilLib::sweep_sphere_capsule(), and PhysxUtilLib::swept_spheres_intersect().