Main Page
Class Hierarchy
Compound List
Compound Members
Include
geometry
PxCapsuleGeometry.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_CAPSULE_GEOMETRY
15
#define PX_PHYSICS_NX_CAPSULE_GEOMETRY
16
19
#include "
geometry/PxGeometry.h
"
20
21
#ifndef PX_DOXYGEN
22
namespace
physx
23
{
24
#endif
25
37
class
PxCapsuleGeometry
:
public
PxGeometry
38
{
39
public
:
43
PX_INLINE
PxCapsuleGeometry
() :
PxGeometry
(
PxGeometryType
::eCAPSULE), radius(0), halfHeight(0) {}
44
48
PX_INLINE
PxCapsuleGeometry
(
PxReal
radius_,
PxReal
halfHeight_) :
PxGeometry
(
PxGeometryType
::eCAPSULE), radius(radius_), halfHeight(halfHeight_) {}
49
60
PX_INLINE
bool
isValid()
const
;
61
62
public
:
66
PxReal
radius
;
67
71
PxReal
halfHeight
;
72
};
73
74
75
PX_INLINE
bool
PxCapsuleGeometry::isValid
()
const
76
{
77
if
(mType !=
PxGeometryType::eCAPSULE
)
78
return
false
;
79
if
(!
PxIsFinite
(radius) || !
PxIsFinite
(halfHeight))
80
return
false
;
81
if
(radius <= 0.0f || halfHeight <= 0.0f)
82
return
false
;
83
84
return
true
;
85
}
86
87
96
PX_FOUNDATION_API
PxTransform
PxTransformFromSegment
(
const
PxVec3
& p0,
const
PxVec3
& p1,
PxReal
* halfHeight =
NULL
);
97
98
99
#ifndef PX_DOXYGEN
100
}
// namespace physx
101
#endif
102
104
#endif
Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.
www.nvidia.com