mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Removing PT (PointerTo) makro where not required, part 1
This commit is contained in:
parent
43e7eef6d1
commit
069cc6aab9
@ -43,7 +43,7 @@ link(NxActor *actorPtr) {
|
||||
for (NxU32 i=0; i < nShapes; i++) {
|
||||
if (shapes[i]->getName() == NULL) shapes[i]->setName("");
|
||||
|
||||
PT(PhysxShape) shape = PhysxShape::factory(shapes[i]->getType());
|
||||
PhysxShape *shape = PhysxShape::factory(shapes[i]->getType());
|
||||
shape->link(shapes[i]);
|
||||
}
|
||||
}
|
||||
@ -61,7 +61,7 @@ unlink() {
|
||||
NxU32 nShapes = _ptr->getNbShapes();
|
||||
|
||||
for (NxU32 i=0; i < nShapes; i++) {
|
||||
PT(PhysxShape) shape = (PhysxShape *)shapes[i]->userData;
|
||||
PhysxShape *shape = (PhysxShape *)shapes[i]->userData;
|
||||
shape->unlink();
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ release() {
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PhysxActor::
|
||||
link_controller(PT(PhysxController) controller) {
|
||||
link_controller(PhysxController *controller) {
|
||||
|
||||
_controller = controller;
|
||||
}
|
||||
@ -350,7 +350,7 @@ get_node_path() const {
|
||||
// Access: Published
|
||||
// Description: Retrieves the scene which this actor belongs to.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxScene) PhysxActor::
|
||||
PhysxScene *PhysxActor::
|
||||
get_scene() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -387,13 +387,13 @@ get_num_shapes() const {
|
||||
// with a call to update_mass_from_shapes() to do
|
||||
// that.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxShape) PhysxActor::
|
||||
PhysxShape *PhysxActor::
|
||||
create_shape(PhysxShapeDesc &desc) {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
nassertr(desc.is_valid(),NULL);
|
||||
|
||||
PT(PhysxShape) shape = PhysxShape::factory(desc.ptr()->getType());
|
||||
PhysxShape *shape = PhysxShape::factory(desc.ptr()->getType());
|
||||
nassertr(shape, NULL);
|
||||
|
||||
NxShape *shapePtr = _ptr->createShape(*desc.ptr());
|
||||
@ -411,7 +411,7 @@ create_shape(PhysxShapeDesc &desc) {
|
||||
// array of shapes. Index must be in the range from
|
||||
// zero to (number-of-shapes minus 1).
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxShape) PhysxActor::
|
||||
PhysxShape *PhysxActor::
|
||||
get_shape(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -432,7 +432,7 @@ get_shape(unsigned int idx) const {
|
||||
// shape's name matches the specified name is
|
||||
// returned, or NULL if no shape has a matching name.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxShape) PhysxActor::
|
||||
PhysxShape *PhysxActor::
|
||||
get_shape_by_name(const char *name) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
@ -84,7 +84,7 @@ PUBLISHED:
|
||||
float compute_kinetic_energy() const;
|
||||
bool update_mass_from_shapes(float density, float totalMass);
|
||||
|
||||
PT(PhysxScene) get_scene() const;
|
||||
PhysxScene *get_scene() const;
|
||||
|
||||
// NodePath
|
||||
void attach_node_path(const NodePath &np);
|
||||
@ -93,9 +93,9 @@ PUBLISHED:
|
||||
|
||||
// Shapes
|
||||
unsigned int get_num_shapes() const;
|
||||
PT(PhysxShape) create_shape(PhysxShapeDesc &desc);
|
||||
PT(PhysxShape) get_shape(unsigned int idx) const;
|
||||
PT(PhysxShape) get_shape_by_name(const char *name) const;
|
||||
PhysxShape *create_shape(PhysxShapeDesc &desc);
|
||||
PhysxShape *get_shape(unsigned int idx) const;
|
||||
PhysxShape *get_shape_by_name(const char *name) const;
|
||||
MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
|
||||
|
||||
// Forces
|
||||
@ -189,7 +189,7 @@ PUBLISHED:
|
||||
public:
|
||||
INLINE NxActor *ptr() const { return _ptr; };
|
||||
|
||||
void link_controller(PT(PhysxController) controller);
|
||||
void link_controller(PhysxController *controller);
|
||||
void link(NxActor *ptr);
|
||||
void unlink();
|
||||
|
||||
|
@ -25,7 +25,7 @@ TypeHandle PhysxContactPair::_type_handle;
|
||||
// Description: Returns the first of the two actors that makes up
|
||||
// this pair.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxActor) PhysxContactPair::
|
||||
PhysxActor *PhysxContactPair::
|
||||
get_actor_a() const {
|
||||
|
||||
NxActor *actorPtr = _pair.actors[0];
|
||||
@ -38,7 +38,7 @@ get_actor_a() const {
|
||||
// Description: Returns the second of the two actors that make up
|
||||
// his pair.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxActor) PhysxContactPair::
|
||||
PhysxActor *PhysxContactPair::
|
||||
get_actor_b() const {
|
||||
|
||||
NxActor *actorPtr = _pair.actors[1];
|
||||
|
@ -36,8 +36,8 @@ class EXPCL_PANDAPHYSX PhysxContactPair : public TypedReferenceCount {
|
||||
PUBLISHED:
|
||||
INLINE ~PhysxContactPair();
|
||||
|
||||
PT(PhysxActor) get_actor_a() const;
|
||||
PT(PhysxActor) get_actor_b() const;
|
||||
PhysxActor *get_actor_a() const;
|
||||
PhysxActor *get_actor_b() const;
|
||||
LVector3f get_sum_normal_force() const;
|
||||
LVector3f get_sum_friction_force() const;
|
||||
|
||||
|
@ -43,7 +43,7 @@ release() {
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxController) PhysxController::
|
||||
PhysxController *PhysxController::
|
||||
factory(NxControllerType controllerType) {
|
||||
|
||||
switch (controllerType) {
|
||||
@ -67,7 +67,7 @@ factory(NxControllerType controllerType) {
|
||||
// Description: Retrieves the actor which this controller is
|
||||
// associated with.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxActor) PhysxController::
|
||||
PhysxActor *PhysxController::
|
||||
get_actor() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
@ -37,7 +37,7 @@ class EXPCL_PANDAPHYSX PhysxController : public PhysxObject, public PhysxEnums {
|
||||
PUBLISHED:
|
||||
void release();
|
||||
|
||||
PT(PhysxActor) get_actor() const;
|
||||
PhysxActor *get_actor() const;
|
||||
|
||||
void set_pos(const LPoint3f &pos);
|
||||
void set_sharpness(float sharpness);
|
||||
@ -64,7 +64,7 @@ PUBLISHED:
|
||||
public:
|
||||
void update(float dt);
|
||||
|
||||
static PT(PhysxController) factory(NxControllerType shapeType);
|
||||
static PhysxController *factory(NxControllerType shapeType);
|
||||
|
||||
virtual NxController *ptr() const = 0;
|
||||
|
||||
|
@ -36,7 +36,7 @@ link(NxForceField *materialPtr) {
|
||||
scene->_forcefields.add(this);
|
||||
|
||||
// Link include shape group
|
||||
PT(PhysxForceFieldShapeGroup) group = new PhysxForceFieldShapeGroup();
|
||||
PhysxForceFieldShapeGroup *group = new PhysxForceFieldShapeGroup();
|
||||
group->link(&(_ptr->getIncludeShapeGroup()));
|
||||
_ptr->getIncludeShapeGroup().setName("");
|
||||
}
|
||||
@ -50,7 +50,7 @@ void PhysxForceField::
|
||||
unlink() {
|
||||
|
||||
// Unlink inlcude shape group
|
||||
PT(PhysxForceFieldShapeGroup) group = (PhysxForceFieldShapeGroup *)(_ptr->getIncludeShapeGroup().userData);
|
||||
PhysxForceFieldShapeGroup *group = (PhysxForceFieldShapeGroup *)(_ptr->getIncludeShapeGroup().userData);
|
||||
group->unlink();
|
||||
|
||||
// Unlink self
|
||||
@ -105,7 +105,7 @@ get_name() const {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxScene) PhysxForceField::
|
||||
PhysxScene *PhysxForceField::
|
||||
get_scene() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -117,7 +117,7 @@ get_scene() const {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceFieldShapeGroup) PhysxForceField::
|
||||
PhysxForceFieldShapeGroup *PhysxForceField::
|
||||
get_include_shape_group() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -141,7 +141,7 @@ get_num_shape_groups() const {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceFieldShapeGroup) PhysxForceField::
|
||||
PhysxForceFieldShapeGroup *PhysxForceField::
|
||||
get_shape_group(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
@ -48,11 +48,11 @@ PUBLISHED:
|
||||
void set_name(const char *name);
|
||||
|
||||
const char *get_name() const;
|
||||
PT(PhysxScene) get_scene() const;
|
||||
PT(PhysxForceFieldShapeGroup) get_include_shape_group() const;
|
||||
PhysxScene *get_scene() const;
|
||||
PhysxForceFieldShapeGroup *get_include_shape_group() const;
|
||||
|
||||
unsigned int get_num_shape_groups() const;
|
||||
PT(PhysxForceFieldShapeGroup) get_shape_group(unsigned int idx) const;
|
||||
PhysxForceFieldShapeGroup *get_shape_group(unsigned int idx) const;
|
||||
MAKE_SEQ(get_shape_groups, get_num_shape_groups, get_shape_group);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -42,7 +42,7 @@ release() {
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceFieldShape) PhysxForceFieldShape::
|
||||
PhysxForceFieldShape *PhysxForceFieldShape::
|
||||
factory(NxShapeType shapeType) {
|
||||
|
||||
switch (shapeType) {
|
||||
@ -70,7 +70,7 @@ factory(NxShapeType shapeType) {
|
||||
// Description: Returns the owning force field if this is a shape
|
||||
// of an include group, else NULL will be returned.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceField) PhysxForceFieldShape::
|
||||
PhysxForceField *PhysxForceFieldShape::
|
||||
get_force_field() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -87,7 +87,7 @@ get_force_field() const {
|
||||
// Access: Published
|
||||
// Description: Returns the owning force field shape group.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceFieldShapeGroup) PhysxForceFieldShape::
|
||||
PhysxForceFieldShapeGroup *PhysxForceFieldShape::
|
||||
get_shape_group() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
@ -39,8 +39,8 @@ class EXPCL_PANDAPHYSX PhysxForceFieldShape : public PhysxObject, public PhysxEn
|
||||
PUBLISHED:
|
||||
void release();
|
||||
|
||||
PT(PhysxForceField) get_force_field() const;
|
||||
PT(PhysxForceFieldShapeGroup) get_shape_group() const;
|
||||
PhysxForceField *get_force_field() const;
|
||||
PhysxForceFieldShapeGroup *get_shape_group() const;
|
||||
|
||||
void set_name(const char *name);
|
||||
void set_mat(const LMatrix4f &mat);
|
||||
@ -54,7 +54,7 @@ PUBLISHED:
|
||||
INLINE void ls(ostream &out, int indent_level=0) const;
|
||||
|
||||
public:
|
||||
static PT(PhysxForceFieldShape) factory(NxShapeType shapeType);
|
||||
static PhysxForceFieldShape *factory(NxShapeType shapeType);
|
||||
|
||||
virtual NxForceFieldShape *ptr() const = 0;
|
||||
|
||||
|
@ -40,7 +40,7 @@ link(NxForceFieldShapeGroup *groupPtr) {
|
||||
_ptr->resetShapesIterator();
|
||||
for (NxU32 i=0; i < nShapes; i++) {
|
||||
NxForceFieldShape *shapePtr = _ptr->getNextShape();
|
||||
PT(PhysxForceFieldShape) shape = PhysxForceFieldShape::factory(shapePtr->getType());
|
||||
PhysxForceFieldShape *shape = PhysxForceFieldShape::factory(shapePtr->getType());
|
||||
shape->link(shapePtr);
|
||||
}
|
||||
}
|
||||
@ -58,7 +58,7 @@ unlink() {
|
||||
_ptr->resetShapesIterator();
|
||||
for (NxU32 i=0; i < nShapes; i++) {
|
||||
NxForceFieldShape *shapePtr = _ptr->getNextShape();
|
||||
PT(PhysxForceFieldShape) shape = (PhysxForceFieldShape *)shapePtr->userData;
|
||||
PhysxForceFieldShape *shape = (PhysxForceFieldShape *)shapePtr->userData;
|
||||
shape->unlink();
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ release() {
|
||||
// Description: Returns the scene that owns this force field shape
|
||||
// group.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxScene) PhysxForceFieldShapeGroup::
|
||||
PhysxScene *PhysxForceFieldShapeGroup::
|
||||
get_scene() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -104,7 +104,7 @@ get_scene() const {
|
||||
// Description: Returns the force field of this group if this is
|
||||
// an include group. If not NULL will be returned.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceField) PhysxForceFieldShapeGroup::
|
||||
PhysxForceField *PhysxForceFieldShapeGroup::
|
||||
get_force_field() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -177,13 +177,13 @@ get_num_shapes() const {
|
||||
// Description: Creates a force field shape and adds it to the
|
||||
// group.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceFieldShape) PhysxForceFieldShapeGroup::
|
||||
PhysxForceFieldShape *PhysxForceFieldShapeGroup::
|
||||
create_shape(PhysxForceFieldShapeDesc &desc) {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
nassertr(desc.is_valid(),NULL);
|
||||
|
||||
PT(PhysxForceFieldShape) shape = PhysxForceFieldShape::factory(desc.ptr()->getType());
|
||||
PhysxForceFieldShape *shape = PhysxForceFieldShape::factory(desc.ptr()->getType());
|
||||
nassertr(shape, NULL);
|
||||
|
||||
NxForceFieldShape *shapePtr = _ptr->createShape(*desc.ptr());
|
||||
@ -199,7 +199,7 @@ create_shape(PhysxForceFieldShapeDesc &desc) {
|
||||
// Access: Published
|
||||
// Description: Returns the i-th shape in the force field group.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceFieldShape) PhysxForceFieldShapeGroup::
|
||||
PhysxForceFieldShape *PhysxForceFieldShapeGroup::
|
||||
get_shape(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
@ -41,16 +41,16 @@ PUBLISHED:
|
||||
|
||||
void save_to_desc(PhysxForceFieldShapeGroupDesc &groupDesc) const;
|
||||
|
||||
PT(PhysxScene) get_scene() const;
|
||||
PT(PhysxForceField) get_force_field() const;
|
||||
PhysxScene *get_scene() const;
|
||||
PhysxForceField *get_force_field() const;
|
||||
const char *get_name() const;
|
||||
|
||||
void set_name(const char *name);
|
||||
|
||||
// Shapes
|
||||
unsigned int get_num_shapes() const;
|
||||
PT(PhysxForceFieldShape) create_shape(PhysxForceFieldShapeDesc &desc);
|
||||
PT(PhysxForceFieldShape) get_shape(unsigned int idx) const;
|
||||
PhysxForceFieldShape *create_shape(PhysxForceFieldShapeDesc &desc);
|
||||
PhysxForceFieldShape *get_shape(unsigned int idx) const;
|
||||
MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -48,7 +48,7 @@ release() {
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxJoint) PhysxJoint::
|
||||
PhysxJoint *PhysxJoint::
|
||||
factory(NxJointType shapeType) {
|
||||
|
||||
switch (shapeType) {
|
||||
@ -121,7 +121,7 @@ get_name() const {
|
||||
// Description: Retrieves the actor which this joint is associated
|
||||
// with.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxActor) PhysxJoint::
|
||||
PhysxActor *PhysxJoint::
|
||||
get_actor(unsigned int idx) const {
|
||||
|
||||
nassertr_always(idx < 2, NULL);
|
||||
@ -138,7 +138,7 @@ get_actor(unsigned int idx) const {
|
||||
// Description: Retrieves the scene which this joint is associated
|
||||
// with.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxScene) PhysxJoint::
|
||||
PhysxScene *PhysxJoint::
|
||||
get_scene() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
@ -40,8 +40,8 @@ class EXPCL_PANDAPHYSX PhysxJoint : public PhysxObject, public PhysxEnums {
|
||||
PUBLISHED:
|
||||
void release();
|
||||
|
||||
PT(PhysxActor) get_actor(unsigned int idx) const;
|
||||
PT(PhysxScene) get_scene() const;
|
||||
PhysxActor *get_actor(unsigned int idx) const;
|
||||
PhysxScene *get_scene() const;
|
||||
|
||||
void purge_limit_planes();
|
||||
|
||||
@ -64,7 +64,7 @@ PUBLISHED:
|
||||
INLINE void ls(ostream &out, int indent_level=0) const;
|
||||
|
||||
public:
|
||||
static PT(PhysxJoint) factory(NxJointType shapeType);
|
||||
static PhysxJoint *factory(NxJointType shapeType);
|
||||
|
||||
virtual NxJoint *ptr() const = 0;
|
||||
|
||||
|
@ -250,7 +250,7 @@ get_joint_flag(const PhysxJointFlag flag) const {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxActor) PhysxJointDesc::
|
||||
PhysxActor *PhysxJointDesc::
|
||||
get_actor(unsigned int idx) const {
|
||||
|
||||
nassertr_always(idx < 2, NULL);
|
||||
|
@ -56,7 +56,7 @@ PUBLISHED:
|
||||
LVector3f get_local_normal(unsigned int idx) const;
|
||||
LVector3f get_local_axis(unsigned int idx) const;
|
||||
LPoint3f get_local_anchor(unsigned int idx) const;
|
||||
PT(PhysxActor) get_actor(unsigned int idx) const;
|
||||
PhysxActor *get_actor(unsigned int idx) const;
|
||||
|
||||
public:
|
||||
virtual NxJointDesc *ptr() const = 0;
|
||||
|
@ -71,7 +71,7 @@ release() {
|
||||
// Access: Published
|
||||
// Description: Returns the scene that owns this material.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxScene) PhysxMaterial::
|
||||
PhysxScene *PhysxMaterial::
|
||||
get_scene() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
@ -56,7 +56,7 @@ PUBLISHED:
|
||||
INLINE PhysxMaterial();
|
||||
INLINE ~PhysxMaterial();
|
||||
|
||||
PT(PhysxScene) get_scene() const;
|
||||
PhysxScene *get_scene() const;
|
||||
unsigned short get_material_index() const;
|
||||
|
||||
void load_from_desc(const PhysxMaterialDesc &materialDesc);
|
||||
|
@ -24,7 +24,7 @@ bool PhysxOverlapReport::
|
||||
onEvent(NxU32 nbEntities, NxShape **entities) {
|
||||
|
||||
for (unsigned int i=0; i<nbEntities; i++) {
|
||||
PT(PhysxShape) shape = (PhysxShape *)entities[i]->userData;
|
||||
PhysxShape *shape = (PhysxShape *)entities[i]->userData;
|
||||
_overlaps.push_back(shape);
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ get_num_overlaps() const {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxShape) PhysxOverlapReport::
|
||||
PhysxShape *PhysxOverlapReport::
|
||||
get_first_overlap() {
|
||||
|
||||
_iterator = _overlaps.begin();
|
||||
@ -59,7 +59,7 @@ get_first_overlap() {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxShape) PhysxOverlapReport::
|
||||
PhysxShape *PhysxOverlapReport::
|
||||
get_next_overlap() {
|
||||
|
||||
if (_iterator != _overlaps.end()) {
|
||||
@ -75,7 +75,7 @@ get_next_overlap() {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxShape) PhysxOverlapReport::
|
||||
PhysxShape *PhysxOverlapReport::
|
||||
get_overlap(unsigned int idx) {
|
||||
|
||||
nassertr(idx < get_num_overlaps(), NULL);
|
||||
|
@ -36,9 +36,9 @@ class EXPCL_PANDAPHYSX PhysxOverlapReport : public PhysxUserEntityReport {
|
||||
|
||||
PUBLISHED:
|
||||
unsigned int get_num_overlaps() const;
|
||||
PT(PhysxShape) get_first_overlap();
|
||||
PT(PhysxShape) get_next_overlap();
|
||||
PT(PhysxShape) get_overlap(unsigned int idx);
|
||||
PhysxShape *get_first_overlap();
|
||||
PhysxShape *get_next_overlap();
|
||||
PhysxShape *get_overlap(unsigned int idx);
|
||||
MAKE_SEQ(get_overlaps, get_num_overlaps, get_overlap);
|
||||
|
||||
public:
|
||||
|
@ -32,7 +32,7 @@ is_empty() const {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxShape) PhysxRaycastHit::
|
||||
PhysxShape *PhysxRaycastHit::
|
||||
get_shape() const {
|
||||
|
||||
nassertr_always(_hit.shape, NULL);
|
||||
|
@ -37,7 +37,7 @@ PUBLISHED:
|
||||
|
||||
bool is_empty() const;
|
||||
|
||||
PT(PhysxShape) get_shape() const;
|
||||
PhysxShape *get_shape() const;
|
||||
LPoint3f get_impact_pos() const;
|
||||
LVector3f get_impact_normal() const;
|
||||
float get_distance() const;
|
||||
|
@ -51,7 +51,7 @@ link(NxScene *scenePtr) {
|
||||
|
||||
while (NxU32 i=_ptr->getMaterialArray(materials, 5, iterator)) {
|
||||
while(i--) {
|
||||
PT(PhysxMaterial) material = new PhysxMaterial();
|
||||
PhysxMaterial *material = new PhysxMaterial();
|
||||
material->link(materials[i]);
|
||||
}
|
||||
}
|
||||
@ -70,7 +70,7 @@ unlink() {
|
||||
|
||||
for (NxU32 i=0; i < nControllers; i++) {
|
||||
NxController *controllerPtr = _cm->getController(i);
|
||||
PT(PhysxController) controller = (PhysxController *)controllerPtr->getUserData();
|
||||
PhysxController *controller = (PhysxController *)controllerPtr->getUserData();
|
||||
controller->unlink();
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ unlink() {
|
||||
NxU32 nActors = _ptr->getNbActors();
|
||||
|
||||
for (NxU32 i=0; i < nActors; i++) {
|
||||
PT(PhysxActor) actor = (PhysxActor *)actors[i]->userData;
|
||||
PhysxActor *actor = (PhysxActor *)actors[i]->userData;
|
||||
|
||||
// Actor could have already been unlinked by controller
|
||||
if (actor) {
|
||||
@ -93,7 +93,7 @@ unlink() {
|
||||
_ptr->resetJointIterator();
|
||||
for (NxU32 i=0; i < nJoints; i++) {
|
||||
NxJoint *jointPtr = _ptr->getNextJoint();
|
||||
PT(PhysxJoint) joint = (PhysxJoint *)jointPtr->userData;
|
||||
PhysxJoint *joint = (PhysxJoint *)jointPtr->userData;
|
||||
joint->unlink();
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ unlink() {
|
||||
NxU32 nFields = _ptr->getNbForceFields();
|
||||
|
||||
for (NxU32 i=0; i < nFields; i++) {
|
||||
PT(PhysxForceField) field = (PhysxForceField *)fields[i]->userData;
|
||||
PhysxForceField *field = (PhysxForceField *)fields[i]->userData;
|
||||
field->unlink();
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ unlink() {
|
||||
_ptr->resetForceFieldShapeGroupsIterator();
|
||||
for (NxU32 i=0; i < nGroups; i++) {
|
||||
NxForceFieldShapeGroup *groupPtr = _ptr->getNextForceFieldShapeGroup();
|
||||
PT(PhysxForceFieldShapeGroup) group = (PhysxForceFieldShapeGroup *)groupPtr->userData;
|
||||
PhysxForceFieldShapeGroup *group = (PhysxForceFieldShapeGroup *)groupPtr->userData;
|
||||
group->unlink();
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ unlink() {
|
||||
|
||||
while (NxU32 i=_ptr->getMaterialArray(materials, 5, iterator)) {
|
||||
while(i--) {
|
||||
PT(PhysxMaterial) material = (PhysxMaterial *)materials[i]->userData;
|
||||
PhysxMaterial *material = (PhysxMaterial *)materials[i]->userData;
|
||||
material->unlink();
|
||||
}
|
||||
}
|
||||
@ -323,13 +323,13 @@ get_num_actors() const {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxActor) PhysxScene::
|
||||
PhysxActor *PhysxScene::
|
||||
create_actor(PhysxActorDesc &desc) {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
nassertr(desc.is_valid(),NULL);
|
||||
|
||||
PT(PhysxActor) actor = new PhysxActor();
|
||||
PhysxActor *actor = new PhysxActor();
|
||||
nassertr(actor, NULL);
|
||||
|
||||
NxActor *actorPtr = _ptr->createActor(desc._desc);
|
||||
@ -345,7 +345,7 @@ create_actor(PhysxActorDesc &desc) {
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxActor) PhysxScene::
|
||||
PhysxActor *PhysxScene::
|
||||
get_actor(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -371,7 +371,7 @@ get_actor(unsigned int idx) const {
|
||||
// Reparent it to render and leave position at
|
||||
// (0,0,0).
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxDebugGeomNode) PhysxScene::
|
||||
PhysxDebugGeomNode *PhysxScene::
|
||||
get_debug_geom_node() {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -505,13 +505,13 @@ get_num_materials() const {
|
||||
// references an undefined material, the default
|
||||
// material with index 0 is used instead.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxMaterial) PhysxScene::
|
||||
PhysxMaterial *PhysxScene::
|
||||
create_material(PhysxMaterialDesc &desc) {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
nassertr(desc.is_valid(),NULL);
|
||||
|
||||
PT(PhysxMaterial) material = new PhysxMaterial();
|
||||
PhysxMaterial *material = new PhysxMaterial();
|
||||
nassertr(material, NULL);
|
||||
|
||||
NxMaterial *materialPtr = _ptr->createMaterial(desc._desc);
|
||||
@ -528,12 +528,12 @@ create_material(PhysxMaterialDesc &desc) {
|
||||
// Description: Creates a new PhysxMaterial using the default
|
||||
// settings of PhysxMaterialDesc.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxMaterial) PhysxScene::
|
||||
PhysxMaterial *PhysxScene::
|
||||
create_material() {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
||||
PT(PhysxMaterial) material = new PhysxMaterial();
|
||||
PhysxMaterial *material = new PhysxMaterial();
|
||||
nassertr(material, NULL);
|
||||
|
||||
NxMaterialDesc desc;
|
||||
@ -575,7 +575,7 @@ get_hightest_material_index() const {
|
||||
// material that has been released, then the default
|
||||
// material is returned, but no error is reported.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxMaterial) PhysxScene::
|
||||
PhysxMaterial *PhysxScene::
|
||||
get_material_from_index(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -592,7 +592,7 @@ get_material_from_index(unsigned int idx) const {
|
||||
// materials. See also get_material_from_index,
|
||||
// which retrieves a material by it's material index.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxMaterial) PhysxScene::
|
||||
PhysxMaterial *PhysxScene::
|
||||
get_material(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -630,13 +630,13 @@ get_num_controllers() const {
|
||||
// Access: Published
|
||||
// Description: Creates a new character controller.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxController) PhysxScene::
|
||||
PhysxController *PhysxScene::
|
||||
create_controller(PhysxControllerDesc &desc) {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
nassertr(desc.is_valid(),NULL);
|
||||
|
||||
PT(PhysxController) controller = PhysxController::factory(desc.ptr()->getType());
|
||||
PhysxController *controller = PhysxController::factory(desc.ptr()->getType());
|
||||
nassertr(controller, NULL);
|
||||
|
||||
desc.ptr()->callback = &_controller_report;
|
||||
@ -656,7 +656,7 @@ create_controller(PhysxControllerDesc &desc) {
|
||||
// Access: Published
|
||||
// Description: Retrieves the n-th controller within the scene.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxController) PhysxScene::
|
||||
PhysxController *PhysxScene::
|
||||
get_controller(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -687,13 +687,13 @@ get_num_joints() const {
|
||||
// Access: Published
|
||||
// Description: Creates a joint in this scene.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxJoint) PhysxScene::
|
||||
PhysxJoint *PhysxScene::
|
||||
create_joint(PhysxJointDesc &desc) {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
nassertr(desc.is_valid(),NULL);
|
||||
|
||||
PT(PhysxJoint) joint = PhysxJoint::factory(desc.ptr()->getType());
|
||||
PhysxJoint *joint = PhysxJoint::factory(desc.ptr()->getType());
|
||||
nassertr(joint, NULL);
|
||||
|
||||
NxJoint *jointPtr = _ptr->createJoint(*desc.ptr());
|
||||
@ -710,7 +710,7 @@ create_joint(PhysxJointDesc &desc) {
|
||||
// Description: Retrieve the n-th joint from the array of all the
|
||||
// joints in the scene.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxJoint) PhysxScene::
|
||||
PhysxJoint *PhysxScene::
|
||||
get_joint(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -744,7 +744,7 @@ get_num_force_fields() const {
|
||||
// Access: Published
|
||||
// Description: Creates a force field in this scene.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceField) PhysxScene::
|
||||
PhysxForceField *PhysxScene::
|
||||
create_force_field(PhysxForceFieldDesc &desc) {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -754,7 +754,7 @@ create_force_field(PhysxForceFieldDesc &desc) {
|
||||
nassertr(desc.is_valid(),NULL);
|
||||
|
||||
// Create the force field
|
||||
PT(PhysxForceField) field = new PhysxForceField();
|
||||
PhysxForceField *field = new PhysxForceField();
|
||||
nassertr(field, NULL);
|
||||
|
||||
NxForceField *fieldPtr = _ptr->createForceField(desc._desc);
|
||||
@ -771,7 +771,7 @@ create_force_field(PhysxForceFieldDesc &desc) {
|
||||
// Description: Returns the n-th force field from the array of
|
||||
// all the force fields in the scene.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceField) PhysxScene::
|
||||
PhysxForceField *PhysxScene::
|
||||
get_force_field(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -802,12 +802,12 @@ get_num_force_field_shape_groups() const {
|
||||
// Description: Creates a new force field shape group in this
|
||||
// scene.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceFieldShapeGroup) PhysxScene::
|
||||
PhysxForceFieldShapeGroup *PhysxScene::
|
||||
create_force_field_shape_group(PhysxForceFieldShapeGroupDesc &desc) {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
||||
PT(PhysxForceFieldShapeGroup) group = new PhysxForceFieldShapeGroup();
|
||||
PhysxForceFieldShapeGroup *group = new PhysxForceFieldShapeGroup();
|
||||
nassertr(group, NULL);
|
||||
|
||||
NxForceFieldShapeGroup *groupPtr = _ptr->createForceFieldShapeGroup(desc._desc);
|
||||
@ -824,7 +824,7 @@ create_force_field_shape_group(PhysxForceFieldShapeGroupDesc &desc) {
|
||||
// Description: Returns the n-th force field shape group in this
|
||||
// scene
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxForceFieldShapeGroup) PhysxScene::
|
||||
PhysxForceFieldShapeGroup *PhysxScene::
|
||||
get_force_field_shape_group(unsigned int idx) const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
@ -1077,17 +1077,6 @@ overlap_capsule_shapes(const LPoint3f &p0, const LPoint3f &p1, float radius,
|
||||
return report;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//################################
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PhysxScene::set_actor_pair_flag
|
||||
// Access: Published
|
||||
|
@ -77,7 +77,7 @@ PUBLISHED:
|
||||
void set_timing_variable();
|
||||
void set_timing_fixed(float maxTimestep=1.0f/60.0f, unsigned int maxIter=8);
|
||||
|
||||
PT(PhysxDebugGeomNode) get_debug_geom_node();
|
||||
PhysxDebugGeomNode *get_debug_geom_node();
|
||||
|
||||
void enable_contact_reporting(bool enabled);
|
||||
bool is_contact_reporting_enabled() const;
|
||||
@ -95,41 +95,41 @@ PUBLISHED:
|
||||
|
||||
// Actors
|
||||
unsigned int get_num_actors() const;
|
||||
PT(PhysxActor) create_actor(PhysxActorDesc &desc);
|
||||
PT(PhysxActor) get_actor(unsigned int idx) const;
|
||||
PhysxActor *create_actor(PhysxActorDesc &desc);
|
||||
PhysxActor *get_actor(unsigned int idx) const;
|
||||
MAKE_SEQ(get_actors, get_num_actors, get_actor);
|
||||
|
||||
// Joints
|
||||
unsigned int get_num_joints() const;
|
||||
PT(PhysxJoint) create_joint(PhysxJointDesc &desc);
|
||||
PT(PhysxJoint) get_joint(unsigned int idx) const;
|
||||
PhysxJoint *create_joint(PhysxJointDesc &desc);
|
||||
PhysxJoint *get_joint(unsigned int idx) const;
|
||||
MAKE_SEQ(get_joints, get_num_joints, get_joint);
|
||||
|
||||
// Materials
|
||||
unsigned int get_num_materials() const;
|
||||
unsigned int get_hightest_material_index() const;
|
||||
PT(PhysxMaterial) create_material(PhysxMaterialDesc &desc);
|
||||
PT(PhysxMaterial) create_material();
|
||||
PT(PhysxMaterial) get_material(unsigned int idx) const;
|
||||
PT(PhysxMaterial) get_material_from_index(unsigned int idx) const;
|
||||
PhysxMaterial *create_material(PhysxMaterialDesc &desc);
|
||||
PhysxMaterial *create_material();
|
||||
PhysxMaterial *get_material(unsigned int idx) const;
|
||||
PhysxMaterial *get_material_from_index(unsigned int idx) const;
|
||||
MAKE_SEQ(get_materials, get_num_materials, get_material);
|
||||
|
||||
// Controllers
|
||||
unsigned int get_num_controllers() const;
|
||||
PT(PhysxController) create_controller(PhysxControllerDesc &controllerDesc);
|
||||
PT(PhysxController) get_controller(unsigned int idx) const;
|
||||
PhysxController *create_controller(PhysxControllerDesc &controllerDesc);
|
||||
PhysxController *get_controller(unsigned int idx) const;
|
||||
MAKE_SEQ(get_controllers, get_num_controllers, get_controller);
|
||||
|
||||
// Force fields
|
||||
unsigned int get_num_force_fields() const;
|
||||
PT(PhysxForceField) create_force_field(PhysxForceFieldDesc &desc);
|
||||
PT(PhysxForceField) get_force_field(unsigned int idx) const;
|
||||
PhysxForceField *create_force_field(PhysxForceFieldDesc &desc);
|
||||
PhysxForceField *get_force_field(unsigned int idx) const;
|
||||
MAKE_SEQ(get_force_fields, get_num_force_fields, get_force_field);
|
||||
|
||||
// Force field shape groups
|
||||
unsigned int get_num_force_field_shape_groups() const;
|
||||
PT(PhysxForceFieldShapeGroup) create_force_field_shape_group(PhysxForceFieldShapeGroupDesc &desc);
|
||||
PT(PhysxForceFieldShapeGroup) get_force_field_shape_group(unsigned int idx) const;
|
||||
PhysxForceFieldShapeGroup *create_force_field_shape_group(PhysxForceFieldShapeGroupDesc &desc);
|
||||
PhysxForceFieldShapeGroup *get_force_field_shape_group(unsigned int idx) const;
|
||||
MAKE_SEQ(get_force_field_shape_groups, get_num_force_field_shape_groups, get_force_field_shape_group);
|
||||
|
||||
// Raycast queries
|
||||
|
@ -52,7 +52,7 @@ release() {
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxShape) PhysxShape::
|
||||
PhysxShape *PhysxShape::
|
||||
factory(NxShapeType shapeType) {
|
||||
|
||||
switch (shapeType) {
|
||||
@ -92,7 +92,7 @@ factory(NxShapeType shapeType) {
|
||||
// Description: Retrieves the actor which this shape is associated
|
||||
// with.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(PhysxActor) PhysxShape::
|
||||
PhysxActor *PhysxShape::
|
||||
get_actor() const {
|
||||
|
||||
nassertr(_error_type == ET_ok, NULL);
|
||||
|
@ -46,7 +46,7 @@ class EXPCL_PANDAPHYSX PhysxShape : public PhysxObject, public PhysxEnums {
|
||||
PUBLISHED:
|
||||
void release();
|
||||
|
||||
PT(PhysxActor) get_actor() const;
|
||||
PhysxActor *get_actor() const;
|
||||
|
||||
void set_name(const char *name);
|
||||
void set_flag(const PhysxShapeFlag flag, bool value);
|
||||
@ -78,7 +78,7 @@ PUBLISHED:
|
||||
INLINE void ls(ostream &out, int indent_level=0) const;
|
||||
|
||||
public:
|
||||
static PT(PhysxShape) factory(NxShapeType shapeType);
|
||||
static PhysxShape *factory(NxShapeType shapeType);
|
||||
|
||||
virtual NxShape *ptr() const = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user