PxSimpleFactory.h
Go to the documentation of this file.
1 //
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions
4 // are met:
5 // * Redistributions of source code must retain the above copyright
6 // notice, this list of conditions and the following disclaimer.
7 // * Redistributions in binary form must reproduce the above copyright
8 // notice, this list of conditions and the following disclaimer in the
9 // documentation and/or other materials provided with the distribution.
10 // * Neither the name of NVIDIA CORPORATION nor the names of its
11 // contributors may be used to endorse or promote products derived
12 // from this software without specific prior written permission.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
15 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 //
26 // Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
27 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
28 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
29 
30 
31 #ifndef PX_PHYSICS_EXTENSIONS_SIMPLE_FACTORY_H
32 #define PX_PHYSICS_EXTENSIONS_SIMPLE_FACTORY_H
33 
38 #include "foundation/PxTransform.h"
39 #include "foundation/PxPlane.h"
40 
41 #if !PX_DOXYGEN
42 namespace physx
43 {
44 #endif
45 
46  class PxPhysics;
47  class PxMaterial;
48  class PxRigidActor;
49  class PxRigidDynamic;
50  class PxRigidStatic;
51  class PxGeometry;
52  class PxShape;
53 
54 
71  const PxTransform& transform,
72  const PxGeometry& geometry,
73  PxMaterial& material,
74  PxReal density,
75  const PxTransform& shapeOffset = PxTransform(PxIdentity));
76 
77 
92  const PxTransform& transform,
93  PxShape& shape,
94  PxReal density);
95 
96 
118  const PxTransform& transform,
119  const PxGeometry& geometry,
120  PxMaterial& material,
121  PxReal density,
122  const PxTransform& shapeOffset = PxTransform(PxIdentity));
123 
124 
144  const PxTransform& transform,
145  PxShape& shape,
146  PxReal density);
147 
148 
163  const PxTransform& transform,
164  const PxGeometry& geometry,
165  PxMaterial& material,
166  const PxTransform& shapeOffset = PxTransform(PxIdentity));
167 
168 
181  const PxTransform& transform,
182  PxShape& shape);
183 
184 
197  const PxTransform& transform,
198  PxShape& shape);
199 
200 
226 PxShape* PxCloneShape(PxPhysics& physicsSDK,
227  const PxShape& shape,
228  bool isExclusive);
229 
230 
231 
257  const PxTransform& transform,
258  const PxRigidActor& actor);
259 
260 
297  const PxTransform& transform,
298  const PxRigidDynamic& body);
299 
300 
313  const PxPlane& plane,
314  PxMaterial& material);
315 
316 
329 void PxScaleRigidActor(PxRigidActor& actor, PxReal scale, bool scaleMassProps = true);
330 
331 
332 #if !PX_DOXYGEN
333 } // namespace physx
334 #endif
335 
337 #endif
Definition: GuContactBuffer.h:37
PxRigidDynamic * PxCreateDynamic(PxPhysics &sdk, const PxTransform &transform, const PxGeometry &geometry, PxMaterial &material, PxReal density, const PxTransform &shapeOffset=PxTransform(PxIdentity))
simple method to create a PxRigidDynamic actor with a single PxShape.
Definition: Px.h:84
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK.
Definition: PxRigidDynamic.h:83
PxShape * PxCloneShape(PxPhysics &physicsSDK, const PxShape &shape, bool isExclusive)
create a shape by copying attributes from another shape
PxRigidStatic * PxCreateStatic(PxPhysics &sdk, const PxTransform &transform, const PxGeometry &geometry, PxMaterial &material, const PxTransform &shapeOffset=PxTransform(PxIdentity))
simple method to create a PxRigidStatic actor with a single PxShape.
PxU8 plane[sizeof(PxPlaneGeometry)]
Definition: PxGeometryHelpers.h:219
Abstract class for collision shapes.
Definition: PxShape.h:142
float PxReal
Definition: PxSimpleTypes.h:78
PxRigidStatic * PxCreatePlane(PxPhysics &sdk, const PxPlane &plane, PxMaterial &material)
create a plane actor. The plane equation is n.x + d = 0
Representation of a plane.
Definition: PxPlane.h:50
PxRigidStatic * PxCloneStatic(PxPhysics &physicsSDK, const PxTransform &transform, const PxRigidActor &actor)
create a static body by copying attributes from another rigid actor
A geometry object.
Definition: PxGeometry.h:75
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition: PxRigidActor.h:58
void PxScaleRigidActor(PxRigidActor &actor, PxReal scale, bool scaleMassProps=true)
scale a rigid actor by a uniform scale
PxU8 geometry[sizeof(PxGeometry)]
Definition: PxGeometryHelpers.h:215
class representing a rigid euclidean transform as a quaternion and a vector
Definition: PxTransform.h:48
virtual bool isExclusive() const =0
Returns true if the shape is exclusive to an actor.
PxRigidDynamic * PxCreateKinematic(PxPhysics &sdk, const PxTransform &transform, const PxGeometry &geometry, PxMaterial &material, PxReal density, const PxTransform &shapeOffset=PxTransform(PxIdentity))
simple method to create a kinematic PxRigidDynamic actor with a single PxShape.
Material class to represent a set of surface properties.
Definition: PxMaterial.h:143
PxRigidDynamic * PxCloneDynamic(PxPhysics &physicsSDK, const PxTransform &transform, const PxRigidDynamic &body)
create a dynamic body by copying attributes from an existing body
Abstract singleton factory class used for instancing objects in the Physics SDK.
Definition: PxPhysics.h:71
PxRigidStatic represents a static rigid body simulation object in the physics SDK.
Definition: PxRigidStatic.h:59