Main Page
Class Hierarchy
Compound List
Compound Members
Include
PxRigidActor.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3
*
4
* NVIDIA CORPORATION and its licensors retain all intellectual property
5
* and proprietary rights in and to this software, related documentation
6
* and any modifications thereto. Any use, reproduction, disclosure or
7
* distribution of this software and related documentation without an express
8
* license agreement from NVIDIA CORPORATION is strictly prohibited.
9
*/
10
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12
13
14
#ifndef PX_PHYSICS_NX_RIGIDACTOR
15
#define PX_PHYSICS_NX_RIGIDACTOR
16
20
#include "
PxActor.h
"
21
#include "
PxShape.h
"
22
23
#ifndef PX_DOXYGEN
24
namespace
physx
25
{
26
#endif
27
28
class
PxConstraint
;
29
class
PxMaterial
;
30
class
PxGeometry
;
31
40
class
PxRigidActor
:
public
PxActor
41
{
42
public
:
59
virtual
void
release() = 0;
60
61
62
/************************************************************************************************/
75
virtual
PxTransform
getGlobalPose()
const
= 0;
76
102
virtual
void
setGlobalPose(
const
PxTransform
& pose,
bool
autowake =
true
) = 0;
103
104
105
/************************************************************************************************/
139
virtual
PxShape
* createShape(
const
PxGeometry
&
geometry
,
PxMaterial
*
const
* materials,
PxU16
materialCount,
PxShapeFlags
shapeFlags =
PxShapeFlag::eVISUALIZATION
|
PxShapeFlag::eSCENE_QUERY_SHAPE
|
PxShapeFlag::eSIMULATION_SHAPE
) = 0;
140
152
PX_DEPRECATED
PX_INLINE
PxShape
* createShape(
const
PxGeometry
& geometry,
PxMaterial
*
const
* materials,
PxU32
materialCount,
const
PxTransform
& localPose)
153
{
154
PxShape
* shape = createShape(geometry, materials,
PxU16
(materialCount));
155
if
(shape)
156
shape->
setLocalPose
(localPose);
157
return
shape;
158
}
159
188
PX_FORCE_INLINE
PxShape
* createShape(
const
PxGeometry
& geometry,
const
PxMaterial
& material,
PxShapeFlags
shapeFlags =
PxShapeFlag::eVISUALIZATION
|
PxShapeFlag::eSCENE_QUERY_SHAPE
|
PxShapeFlag::eSIMULATION_SHAPE
)
189
{
190
PxMaterial
* materialPtr =
const_cast<
PxMaterial
*
>
(&material);
191
return
createShape(geometry, &materialPtr, 1, shapeFlags);
192
}
193
205
PX_DEPRECATED
PX_INLINE
PxShape
* createShape(
const
PxGeometry
& geometry,
const
PxMaterial
& material,
const
PxTransform
& localPose)
206
{
207
PxShape
* shape = createShape(geometry, material);
208
if
(shape)
209
shape->
setLocalPose
(localPose);
210
return
shape;
211
}
212
213
231
virtual
void
attachShape(
PxShape
& shape) = 0;
232
233
247
virtual
void
detachShape(
PxShape
& shape,
bool
wakeOnLostTouch =
true
) = 0;
248
249
259
virtual
PxU32
getNbShapes()
const
= 0;
260
261
278
virtual
PxU32
getShapes(
PxShape
** userBuffer,
PxU32
bufferSize,
PxU32
startIndex=0)
const
= 0;
279
280
/************************************************************************************************/
293
virtual
PxU32
getNbConstraints()
const
= 0;
294
295
310
virtual
PxU32
getConstraints(
PxConstraint
** userBuffer,
PxU32
bufferSize,
PxU32
startIndex=0)
const
= 0;
311
312
protected
:
313
PX_INLINE
PxRigidActor
(
PxType
concreteType,
PxBaseFlags
baseFlags) :
PxActor
(concreteType, baseFlags) {}
314
PX_INLINE
PxRigidActor
(
PxBaseFlags
baseFlags) :
PxActor
(baseFlags) {}
315
virtual
~PxRigidActor
() {}
316
virtual
bool
isKindOf
(
const
char
* name)
const
{
return
!strcmp(
"PxRigidActor"
, name) ||
PxActor::isKindOf
(name); }
317
};
318
319
PX_DEPRECATED
PX_INLINE
PxRigidActor
*
PxActor::isRigidActor
() {
return
is<PxRigidActor>(); }
320
PX_DEPRECATED
PX_INLINE
const
PxRigidActor
*
PxActor::isRigidActor
()
const
{
return
is<PxRigidActor>(); }
321
322
323
#ifndef PX_DOXYGEN
324
}
// namespace physx
325
#endif
326
328
#endif
Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.
www.nvidia.com