APEX Framework: ModuleFieldSampler.h Source File

NVIDIA APEX

ModuleFieldSampler.h
00001 /*
00002  * Copyright (c) 2008-2017, NVIDIA CORPORATION.  All rights reserved.
00003  *
00004  * NVIDIA CORPORATION and its licensors retain all intellectual property
00005  * and proprietary rights in and to this software, related documentation
00006  * and any modifications thereto.  Any use, reproduction, disclosure or
00007  * distribution of this software and related documentation without an express
00008  * license agreement from NVIDIA CORPORATION is strictly prohibited.
00009  */
00010 
00011 
00012 #ifndef MODULE_FIELD_SAMPLER_H
00013 #define MODULE_FIELD_SAMPLER_H
00014 
00015 #include "Apex.h"
00016 
00017 namespace nvidia
00018 {
00019 namespace apex
00020 {
00021 
00022 PX_PUSH_PACK_DEFAULT
00023 
00030 class FieldSamplerWeightedCollisionFilterCallback
00031 {
00032 public:
00039     virtual bool fieldSamplerWeightedCollisionFilter(const physx::PxFilterData &objectA,const physx::PxFilterData &objectB,float &multiplierValue) = 0;
00040 };
00041 
00042 
00046 class ModuleFieldSampler : public Module
00047 {
00048 protected:
00049     virtual                 ~ModuleFieldSampler() {}
00050 
00051 public:
00052 
00056     virtual bool            setFieldSamplerWeightedCollisionFilterCallback(const Scene& apexScene,FieldSamplerWeightedCollisionFilterCallback *callback) = 0;
00057 
00058     
00059 #if PX_PHYSICS_VERSION_MAJOR == 3
00060 
00063     virtual void            enablePhysXMonitor(const Scene& apexScene, bool enable) = 0;
00070     virtual void            setPhysXMonitorFilterData(const Scene& apexScene, physx::PxFilterData filterData) = 0;
00071 #endif
00072 
00081     virtual uint32_t        createForceSampleBatch(const Scene& apexScene, uint32_t maxCount, const physx::PxFilterData filterData) = 0;
00082 
00089     virtual void            releaseForceSampleBatch(const Scene& apexScene, uint32_t batchId) = 0;
00090 
00107     virtual void            submitForceSampleBatch( const Scene& apexScene, uint32_t batchId,
00108                                                     PxVec4* forces, const uint32_t forcesStride, 
00109                                                     const PxVec3* positions, const uint32_t positionsStride, 
00110                                                     const PxVec3* velocities, const uint32_t velocitiesStride,
00111                                                     const float* mass, const uint32_t massStride,
00112                                                     const uint32_t* indices, const uint32_t numIndices) = 0;
00113 
00114 };
00115 
00116 
00117 
00118 PX_POP_PACK
00119 
00120 }
00121 } // end namespace nvidia::apex
00122 
00123 #endif // MODULE_FIELD_SAMPLER_H

Generated on Fri Dec 15 2017 13:58:35
Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.