15 #ifndef PHYSXMANAGER_H
16 #define PHYSXMANAGER_H
18 #include "pandabase.h"
19 #include "pointerTo.h"
22 #include "physxEnums.h"
23 #include "physxObjectCollection.h"
24 #include "physx_includes.h"
34 class PhysxOutputStream;
55 void set_parameter(PhysxParameter param,
float value);
56 float get_parameter(PhysxParameter param);
58 bool is_hardware_available();
59 unsigned int get_num_ppus();
60 unsigned int get_hw_version();
61 const char *get_internal_version();
63 unsigned int get_num_scenes()
const;
66 MAKE_SEQ(get_scenes, get_num_scenes, get_scene);
68 unsigned int get_num_height_fields();
71 MAKE_SEQ(get_height_fields, get_num_height_fields, get_height_field);
73 unsigned int get_num_convex_meshes();
75 MAKE_SEQ(get_convex_meshes, get_num_convex_meshes, get_convex_mesh);
77 unsigned int get_num_triangle_meshes();
79 MAKE_SEQ(get_triangle_meshes, get_num_triangle_meshes, get_triangle_mesh);
81 unsigned int get_num_cloth_meshes();
83 MAKE_SEQ(get_cloth_meshes, get_num_cloth_meshes, get_cloth_mesh);
85 unsigned int get_num_soft_body_meshes();
87 MAKE_SEQ(get_soft_body_meshes, get_num_soft_body_meshes, get_soft_body_mesh);
89 unsigned int get_num_ccd_skeletons();
92 MAKE_SEQ(get_ccd_skeletons, get_num_ccd_skeletons, get_ccd_skeleton);
94 INLINE
void ls()
const;
95 INLINE
void ls(ostream &out,
int indent_level=0)
const;
98 INLINE NxPhysicsSDK *get_sdk()
const;
108 INLINE
static NxVec3 vec3_to_nxVec3(
const LVector3f &v);
109 INLINE
static LVector3f nxVec3_to_vec3(
const NxVec3 &v);
110 INLINE
static NxExtendedVec3 vec3_to_nxExtVec3(
const LVector3f &v);
111 INLINE
static LVector3f nxExtVec3_to_vec3(
const NxExtendedVec3 &v);
112 INLINE
static NxVec3 point3_to_nxVec3(
const LPoint3f &p);
113 INLINE
static LPoint3f nxVec3_to_point3(
const NxVec3 &p);
114 INLINE
static NxExtendedVec3 point3_to_nxExtVec3(
const LPoint3f &p);
115 INLINE
static LPoint3f nxExtVec3_to_point3(
const NxExtendedVec3 &p);
116 INLINE
static NxQuat quat_to_nxQuat(
const LQuaternionf &q);
117 INLINE
static LQuaternionf nxQuat_to_quat(
const NxQuat &q);
118 INLINE
static NxMat34 mat4_to_nxMat34(
const LMatrix4f &m);
119 INLINE
static LMatrix4f nxMat34_to_mat4(
const NxMat34 &m);
120 INLINE
static NxMat33 mat3_to_nxMat33(
const LMatrix3f &m);
121 INLINE
static LMatrix3f nxMat33_to_mat3(
const NxMat33 &m);
123 INLINE
static void update_vec3_from_nxVec3(
LVector3f &v,
const NxVec3 &nVec);
124 INLINE
static void update_point3_from_nxVec3(
LPoint3f &p,
const NxVec3 &nVec);
131 class PhysxOutputStream :
public NxUserOutputStream {
132 void reportError(NxErrorCode code,
const char *message,
const char *file,
int line);
133 NxAssertResponse reportAssertViolation(
const char *message,
const char *file,
int line);
134 void print(
const char *message);
135 const char *get_error_code_string(NxErrorCode code);
137 static PhysxOutputStream _outputStream;
139 static const char *get_sdk_error_string(
const NxSDKCreateError &error);
142 #include "physxManager.I"
144 #endif // PHYSXMANAGER_H
Descriptor for PhysxScene.
The central interface to the PhysX subsystem.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
A scene is a collection of bodies, constraints, and effectors which can interact. ...
Descriptor class for height fields.
This class exists just to provide scoping for the enums shared by PhysX classes.
This is a 4-by-4 transform matrix.
This is the base quaternion class.
This is a 3-by-3 transform matrix.