Main Page
Class Hierarchy
Compound List
Compound Members
Include
particles
PxParticleCreationData.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_PARTICLESYSTEM_NXPARTICLECREATIONDATA
15
#define PX_PARTICLESYSTEM_NXPARTICLECREATIONDATA
16
20
#include "
PxPhysXConfig.h
"
21
#include "
foundation/PxVec3.h
"
22
#include "
foundation/PxStrideIterator.h
"
23
24
#ifndef PX_DOXYGEN
25
namespace
physx
26
{
27
#endif
28
37
class
PxParticleCreationData
38
{
39
public
:
40
44
PxU32
numParticles
;
45
51
PxStrideIterator<const PxU32>
indexBuffer
;
52
58
PxStrideIterator<const PxVec3>
positionBuffer
;
59
65
PxStrideIterator<const PxVec3>
velocityBuffer
;
66
74
PxStrideIterator<const PxF32>
restOffsetBuffer
;
75
86
PxStrideIterator<const PxU32>
flagBuffer
;
87
91
PX_INLINE
void
setToDefault();
92
96
PX_INLINE
bool
isValid()
const
;
97
101
PX_INLINE
PxParticleCreationData
();
102
};
103
104
PX_INLINE
PxParticleCreationData::PxParticleCreationData
()
105
{
106
indexBuffer =
PxStrideIterator<const PxU32>
();
107
positionBuffer =
PxStrideIterator<const PxVec3>
();
108
velocityBuffer =
PxStrideIterator<const PxVec3>
();
109
restOffsetBuffer =
PxStrideIterator<const PxF32>
();
110
flagBuffer =
PxStrideIterator<const PxU32>
();
111
}
112
113
PX_INLINE
void
PxParticleCreationData::setToDefault
()
114
{
115
*
this
=
PxParticleCreationData
();
116
}
117
118
PX_INLINE
bool
PxParticleCreationData::isValid
()
const
119
{
120
if
(numParticles > 0 && !(indexBuffer.ptr() && positionBuffer.ptr()))
return
false
;
121
return
true
;
122
}
123
124
#ifndef PX_DOXYGEN
125
}
// namespace physx
126
#endif
127
129
#endif
Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.
www.nvidia.com