aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Include/particles/PxParticleReadData.h
diff options
context:
space:
mode:
authorgit perforce import user <a@b>2016-10-25 12:29:14 -0600
committerSheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees>2016-10-25 18:56:37 -0500
commit3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch)
treefa6485c169e50d7415a651bf838f5bcd0fd3bfbd /PhysX_3.4/Include/particles/PxParticleReadData.h
downloadphysx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz
physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip
Initial commit:
PhysX 3.4.0 Update @ 21294896 APEX 1.4.0 Update @ 21275617 [CL 21300167]
Diffstat (limited to 'PhysX_3.4/Include/particles/PxParticleReadData.h')
-rw-r--r--PhysX_3.4/Include/particles/PxParticleReadData.h224
1 files changed, 224 insertions, 0 deletions
diff --git a/PhysX_3.4/Include/particles/PxParticleReadData.h b/PhysX_3.4/Include/particles/PxParticleReadData.h
new file mode 100644
index 00000000..a00ae7d8
--- /dev/null
+++ b/PhysX_3.4/Include/particles/PxParticleReadData.h
@@ -0,0 +1,224 @@
+// This code contains NVIDIA Confidential Information and is disclosed to you
+// under a form of NVIDIA software license agreement provided separately to you.
+//
+// Notice
+// NVIDIA Corporation and its licensors retain all intellectual property and
+// proprietary rights in and to this software and related documentation and
+// any modifications thereto. Any use, reproduction, disclosure, or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA Corporation is strictly prohibited.
+//
+// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
+// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
+//
+// Information and code furnished is believed to be accurate and reliable.
+// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright (c) 2008-2016 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
+// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
+
+
+#ifndef PX_PARTICLESYSTEM_NXPARTICLEREADDATA
+#define PX_PARTICLESYSTEM_NXPARTICLEREADDATA
+/** \addtogroup particles
+ @{
+*/
+
+#include "foundation/PxStrideIterator.h"
+#include "foundation/PxFlags.h"
+#include "PxLockedData.h"
+#include "PxParticleFlag.h"
+
+#if !PX_DOXYGEN
+namespace physx
+{
+#endif
+
+/**
+Flags to configure PxParticleBase simulation output that can be read by the application. (deprecated)
+Disabling unneeded buffers saves memory and improves performance.
+
+\deprecated The PhysX particle feature has been deprecated in PhysX version 3.4
+*/
+struct PX_DEPRECATED PxParticleReadDataFlag
+ {
+ enum Enum
+ {
+ /**
+ Enables reading particle positions from the SDK.
+ @see PxParticleReadData.positionBuffer
+ */
+ ePOSITION_BUFFER = (1<<0),
+
+ /**
+ Enables reading particle velocities from the SDK.
+ @see PxParticleReadData.velocityBuffer
+ */
+ eVELOCITY_BUFFER = (1<<1),
+
+ /**
+ Enables reading per particle rest offsets from the SDK.
+ Per particle rest offsets are never changed by the simulation.
+ This option may only be used on particle systems that have
+ PxParticleBaseFlag.ePER_PARTICLE_REST_OFFSET enabled.
+ @see PxParticleBaseFlag.ePER_PARTICLE_REST_OFFSET
+ */
+ eREST_OFFSET_BUFFER = (1<<2),
+
+ /**
+ Enables reading particle flags from the SDK.
+ @see PxParticleReadData.flagsBuffer
+ */
+ eFLAGS_BUFFER = (1<<3),
+
+ /**
+ Enables reading particle collision normals from the SDK.
+ @see PxParticleReadData.collisionNormalBuffer
+ */
+ eCOLLISION_NORMAL_BUFFER = (1<<4),
+
+ /**
+ Enables reading particle collision velocities from the SDK.
+ @see PxParticleReadData.collisionVelocity
+ */
+ eCOLLISION_VELOCITY_BUFFER = (1<<5),
+
+ /**
+ Enables reading particle densities from the SDK. (PxParticleFluid only)
+ @see PxParticleFluidReadData.densityBuffer
+ */
+ eDENSITY_BUFFER = (1<<6)
+ };
+ };
+
+/**
+\brief collection of set bits defined in PxParticleReadDataFlag. (deprecated)
+
+\deprecated The PhysX particle feature has been deprecated in PhysX version 3.4
+
+@see PxParticleReadDataFlag
+*/
+typedef PX_DEPRECATED PxFlags<PxParticleReadDataFlag::Enum, PxU16> PxParticleReadDataFlags;
+PX_FLAGS_OPERATORS(PxParticleReadDataFlag::Enum,PxU16)
+
+/**
+\brief collection of set bits defined in PxParticleFlag. (deprecated)
+
+\deprecated The PhysX particle feature has been deprecated in PhysX version 3.4
+
+@see PxParticleFlag
+*/
+typedef PX_DEPRECATED PxFlags<PxParticleFlag::Enum, PxU16> PxParticleFlags;
+PX_FLAGS_OPERATORS(PxParticleFlag::Enum,PxU16)
+
+/**
+\brief Data layout descriptor for reading particle data from the SDK. (deprecated)
+
+PxParticleReadData is used to retrieve information about simulated particles. It can be accessed by calling PxParticleBase.lockParticleReadData().
+
+Each particle is described by its position, velocity, a set of (PxParticleFlag) flags and information on collisions (collision normal).
+The particle buffers are sparse, i.e. occupied particle indices will have PxParticleFlag.eVALID set in the corresponding entry of
+PxParticleReadData.flagsBuffer. Alternatively valid particles can be identified with the bitmap PxParticleReadData.validParticleBitmap.
+If (and only if) the index range of valid particles PxParticleReadData.validParticleRange is greater 0, i.e. any particles are present,
+data can be read from the particle buffers. Additionally individual particle buffers can only be read if the corresponding
+PxParticleReadDataFlag in particleReadDataFlags is set.
+
+The particle data buffer are defined in the range [0, PxParticleReadData.validParticleRange-1].
+The bitmap words are defined in the range [0, (PxParticleReadData.validParticleRange-1) >> 5].
+
+\deprecated The PhysX particle feature has been deprecated in PhysX version 3.4
+
+@see PxParticleBase::lockParticleReadData()
+*/
+class PX_DEPRECATED PxParticleReadData : public PxLockedData
+ {
+ public:
+
+ /**
+ \brief Number of particles (only including particles with PxParticleFlag.eVALID set).
+ */
+ PxU32 nbValidParticles;
+
+ /**
+ \brief Index after the last valid particle (PxParticleFlag.eVALID set). Its 0 if there are no valid particles.
+ */
+ PxU32 validParticleRange;
+
+ /**
+ \brief Bitmap marking valid particle indices. The bitmap is defined between [0, (PxParticleReadData.validParticleRange-1) >> 5].
+ \note Might be NULL if PxParticleReadData.validParticleRange == 0.
+ */
+ const PxU32* validParticleBitmap;
+
+ /**
+ \brief Particle position data.
+ */
+ PxStrideIterator<const PxVec3> positionBuffer;
+
+ /**
+ \brief Particle velocity data.
+ */
+ PxStrideIterator<const PxVec3> velocityBuffer;
+
+ /**
+ \brief Particle rest offset data.
+ */
+ PxStrideIterator<const PxF32> restOffsetBuffer;
+
+ /**
+ \brief Particle flags.
+ */
+ PxStrideIterator<const PxParticleFlags> flagsBuffer;
+
+ /**
+ \brief Collision normals of colliding particles.
+ The collision normal buffer is only guaranteed to be valid after the particle
+ system has been simulated. Otherwise collisionNormalBuffer.ptr() is NULL. This also
+ applies to particle systems that are not assigned to a scene.
+ */
+ PxStrideIterator<const PxVec3> collisionNormalBuffer;
+
+ /**
+ \brief Velocities of particles relative to shapes they collide with.
+ The collision velocity buffer is only guaranteed to be valid after the particle
+ system has been simulated. Otherwise collisionVelocityBuffer.ptr() is NULL. This also
+ applies to particle systems that are not assigned to a scene.
+ The collision velocity is identical to the particle velocity if the particle is not colliding.
+ */
+ PxStrideIterator<const PxVec3> collisionVelocityBuffer;
+
+ /**
+ \brief Returns PxDataAccessFlag::eREADABLE, since PxParticleReadData is read only data
+ @see PxLockedData
+ */
+ virtual PxDataAccessFlags getDataAccessFlags() = 0;
+
+ /**
+ \brief Unlocks the data.
+ @see PxLockedData
+ */
+ virtual void unlock() = 0;
+
+ /**
+ \brief virtual destructor
+ */
+ virtual ~PxParticleReadData() {}
+
+ };
+
+#if !PX_DOXYGEN
+} // namespace physx
+#endif
+
+/** @} */
+#endif