34#include "extensions/PxJoint.h"
36#include "foundation/PxUserAllocated.h"
37#include "PxPvdDataStream.h"
38#include "PvdTypeNames.h"
39#include "PxPvdObjectModelBaseTypes.h"
41#if PX_LINUX && PX_CLANG
42#pragma clang diagnostic push
43#pragma clang diagnostic ignored "-Wreserved-identifier"
45#include "PxExtensionMetaDataObjects.h"
46#if PX_LINUX && PX_CLANG
47#pragma clang diagnostic pop
57class PxPrismaticJoint;
59class PxSphericalJoint;
62class PxRackAndPinionJoint;
69 #define DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP( type ) DEFINE_PVD_TYPE_NAME_MAP( physx::type, "physx3", #type )
71 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxJoint)
73 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxFixedJoint)
75 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxDistanceJoint)
77 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxContactJoint)
79 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxPrismaticJoint)
81 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxRevoluteJoint)
83 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxSphericalJoint)
85 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxD6Joint)
87 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxGearJoint)
89 DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP(PxRackAndPinionJoint)
91#undef DEFINE_NATIVE_PVD_PHYSX3_TYPE_MAP
99 using namespace physx::pvdsdk;
103 Pvd& operator=(
const Pvd&);
112 PvdNameSpace& operator=(
const PvdNameSpace&);
119 template<
typename TObjType>
122 inStream.createInstance( &inSource );
123 inStream.pushBackObjectRef( c.getScene(),
"Joints", &inSource );
127 ConstraintUpdateCmd &operator=(
const ConstraintUpdateCmd&) { PX_ASSERT(0);
return *
this; }
140 ConstraintUpdateCmd(
const ConstraintUpdateCmd& cmd)
141 :
PvdDataStream::PvdCommand(), mConstraint(cmd.mConstraint), mJoint(cmd.mJoint)
147 PX_ASSERT(inStream_.isInstanceValid(&mJoint));
149 return ((actor0 == NULL) || inStream_.isInstanceValid(actor0))
150 && ((actor1 == NULL) || inStream_.isInstanceValid(actor1));
155 if(!inStream_.isInstanceValid(&mJoint))
159 mConstraint.
getActors( actor0_, actor1_ );
161 if ( actor0_ && (inStream_.isInstanceValid(actor0_)) )
162 inStream_.pushBackObjectRef( actor0_,
"Joints", &mJoint );
163 if ( actor1_ && (inStream_.isInstanceValid(actor1_)) )
164 inStream_.pushBackObjectRef( actor1_,
"Joints", &mJoint );
165 const void* parent = actor0_ ? actor0_ : actor1_;
166 inStream_.setPropertyValue( &mJoint,
"Parent", parent );
170 ConstraintUpdateCmd* cmd = PX_PLACEMENT_NEW(inStream.allocateMemForCmd(
sizeof(ConstraintUpdateCmd)),
171 ConstraintUpdateCmd)(c, inSource);
173 if(cmd->canRun( inStream ))
174 cmd->run( inStream );
176 inStream.pushPvdCommand( *cmd );
179 template<
typename jo
inttype,
typename structValue>
180 static void updatePvdProperties(
PvdDataStream& pvdConnection,
const jointtype& joint)
182 structValue theValueStruct( &joint );
183 pvdConnection.setPropertyMessage( &joint, theValueStruct );
186 template<
typename jo
inttype>
189 template<
typename jo
inttype>
192 createInstance<jointtype>( pvdConnection, c, joint );
196 static void sendClassDescriptions(
PvdDataStream& pvdConnection);
PxActor is the base class for the main simulation objects in the physics SDK.
Definition PxActor.h:201
A plugin class for implementing constraints.
Definition PxConstraint.h:100
virtual void getActors(PxRigidActor *&actor0, PxRigidActor *&actor1) const =0
Retrieves the actors for this constraint.
a base interface providing common functionality for PhysX joints
Definition PxJoint.h:105
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition PxRigidActor.h:53
Definition PxUserAllocated.h:43
Definition PxPvdDataStream.h:241
Definition PxPvdDataStream.h:203
Definition PxPvdDataStream.h:98
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition PxExtensionAutoGeneratedMetaDataObjects.h:293
Definition PxExtensionAutoGeneratedMetaDataObjects.h:409
Definition PxExtensionAutoGeneratedMetaDataObjects.h:565
Definition PxExtensionAutoGeneratedMetaDataObjects.h:207
Definition PxExtensionAutoGeneratedMetaDataObjects.h:47
Definition PxExtensionAutoGeneratedMetaDataObjects.h:631
Definition PxExtensionAutoGeneratedMetaDataObjects.h:151
Definition PxExtensionAutoGeneratedMetaDataObjects.h:715
Definition PxExtensionAutoGeneratedMetaDataObjects.h:809