Panda3D
Classes | Public Member Functions | Static Public Member Functions | Public Attributes

PhysxManager Class Reference

The central interface to the PhysX subsystem. More...

#include "physxManager.h"

Inheritance diagram for PhysxManager:
PhysxEnums

List of all members.

Classes

class  PhysxOutputStream

Public Member Functions

PhysxHeightFieldcreate_height_field (PhysxHeightFieldDesc &desc)
PhysxScenecreate_scene (PhysxSceneDesc &desc)
PhysxClothMeshget_cloth_mesh (unsigned int idx)
PhysxConvexMeshget_convex_mesh (unsigned int idx)
PhysxHeightFieldget_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)
PhysxSceneget_scene (unsigned int idx) const
NxPhysicsSDK * get_sdk () const
 Returns a pointer to the NxPhysicsSDK.
PhysxSoftBodyMeshget_soft_body_mesh (unsigned int idx)
PhysxTriangleMeshget_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 PhysxManagerget_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

Detailed Description

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.


Member Function Documentation

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]
NxMat34 PhysxManager::mat4_to_nxMat34 ( const LMatrix4f m) [inline, static]
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]
LMatrix4f PhysxManager::nxMat34_to_mat4 ( const NxMat34 &  m) [inline, static]
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]
LVector3f PhysxManager::nxVec3_to_vec3 ( const NxVec3 &  v) [inline, static]
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().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations