From 8ee05c79ae1748ef132a12e4fb0af284899faec6 Mon Sep 17 00:00:00 2001 From: Miles Macklin Date: Mon, 19 Mar 2018 15:10:24 +1300 Subject: Flex 1.2.0 release --- doc/_static/api/_nv_flex_8h.html | 242 +++++- doc/_static/api/_nv_flex_8h_source.html | 944 +++++++++++---------- doc/_static/api/_nv_flex_device_8h.html | 2 +- doc/_static/api/_nv_flex_device_8h_source.html | 2 +- doc/_static/api/_nv_flex_ext_8h.html | 212 ++++- doc/_static/api/_nv_flex_ext_8h_source.html | 333 ++++---- .../api/dir_d44c64559bbebec7f509842c48db8b23.html | 2 +- doc/_static/api/files.html | 2 +- doc/_static/api/globals.html | 28 +- doc/_static/api/globals_enum.html | 2 +- doc/_static/api/globals_eval.html | 5 +- doc/_static/api/globals_func.html | 25 +- doc/_static/api/globals_type.html | 2 +- doc/_static/api/index.html | 2 +- .../api/struct_nv_flex_solver_callback.html | 2 +- doc/_static/api/struct_nv_flex_vector.html | 2 +- 16 files changed, 1142 insertions(+), 665 deletions(-) (limited to 'doc/_static/api') diff --git a/doc/_static/api/_nv_flex_8h.html b/doc/_static/api/_nv_flex_8h.html index ca04c36..5ea2d6d 100644 --- a/doc/_static/api/_nv_flex_8h.html +++ b/doc/_static/api/_nv_flex_8h.html @@ -125,7 +125,7 @@ Enumerations
  eNvFlexPhaseFlagsMask = 0x00f00000,
-  eNvFlexPhaseShapeChannelMask = 0xff000000, +  eNvFlexPhaseShapeChannelMask = 0x7f000000,
  eNvFlexPhaseSelfCollide = 1 << 20,
@@ -147,9 +147,7 @@ Enumerations
  eNvFlexPhaseShapeChannel5 = 1 << 29,
-  eNvFlexPhaseShapeChannel6 = 1 << 30, -
-  eNvFlexPhaseShapeChannel7 = 1 << 31 +  eNvFlexPhaseShapeChannel6 = 1 << 30
}   @@ -244,6 +242,8 @@ Functions   NV_FLEX_API void NvFlexDestroySolver (NvFlexSolver *solver)   +NV_FLEX_API int NvFlexGetSolvers (NvFlexLibrary *lib, NvFlexSolver **solvers, int n) +  NV_FLEX_API NvFlexLibraryNvFlexGetSolverLibrary (NvFlexSolver *solver)   NV_FLEX_API void NvFlexGetSolverDesc (NvFlexSolver *solver, NvFlexSolverDesc *desc) @@ -298,6 +298,8 @@ Functions   NV_FLEX_API void NvFlexDestroyTriangleMesh (NvFlexLibrary *lib, NvFlexTriangleMeshId mesh)   +NV_FLEX_API int NvFlexGetTriangleMeshes (NvFlexLibrary *lib, NvFlexTriangleMeshId *meshes, int n) +  NV_FLEX_API void NvFlexUpdateTriangleMesh (NvFlexLibrary *lib, NvFlexTriangleMeshId mesh, NvFlexBuffer *vertices, NvFlexBuffer *indices, int numVertices, int numTriangles, const float *lower, const float *upper)   NV_FLEX_API void NvFlexGetTriangleMeshBounds (NvFlexLibrary *lib, const NvFlexTriangleMeshId mesh, float *lower, float *upper) @@ -306,12 +308,16 @@ Functions   NV_FLEX_API void NvFlexDestroyDistanceField (NvFlexLibrary *lib, NvFlexDistanceFieldId sdf)   +NV_FLEX_API int NvFlexGetDistanceFields (NvFlexLibrary *lib, NvFlexDistanceFieldId *sdfs, int n) +  NV_FLEX_API void NvFlexUpdateDistanceField (NvFlexLibrary *lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer *field)   NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh (NvFlexLibrary *lib)   NV_FLEX_API void NvFlexDestroyConvexMesh (NvFlexLibrary *lib, NvFlexConvexMeshId convex)   +NV_FLEX_API int NvFlexGetConvexMeshes (NvFlexLibrary *lib, NvFlexConvexMeshId *meshes, int n) +  NV_FLEX_API void NvFlexUpdateConvexMesh (NvFlexLibrary *lib, NvFlexConvexMeshId convex, NvFlexBuffer *planes, int numPlanes, const float *lower, const float *upper)   NV_FLEX_API void NvFlexGetConvexMeshBounds (NvFlexLibrary *lib, NvFlexConvexMeshId mesh, float *lower, float *upper) @@ -338,8 +344,8 @@ Functions   NV_FLEX_API void NvFlexGetContacts (NvFlexSolver *solver, NvFlexBuffer *planes, NvFlexBuffer *velocities, NvFlexBuffer *indices, NvFlexBuffer *counts)   -NV_FLEX_API void NvFlexGetNeighbors (NvFlexSolver *solver, NvFlexBuffer *neighbors, NvFlexBuffer *counts, NvFlexBuffer *remap) -  +NV_FLEX_API void NvFlexGetNeighbors (NvFlexSolver *solver, NvFlexBuffer *neighbors, NvFlexBuffer *counts, NvFlexBuffer *apiToInternal, NvFlexBuffer *internalToApi) +  NV_FLEX_API void NvFlexGetBounds (NvFlexSolver *solver, NvFlexBuffer *lower, NvFlexBuffer *upper)   NV_FLEX_API float NvFlexGetDeviceLatency (NvFlexSolver *solver, unsigned long long *begin, unsigned long long *end, unsigned long long *frequency) @@ -926,11 +932,11 @@ computeContext Direct3D context to use for simulation, if none is specified a new context will be created, in DirectX 12 this should be a pointer to the ID3D12CommandQueue where compute operations will take place. -bool +bool -useComputeQueue +runOnRenderContext -If true, run Flex on a D3D12 compute queue, or vendor specific D3D11 compute queue. This allows compute and graphics to run in parallel on some GPUs. +If true, run Flex on D3D11 render context, or D3D12 direct queue. If false, run on a D3D12 compute queue, or vendor specific D3D11 compute queue, allowing compute and graphics to run in parallel on some GPUs. NvFlexComputeType @@ -977,6 +983,12 @@ Maximum number of diffuse particles in the solver. maxNeighborsPerParticle Maximum number of neighbors per-particle, for solids this can be around 32, for fluids up to 128 may be necessary depending on smoothing radius. + +int + +maxContactsPerParticle + +Maximum number of collision contacts per-particle. @@ -1425,7 +1437,7 @@ time

Bits [20, 23] hold flags about how the particle behave.

eNvFlexPhaseShapeChannelMask  -

Bits [24, 31] hold flags representing what shape collision channels particles will collide with, see NvFlexMakeShapeFlags()

+

Bits [24, 30] hold flags representing what shape collision channels particles will collide with, see NvFlexMakeShapeFlags() (highest bit reserved for now)

eNvFlexPhaseSelfCollide 

If set this particle will interact with particles of the same group.

@@ -1460,9 +1472,6 @@ time eNvFlexPhaseShapeChannel6 

Particle will collide with shapes with channel 6 set (see NvFlexMakeShapeFlags())

-eNvFlexPhaseShapeChannel7  -

Particle will collide with shapes with channel 7 set (see NvFlexMakeShapeFlags())

- @@ -1878,6 +1887,48 @@ time + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexGetSolvers (NvFlexLibrarylib,
NvFlexSolver ** solvers,
int n 
)
+
+

Get the list of active solvers in the library If the size of the array is smaller than the number of active solvers, only the first n entries are copied.

+
Parameters
+ + + + +
[in]libThe library instance to use
[in]solversPointer to array
[in]nSize of array
+
+
+
Returns
The number of active solvers in the library
+
@@ -2215,7 +2266,7 @@ time
Parameters
- +
[in]solverA valid solver
[out]indicesa buffer of indices at least activeCount in length
[out]indicesa buffer of indices at least activeCount in length. Default values are successive numbers from 0 to maxParticles-1
[in]descDescribes the copy region, if NULL the solver will try to access the entire buffer (maxParticles length)
@@ -3094,6 +3145,48 @@ time
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexGetTriangleMeshes (NvFlexLibrarylib,
NvFlexTriangleMeshIdmeshes,
int n 
)
+
+

Get the list of triangle meshes in the library If the size of the array is smaller than the number of triangle meshes, only the first n entries are copied.

+
Parameters
+ + + + +
[in]libThe library instance to use
[in]meshesPointer to array
[in]nSize of array
+
+
+
Returns
The number of triangle meshes in the library
+
@@ -3160,7 +3253,7 @@ time - + @@ -3276,6 +3369,48 @@ time + + + +
+
+
[in]libThe library instance to use
[in]meshA triangle mesh created with NvFlexCreateTriangleMesh()
[in]verticesPointer to a buffer of float3 vertex positions
[in]verticesPointer to a buffer of float4 vertex positions
[in]indicesPointer to a buffer of triangle indices, should be length numTriangles*3
[in]numVerticesThe number of vertices in the vertices array
[in]numTrianglesThe number of triangles in the mesh
+ + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexGetDistanceFields (NvFlexLibrarylib,
NvFlexDistanceFieldIdsdfs,
int n 
)
+
+

Get the list of signed distance fields in the library If the size of the array is smaller than the number of signed distance fields, only the first n entries are copied.

+
Parameters
+ + + + +
[in]libThe library instance to use
[in]sdfsPointer to array
[in]nSize of array
+
+
+
Returns
The number of signed distance fields in the library
+
@@ -3396,6 +3531,48 @@ time + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API int NvFlexGetConvexMeshes (NvFlexLibrarylib,
NvFlexConvexMeshIdmeshes,
int n 
)
+
+

Get the list of convex meshes in the library If the size of the array is smaller than the number of convex meshes, only the first n entries are copied.

+
Parameters
+ + + + +
[in]libThe library instance to use
[in]meshesPointer to array
[in]nSize of array
+
+
+
Returns
The number of convex meshes in the library
+
@@ -4071,17 +4248,17 @@ time
Parameters
- - - - + + + +
[in]solverA valid solver
[out]planesPointer to a destination buffer containing the contact planes for the particle, each particle can have up to 6 contact planes so this buffer should be 4*6*maxParticles floats in length
[out]velocitiesPointer to a destination buffer containing the velocity of the contact point on the shape in world space, the index of the shape (corresponding to the shape in NvFlexSetShapes() is stored in the w component), each particle can have up to 6 contact planes so this buffer should be 4*6*maxParticles floats in length
[out]indicesPointer to a buffer of indices into the contacts buffer, the first contact plane for the i'th particle is given by planes[indices[i]*sizeof(float)*4*6] and subsequent contact planes for that particle are stored sequentially, this array should be maxParticles in length
[out]countsPointer to a buffer of contact counts for each particle (will be <= 6), this buffer should be maxParticles in length
[out]planesPointer to a destination buffer containing the contact planes for the particle, each particle can have up to maxContactsPerParticle contact planes (see NvFlexSolverDesc) so this buffer should be 4*maxContactsPerParticle*maxParticles floats in length
[out]velocitiesPointer to a destination buffer containing the velocity of the contact point on the shape in world space, the index of the shape (corresponding to the shape in NvFlexSetShapes() is stored in the w component), each particle can have up to maxContactsPerParticle contact planes so this buffer should be 4*maxContactsPerParticle*maxParticles floats in length
[out]indicesPointer to a buffer of indices into the contacts buffer, the first contact plane for the i'th particle is given by planes[indices[i]*sizeof(float)*4*maxContactsPerParticle] and subsequent contact planes for that particle are stored sequentially, this array should be maxParticles in length
[out]countsPointer to a buffer of contact counts for each particle (will be <= maxContactsPerParticle), this buffer should be maxParticles in length
- +
@@ -4107,7 +4284,13 @@ time - + + + + + + + @@ -4117,11 +4300,12 @@ time
NvFlexBufferremap apiToInternal,
NvFlexBufferinternalToApi 

Get the particle neighbor lists, these are stored in a strided format, and can be iterated in the following manner:

-
NvFlexGetNeighbors(solver, neighborsBuffer, countsBuffer, indicesBuffer);
+
NvFlexGetNeighbors(solver, neighborsBuffer, countsBuffer, apiToInternalBuffer, internalToApiBuffer);
int* neighbors = (int*)NvFlexMap(neighborsBuffer, 0);
int* counts = (int*)NvFlexMap(countsBuffer, 0);
-
int* remap = (int*)NvFlexMap(remapBuffer, 0);
+
int* apiToInternal = (int*)NvFlexMap(apiToInternalBuffer, 0);
+
int* internalToApi = (int*)NvFlexMap(internalToApiBuffer, 0);
// neighbors are stored in a strided format so that the first neighbor
// of each particle is stored sequentially, then the second, and so on
@@ -4131,12 +4315,12 @@ time
for (int i=0; i < maxParticles; ++i)
{
// find offset in the neighbors buffer
-
int offset = remap[i];
+
int offset = apiToInternal[i];
int count = counts[offset];
for (int c=0; c < count; ++c)
{
-
int neighbor = remap[neighbors[c*stride + offset]];
+
int neighbor = internalToApi[neighbors[c*stride + offset]];
printf("Particle %d's neighbor %d is particle %d\n", i, c, neighbor);
}
@@ -4144,13 +4328,15 @@ time
NvFlexUnmap(neighborsBuffer);
NvFlexUnmap(countsBuffer);
-
NvFlexUnmap(remapBuffer);
+
NvFlexUnmap(apiToInternalBuffer);
+
NvFlexUnmap(internalToApiBuffer);
Parameters
- + +
[in]solverA valid solver
[out]neighborsPointer to a destination buffer containing the the neighbors for all particles, this should be maxParticles*maxParticleNeighbors ints (passed to NvFlexInit() in length)
[out]countsPointer to a buffer of neighbor counts per-particle, should be maxParticles ints in length
[out]remapPointer to a buffer of indices, because Flex internally re-orders particles these are used to map from an API particle index to it internal index
[out]apiToInternalPointer to a buffer of indices, because Flex internally re-orders particles these are used to map from an API particle index to it internal index
[out]internalToApiPointer to a buffer of indices, because Flex internally re-orders particles these are used to map from an internal index to an API index
@@ -4754,7 +4940,7 @@ time
diff --git a/doc/_static/api/_nv_flex_8h_source.html b/doc/_static/api/_nv_flex_8h_source.html index c4cd011..4ff1d6b 100644 --- a/doc/_static/api/_nv_flex_8h_source.html +++ b/doc/_static/api/_nv_flex_8h_source.html @@ -172,7 +172,7 @@
161 {
162  eNvFlexPhaseGroupMask = 0x000fffff,
163  eNvFlexPhaseFlagsMask = 0x00f00000,
- +
165 
@@ -186,605 +186,619 @@ - -
179 };
+
178 };
+
179 
180 
-
181 
-
190 NV_FLEX_API inline int NvFlexMakePhaseWithChannels(int group, int particleFlags, int shapeChannels) { return (group & eNvFlexPhaseGroupMask) | (particleFlags & eNvFlexPhaseFlagsMask) | (shapeChannels & eNvFlexPhaseShapeChannelMask); }
-
191 
-
195 NV_FLEX_API inline int NvFlexMakePhase(int group, int particleFlags) { return NvFlexMakePhaseWithChannels(group, particleFlags, eNvFlexPhaseShapeChannelMask); }
+
189 NV_FLEX_API inline int NvFlexMakePhaseWithChannels(int group, int particleFlags, int shapeChannels) { return (group & eNvFlexPhaseGroupMask) | (particleFlags & eNvFlexPhaseFlagsMask) | (shapeChannels & eNvFlexPhaseShapeChannelMask); }
+
190 
+
194 NV_FLEX_API inline int NvFlexMakePhase(int group, int particleFlags) { return NvFlexMakePhaseWithChannels(group, particleFlags, eNvFlexPhaseShapeChannelMask); }
+
195 
196 
-
197 
- -
202 {
-
203  float predict;
- - -
206  float createGrid;
-
207  float reorder;
- - - - - - - -
215  float solveShapes;
-
216  float solveSprings;
- - -
219  float applyDeltas;
- - - - -
224  float finalize;
-
225  float updateBounds;
-
226  float total;
-
227 };
-
228 
- -
233 {
- - - - - -
239 };
-
240 
-
241 
- -
245 {
- - - - - - -
252 };
+ +
201 {
+
202  float predict;
+ + +
205  float createGrid;
+
206  float reorder;
+ + + + + + + +
214  float solveShapes;
+
215  float solveSprings;
+ + +
218  float applyDeltas;
+ + + + +
223  float finalize;
+
224  float updateBounds;
+
225  float total;
+
226 };
+
227 
+ +
232 {
+ + + + + +
238 };
+
239 
+
240 
+ +
244 {
+ + + + + + +
251 };
+
252 
253 
-
254 
- -
268 {
- -
270  void* userData;
-
271 
-
272  float* particles;
-
273  float* velocities;
-
274  int* phases;
-
275 
-
276  int numActive;
-
277 
-
278  float dt;
-
279 
-
280  const int* originalToSortedMap;
-
281  const int* sortedToOriginalMap;
-
282 };
-
283 
- -
287 {
-
289  void* userData;
-
290 
-
292  void (*function)(NvFlexSolverCallbackParams params);
-
293 };
-
294 
-
298 typedef void (*NvFlexErrorCallback)(NvFlexErrorSeverity type, const char* msg, const char* file, int line);
+ +
267 {
+ +
269  void* userData;
+
270 
+
271  float* particles;
+
272  float* velocities;
+
273  int* phases;
+
274 
+
275  int numActive;
+
276 
+
277  float dt;
+
278 
+
279  const int* originalToSortedMap;
+
280  const int* sortedToOriginalMap;
+
281 };
+
282 
+ +
286 {
+
288  void* userData;
+
289 
+
291  void (*function)(NvFlexSolverCallbackParams params);
+
292 };
+
293 
+
297 typedef void (*NvFlexErrorCallback)(NvFlexErrorSeverity type, const char* msg, const char* file, int line);
+
298 
299 
300 
301 
-
302 
- -
306 {
- - - -
310 };
+ +
305 {
+ + + +
309 };
+
310 
311 
-
312 
- -
316 {
- - -
319  void* renderDevice;
- - - -
323 
- -
325 };
-
326 
-
336 NV_FLEX_API NvFlexLibrary* NvFlexInit(int version = NV_FLEX_VERSION, NvFlexErrorCallback errorFunc = 0, NvFlexInitDesc* desc = 0);
-
337 
-
344 NV_FLEX_API void NvFlexShutdown(NvFlexLibrary* lib);
-
345 
-
349 NV_FLEX_API int NvFlexGetVersion();
-
350 
- -
355 {
- - - -
359 };
-
360 
- -
365 {
- -
367 
- - - + +
315 {
+ + +
318  void* renderDevice;
+ + + +
322 
+ +
324 };
+
325 
+
335 NV_FLEX_API NvFlexLibrary* NvFlexInit(int version = NV_FLEX_VERSION, NvFlexErrorCallback errorFunc = 0, NvFlexInitDesc* desc = 0);
+
336 
+
343 NV_FLEX_API void NvFlexShutdown(NvFlexLibrary* lib);
+
344 
+
348 NV_FLEX_API int NvFlexGetVersion();
+
349 
+ +
354 {
+ + + +
358 };
+
359 
+ +
364 {
+ +
366 
+ + + +
371 };
372 
377 NV_FLEX_API void NvFlexSetSolverDescDefaults(NvFlexSolverDesc* desc);
378 
385 NV_FLEX_API NvFlexSolver* NvFlexCreateSolver(NvFlexLibrary* lib, const NvFlexSolverDesc* desc);
-
391 NV_FLEX_API void NvFlexDestroySolver(NvFlexSolver* solver);
-
392 
- -
400 
-
407 NV_FLEX_API void NvFlexGetSolverDesc(NvFlexSolver* solver, NvFlexSolverDesc* desc);
-
408 
- -
418 
-
478 NV_FLEX_API void NvFlexUpdateSolver(NvFlexSolver* solver, float dt, int substeps, bool enableTimers);
-
479 
-
486 NV_FLEX_API void NvFlexSetParams(NvFlexSolver* solver, const NvFlexParams* params);
-
487 
-
495 NV_FLEX_API void NvFlexGetParams(NvFlexSolver* solver, NvFlexParams* params);
-
496 
- -
501 {
-
502  int srcOffset; //<! Offset in elements from the start of the source buffer to begin reading from
-
503  int dstOffset; //<! Offset in elements from the start of the destination buffer to being writing to
-
504  int elementCount; //<! Number of elements to copy
-
505 };
-
506 
-
514 NV_FLEX_API void NvFlexSetActive(NvFlexSolver* solver, NvFlexBuffer* indices, const NvFlexCopyDesc* desc);
-
515 
-
523 NV_FLEX_API void NvFlexGetActive(NvFlexSolver* solver, NvFlexBuffer* indices, const NvFlexCopyDesc* desc);
-
524 
-
531 NV_FLEX_API void NvFlexSetActiveCount(NvFlexSolver* solver, int n);
-
532 
-
539 NV_FLEX_API int NvFlexGetActiveCount(NvFlexSolver* solver);
-
540 
-
549 NV_FLEX_API void NvFlexSetParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
-
550 
-
558 NV_FLEX_API void NvFlexGetParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
-
559 
-
569 NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
-
570 
-
579 NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
-
580 
-
581 
-
589 NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
-
590 
-
599 NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, const NvFlexCopyDesc* desc);
-
607 NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, const NvFlexCopyDesc* desc);
-
608 
-
625 NV_FLEX_API void NvFlexSetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, const NvFlexCopyDesc* desc);
-
633 NV_FLEX_API void NvFlexGetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, const NvFlexCopyDesc* desc);
-
634 
-
642 NV_FLEX_API void NvFlexSetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, const NvFlexCopyDesc* desc);
-
643 
-
651 NV_FLEX_API void NvFlexGetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, const NvFlexCopyDesc* desc);
-
652 
-
653 
-
666 NV_FLEX_API void NvFlexSetSprings(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* restLengths, NvFlexBuffer* stiffness, int numSprings);
-
676 NV_FLEX_API void NvFlexGetSprings(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* restLengths, NvFlexBuffer* stiffness, int numSprings);
-
677 
-
696 NV_FLEX_API void NvFlexSetRigids(NvFlexSolver* solver, NvFlexBuffer* offsets, NvFlexBuffer* indices, NvFlexBuffer* restPositions, NvFlexBuffer* restNormals, NvFlexBuffer* stiffness, NvFlexBuffer* thresholds, NvFlexBuffer* creeps, NvFlexBuffer* rotations, NvFlexBuffer* translations, int numRigids, int numIndices);
-
697 
-
713 NV_FLEX_API void NvFlexGetRigids(NvFlexSolver* solver, NvFlexBuffer* offsets, NvFlexBuffer* indices, NvFlexBuffer* restPositions, NvFlexBuffer* restNormals, NvFlexBuffer* stiffness, NvFlexBuffer* thresholds, NvFlexBuffer* creeps, NvFlexBuffer* rotations, NvFlexBuffer* translations);
-
714 
-
718 typedef unsigned int NvFlexTriangleMeshId;
-
719 
-
723 typedef unsigned int NvFlexDistanceFieldId;
-
724 
-
730 typedef unsigned int NvFlexConvexMeshId;
+
386 
+
392 NV_FLEX_API void NvFlexDestroySolver(NvFlexSolver* solver);
+
393 
+
403 NV_FLEX_API int NvFlexGetSolvers(NvFlexLibrary* lib, NvFlexSolver** solvers, int n);
+
404 
+ +
412 
+
419 NV_FLEX_API void NvFlexGetSolverDesc(NvFlexSolver* solver, NvFlexSolverDesc* desc);
+
420 
+ +
430 
+
490 NV_FLEX_API void NvFlexUpdateSolver(NvFlexSolver* solver, float dt, int substeps, bool enableTimers);
+
491 
+
498 NV_FLEX_API void NvFlexSetParams(NvFlexSolver* solver, const NvFlexParams* params);
+
499 
+
507 NV_FLEX_API void NvFlexGetParams(NvFlexSolver* solver, NvFlexParams* params);
+
508 
+ +
513 {
+
514  int srcOffset; //<! Offset in elements from the start of the source buffer to begin reading from
+
515  int dstOffset; //<! Offset in elements from the start of the destination buffer to being writing to
+
516  int elementCount; //<! Number of elements to copy
+
517 };
+
518 
+
526 NV_FLEX_API void NvFlexSetActive(NvFlexSolver* solver, NvFlexBuffer* indices, const NvFlexCopyDesc* desc);
+
527 
+
535 NV_FLEX_API void NvFlexGetActive(NvFlexSolver* solver, NvFlexBuffer* indices, const NvFlexCopyDesc* desc);
+
536 
+
543 NV_FLEX_API void NvFlexSetActiveCount(NvFlexSolver* solver, int n);
+
544 
+
551 NV_FLEX_API int NvFlexGetActiveCount(NvFlexSolver* solver);
+
552 
+
561 NV_FLEX_API void NvFlexSetParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
+
562 
+
570 NV_FLEX_API void NvFlexGetParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
+
571 
+
581 NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
+
582 
+
591 NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
+
592 
+
593 
+
601 NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver* solver, NvFlexBuffer* p, const NvFlexCopyDesc* desc);
+
602 
+
611 NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, const NvFlexCopyDesc* desc);
+
619 NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver* solver, NvFlexBuffer* v, const NvFlexCopyDesc* desc);
+
620 
+
637 NV_FLEX_API void NvFlexSetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, const NvFlexCopyDesc* desc);
+
645 NV_FLEX_API void NvFlexGetPhases(NvFlexSolver* solver, NvFlexBuffer* phases, const NvFlexCopyDesc* desc);
+
646 
+
654 NV_FLEX_API void NvFlexSetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, const NvFlexCopyDesc* desc);
+
655 
+
663 NV_FLEX_API void NvFlexGetNormals(NvFlexSolver* solver, NvFlexBuffer* normals, const NvFlexCopyDesc* desc);
+
664 
+
665 
+
678 NV_FLEX_API void NvFlexSetSprings(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* restLengths, NvFlexBuffer* stiffness, int numSprings);
+
688 NV_FLEX_API void NvFlexGetSprings(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* restLengths, NvFlexBuffer* stiffness, int numSprings);
+
689 
+
708 NV_FLEX_API void NvFlexSetRigids(NvFlexSolver* solver, NvFlexBuffer* offsets, NvFlexBuffer* indices, NvFlexBuffer* restPositions, NvFlexBuffer* restNormals, NvFlexBuffer* stiffness, NvFlexBuffer* thresholds, NvFlexBuffer* creeps, NvFlexBuffer* rotations, NvFlexBuffer* translations, int numRigids, int numIndices);
+
709 
+
725 NV_FLEX_API void NvFlexGetRigids(NvFlexSolver* solver, NvFlexBuffer* offsets, NvFlexBuffer* indices, NvFlexBuffer* restPositions, NvFlexBuffer* restNormals, NvFlexBuffer* stiffness, NvFlexBuffer* thresholds, NvFlexBuffer* creeps, NvFlexBuffer* rotations, NvFlexBuffer* translations);
+
726 
+
730 typedef unsigned int NvFlexTriangleMeshId;
731 
-
738 NV_FLEX_API NvFlexTriangleMeshId NvFlexCreateTriangleMesh(NvFlexLibrary* lib);
-
739 
-
746 NV_FLEX_API void NvFlexDestroyTriangleMesh(NvFlexLibrary* lib, NvFlexTriangleMeshId mesh);
-
747 
-
761 NV_FLEX_API void NvFlexUpdateTriangleMesh(NvFlexLibrary* lib, NvFlexTriangleMeshId mesh, NvFlexBuffer* vertices, NvFlexBuffer* indices, int numVertices, int numTriangles, const float* lower, const float* upper);
-
762 
-
771 NV_FLEX_API void NvFlexGetTriangleMeshBounds(NvFlexLibrary* lib, const NvFlexTriangleMeshId mesh, float* lower, float* upper);
-
772 
-
779 NV_FLEX_API NvFlexDistanceFieldId NvFlexCreateDistanceField(NvFlexLibrary* lib);
-
780 
-
787 NV_FLEX_API void NvFlexDestroyDistanceField(NvFlexLibrary* lib, NvFlexDistanceFieldId sdf);
-
788 
-
800 NV_FLEX_API void NvFlexUpdateDistanceField(NvFlexLibrary* lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer* field);
-
801 
-
808 NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh(NvFlexLibrary* lib);
-
809 
-
816 NV_FLEX_API void NvFlexDestroyConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex);
-
817 
-
828 NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex, NvFlexBuffer* planes, int numPlanes, const float* lower, const float* upper);
-
829 
-
838 NV_FLEX_API void NvFlexGetConvexMeshBounds(NvFlexLibrary* lib, NvFlexConvexMeshId mesh, float* lower, float* upper);
-
839 
- -
844 {
-
845  float radius;
-
846 };
-
847 
- -
852 {
-
853  float radius;
-
854  float halfHeight;
-
855 };
-
856 
- -
861 {
-
862  float halfExtents[3];
-
863 };
-
864 
- -
869 {
-
870  float scale[3];
-
871  NvFlexConvexMeshId mesh;
-
872 };
-
873 
- -
878 {
-
879  float scale[3];
-
880  NvFlexTriangleMeshId mesh;
-
881 };
-
882 
- -
888 {
-
889  float scale;
-
890  NvFlexDistanceFieldId field;
+
735 typedef unsigned int NvFlexDistanceFieldId;
+
736 
+
742 typedef unsigned int NvFlexConvexMeshId;
+
743 
+
750 NV_FLEX_API NvFlexTriangleMeshId NvFlexCreateTriangleMesh(NvFlexLibrary* lib);
+
751 
+
758 NV_FLEX_API void NvFlexDestroyTriangleMesh(NvFlexLibrary* lib, NvFlexTriangleMeshId mesh);
+
759 
+
769 NV_FLEX_API int NvFlexGetTriangleMeshes(NvFlexLibrary* lib, NvFlexTriangleMeshId* meshes, int n);
+
770 
+
784 NV_FLEX_API void NvFlexUpdateTriangleMesh(NvFlexLibrary* lib, NvFlexTriangleMeshId mesh, NvFlexBuffer* vertices, NvFlexBuffer* indices, int numVertices, int numTriangles, const float* lower, const float* upper);
+
785 
+
794 NV_FLEX_API void NvFlexGetTriangleMeshBounds(NvFlexLibrary* lib, const NvFlexTriangleMeshId mesh, float* lower, float* upper);
+
795 
+
802 NV_FLEX_API NvFlexDistanceFieldId NvFlexCreateDistanceField(NvFlexLibrary* lib);
+
803 
+
810 NV_FLEX_API void NvFlexDestroyDistanceField(NvFlexLibrary* lib, NvFlexDistanceFieldId sdf);
+
811 
+
821 NV_FLEX_API int NvFlexGetDistanceFields(NvFlexLibrary* lib, NvFlexDistanceFieldId* sdfs, int n);
+
822 
+
834 NV_FLEX_API void NvFlexUpdateDistanceField(NvFlexLibrary* lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer* field);
+
835 
+
842 NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh(NvFlexLibrary* lib);
+
843 
+
850 NV_FLEX_API void NvFlexDestroyConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex);
+
851 
+
861 NV_FLEX_API int NvFlexGetConvexMeshes(NvFlexLibrary* lib, NvFlexConvexMeshId* meshes, int n);
+
862 
+
873 NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex, NvFlexBuffer* planes, int numPlanes, const float* lower, const float* upper);
+
874 
+
883 NV_FLEX_API void NvFlexGetConvexMeshBounds(NvFlexLibrary* lib, NvFlexConvexMeshId mesh, float* lower, float* upper);
+
884 
+ +
889 {
+
890  float radius;
891 };
892 
- -
898 {
- - - - - - -
905 };
-
906 
- -
908 {
- - - - - - -
915 };
-
916 
- -
918 {
- - - -
922 
- -
924 };
-
925 
-
933 NV_FLEX_API inline int NvFlexMakeShapeFlagsWithChannels(NvFlexCollisionShapeType type, bool dynamic, int shapeChannels) { return type | (dynamic?eNvFlexShapeFlagDynamic:0) | shapeChannels; }
-
934 
-
938 NV_FLEX_API inline int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic) { return NvFlexMakeShapeFlagsWithChannels(type, dynamic, eNvFlexPhaseShapeChannelMask); }
-
939 
-
940 
-
954 NV_FLEX_API void NvFlexSetShapes(NvFlexSolver* solver, NvFlexBuffer* geometry, NvFlexBuffer* shapePositions, NvFlexBuffer* shapeRotations, NvFlexBuffer* shapePrevPositions, NvFlexBuffer* shapePrevRotations, NvFlexBuffer* shapeFlags, int numShapes);
-
955 
-
966 NV_FLEX_API void NvFlexSetDynamicTriangles(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* normals, int numTris);
-
975 NV_FLEX_API void NvFlexGetDynamicTriangles(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* normals, int numTris);
-
976 
-
991 NV_FLEX_API void NvFlexSetInflatables(NvFlexSolver* solver, NvFlexBuffer* startTris, NvFlexBuffer* numTris, NvFlexBuffer* restVolumes, NvFlexBuffer* overPressures, NvFlexBuffer* constraintScales, int numInflatables);
-
992 
-
1000 NV_FLEX_API void NvFlexGetDensities(NvFlexSolver* solver, NvFlexBuffer* densities, const NvFlexCopyDesc* desc);
-
1001 
-
1016 NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver* solver, NvFlexBuffer* q1, NvFlexBuffer* q2, NvFlexBuffer* q3, const NvFlexCopyDesc* desc);
-
1026 NV_FLEX_API void NvFlexGetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, NvFlexBuffer* count);
-
1027 
-
1038 NV_FLEX_API void NvFlexSetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, int n);
-
1039 
-
1049 NV_FLEX_API void NvFlexGetContacts(NvFlexSolver* solver, NvFlexBuffer* planes, NvFlexBuffer* velocities, NvFlexBuffer* indices, NvFlexBuffer* counts);
-
1050 
-
1094 NV_FLEX_API void NvFlexGetNeighbors(NvFlexSolver* solver, NvFlexBuffer* neighbors, NvFlexBuffer* counts, NvFlexBuffer* remap);
+ +
897 {
+
898  float radius;
+
899  float halfHeight;
+
900 };
+
901 
+ +
906 {
+
907  float halfExtents[3];
+
908 };
+
909 
+ +
914 {
+
915  float scale[3];
+
916  NvFlexConvexMeshId mesh;
+
917 };
+
918 
+ +
923 {
+
924  float scale[3];
+
925  NvFlexTriangleMeshId mesh;
+
926 };
+
927 
+ +
933 {
+
934  float scale;
+
935  NvFlexDistanceFieldId field;
+
936 };
+
937 
+ +
943 {
+ + + + + + +
950 };
+
951 
+ +
953 {
+ + + + + + +
960 };
+
961 
+ +
963 {
+ + + +
967 
+ +
969 };
+
970 
+
978 NV_FLEX_API inline int NvFlexMakeShapeFlagsWithChannels(NvFlexCollisionShapeType type, bool dynamic, int shapeChannels) { return type | (dynamic?eNvFlexShapeFlagDynamic:0) | shapeChannels; }
+
979 
+
983 NV_FLEX_API inline int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic) { return NvFlexMakeShapeFlagsWithChannels(type, dynamic, eNvFlexPhaseShapeChannelMask); }
+
984 
+
985 
+
999 NV_FLEX_API void NvFlexSetShapes(NvFlexSolver* solver, NvFlexBuffer* geometry, NvFlexBuffer* shapePositions, NvFlexBuffer* shapeRotations, NvFlexBuffer* shapePrevPositions, NvFlexBuffer* shapePrevRotations, NvFlexBuffer* shapeFlags, int numShapes);
+
1000 
+
1011 NV_FLEX_API void NvFlexSetDynamicTriangles(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* normals, int numTris);
+
1020 NV_FLEX_API void NvFlexGetDynamicTriangles(NvFlexSolver* solver, NvFlexBuffer* indices, NvFlexBuffer* normals, int numTris);
+
1021 
+
1036 NV_FLEX_API void NvFlexSetInflatables(NvFlexSolver* solver, NvFlexBuffer* startTris, NvFlexBuffer* numTris, NvFlexBuffer* restVolumes, NvFlexBuffer* overPressures, NvFlexBuffer* constraintScales, int numInflatables);
+
1037 
+
1045 NV_FLEX_API void NvFlexGetDensities(NvFlexSolver* solver, NvFlexBuffer* densities, const NvFlexCopyDesc* desc);
+
1046 
+
1061 NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver* solver, NvFlexBuffer* q1, NvFlexBuffer* q2, NvFlexBuffer* q3, const NvFlexCopyDesc* desc);
+
1071 NV_FLEX_API void NvFlexGetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, NvFlexBuffer* count);
+
1072 
+
1083 NV_FLEX_API void NvFlexSetDiffuseParticles(NvFlexSolver* solver, NvFlexBuffer* p, NvFlexBuffer* v, int n);
+
1084 
+
1094 NV_FLEX_API void NvFlexGetContacts(NvFlexSolver* solver, NvFlexBuffer* planes, NvFlexBuffer* velocities, NvFlexBuffer* indices, NvFlexBuffer* counts);
1095 
-
1104 NV_FLEX_API void NvFlexGetBounds(NvFlexSolver* solver, NvFlexBuffer* lower, NvFlexBuffer* upper);
-
1105 
-
1117 NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver* solver, unsigned long long* begin, unsigned long long* end, unsigned long long* frequency);
-
1118 
-
1129 NV_FLEX_API void NvFlexGetTimers(NvFlexSolver* solver, NvFlexTimers* timers);
-
1130 
- -
1135 {
-
1136  char* name;
-
1137  float time;
-
1138 };
-
1139 
-
1152 NV_FLEX_API int NvFlexGetDetailTimers(NvFlexSolver* solver, NvFlexDetailTimer** timers);
+
1142 NV_FLEX_API void NvFlexGetNeighbors(NvFlexSolver* solver, NvFlexBuffer* neighbors, NvFlexBuffer* counts, NvFlexBuffer* apiToInternal, NvFlexBuffer* internalToApi);
+
1143 
+
1152 NV_FLEX_API void NvFlexGetBounds(NvFlexSolver* solver, NvFlexBuffer* lower, NvFlexBuffer* upper);
1153 
-
1163 NV_FLEX_API NvFlexBuffer* NvFlexAllocBuffer(NvFlexLibrary* lib, int elementCount, int elementByteStride, NvFlexBufferType type);
-
1164 
-
1170 NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer* buf);
-
1171 
-
1181 NV_FLEX_API void* NvFlexMap(NvFlexBuffer* buffer, int flags);
-
1182 
-
1188 NV_FLEX_API void NvFlexUnmap(NvFlexBuffer* buffer);
-
1189 
-
1219 NV_FLEX_API NvFlexBuffer* NvFlexRegisterOGLBuffer(NvFlexLibrary* lib, int buf, int elementCount, int elementByteStride);
-
1220 
-
1226 NV_FLEX_API void NvFlexUnregisterOGLBuffer(NvFlexBuffer* buf);
-
1227 
-
1237 NV_FLEX_API NvFlexBuffer* NvFlexRegisterD3DBuffer(NvFlexLibrary* lib, void* buffer, int elementCount, int elementByteStride);
-
1238 
-
1244 NV_FLEX_API void NvFlexUnregisterD3DBuffer(NvFlexBuffer* buf);
-
1245 
-
1251 NV_FLEX_API void NvFlexAcquireContext(NvFlexLibrary* lib);
-
1252 
-
1257 NV_FLEX_API void NvFlexRestoreContext(NvFlexLibrary* lib);
-
1258 
-
1264 NV_FLEX_API const char* NvFlexGetDeviceName(NvFlexLibrary* lib);
-
1265 
-
1275 NV_FLEX_API void NvFlexGetDeviceAndContext(NvFlexLibrary* lib, void** device, void** context);
-
1276 
-
1277 
-
1283 NV_FLEX_API void NvFlexFlush(NvFlexLibrary* lib);
-
1284 
-
1285 NV_FLEX_API void NvFlexWait(NvFlexLibrary* lib);
+
1165 NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver* solver, unsigned long long* begin, unsigned long long* end, unsigned long long* frequency);
+
1166 
+
1177 NV_FLEX_API void NvFlexGetTimers(NvFlexSolver* solver, NvFlexTimers* timers);
+
1178 
+ +
1183 {
+
1184  char* name;
+
1185  float time;
+
1186 };
+
1187 
+
1200 NV_FLEX_API int NvFlexGetDetailTimers(NvFlexSolver* solver, NvFlexDetailTimer** timers);
+
1201 
+
1211 NV_FLEX_API NvFlexBuffer* NvFlexAllocBuffer(NvFlexLibrary* lib, int elementCount, int elementByteStride, NvFlexBufferType type);
+
1212 
+
1218 NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer* buf);
+
1219 
+
1229 NV_FLEX_API void* NvFlexMap(NvFlexBuffer* buffer, int flags);
+
1230 
+
1236 NV_FLEX_API void NvFlexUnmap(NvFlexBuffer* buffer);
+
1237 
+
1267 NV_FLEX_API NvFlexBuffer* NvFlexRegisterOGLBuffer(NvFlexLibrary* lib, int buf, int elementCount, int elementByteStride);
+
1268 
+
1274 NV_FLEX_API void NvFlexUnregisterOGLBuffer(NvFlexBuffer* buf);
+
1275 
+
1285 NV_FLEX_API NvFlexBuffer* NvFlexRegisterD3DBuffer(NvFlexLibrary* lib, void* buffer, int elementCount, int elementByteStride);
1286 
-
1288 
-
1293 NV_FLEX_API void NvFlexSetDebug(NvFlexSolver* solver, bool enable);
-
1294 NV_FLEX_API void NvFlexGetShapeBVH(NvFlexSolver* solver, void* bvh);
-
1295 NV_FLEX_API void NvFlexCopySolver(NvFlexSolver* dst, NvFlexSolver* src);
-
1296 NV_FLEX_API void NvFlexCopyDeviceToHost(NvFlexSolver* solver, NvFlexBuffer* pDevice, void* pHost, int size, int stride);
-
1297 NV_FLEX_API void NvFlexComputeWaitForGraphics(NvFlexLibrary* lib);
-
1298 
+
1292 NV_FLEX_API void NvFlexUnregisterD3DBuffer(NvFlexBuffer* buf);
+
1293 
+
1299 NV_FLEX_API void NvFlexAcquireContext(NvFlexLibrary* lib);
1300 
-
1301 } // extern "C"
-
1302 
-
1303 #endif // NV_FLEX_H
+
1305 NV_FLEX_API void NvFlexRestoreContext(NvFlexLibrary* lib);
+
1306 
+
1312 NV_FLEX_API const char* NvFlexGetDeviceName(NvFlexLibrary* lib);
+
1313 
+
1323 NV_FLEX_API void NvFlexGetDeviceAndContext(NvFlexLibrary* lib, void** device, void** context);
+
1324 
+
1325 
+
1331 NV_FLEX_API void NvFlexFlush(NvFlexLibrary* lib);
+
1332 
+
1333 NV_FLEX_API void NvFlexWait(NvFlexLibrary* lib);
+
1334 
+
1336 
+
1341 NV_FLEX_API void NvFlexSetDebug(NvFlexSolver* solver, bool enable);
+
1342 NV_FLEX_API void NvFlexGetShapeBVH(NvFlexSolver* solver, void* bvh);
+
1343 NV_FLEX_API void NvFlexCopySolver(NvFlexSolver* dst, NvFlexSolver* src);
+
1344 NV_FLEX_API void NvFlexCopyDeviceToHost(NvFlexSolver* solver, NvFlexBuffer* pDevice, void* pHost, int size, int stride);
+
1345 NV_FLEX_API void NvFlexComputeWaitForGraphics(NvFlexLibrary* lib);
+
1346 NV_FLEX_API void NvFlexGetDataAftermath(NvFlexLibrary* lib, void* pDataOut, void* pStatusOut);
+
1347 
+
1349 
+
1350 } // extern "C"
+
1351 
+
1352 #endif // NV_FLEX_H
NV_FLEX_API int NvFlexGetActiveCount(NvFlexSolver *solver)
Reserved.
Definition: NvFlex.h:169
-
float solveShapes
Time spent solving rigid body constraints.
Definition: NvFlex.h:215
+
float solveShapes
Time spent solving rigid body constraints.
Definition: NvFlex.h:214
NV_FLEX_API NvFlexSolverCallback NvFlexRegisterSolverCallback(NvFlexSolver *solver, NvFlexSolverCallback function, NvFlexSolverCallbackStage stage)
NV_FLEX_API void NvFlexGetPhases(NvFlexSolver *solver, NvFlexBuffer *phases, const NvFlexCopyDesc *desc)
-
float radius
Definition: NvFlex.h:845
-
Warning messages.
Definition: NvFlex.h:236
-
float solveSprings
Time spent solving distance constraints.
Definition: NvFlex.h:216
+
float radius
Definition: NvFlex.h:890
+
Warning messages.
Definition: NvFlex.h:235
+
float solveSprings
Time spent solving distance constraints.
Definition: NvFlex.h:215
NvFlexMapFlags
Definition: NvFlex.h:67
-
int maxDiffuseParticles
Maximum number of diffuse particles in the solver.
Definition: NvFlex.h:369
-
void(* NvFlexErrorCallback)(NvFlexErrorSeverity type, const char *msg, const char *file, int line)
Definition: NvFlex.h:298
-
Information messages.
Definition: NvFlex.h:235
+
int maxDiffuseParticles
Maximum number of diffuse particles in the solver.
Definition: NvFlex.h:368
+
void(* NvFlexErrorCallback)(NvFlexErrorSeverity type, const char *msg, const char *file, int line)
Definition: NvFlex.h:297
+
Information messages.
Definition: NvFlex.h:234
float smoothing
Control the strength of Laplacian smoothing in particles for rendering, if zero then smoothed positio...
Definition: NvFlex.h:132
NV_FLEX_API void NvFlexSetParams(NvFlexSolver *solver, const NvFlexParams *params)
-
Called at the end of solver update after the final substep has completed.
Definition: NvFlex.h:250
+
Called at the end of solver update after the final substep has completed.
Definition: NvFlex.h:249
Particle will collide with shapes with channel 3 set (see NvFlexMakeShapeFlags()) ...
Definition: NvFlex.h:174
NV_FLEX_API void NvFlexUpdateTriangleMesh(NvFlexLibrary *lib, NvFlexTriangleMeshId mesh, NvFlexBuffer *vertices, NvFlexBuffer *indices, int numVertices, int numTriangles, const float *lower, const float *upper)
NV_FLEX_API void NvFlexUnmap(NvFlexBuffer *buffer)
If set this particle will interact with particles of the same group.
Definition: NvFlex.h:166
-
float createCellIndices
Time spent creating grid indices.
Definition: NvFlex.h:204
+
float createCellIndices
Time spent creating grid indices.
Definition: NvFlex.h:203
Particle will collide with shapes with channel 4 set (see NvFlexMakeShapeFlags()) ...
Definition: NvFlex.h:175
float shapeCollisionMargin
Increases the radius used during contact finding against kinematic shapes.
Definition: NvFlex.h:147
-
float scale
Uniform scale of SDF, this corresponds to the world space width of the shape.
Definition: NvFlex.h:889
+
float scale
Uniform scale of SDF, this corresponds to the world space width of the shape.
Definition: NvFlex.h:934
int diffuseBallistic
The number of neighbors below which a diffuse particle is considered ballistic.
Definition: NvFlex.h:141
NV_FLEX_API void NvFlexSetRigids(NvFlexSolver *solver, NvFlexBuffer *offsets, NvFlexBuffer *indices, NvFlexBuffer *restPositions, NvFlexBuffer *restNormals, NvFlexBuffer *stiffness, NvFlexBuffer *thresholds, NvFlexBuffer *creeps, NvFlexBuffer *rotations, NvFlexBuffer *translations, int numRigids, int numIndices)
NvFlexRelaxationMode
Definition: NvFlex.h:85
float drag
Drag force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in th...
Definition: NvFlex.h:121
-
NvFlexErrorSeverity
Definition: NvFlex.h:232
+
NvFlexErrorSeverity
Definition: NvFlex.h:231
NV_FLEX_API void NvFlexSetPhases(NvFlexSolver *solver, NvFlexBuffer *phases, const NvFlexCopyDesc *desc)
float maxSpeed
The magnitude of particle velocity will be clamped to this value at the end of each step...
Definition: NvFlex.h:112
-
All features enabled.
Definition: NvFlex.h:356
+
All features enabled.
Definition: NvFlex.h:355
float planes[8][4]
Collision planes in the form ax + by + cz + d = 0.
Definition: NvFlex.h:149
float cohesion
Control how strongly particles hold each other together, default: 0.025, range [0.0, +inf].
Definition: NvFlex.h:125
float staticFriction
Coefficient of static friction used when colliding against shapes.
Definition: NvFlex.h:106
-
float collideParticles
Time spent finding particle neighbors.
Definition: NvFlex.h:208
+
float collideParticles
Time spent finding particle neighbors.
Definition: NvFlex.h:207
NV_FLEX_API void NvFlexGetNormals(NvFlexSolver *solver, NvFlexBuffer *normals, const NvFlexCopyDesc *desc)
-
NvFlexCapsuleGeometry capsule
Definition: NvFlex.h:900
-
float predict
Time spent in prediction.
Definition: NvFlex.h:203
+
NvFlexCapsuleGeometry capsule
Definition: NvFlex.h:945
+
float predict
Time spent in prediction.
Definition: NvFlex.h:202
NV_FLEX_API void NvFlexGetDiffuseParticles(NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, NvFlexBuffer *count)
-
Definition: NvFlex.h:868
-
int maxNeighborsPerParticle
Maximum number of neighbors per-particle, for solids this can be around 32, for fluids up to 128 may ...
Definition: NvFlex.h:370
-
float updateDiffuse
Time spent updating diffuse particles.
Definition: NvFlex.h:221
-
NvFlexSphereGeometry sphere
Definition: NvFlex.h:899
+
Definition: NvFlex.h:913
+
int maxNeighborsPerParticle
Maximum number of neighbors per-particle, for solids this can be around 32, for fluids up to 128 may ...
Definition: NvFlex.h:369
+
float updateDiffuse
Time spent updating diffuse particles.
Definition: NvFlex.h:220
+
NvFlexSphereGeometry sphere
Definition: NvFlex.h:944
float collisionDistance
Distance particles maintain against shapes, note that for robust collision against triangle meshes th...
Definition: NvFlex.h:145
-
NvFlexTriangleMeshGeometry triMesh
Definition: NvFlex.h:903
-
float solveContacts
Time spent solving contact constraints.
Definition: NvFlex.h:217
+
NvFlexTriangleMeshGeometry triMesh
Definition: NvFlex.h:948
+
float solveContacts
Time spent solving contact constraints.
Definition: NvFlex.h:216
NV_FLEX_API void NvFlexSetActiveCount(NvFlexSolver *solver, int n)
Bits [20, 23] hold flags about how the particle behave.
Definition: NvFlex.h:163
-
Definition: NvFlex.h:923
-
NvFlexComputeType computeType
Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, this must match the li...
Definition: NvFlex.h:324
+
Definition: NvFlex.h:968
+
NvFlexComputeType computeType
Set to eNvFlexD3D11 if DirectX 11 should be used, eNvFlexD3D12 for DirectX 12, this must match the li...
Definition: NvFlex.h:323
NV_FLEX_API void NvFlexDestroyDistanceField(NvFlexLibrary *lib, NvFlexDistanceFieldId sdf)
-
Use DirectX 11 compute for Flex, the application must link against the D3D libraries.
Definition: NvFlex.h:308
-
NV_FLEX_API void NvFlexGetNeighbors(NvFlexSolver *solver, NvFlexBuffer *neighbors, NvFlexBuffer *counts, NvFlexBuffer *remap)
+
Use DirectX 11 compute for Flex, the application must link against the D3D libraries.
Definition: NvFlex.h:307
NV_FLEX_API void NvFlexDestroySolver(NvFlexSolver *solver)
-
Lower 3 bits holds the type of the collision shape given by the NvFlexCollisionShapeType enum...
Definition: NvFlex.h:919
-
const int * originalToSortedMap
Device pointer that maps the sorted callback data to the original position given by SetParticles() ...
Definition: NvFlex.h:280
-
float halfHeight
Definition: NvFlex.h:854
+
Lower 3 bits holds the type of the collision shape given by the NvFlexCollisionShapeType enum...
Definition: NvFlex.h:964
+
const int * originalToSortedMap
Device pointer that maps the sorted callback data to the original position given by SetParticles() ...
Definition: NvFlex.h:279
+
float halfHeight
Definition: NvFlex.h:899
Calling thread will be blocked until buffer is ready for access, default.
Definition: NvFlex.h:69
NV_FLEX_API void NvFlexSetDiffuseParticles(NvFlexSolver *solver, NvFlexBuffer *p, NvFlexBuffer *v, int n)
struct NvFlexSolver NvFlexSolver
Definition: NvFlex.h:57
-
Called at the end of each substep after the velocity has been updated by the constraints.
Definition: NvFlex.h:249
-
float * particles
Device pointer to the active particle basic data in the form x,y,z,1/m.
Definition: NvFlex.h:272
+
Called at the end of each substep after the velocity has been updated by the constraints.
Definition: NvFlex.h:248
+
float * particles
Device pointer to the active particle basic data in the form x,y,z,1/m.
Definition: NvFlex.h:271
NV_FLEX_API void NvFlexGetActive(NvFlexSolver *solver, NvFlexBuffer *indices, const NvFlexCopyDesc *desc)
NV_FLEX_API void NvFlexSetInflatables(NvFlexSolver *solver, NvFlexBuffer *startTris, NvFlexBuffer *numTris, NvFlexBuffer *restVolumes, NvFlexBuffer *overPressures, NvFlexBuffer *constraintScales, int numInflatables)
NV_FLEX_API void NvFlexWait(NvFlexLibrary *lib)
NV_FLEX_API void NvFlexSetParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)
-
Definition: NvFlex.h:843
-
Definition: NvFlex.h:364
-
int dstOffset
Definition: NvFlex.h:503
-
Called at the beginning of each constraint iteration.
Definition: NvFlex.h:246
+
Definition: NvFlex.h:888
+
Definition: NvFlex.h:363
+
int dstOffset
Definition: NvFlex.h:515
+
Called at the beginning of each constraint iteration.
Definition: NvFlex.h:245
NV_FLEX_API void NvFlexGetTriangleMeshBounds(NvFlexLibrary *lib, const NvFlexTriangleMeshId mesh, float *lower, float *upper)
-
NV_FLEX_API int NvFlexMakeShapeFlagsWithChannels(NvFlexCollisionShapeType type, bool dynamic, int shapeChannels)
Definition: NvFlex.h:933
-
Definition: NvFlex.h:267
+
NV_FLEX_API int NvFlexMakeShapeFlagsWithChannels(NvFlexCollisionShapeType type, bool dynamic, int shapeChannels)
Definition: NvFlex.h:978
+
Definition: NvFlex.h:266
NV_FLEX_API NvFlexConvexMeshId NvFlexCreateConvexMesh(NvFlexLibrary *lib)
NV_FLEX_API void * NvFlexMap(NvFlexBuffer *buffer, int flags)
-
float time
Definition: NvFlex.h:1137
-
Definition: NvFlex.h:897
-
float updateNormals
Time spent updating vertex normals.
Definition: NvFlex.h:223
-
unsigned int NvFlexTriangleMeshId
Definition: NvFlex.h:718
+
float time
Definition: NvFlex.h:1185
+
Definition: NvFlex.h:942
+
float updateNormals
Time spent updating vertex normals.
Definition: NvFlex.h:222
+
unsigned int NvFlexTriangleMeshId
Definition: NvFlex.h:730
The relaxation factor is a fixed multiplier on each constraint's delta divided by the particle's cons...
Definition: NvFlex.h:88
NV_FLEX_API NvFlexBuffer * NvFlexRegisterD3DBuffer(NvFlexLibrary *lib, void *buffer, int elementCount, int elementByteStride)
-
Indicates that the shape is a trigger volume, this means it will not perform any collision response...
Definition: NvFlex.h:921
-
Simple single phase fluid-only particles (no solids)
Definition: NvFlex.h:358
-
A sphere shape, see FlexSphereGeometry.
Definition: NvFlex.h:909
-
A signed distance field shape, see FlexSDFGeometry.
Definition: NvFlex.h:914
-
int deviceIndex
The GPU device index that should be used, if there is already a CUDA context on the calling thread th...
Definition: NvFlex.h:317
+
bool runOnRenderContext
If true, run Flex on D3D11 render context, or D3D12 direct queue. If false, run on a D3D12 compute qu...
Definition: NvFlex.h:321
+
Indicates that the shape is a trigger volume, this means it will not perform any collision response...
Definition: NvFlex.h:966
+
Simple single phase fluid-only particles (no solids)
Definition: NvFlex.h:357
+
A sphere shape, see FlexSphereGeometry.
Definition: NvFlex.h:954
+
A signed distance field shape, see FlexSDFGeometry.
Definition: NvFlex.h:959
+
int deviceIndex
The GPU device index that should be used, if there is already a CUDA context on the calling thread th...
Definition: NvFlex.h:316
float viscosity
Smoothes particle velocities using XSPH viscosity.
Definition: NvFlex.h:127
-
NvFlexTriangleMeshId mesh
A triangle mesh pointer created by NvFlexCreateTriangleMesh()
Definition: NvFlex.h:880
+
NvFlexTriangleMeshId mesh
A triangle mesh pointer created by NvFlexCreateTriangleMesh()
Definition: NvFlex.h:925
float adhesion
Controls how strongly particles stick to surfaces they hit, default 0.0, range [0.0, +inf].
Definition: NvFlex.h:109
NV_FLEX_API void NvFlexUnregisterOGLBuffer(NvFlexBuffer *buf)
-
float halfExtents[3]
Definition: NvFlex.h:862
-
Definition: NvFlex.h:860
+
float halfExtents[3]
Definition: NvFlex.h:907
+
Definition: NvFlex.h:905
NV_FLEX_API NvFlexDistanceFieldId NvFlexCreateDistanceField(NvFlexLibrary *lib)
-
int * phases
Device pointer to the active particle phase data.
Definition: NvFlex.h:274
+
int * phases
Device pointer to the active particle phase data.
Definition: NvFlex.h:273
NV_FLEX_API void NvFlexFlush(NvFlexLibrary *lib)
NV_FLEX_API void NvFlexGetBounds(NvFlexSolver *solver, NvFlexBuffer *lower, NvFlexBuffer *upper)
A host mappable buffer, pinned memory on CUDA, staging buffer on DX.
Definition: NvFlex.h:78
-
int numActive
The number of active particles returned, the callback data only return pointers to active particle da...
Definition: NvFlex.h:276
+
int numActive
The number of active particles returned, the callback data only return pointers to active particle da...
Definition: NvFlex.h:275
NV_FLEX_API NvFlexLibrary * NvFlexGetSolverLibrary(NvFlexSolver *solver)
-
Particle will collide with shapes with channel 7 set (see NvFlexMakeShapeFlags()) ...
Definition: NvFlex.h:178
struct NvFlexBuffer NvFlexBuffer
Definition: NvFlex.h:62
-
float sortCellIndices
Time spent sorting grid indices.
Definition: NvFlex.h:205
-
int srcOffset
Definition: NvFlex.h:502
-
int maxParticles
Maximum number of regular particles in the solver.
Definition: NvFlex.h:368
+
float sortCellIndices
Time spent sorting grid indices.
Definition: NvFlex.h:204
+
int srcOffset
Definition: NvFlex.h:514
+
int maxParticles
Maximum number of regular particles in the solver.
Definition: NvFlex.h:367
NV_FLEX_API void NvFlexGetRestParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)
-
void * computeContext
Direct3D context to use for simulation, if none is specified a new context will be created...
Definition: NvFlex.h:321
+
int maxContactsPerParticle
Maximum number of collision contacts per-particle.
Definition: NvFlex.h:370
+
void * computeContext
Direct3D context to use for simulation, if none is specified a new context will be created...
Definition: NvFlex.h:320
float radius
The maximum interaction radius for particles.
Definition: NvFlex.h:100
NV_FLEX_API void NvFlexGetContacts(NvFlexSolver *solver, NvFlexBuffer *planes, NvFlexBuffer *velocities, NvFlexBuffer *indices, NvFlexBuffer *counts)
-
NvFlexBoxGeometry box
Definition: NvFlex.h:901
-
float * velocities
Device pointer to the active particle velocity data in the form x,y,z,w (last component is not used) ...
Definition: NvFlex.h:273
+
NvFlexBoxGeometry box
Definition: NvFlex.h:946
+
float * velocities
Device pointer to the active particle velocity data in the form x,y,z,w (last component is not used) ...
Definition: NvFlex.h:272
Particle will collide with shapes with channel 1 set (see NvFlexMakeShapeFlags()) ...
Definition: NvFlex.h:172
NV_FLEX_API float NvFlexGetDeviceLatency(NvFlexSolver *solver, unsigned long long *begin, unsigned long long *end, unsigned long long *frequency)
float anisotropyMin
Clamp the anisotropy scale to this fraction of the radius.
Definition: NvFlex.h:130
-
float applyDeltas
Time spent adding position deltas to particles.
Definition: NvFlex.h:219
-
NvFlexDistanceFieldId field
A signed distance field pointer created by NvFlexCreateDistanceField()
Definition: NvFlex.h:890
-
float calculateDensity
Time spent calculating fluid density.
Definition: NvFlex.h:212
-
void * userData
Definition: NvFlex.h:289
-
A capsule shape, see FlexCapsuleGeometry.
Definition: NvFlex.h:910
+
float applyDeltas
Time spent adding position deltas to particles.
Definition: NvFlex.h:218
+
NvFlexDistanceFieldId field
A signed distance field pointer created by NvFlexCreateDistanceField()
Definition: NvFlex.h:935
+
float calculateDensity
Time spent calculating fluid density.
Definition: NvFlex.h:211
+
void * userData
Definition: NvFlex.h:288
+
A capsule shape, see FlexCapsuleGeometry.
Definition: NvFlex.h:955
NV_FLEX_API NvFlexTriangleMeshId NvFlexCreateTriangleMesh(NvFlexLibrary *lib)
-
NvFlexFeatureMode featureMode
Control which features are enabled.
Definition: NvFlex.h:366
+
NV_FLEX_API int NvFlexGetSolvers(NvFlexLibrary *lib, NvFlexSolver **solvers, int n)
+
NvFlexFeatureMode featureMode
Control which features are enabled.
Definition: NvFlex.h:365
NV_FLEX_API void NvFlexShutdown(NvFlexLibrary *lib)
-
NvFlexSolver * solver
Pointer to the solver that the callback is registered to.
Definition: NvFlex.h:269
+
NvFlexSolver * solver
Pointer to the solver that the callback is registered to.
Definition: NvFlex.h:268
If set this particle will generate fluid density constraints for its overlapping neighbors.
Definition: NvFlex.h:168
-
NvFlexFeatureMode
Definition: NvFlex.h:354
+
NvFlexFeatureMode
Definition: NvFlex.h:353
+
NV_FLEX_API int NvFlexGetDistanceFields(NvFlexLibrary *lib, NvFlexDistanceFieldId *sdfs, int n)
NvFlexPhase
Definition: NvFlex.h:160
NV_FLEX_API void NvFlexUnregisterD3DBuffer(NvFlexBuffer *buf)
-
bool useComputeQueue
If true, run Flex on a D3D12 compute queue, or vendor specific D3D11 compute queue. This allows compute and graphics to run in parallel on some GPUs.
Definition: NvFlex.h:322
float sleepThreshold
Particles with a velocity magnitude < this threshold will be considered fixed.
Definition: NvFlex.h:110
NV_FLEX_API int NvFlexGetVersion()
+
NV_FLEX_API int NvFlexGetTriangleMeshes(NvFlexLibrary *lib, NvFlexTriangleMeshId *meshes, int n)
float anisotropyMax
Clamp the anisotropy scale to this fraction of the radius.
Definition: NvFlex.h:131
-
float collideTriangles
Time spent colliding triangle shapes.
Definition: NvFlex.h:210
+
float collideTriangles
Time spent colliding triangle shapes.
Definition: NvFlex.h:209
NV_FLEX_API int NvFlexGetDetailTimers(NvFlexSolver *solver, NvFlexDetailTimer **timers)
NV_FLEX_API void NvFlexGetConvexMeshBounds(NvFlexLibrary *lib, NvFlexConvexMeshId mesh, float *lower, float *upper)
-
Indicates the shape is dynamic and should have lower priority over static collision shapes...
Definition: NvFlex.h:920
+
Indicates the shape is dynamic and should have lower priority over static collision shapes...
Definition: NvFlex.h:965
Calling thread will check if buffer is ready for access, if not ready then the method will return NUL...
Definition: NvFlex.h:70
-
NV_FLEX_API int NvFlexMakePhaseWithChannels(int group, int particleFlags, int shapeChannels)
Definition: NvFlex.h:190
-
NV_FLEX_API int NvFlexMakePhase(int group, int particleFlags)
Definition: NvFlex.h:195
+
NV_FLEX_API int NvFlexMakePhaseWithChannels(int group, int particleFlags, int shapeChannels)
Definition: NvFlex.h:189
+
NV_FLEX_API int NvFlexMakePhase(int group, int particleFlags)
Definition: NvFlex.h:194
NV_FLEX_API void NvFlexSetActive(NvFlexSolver *solver, NvFlexBuffer *indices, const NvFlexCopyDesc *desc)
float shockPropagation
Artificially decrease the mass of particles based on height from a fixed reference point...
Definition: NvFlex.h:115
NV_FLEX_API const char * NvFlexGetDeviceName(NvFlexLibrary *lib)
NV_FLEX_API void NvFlexDestroyConvexMesh(NvFlexLibrary *lib, NvFlexConvexMeshId convex)
-
float collideFields
Time spent colliding signed distance field shapes.
Definition: NvFlex.h:211
-
float calculateAnisotropy
Time spent calculating particle anisotropy for fluid.
Definition: NvFlex.h:220
+
float collideFields
Time spent colliding signed distance field shapes.
Definition: NvFlex.h:210
+
float calculateAnisotropy
Time spent calculating particle anisotropy for fluid.
Definition: NvFlex.h:219
Particle will collide with shapes with channel 6 set (see NvFlexMakeShapeFlags()) ...
Definition: NvFlex.h:177
NV_FLEX_API void NvFlexGetParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)
-
void * renderContext
Direct3D context that the app is using for rendering. In DirectX 12 this should be a ID3D12CommandQue...
Definition: NvFlex.h:320
+
void * renderContext
Direct3D context that the app is using for rendering. In DirectX 12 this should be a ID3D12CommandQue...
Definition: NvFlex.h:319
struct NvFlexLibrary NvFlexLibrary
Definition: NvFlex.h:52
NV_FLEX_API void NvFlexAcquireContext(NvFlexLibrary *lib)
NV_FLEX_API NvFlexLibrary * NvFlexInit(int version=NV_FLEX_VERSION, NvFlexErrorCallback errorFunc=0, NvFlexInitDesc *desc=0)
float freeSurfaceDrag
Drag force applied to boundary fluid particles.
Definition: NvFlex.h:134
NV_FLEX_API void NvFlexSetNormals(NvFlexSolver *solver, NvFlexBuffer *normals, const NvFlexCopyDesc *desc)
-
NvFlexSDFGeometry sdf
Definition: NvFlex.h:904
+
NvFlexSDFGeometry sdf
Definition: NvFlex.h:949
float maxAcceleration
The magnitude of particle acceleration will be clamped to this value at the end of each step (limits ...
Definition: NvFlex.h:113
float wind[3]
Constant acceleration applied to particles that belong to dynamic triangles, drag needs to be > 0 for...
Definition: NvFlex.h:120
Particle will collide with shapes with channel 5 set (see NvFlexMakeShapeFlags()) ...
Definition: NvFlex.h:176
NV_FLEX_API NvFlexSolver * NvFlexCreateSolver(NvFlexLibrary *lib, const NvFlexSolverDesc *desc)
NV_FLEX_API void NvFlexUpdateDistanceField(NvFlexLibrary *lib, NvFlexDistanceFieldId sdf, int dimx, int dimy, int dimz, NvFlexBuffer *field)
-
Definition: NvFlex.h:201
+
Definition: NvFlex.h:200
float surfaceTension
Controls how strongly particles attempt to minimize surface area, default: 0.0, range: [0...
Definition: NvFlex.h:126
Particle will collide with shapes with channel 0 set (see NvFlexMakeShapeFlags()) ...
Definition: NvFlex.h:171
-
float dt
The per-update time-step, this is the value passed to NvFlexUpdateSolver()
Definition: NvFlex.h:278
+
float dt
The per-update time-step, this is the value passed to NvFlexUpdateSolver()
Definition: NvFlex.h:277
float fluidRestDistance
The distance fluid particles are spaced at the rest density, must be in the range (0...
Definition: NvFlex.h:102
-
float reorder
Time spent reordering particles.
Definition: NvFlex.h:207
-
unsigned int NvFlexDistanceFieldId
Definition: NvFlex.h:723
-
A triangle mesh shape, see FlexTriangleMeshGeometry.
Definition: NvFlex.h:913
+
float reorder
Time spent reordering particles.
Definition: NvFlex.h:206
+
unsigned int NvFlexDistanceFieldId
Definition: NvFlex.h:735
+
A triangle mesh shape, see FlexTriangleMeshGeometry.
Definition: NvFlex.h:958
If set this particle will ignore collisions with particles closer than the radius in the rest pose...
Definition: NvFlex.h:167
NV_FLEX_API void NvFlexGetTimers(NvFlexSolver *solver, NvFlexTimers *timers)
-
NvFlexConvexMeshId mesh
Definition: NvFlex.h:871
+
NvFlexConvexMeshId mesh
Definition: NvFlex.h:916
NV_FLEX_API void NvFlexGetRigids(NvFlexSolver *solver, NvFlexBuffer *offsets, NvFlexBuffer *indices, NvFlexBuffer *restPositions, NvFlexBuffer *restNormals, NvFlexBuffer *stiffness, NvFlexBuffer *thresholds, NvFlexBuffer *creeps, NvFlexBuffer *rotations, NvFlexBuffer *translations)
-
NvFlexConvexMeshGeometry convexMesh
Definition: NvFlex.h:902
-
NvFlexSolverCallbackStage
Definition: NvFlex.h:244
+
NvFlexConvexMeshGeometry convexMesh
Definition: NvFlex.h:947
+
NvFlexSolverCallbackStage
Definition: NvFlex.h:243
float dissipation
Damps particle velocity based on how many particle contacts it has.
Definition: NvFlex.h:116
-
NvFlexCollisionShapeType
Definition: NvFlex.h:907
-
Used only in debug version of dll.
Definition: NvFlex.h:237
-
Use CUDA compute for Flex, the application must link against the CUDA libraries.
Definition: NvFlex.h:307
+
NvFlexCollisionShapeType
Definition: NvFlex.h:952
+
Used only in debug version of dll.
Definition: NvFlex.h:236
+
NV_FLEX_API int NvFlexGetConvexMeshes(NvFlexLibrary *lib, NvFlexConvexMeshId *meshes, int n)
+
Use CUDA compute for Flex, the application must link against the CUDA libraries.
Definition: NvFlex.h:306
NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary *lib, NvFlexConvexMeshId convex, NvFlexBuffer *planes, int numPlanes, const float *lower, const float *upper)
NvFlexRelaxationMode relaxationMode
How the relaxation is applied inside the solver.
Definition: NvFlex.h:152
float lift
Lift force applied to particles belonging to dynamic triangles, proportional to velocity^2*area in th...
Definition: NvFlex.h:122
NV_FLEX_API void NvFlexGetDeviceAndContext(NvFlexLibrary *lib, void **device, void **context)
-
void * renderDevice
Direct3D device to use for simulation, if none is specified a new device and context will be created...
Definition: NvFlex.h:319
-
A box shape, see FlexBoxGeometry.
Definition: NvFlex.h:911
+
void * renderDevice
Direct3D device to use for simulation, if none is specified a new device and context will be created...
Definition: NvFlex.h:318
+
A box shape, see FlexBoxGeometry.
Definition: NvFlex.h:956
float damping
Viscous drag force, applies a force proportional, and opposite to the particle velocity.
Definition: NvFlex.h:117
NV_FLEX_API void NvFlexSetDynamicTriangles(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *normals, int numTris)
-
NvFlexCollisionShapeFlags
Definition: NvFlex.h:917
+
NvFlexCollisionShapeFlags
Definition: NvFlex.h:962
int numPlanes
Num collision planes.
Definition: NvFlex.h:150
NV_FLEX_API NvFlexBuffer * NvFlexAllocBuffer(NvFlexLibrary *lib, int elementCount, int elementByteStride, NvFlexBufferType type)
Definition: NvFlex.h:95
-
float collideShapes
Time spent colliding convex shapes.
Definition: NvFlex.h:209
+
float collideShapes
Time spent colliding convex shapes.
Definition: NvFlex.h:208
float particleFriction
Coefficient of friction used when colliding particles.
Definition: NvFlex.h:107
NV_FLEX_API void NvFlexUpdateSolver(NvFlexSolver *solver, float dt, int substeps, bool enableTimers)
-
float createGrid
Time spent creating grid.
Definition: NvFlex.h:206
+
float createGrid
Time spent creating grid.
Definition: NvFlex.h:205
Bits [ 0, 19] represent the particle group for controlling collisions.
Definition: NvFlex.h:162
float buoyancy
Gravity is scaled by this value for fluid particles.
Definition: NvFlex.h:135
-
All log types.
Definition: NvFlex.h:238
+
All log types.
Definition: NvFlex.h:237
NV_FLEX_API void NvFlexSetShapes(NvFlexSolver *solver, NvFlexBuffer *geometry, NvFlexBuffer *shapePositions, NvFlexBuffer *shapeRotations, NvFlexBuffer *shapePrevPositions, NvFlexBuffer *shapePrevRotations, NvFlexBuffer *shapeFlags, int numShapes)
-
Use DirectX 12 compute for Flex, the application must link against the D3D libraries.
Definition: NvFlex.h:309
-
float scale[3]
The scale of the object from local space to world space.
Definition: NvFlex.h:879
-
float solveDensities
Time spent solving density constraints.
Definition: NvFlex.h:213
+
Use DirectX 12 compute for Flex, the application must link against the D3D libraries.
Definition: NvFlex.h:308
+
float scale[3]
The scale of the object from local space to world space.
Definition: NvFlex.h:924
+
float solveDensities
Time spent solving density constraints.
Definition: NvFlex.h:212
NV_FLEX_API void NvFlexGetSmoothParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)
NV_FLEX_API void NvFlexGetAnisotropy(NvFlexSolver *solver, NvFlexBuffer *q1, NvFlexBuffer *q2, NvFlexBuffer *q3, const NvFlexCopyDesc *desc)
NV_FLEX_API void NvFlexDestroyTriangleMesh(NvFlexLibrary *lib, NvFlexTriangleMeshId mesh)
float gravity[3]
Constant acceleration applied to all particles.
Definition: NvFlex.h:99
-
Called at the end of each constraint iteration.
Definition: NvFlex.h:247
-
Error messages.
Definition: NvFlex.h:234
+
Called at the end of each constraint iteration.
Definition: NvFlex.h:246
+
Error messages.
Definition: NvFlex.h:233
NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer *buf)
-
Bits [24, 31] hold flags representing what shape collision channels particles will collide with...
Definition: NvFlex.h:164
-
float solveInflatables
Time spent solving pressure constraints.
Definition: NvFlex.h:218
-
Called at the beginning of each substep after the prediction step has been completed.
Definition: NvFlex.h:248
-
Simple per-particle collision (no per-particle SDF normals, no fluids)
Definition: NvFlex.h:357
-
Definition: NvFlex.h:315
+
Bits [24, 30] hold flags representing what shape collision channels particles will collide with...
Definition: NvFlex.h:164
+
float solveInflatables
Time spent solving pressure constraints.
Definition: NvFlex.h:217
+
Called at the beginning of each substep after the prediction step has been completed.
Definition: NvFlex.h:247
+
Simple per-particle collision (no per-particle SDF normals, no fluids)
Definition: NvFlex.h:356
+
Definition: NvFlex.h:314
The relaxation factor is a fixed multiplier on each constraint's position delta.
Definition: NvFlex.h:87
NV_FLEX_API void NvFlexGetVelocities(NvFlexSolver *solver, NvFlexBuffer *v, const NvFlexCopyDesc *desc)
-
Definition: NvFlex.h:851
-
float total
Sum of all timers above.
Definition: NvFlex.h:226
-
void * userData
Pointer to the user data provided to NvFlexRegisterSolverCallback()
Definition: NvFlex.h:270
+
Definition: NvFlex.h:896
+
float total
Sum of all timers above.
Definition: NvFlex.h:225
+
void * userData
Pointer to the user data provided to NvFlexRegisterSolverCallback()
Definition: NvFlex.h:269
NV_FLEX_API void NvFlexGetDensities(NvFlexSolver *solver, NvFlexBuffer *densities, const NvFlexCopyDesc *desc)
-
float radius
Definition: NvFlex.h:853
+
float radius
Definition: NvFlex.h:898
NV_FLEX_API void NvFlexGetDynamicTriangles(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *normals, int numTris)
-
NV_FLEX_API int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic)
Definition: NvFlex.h:938
+
NV_FLEX_API int NvFlexMakeShapeFlags(NvFlexCollisionShapeType type, bool dynamic)
Definition: NvFlex.h:983
NV_FLEX_API NvFlexBuffer * NvFlexRegisterOGLBuffer(NvFlexLibrary *lib, int buf, int elementCount, int elementByteStride)
-
Definition: NvFlex.h:1134
+
Definition: NvFlex.h:1182
Particle will collide with shapes with channel 2 set (see NvFlexMakeShapeFlags()) ...
Definition: NvFlex.h:173
float relaxationFactor
Control the convergence rate of the parallel solver, default: 1, values greater than 1 may lead to in...
Definition: NvFlex.h:153
NV_FLEX_API void NvFlexSetSprings(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *restLengths, NvFlexBuffer *stiffness, int numSprings)
-
float finalize
Time spent finalizing state.
Definition: NvFlex.h:224
-
const int * sortedToOriginalMap
Device pointer that maps the original particle index to the index in the callback data structure...
Definition: NvFlex.h:281
-
NvFlexComputeType
Definition: NvFlex.h:305
+
float finalize
Time spent finalizing state.
Definition: NvFlex.h:223
+
const int * sortedToOriginalMap
Device pointer that maps the original particle index to the index in the callback data structure...
Definition: NvFlex.h:280
+
NvFlexComputeType
Definition: NvFlex.h:304
+
NV_FLEX_API void NvFlexGetNeighbors(NvFlexSolver *solver, NvFlexBuffer *neighbors, NvFlexBuffer *counts, NvFlexBuffer *apiToInternal, NvFlexBuffer *internalToApi)
float dynamicFriction
Coefficient of friction used when colliding against shapes.
Definition: NvFlex.h:105
-
Definition: NvFlex.h:887
-
float scale[3]
Definition: NvFlex.h:870
-
Definition: NvFlex.h:286
+
Definition: NvFlex.h:932
+
float scale[3]
Definition: NvFlex.h:915
+
Definition: NvFlex.h:285
float diffuseBuoyancy
Scales force opposing gravity that diffuse particles receive.
Definition: NvFlex.h:139
-
float updateBounds
Time spent updating particle bounds.
Definition: NvFlex.h:225
-
char * name
Definition: NvFlex.h:1136
+
float updateBounds
Time spent updating particle bounds.
Definition: NvFlex.h:224
+
char * name
Definition: NvFlex.h:1184
float solidRestDistance
The distance non-fluid particles attempt to maintain from each other, must be in the range (0...
Definition: NvFlex.h:101
NV_FLEX_API void NvFlexSetSolverDescDefaults(NvFlexSolverDesc *desc)
float solidPressure
Add pressure from solid surfaces to particles.
Definition: NvFlex.h:133
-
float solveVelocities
Time spent solving velocity constraints.
Definition: NvFlex.h:214
-
Number of stages.
Definition: NvFlex.h:251
+
float solveVelocities
Time spent solving velocity constraints.
Definition: NvFlex.h:213
+
Number of stages.
Definition: NvFlex.h:250
float restitution
Coefficient of restitution used when colliding against shapes, particle collisions are always inelast...
Definition: NvFlex.h:108
-
Definition: NvFlex.h:877
+
Definition: NvFlex.h:922
int numIterations
Number of solver iterations to perform per-substep.
Definition: NvFlex.h:97
NV_FLEX_API void NvFlexRestoreContext(NvFlexLibrary *lib)
NV_FLEX_API void NvFlexGetParams(NvFlexSolver *solver, NvFlexParams *params)
@@ -795,21 +809,21 @@
NV_FLEX_API void NvFlexGetSolverDesc(NvFlexSolver *solver, NvFlexSolverDesc *desc)
float particleCollisionMargin
Increases the radius used during neighbor finding, this is useful if particles are expected to move s...
Definition: NvFlex.h:146
float diffuseThreshold
Particles with kinetic energy + divergence above this threshold will spawn new diffuse particles...
Definition: NvFlex.h:138
-
int elementCount
Definition: NvFlex.h:504
+
int elementCount
Definition: NvFlex.h:516
A device memory buffer, mapping this on CUDA will return a device memory pointer, and will return a b...
Definition: NvFlex.h:79
NV_FLEX_API void NvFlexGetSprings(NvFlexSolver *solver, NvFlexBuffer *indices, NvFlexBuffer *restLengths, NvFlexBuffer *stiffness, int numSprings)
NV_FLEX_API void NvFlexSetRestParticles(NvFlexSolver *solver, NvFlexBuffer *p, const NvFlexCopyDesc *desc)
NV_FLEX_API void NvFlexSetVelocities(NvFlexSolver *solver, NvFlexBuffer *v, const NvFlexCopyDesc *desc)
-
A convex mesh shape, see FlexConvexMeshGeometry.
Definition: NvFlex.h:912
-
float updateTriangles
Time spent updating dynamic triangles.
Definition: NvFlex.h:222
-
Definition: NvFlex.h:500
+
A convex mesh shape, see FlexConvexMeshGeometry.
Definition: NvFlex.h:957
+
float updateTriangles
Time spent updating dynamic triangles.
Definition: NvFlex.h:221
+
Definition: NvFlex.h:512
NvFlexBufferType
Definition: NvFlex.h:76
-
bool enableExtensions
Enable or disable NVIDIA/AMD extensions in DirectX, can lead to improved performance.
Definition: NvFlex.h:318
-
unsigned int NvFlexConvexMeshId
Definition: NvFlex.h:730
+
bool enableExtensions
Enable or disable NVIDIA/AMD extensions in DirectX, can lead to improved performance.
Definition: NvFlex.h:317
+
unsigned int NvFlexConvexMeshId
Definition: NvFlex.h:742
diff --git a/doc/_static/api/_nv_flex_device_8h.html b/doc/_static/api/_nv_flex_device_8h.html index 9f0be26..867eaa4 100644 --- a/doc/_static/api/_nv_flex_device_8h.html +++ b/doc/_static/api/_nv_flex_device_8h.html @@ -115,7 +115,7 @@ Functions diff --git a/doc/_static/api/_nv_flex_device_8h_source.html b/doc/_static/api/_nv_flex_device_8h_source.html index 8986294..597c6a9 100644 --- a/doc/_static/api/_nv_flex_device_8h_source.html +++ b/doc/_static/api/_nv_flex_device_8h_source.html @@ -91,7 +91,7 @@ diff --git a/doc/_static/api/_nv_flex_ext_8h.html b/doc/_static/api/_nv_flex_ext_8h.html index 8b89124..b12e47a 100644 --- a/doc/_static/api/_nv_flex_ext_8h.html +++ b/doc/_static/api/_nv_flex_ext_8h.html @@ -57,6 +57,8 @@ Data Structures   struct  NvFlexExtInstance   +struct  NvFlexExtSoftJoint +  struct  NvFlexExtTearingParticleClone   struct  NvFlexExtTearingMeshEdit @@ -157,6 +159,12 @@ Functions   NV_FLEX_API void NvFlexExtSetForceFields (NvFlexExtForceFieldCallback *callback, const NvFlexExtForceField *forceFields, int numForceFields)   +NV_FLEX_API NvFlexExtSoftJointNvFlexExtCreateSoftJoint (NvFlexExtContainer *container, const int *particleIndices, const float *particleLocalPositions, const int numJointParticles, const float stiffness) +  +NV_FLEX_API void NvFlexExtDestroySoftJoint (NvFlexExtContainer *container, NvFlexExtSoftJoint *joint) +  +NV_FLEX_API void NvFlexExtSoftJointSetTransform (NvFlexExtContainer *container, NvFlexExtSoftJoint *joint, const float *position, const float *rotation) + 

Detailed Description

The main include file for the Flex extensions API, this is a collection of helper functions for asset creation, scene management, and sample code that builds on the Flex core API.

@@ -429,6 +437,70 @@ userData User data pointer. +
+ + +
+
+ + + + +
struct NvFlexExtSoftJoint
+
+

Represents a soft joint with a radius overlapping different flex objects Each soft joint can be spawned into a container using NvFlexExtCreateSoftJoint()

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Data Fields
+int * +particleIndices +Global indices.
+float * +particleLocalPositions +Relative offsets from the particles of the joint to the center.
+int +shapeIndex +Index in the container's shape body constraints array.
+int +numParticles +Number of particles in the joint.
+float +shapeTranslations[3] +Joint shape matching group translations (vec3s)
+float +shapeRotations[4] +Joint shape matching group rotations (quaternions)
+float +stiffness +Joint stiffness.
+bool +initialized +Joint status flag.
+
@@ -2134,12 +2206,150 @@ Linear or no falloff. + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API NvFlexExtSoftJoint* NvFlexExtCreateSoftJoint (NvFlexExtContainercontainer,
const int * particleIndices,
const float * particleLocalPositions,
const int numJointParticles,
const float stiffness 
)
+
+

Create a soft joint, the container will internally store a reference to the joint array

+
Parameters
+ + + + + + +
[in]containerThe container to spawn into
[in]particleIndicesA pointer to an array of particle indices
[in]particleLocalPositionsA pointer to an array of particle local positions
[in]numJointParticlesThe number of particles in the joint
[in]stiffnessThe stiffness of the joint
+
+
+
Returns
A pointer to the soft joint
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtDestroySoftJoint (NvFlexExtContainercontainer,
NvFlexExtSoftJointjoint 
)
+
+

Destroy a soft joint

+
Parameters
+ + + +
[in]containerThe container the joint belongs to
[in]jointThe soft joint to destroy
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NV_FLEX_API void NvFlexExtSoftJointSetTransform (NvFlexExtContainercontainer,
NvFlexExtSoftJointjoint,
const float * position,
const float * rotation 
)
+
+

Transform all the local particles of the soft joint

+
Parameters
+ + + + + +
[in]containerThe container to spawn into
[in]jointThe soft joint to destroy
[in]positionA pointer to a vec3 storing the soft joint new position
[in]rotationA pointer to a quaternion storing the soft joint new rotation
+
+
+
diff --git a/doc/_static/api/_nv_flex_ext_8h_source.html b/doc/_static/api/_nv_flex_ext_8h_source.html index 18c994b..2fde2da 100644 --- a/doc/_static/api/_nv_flex_ext_8h_source.html +++ b/doc/_static/api/_nv_flex_ext_8h_source.html @@ -354,134 +354,153 @@
364  void* userData;
365 };
366 
-
370 typedef struct NvFlexExtContainer NvFlexExtContainer;
-
371 
-
383 NV_FLEX_API int NvFlexExtCreateWeldedMeshIndices(const float* vertices, int numVertices, int* uniqueVerts, int* originalToUniqueMap, float threshold);
-
384 
-
400 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateClothFromMesh(const float* particles, int numParticles, const int* indices, int numTriangles, float stretchStiffness, float bendStiffness, float tetherStiffness, float tetherGive, float pressure);
-
401 
-
420 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateTearingClothFromMesh(const float* particles, int numParticles, int maxParticles, const int* indices, int numTriangles, float stretchStiffness, float bendStiffness, float pressure);
-
421 
-
426 NV_FLEX_API void NvFlexExtDestroyTearingCloth(NvFlexExtAsset* asset);
-
427 
-
433 struct NvFlexExtTearingParticleClone
-
434 {
-
435  int srcIndex;
-
436  int destIndex;
-
437 };
-
438 
-
446 struct NvFlexExtTearingMeshEdit
-
447 {
-
448  int triIndex; // index into the triangle indices array to update
-
449  int newParticleIndex; // new value for the index
-
450 };
-
451 
-
466 NV_FLEX_API void NvFlexExtTearClothMesh(NvFlexExtAsset* asset, float maxStrain, int maxSplits, NvFlexExtTearingParticleClone* particleCopies, int* numParticleCopies, int maxCopies, NvFlexExtTearingMeshEdit* triangleEdits, int* numTriangleEdits, int maxEdits);
-
467 
-
479 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float radius, float expand);
-
480 
-
501 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness, float clusterPlasticThreshold, float clusterPlasticCreep);
-
502 
-
507 NV_FLEX_API void NvFlexExtDestroyAsset(NvFlexExtAsset* asset);
-
508 
-
521 NV_FLEX_API void NvFlexExtCreateSoftMeshSkinning(const float* vertices, int numVertices, const float* bones, int numBones, float falloff, float maxDistance, float* skinningWeights, int* skinningIndices);
-
522 
-
531 NV_FLEX_API NvFlexExtContainer* NvFlexExtCreateContainer(NvFlexLibrary* lib, NvFlexSolver* solver, int maxParticles);
-
532 
-
538 NV_FLEX_API void NvFlexExtDestroyContainer(NvFlexExtContainer* container);
-
539 
-
547 NV_FLEX_API int NvFlexExtAllocParticles(NvFlexExtContainer* container, int n, int* indices);
-
548 
-
556 NV_FLEX_API void NvFlexExtFreeParticles(NvFlexExtContainer* container, int n, const int* indices);
-
557 
+
371 struct NvFlexExtSoftJoint
+
372 {
+
373  int* particleIndices;
+
374  float* particleLocalPositions;
+
375  int shapeIndex;
+
376  int numParticles;
+
377 
+
378  float shapeTranslations[3];
+
379  float shapeRotations[4];
+
380 
+
381  float stiffness;
+
382 
+
383  bool initialized;
+
384 };
+
385 
+
389 typedef struct NvFlexExtContainer NvFlexExtContainer;
+
390 
+
402 NV_FLEX_API int NvFlexExtCreateWeldedMeshIndices(const float* vertices, int numVertices, int* uniqueVerts, int* originalToUniqueMap, float threshold);
+
403 
+
419 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateClothFromMesh(const float* particles, int numParticles, const int* indices, int numTriangles, float stretchStiffness, float bendStiffness, float tetherStiffness, float tetherGive, float pressure);
+
420 
+
439 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateTearingClothFromMesh(const float* particles, int numParticles, int maxParticles, const int* indices, int numTriangles, float stretchStiffness, float bendStiffness, float pressure);
+
440 
+
445 NV_FLEX_API void NvFlexExtDestroyTearingCloth(NvFlexExtAsset* asset);
+
446 
+
452 struct NvFlexExtTearingParticleClone
+
453 {
+
454  int srcIndex;
+
455  int destIndex;
+
456 };
+
457 
+
465 struct NvFlexExtTearingMeshEdit
+
466 {
+
467  int triIndex; // index into the triangle indices array to update
+
468  int newParticleIndex; // new value for the index
+
469 };
+
470 
+
485 NV_FLEX_API void NvFlexExtTearClothMesh(NvFlexExtAsset* asset, float maxStrain, int maxSplits, NvFlexExtTearingParticleClone* particleCopies, int* numParticleCopies, int maxCopies, NvFlexExtTearingMeshEdit* triangleEdits, int* numTriangleEdits, int maxEdits);
+
486 
+
498 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float radius, float expand);
+
499 
+
520 NV_FLEX_API NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int numVertices, const int* indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness, float clusterPlasticThreshold, float clusterPlasticCreep);
+
521 
+
526 NV_FLEX_API void NvFlexExtDestroyAsset(NvFlexExtAsset* asset);
+
527 
+
540 NV_FLEX_API void NvFlexExtCreateSoftMeshSkinning(const float* vertices, int numVertices, const float* bones, int numBones, float falloff, float maxDistance, float* skinningWeights, int* skinningIndices);
+
541 
+
550 NV_FLEX_API NvFlexExtContainer* NvFlexExtCreateContainer(NvFlexLibrary* lib, NvFlexSolver* solver, int maxParticles);
+
551 
+
557 NV_FLEX_API void NvFlexExtDestroyContainer(NvFlexExtContainer* container);
558 
-
566 NV_FLEX_API int NvFlexExtGetActiveList(NvFlexExtContainer* container, int* indices);
+
566 NV_FLEX_API int NvFlexExtAllocParticles(NvFlexExtContainer* container, int n, int* indices);
567 
-
568 
-
569 struct NvFlexExtParticleData
-
570 {
-
571  float* particles;
-
572  float* restParticles;
-
573  float* velocities;
-
574  int* phases;
-
575  float* normals;
+
575 NV_FLEX_API void NvFlexExtFreeParticles(NvFlexExtContainer* container, int n, const int* indices);
576 
-
577  const float* lower;
-
578  const float* upper;
-
579 };
-
580 
-
587 NV_FLEX_API NvFlexExtParticleData NvFlexExtMapParticleData(NvFlexExtContainer* container);
-
588 NV_FLEX_API void NvFlexExtUnmapParticleData(NvFlexExtContainer* container);
-
589 
-
590 struct NvFlexExtTriangleData
-
591 {
-
592  int* indices;
-
593  float* normals;
-
594 };
+
577 
+
585 NV_FLEX_API int NvFlexExtGetActiveList(NvFlexExtContainer* container, int* indices);
+
586 
+
587 
+
588 struct NvFlexExtParticleData
+
589 {
+
590  float* particles;
+
591  float* restParticles;
+
592  float* velocities;
+
593  int* phases;
+
594  float* normals;
595 
-
601 NV_FLEX_API NvFlexExtTriangleData NvFlexExtMapTriangleData(NvFlexExtContainer* container);
-
602 
-
606 NV_FLEX_API void NvFlexExtUnmapTriangleData(NvFlexExtContainer* container);
-
607 
-
608 struct NvFlexExtShapeData
-
609 {
-
610  float* rotations;
-
611  float* positions;
-
612  int n;
+
596  const float* lower;
+
597  const float* upper;
+
598 };
+
599 
+
606 NV_FLEX_API NvFlexExtParticleData NvFlexExtMapParticleData(NvFlexExtContainer* container);
+
607 NV_FLEX_API void NvFlexExtUnmapParticleData(NvFlexExtContainer* container);
+
608 
+
609 struct NvFlexExtTriangleData
+
610 {
+
611  int* indices;
+
612  float* normals;
613 };
614 
-
620 NV_FLEX_API NvFlexExtShapeData NvFlexExtMapShapeData(NvFlexExtContainer* container);
+
620 NV_FLEX_API NvFlexExtTriangleData NvFlexExtMapTriangleData(NvFlexExtContainer* container);
621 
-
625 NV_FLEX_API void NvFlexExtUnmapShapeData(NvFlexExtContainer* container);
+
625 NV_FLEX_API void NvFlexExtUnmapTriangleData(NvFlexExtContainer* container);
626 
-
642 NV_FLEX_API NvFlexExtInstance* NvFlexExtCreateInstance(NvFlexExtContainer* container, NvFlexExtParticleData* particleData, const NvFlexExtAsset* asset, const float* transform, float vx, float vy, float vz, int phase, float invMassScale);
-
643 
-
649 NV_FLEX_API void NvFlexExtDestroyInstance(NvFlexExtContainer* container, const NvFlexExtInstance* instance);
-
650 
-
657 NV_FLEX_API void NvFlexExtNotifyAssetChanged(NvFlexExtContainer* container, const NvFlexExtAsset* asset);
-
658 
-
688 NV_FLEX_API void NvFlexExtTickContainer(NvFlexExtContainer* container, float dt, int numSubsteps, bool enableTimers=false);
-
689 
-
695 NV_FLEX_API void NvFlexExtPushToDevice(NvFlexExtContainer* container);
-
696 
-
702 NV_FLEX_API void NvFlexExtPullFromDevice(NvFlexExtContainer* container);
-
703 
-
709 NV_FLEX_API void NvFlexExtUpdateInstances(NvFlexExtContainer* container);
-
710 
-
711 
-
715 enum NvFlexExtForceMode
-
716 {
-
718  eNvFlexExtModeForce = 0,
-
719 
-
721  eNvFlexExtModeImpulse = 1,
+
627 struct NvFlexExtShapeData
+
628 {
+
629  float* rotations;
+
630  float* positions;
+
631  int n;
+
632 };
+
633 
+
639 NV_FLEX_API NvFlexExtShapeData NvFlexExtMapShapeData(NvFlexExtContainer* container);
+
640 
+
644 NV_FLEX_API void NvFlexExtUnmapShapeData(NvFlexExtContainer* container);
+
645 
+
661 NV_FLEX_API NvFlexExtInstance* NvFlexExtCreateInstance(NvFlexExtContainer* container, NvFlexExtParticleData* particleData, const NvFlexExtAsset* asset, const float* transform, float vx, float vy, float vz, int phase, float invMassScale);
+
662 
+
668 NV_FLEX_API void NvFlexExtDestroyInstance(NvFlexExtContainer* container, const NvFlexExtInstance* instance);
+
669 
+
676 NV_FLEX_API void NvFlexExtNotifyAssetChanged(NvFlexExtContainer* container, const NvFlexExtAsset* asset);
+
677 
+
707 NV_FLEX_API void NvFlexExtTickContainer(NvFlexExtContainer* container, float dt, int numSubsteps, bool enableTimers=false);
+
708 
+
714 NV_FLEX_API void NvFlexExtPushToDevice(NvFlexExtContainer* container);
+
715 
+
721 NV_FLEX_API void NvFlexExtPullFromDevice(NvFlexExtContainer* container);
722 
-
724  eNvFlexExtModeVelocityChange = 2,
-
725 };
-
726 
-
730 struct NvFlexExtForceField
-
731 {
-
732  float mPosition[3];
-
733  float mRadius;
-
734  float mStrength;
-
735  NvFlexExtForceMode mMode;
-
736  bool mLinearFalloff;
-
737 };
+
728 NV_FLEX_API void NvFlexExtUpdateInstances(NvFlexExtContainer* container);
+
729 
+
730 
+
734 enum NvFlexExtForceMode
+
735 {
+
737  eNvFlexExtModeForce = 0,
738 
-
743 typedef struct NvFlexExtForceFieldCallback NvFlexExtForceFieldCallback;
-
744 
-
752 NV_FLEX_API NvFlexExtForceFieldCallback* NvFlexExtCreateForceFieldCallback(NvFlexSolver* solver);
-
753 
-
759 NV_FLEX_API void NvFlexExtDestroyForceFieldCallback(NvFlexExtForceFieldCallback* callback);
-
760 
-
768 NV_FLEX_API void NvFlexExtSetForceFields(NvFlexExtForceFieldCallback* callback, const NvFlexExtForceField* forceFields, int numForceFields);
-
769 
-
770 
-
771 
-
772 } // extern "C"
-
773 
-
774 #endif // NV_FLEX_EXT_H
-
775 
-
bool mLinearFalloff
Linear or no falloff.
Definition: NvFlexExt.h:736
+
740  eNvFlexExtModeImpulse = 1,
+
741 
+
743  eNvFlexExtModeVelocityChange = 2,
+
744 };
+
745 
+
749 struct NvFlexExtForceField
+
750 {
+
751  float mPosition[3];
+
752  float mRadius;
+
753  float mStrength;
+
754  NvFlexExtForceMode mMode;
+
755  bool mLinearFalloff;
+
756 };
+
757 
+
762 typedef struct NvFlexExtForceFieldCallback NvFlexExtForceFieldCallback;
+
763 
+
771 NV_FLEX_API NvFlexExtForceFieldCallback* NvFlexExtCreateForceFieldCallback(NvFlexSolver* solver);
+
772 
+
778 NV_FLEX_API void NvFlexExtDestroyForceFieldCallback(NvFlexExtForceFieldCallback* callback);
+
779 
+
787 NV_FLEX_API void NvFlexExtSetForceFields(NvFlexExtForceFieldCallback* callback, const NvFlexExtForceField* forceFields, int numForceFields);
+
788 
+
799 NV_FLEX_API NvFlexExtSoftJoint* NvFlexExtCreateSoftJoint(NvFlexExtContainer* container, const int* particleIndices, const float* particleLocalPositions, const int numJointParticles, const float stiffness);
+
800 
+
806 NV_FLEX_API void NvFlexExtDestroySoftJoint(NvFlexExtContainer* container, NvFlexExtSoftJoint* joint);
+
807 
+
815 NV_FLEX_API void NvFlexExtSoftJointSetTransform(NvFlexExtContainer* container, NvFlexExtSoftJoint* joint, const float* position, const float* rotation);
+
816 
+
817 } // extern "C"
+
818 
+
819 #endif // NV_FLEX_EXT_H
+
820 
+
bool mLinearFalloff
Linear or no falloff.
Definition: NvFlexExt.h:755
void destroy()
Definition: NvFlexExt.h:86
NvFlexBufferType type
Definition: NvFlexExt.h:76
int numParticles
Number of particles.
Definition: NvFlexExt.h:315
@@ -490,11 +509,11 @@
NV_FLEX_API void NvFlexExtMovingFrameApply(NvFlexExtMovingFrame *frame, float *positions, float *velocities, int numParticles, float linearScale, float angularScale, float dt)
float * shapeRotations
Shape matching group rotations (quaternions)
Definition: NvFlexExt.h:360
NvFlexVector(NvFlexLibrary *l, const T *ptr, int size, NvFlexBufferType type=eNvFlexBufferHost)
Definition: NvFlexExt.h:58
-
int n
Number of valid tranforms.
Definition: NvFlexExt.h:612
+
int n
Number of valid tranforms.
Definition: NvFlexExt.h:631
NvFlexLibrary * lib
Definition: NvFlexExt.h:70
float * particles
Local space particle positions, x,y,z,1/mass.
Definition: NvFlexExt.h:314
int * shapeOffsets
Each entry stores the end of the shape's indices in the indices array (exclusive prefix sum of shape ...
Definition: NvFlexExt.h:327
-
int newParticleIndex
Definition: NvFlexExt.h:449
+
int newParticleIndex
Definition: NvFlexExt.h:468
NV_FLEX_API void NvFlexUnmap(NvFlexBuffer *buffer)
NV_FLEX_API void NvFlexExtDestroyInstance(NvFlexExtContainer *container, const NvFlexExtInstance *instance)
NV_FLEX_API void NvFlexExtMovingFrameUpdate(NvFlexExtMovingFrame *frame, const float *worldTranslation, const float *worldRotation, float dt)
@@ -503,26 +522,28 @@
float * springRestLengths
Spring rest-lengths.
Definition: NvFlexExt.h:321
int size() const
Definition: NvFlexExt.h:162
NV_FLEX_API void NvFlexExtTickContainer(NvFlexExtContainer *container, float dt, int numSubsteps, bool enableTimers=false)
-
Definition: NvFlexExt.h:569
+
Definition: NvFlexExt.h:588
int numParticles
Number of simulation particles.
Definition: NvFlexExt.h:353
NV_FLEX_API void NvFlexExtUnmapParticleData(NvFlexExtContainer *container)
-
struct NvFlexExtContainer NvFlexExtContainer
Definition: NvFlexExt.h:370
+
struct NvFlexExtContainer NvFlexExtContainer
Definition: NvFlexExt.h:389
T & operator[](int index)
Definition: NvFlexExt.h:128
+
NV_FLEX_API NvFlexExtSoftJoint * NvFlexExtCreateSoftJoint(NvFlexExtContainer *container, const int *particleIndices, const float *particleLocalPositions, const int numJointParticles, const float stiffness)
void * userData
User data pointer.
Definition: NvFlexExt.h:364
NV_FLEX_API void NvFlexExtPullFromDevice(NvFlexExtContainer *container)
void resize(int newCount, const T &val)
Definition: NvFlexExt.h:211
int * triangleIndices
Indexed triangle mesh indices for clothing.
Definition: NvFlexExt.h:337
int capacity
Definition: NvFlexExt.h:75
int * particleIndices
Simulation particle indices.
Definition: NvFlexExt.h:352
-
float mRadius
Radius of the force field.
Definition: NvFlexExt.h:733
+
float mRadius
Radius of the force field.
Definition: NvFlexExt.h:752
int numTriangles
Number of triangles.
Definition: NvFlexExt.h:338
Calling thread will be blocked until buffer is ready for access, default.
Definition: NvFlex.h:69
+
float stiffness
Joint stiffness.
Definition: NvFlexExt.h:381
struct NvFlexSolver NvFlexSolver
Definition: NvFlex.h:57
NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateClothFromMesh(const float *particles, int numParticles, const int *indices, int numTriangles, float stretchStiffness, float bendStiffness, float tetherStiffness, float tetherGive, float pressure)
-
Definition: NvFlexExt.h:730
+
Definition: NvFlexExt.h:749
int numShapeIndices
Total number of indices for shape constraints.
Definition: NvFlexExt.h:326
NV_FLEX_API void NvFlexExtDestroyTearingCloth(NvFlexExtAsset *asset)
-
float * rotations
Receives a pointer to the array quaternion rotation data in [x, y z, w] format.
Definition: NvFlexExt.h:610
+
float * rotations
Receives a pointer to the array quaternion rotation data in [x, y z, w] format.
Definition: NvFlexExt.h:629
NV_FLEX_API int NvFlexExtGetActiveList(NvFlexExtContainer *container, int *indices)
int shapeIndex
Index in the container's shape body constraints array.
Definition: NvFlexExt.h:356
Definition: NvFlexExt.h:45
@@ -539,7 +560,7 @@
float omega[3]
Definition: NvFlexExt.h:237
NV_FLEX_API void NvFlexExtCreateSoftMeshSkinning(const float *vertices, int numVertices, const float *bones, int numBones, float falloff, float maxDistance, float *skinningWeights, int *skinningIndices)
bool empty() const
Definition: NvFlexExt.h:164
-
Definition: NvFlexExt.h:446
+
Definition: NvFlexExt.h:465
NV_FLEX_API NvFlexExtContainer * NvFlexExtCreateContainer(NvFlexLibrary *lib, NvFlexSolver *solver, int maxParticles)
NV_FLEX_API NvFlexExtInstance * NvFlexExtCreateInstance(NvFlexExtContainer *container, NvFlexExtParticleData *particleData, const NvFlexExtAsset *asset, const float *transform, float vx, float vy, float vz, int phase, float invMassScale)
float rotation[4]
Definition: NvFlexExt.h:234
@@ -548,46 +569,53 @@
NV_FLEX_API void NvFlexExtUnmapShapeData(NvFlexExtContainer *container)
struct NvFlexBuffer NvFlexBuffer
Definition: NvFlex.h:62
NV_FLEX_API NvFlexExtShapeData NvFlexExtMapShapeData(NvFlexExtContainer *container)
-
Apply field value as an impulse.
Definition: NvFlexExt.h:721
-
float * particles
Receives a pointer to the particle position / mass data.
Definition: NvFlexExt.h:571
+
Apply field value as an impulse.
Definition: NvFlexExt.h:740
+
float * particles
Receives a pointer to the particle position / mass data.
Definition: NvFlexExt.h:590
float * springCoefficients
Spring coefficients.
Definition: NvFlexExt.h:320
NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateSoftFromMesh(const float *vertices, int numVertices, const int *indices, int numTriangleIndices, float particleSpacing, float volumeSampling, float surfaceSampling, float clusterSpacing, float clusterRadius, float clusterStiffness, float linkRadius, float linkStiffness, float globalStiffness, float clusterPlasticThreshold, float clusterPlasticCreep)
-
float * restParticles
Receives a pointer to the particle's rest position (used for self collision culling) ...
Definition: NvFlexExt.h:572
-
float * positions
Receives a pointer to an array of shape body translations in [x, y, z] format.
Definition: NvFlexExt.h:611
+
float * restParticles
Receives a pointer to the particle's rest position (used for self collision culling) ...
Definition: NvFlexExt.h:591
+
float * positions
Receives a pointer to an array of shape body translations in [x, y, z] format.
Definition: NvFlexExt.h:630
Definition: NvFlexExt.h:231
const T & operator[](int index) const
Definition: NvFlexExt.h:120
void unmap()
Definition: NvFlexExt.h:109
Definition: NvFlexExt.h:350
NV_FLEX_API void NvFlexExtUpdateInstances(NvFlexExtContainer *container)
-
float mPosition[3]
Center of force field.
Definition: NvFlexExt.h:732
-
int * indices
Receives a pointer to the array of triangle index data.
Definition: NvFlexExt.h:592
-
float * normals
Receives a pointer to an array of triangle normal data stored with 16 byte stride, i.e.: [nx, ny, nz].
Definition: NvFlexExt.h:593
+
bool initialized
Joint status flag.
Definition: NvFlexExt.h:383
+
float mPosition[3]
Center of force field.
Definition: NvFlexExt.h:751
+
int * indices
Receives a pointer to the array of triangle index data.
Definition: NvFlexExt.h:611
+
float * normals
Receives a pointer to an array of triangle normal data stored with 16 byte stride, i.e.: [nx, ny, nz].
Definition: NvFlexExt.h:612
+
NV_FLEX_API void NvFlexExtSoftJointSetTransform(NvFlexExtContainer *container, NvFlexExtSoftJoint *joint, const float *position, const float *rotation)
NV_FLEX_API void NvFlexExtTearClothMesh(NvFlexExtAsset *asset, float maxStrain, int maxSplits, NvFlexExtTearingParticleClone *particleCopies, int *numParticleCopies, int maxCopies, NvFlexExtTearingMeshEdit *triangleEdits, int *numTriangleEdits, int maxEdits)
float acceleration[3]
Definition: NvFlexExt.h:239
-
Apply field value as a force.
Definition: NvFlexExt.h:718
+
int * particleIndices
Global indices.
Definition: NvFlexExt.h:373
+
Apply field value as a force.
Definition: NvFlexExt.h:737
float inflatableStiffness
How stiff the inflatable is.
Definition: NvFlexExt.h:344
struct NvFlexLibrary NvFlexLibrary
Definition: NvFlex.h:52
-
int triIndex
Definition: NvFlexExt.h:448
-
float * normals
Receives a pointer to the particle normal data with 16 byte stride in format [nx, ny...
Definition: NvFlexExt.h:575
+
int triIndex
Definition: NvFlexExt.h:467
+
float * normals
Receives a pointer to the particle normal data with 16 byte stride in format [nx, ny...
Definition: NvFlexExt.h:594
+
int numParticles
Number of particles in the joint.
Definition: NvFlexExt.h:376
NV_FLEX_API NvFlexExtTriangleData NvFlexExtMapTriangleData(NvFlexExtContainer *container)
-
int destIndex
Definition: NvFlexExt.h:436
-
float mStrength
Strength of the force field.
Definition: NvFlexExt.h:734
+
int destIndex
Definition: NvFlexExt.h:455
+
float mStrength
Strength of the force field.
Definition: NvFlexExt.h:753
float position[3]
Definition: NvFlexExt.h:233
+
float shapeTranslations[3]
Joint shape matching group translations (vec3s)
Definition: NvFlexExt.h:378
void resize(int newCount)
Definition: NvFlexExt.h:201
Definition: NvFlexExt.h:311
+
int shapeIndex
Index in the container's shape body constraints array.
Definition: NvFlexExt.h:375
NV_FLEX_API void NvFlexExtPushToDevice(NvFlexExtContainer *container)
-
struct NvFlexExtForceFieldCallback NvFlexExtForceFieldCallback
Definition: NvFlexExt.h:743
+
struct NvFlexExtForceFieldCallback NvFlexExtForceFieldCallback
Definition: NvFlexExt.h:762
int count
Definition: NvFlexExt.h:74
-
NvFlexExtForceMode
Definition: NvFlexExt.h:715
+
NvFlexExtForceMode
Definition: NvFlexExt.h:734
float * shapeCoefficients
The stiffness coefficient for each shape.
Definition: NvFlexExt.h:328
+
float shapeRotations[4]
Joint shape matching group rotations (quaternions)
Definition: NvFlexExt.h:379
void map(int flags=eNvFlexMapWait)
Definition: NvFlexExt.h:100
-
Apply field value as a velocity change.
Definition: NvFlexExt.h:724
+
Apply field value as a velocity change.
Definition: NvFlexExt.h:743
NV_FLEX_API NvFlexExtAsset * NvFlexExtCreateTearingClothFromMesh(const float *particles, int numParticles, int maxParticles, const int *indices, int numTriangles, float stretchStiffness, float bendStiffness, float pressure)
-
Definition: NvFlexExt.h:608
+
Definition: NvFlexExt.h:627
NV_FLEX_API void NvFlexExtMovingFrameInit(NvFlexExtMovingFrame *frame, const float *worldTranslation, const float *worldRotation)
float inflatablePressure
How much over the rest volume the inflatable should attempt to maintain.
Definition: NvFlexExt.h:343
-
const float * upper
Receive a pointer to the particle upper bounds [x, y, z].
Definition: NvFlexExt.h:578
+
const float * upper
Receive a pointer to the particle upper bounds [x, y, z].
Definition: NvFlexExt.h:597
NV_FLEX_API NvFlexBuffer * NvFlexAllocBuffer(NvFlexLibrary *lib, int elementCount, int elementByteStride, NvFlexBufferType type)
int inflatableIndex
Index in the container's inflatables array.
Definition: NvFlexExt.h:357
NV_FLEX_API void NvFlexExtFreeParticles(NvFlexExtContainer *container, int n, const int *indices)
@@ -595,38 +623,41 @@
NV_FLEX_API int NvFlexExtCreateWeldedMeshIndices(const float *vertices, int numVertices, int *uniqueVerts, int *originalToUniqueMap, float threshold)
NV_FLEX_API NvFlexExtParticleData NvFlexExtMapParticleData(NvFlexExtContainer *container)
void assign(const T *srcPtr, int newCount)
Definition: NvFlexExt.h:146
+
NV_FLEX_API void NvFlexExtDestroySoftJoint(NvFlexExtContainer *container, NvFlexExtSoftJoint *joint)
float * shapePlasticThresholds
The plastic threshold coefficient for each shape.
Definition: NvFlexExt.h:333
const NvFlexExtAsset * asset
Source asset used to create this instance.
Definition: NvFlexExt.h:362
T * mappedPtr
Definition: NvFlexExt.h:73
float delta[4][4]
Definition: NvFlexExt.h:242
-
const float * lower
Receive a pointer to the particle lower bounds [x, y, z].
Definition: NvFlexExt.h:577
+
const float * lower
Receive a pointer to the particle lower bounds [x, y, z].
Definition: NvFlexExt.h:596
int triangleIndex
Index in the container's triangle array.
Definition: NvFlexExt.h:355
-
Definition: NvFlexExt.h:590
-
NvFlexExtForceMode mMode
Mode of field application.
Definition: NvFlexExt.h:735
+
Definition: NvFlexExt.h:609
+
NvFlexExtForceMode mMode
Mode of field application.
Definition: NvFlexExt.h:754
NV_FLEX_API int NvFlexExtAllocParticles(NvFlexExtContainer *container, int n, int *indices)
-
int * phases
Receives a pointer to the particle phase data.
Definition: NvFlexExt.h:574
+
int * phases
Receives a pointer to the particle phase data.
Definition: NvFlexExt.h:593
NV_FLEX_API void NvFlexFreeBuffer(NvFlexBuffer *buf)
int numShapes
The number of shape matching constraints.
Definition: NvFlexExt.h:330
NV_FLEX_API void NvFlexExtUnmapTriangleData(NvFlexExtContainer *container)
void copyto(T *dest, int count)
Definition: NvFlexExt.h:155
NV_FLEX_API void NvFlexExtDestroyAsset(NvFlexExtAsset *asset)
float * shapePlasticCreeps
The plastic creep coefficient for each shape.
Definition: NvFlexExt.h:334
-
int srcIndex
Definition: NvFlexExt.h:435
+
int srcIndex
Definition: NvFlexExt.h:454
float * shapeTranslations
Shape matching group translations (vec3s)
Definition: NvFlexExt.h:359
float velocity[3]
Definition: NvFlexExt.h:236
-
Definition: NvFlexExt.h:433
+
Definition: NvFlexExt.h:452
NvFlexBuffer * buffer
Definition: NvFlexExt.h:71
-
float * velocities
Receives a pointer to the particle velocity data.
Definition: NvFlexExt.h:573
+
float * velocities
Receives a pointer to the particle velocity data.
Definition: NvFlexExt.h:592
const T & back() const
Definition: NvFlexExt.h:166
+
Definition: NvFlexExt.h:371
NV_FLEX_API NvFlexExtForceFieldCallback * NvFlexExtCreateForceFieldCallback(NvFlexSolver *solver)
bool inflatable
Whether an inflatable constraint should be added.
Definition: NvFlexExt.h:341
int numSprings
Number of springs.
Definition: NvFlexExt.h:322
+
float * particleLocalPositions
Relative offsets from the particles of the joint to the center.
Definition: NvFlexExt.h:374
NV_FLEX_API void NvFlexExtNotifyAssetChanged(NvFlexExtContainer *container, const NvFlexExtAsset *asset)
NvFlexBufferType
Definition: NvFlex.h:76
diff --git a/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html b/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html index 3f3697d..a8f9508 100644 --- a/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/doc/_static/api/dir_d44c64559bbebec7f509842c48db8b23.html @@ -52,7 +52,7 @@ Files diff --git a/doc/_static/api/files.html b/doc/_static/api/files.html index 7f6b61c..e83298d 100644 --- a/doc/_static/api/files.html +++ b/doc/_static/api/files.html @@ -45,7 +45,7 @@ diff --git a/doc/_static/api/globals.html b/doc/_static/api/globals.html index 6039eb7..0fa917e 100644 --- a/doc/_static/api/globals.html +++ b/doc/_static/api/globals.html @@ -124,9 +124,6 @@
  • eNvFlexPhaseShapeChannel6 : NvFlex.h
  • -
  • eNvFlexPhaseShapeChannel7 -: NvFlex.h -
  • eNvFlexPhaseShapeChannelMask : NvFlex.h
  • @@ -281,6 +278,9 @@
  • NvFlexExtCreateSoftFromMesh() : NvFlexExt.h
  • +
  • NvFlexExtCreateSoftJoint() +: NvFlexExt.h +
  • NvFlexExtCreateSoftMeshSkinning() : NvFlexExt.h
  • @@ -302,6 +302,9 @@
  • NvFlexExtDestroyInstance() : NvFlexExt.h
  • +
  • NvFlexExtDestroySoftJoint() +: NvFlexExt.h +
  • NvFlexExtDestroyTearingCloth() : NvFlexExt.h
  • @@ -347,6 +350,9 @@
  • NvFlexExtSetForceFields() : NvFlexExt.h
  • +
  • NvFlexExtSoftJointSetTransform() +: NvFlexExt.h +
  • NvFlexExtTearClothMesh() : NvFlexExt.h
  • @@ -392,6 +398,9 @@
  • NvFlexGetConvexMeshBounds() : NvFlex.h
  • +
  • NvFlexGetConvexMeshes() +: NvFlex.h +
  • NvFlexGetDensities() : NvFlex.h
  • @@ -410,11 +419,14 @@
  • NvFlexGetDiffuseParticles() : NvFlex.h
  • +
  • NvFlexGetDistanceFields() +: NvFlex.h +
  • NvFlexGetDynamicTriangles() : NvFlex.h
  • NvFlexGetNeighbors() -: NvFlex.h +: NvFlex.h
  • NvFlexGetNormals() : NvFlex.h @@ -443,6 +455,9 @@
  • NvFlexGetSolverLibrary() : NvFlex.h
  • +
  • NvFlexGetSolvers() +: NvFlex.h +
  • NvFlexGetSprings() : NvFlex.h
  • @@ -452,6 +467,9 @@
  • NvFlexGetTriangleMeshBounds() : NvFlex.h
  • +
  • NvFlexGetTriangleMeshes() +: NvFlex.h +
  • NvFlexGetVelocities() : NvFlex.h
  • @@ -585,7 +603,7 @@ diff --git a/doc/_static/api/globals_enum.html b/doc/_static/api/globals_enum.html index 99f3b98..0d9d68b 100644 --- a/doc/_static/api/globals_enum.html +++ b/doc/_static/api/globals_enum.html @@ -69,7 +69,7 @@ diff --git a/doc/_static/api/globals_eval.html b/doc/_static/api/globals_eval.html index 22e284d..78660a7 100644 --- a/doc/_static/api/globals_eval.html +++ b/doc/_static/api/globals_eval.html @@ -124,9 +124,6 @@
  • eNvFlexPhaseShapeChannel6 : NvFlex.h
  • -
  • eNvFlexPhaseShapeChannel7 -: NvFlex.h -
  • eNvFlexPhaseShapeChannelMask : NvFlex.h
  • @@ -191,7 +188,7 @@ diff --git a/doc/_static/api/globals_func.html b/doc/_static/api/globals_func.html index 2ede00b..d368677 100644 --- a/doc/_static/api/globals_func.html +++ b/doc/_static/api/globals_func.html @@ -94,6 +94,9 @@
  • NvFlexExtCreateSoftFromMesh() : NvFlexExt.h
  • +
  • NvFlexExtCreateSoftJoint() +: NvFlexExt.h +
  • NvFlexExtCreateSoftMeshSkinning() : NvFlexExt.h
  • @@ -115,6 +118,9 @@
  • NvFlexExtDestroyInstance() : NvFlexExt.h
  • +
  • NvFlexExtDestroySoftJoint() +: NvFlexExt.h +
  • NvFlexExtDestroyTearingCloth() : NvFlexExt.h
  • @@ -154,6 +160,9 @@
  • NvFlexExtSetForceFields() : NvFlexExt.h
  • +
  • NvFlexExtSoftJointSetTransform() +: NvFlexExt.h +
  • NvFlexExtTearClothMesh() : NvFlexExt.h
  • @@ -196,6 +205,9 @@
  • NvFlexGetConvexMeshBounds() : NvFlex.h
  • +
  • NvFlexGetConvexMeshes() +: NvFlex.h +
  • NvFlexGetDensities() : NvFlex.h
  • @@ -214,11 +226,14 @@
  • NvFlexGetDiffuseParticles() : NvFlex.h
  • +
  • NvFlexGetDistanceFields() +: NvFlex.h +
  • NvFlexGetDynamicTriangles() : NvFlex.h
  • NvFlexGetNeighbors() -: NvFlex.h +: NvFlex.h
  • NvFlexGetNormals() : NvFlex.h @@ -247,6 +262,9 @@
  • NvFlexGetSolverLibrary() : NvFlex.h
  • +
  • NvFlexGetSolvers() +: NvFlex.h +
  • NvFlexGetSprings() : NvFlex.h
  • @@ -256,6 +274,9 @@
  • NvFlexGetTriangleMeshBounds() : NvFlex.h
  • +
  • NvFlexGetTriangleMeshes() +: NvFlex.h +
  • NvFlexGetVelocities() : NvFlex.h
  • @@ -368,7 +389,7 @@ diff --git a/doc/_static/api/globals_type.html b/doc/_static/api/globals_type.html index 1e6db85..506389f 100644 --- a/doc/_static/api/globals_type.html +++ b/doc/_static/api/globals_type.html @@ -63,7 +63,7 @@ diff --git a/doc/_static/api/index.html b/doc/_static/api/index.html index 4066cf8..399c54e 100644 --- a/doc/_static/api/index.html +++ b/doc/_static/api/index.html @@ -43,7 +43,7 @@ diff --git a/doc/_static/api/struct_nv_flex_solver_callback.html b/doc/_static/api/struct_nv_flex_solver_callback.html index 041be39..5950e88 100644 --- a/doc/_static/api/struct_nv_flex_solver_callback.html +++ b/doc/_static/api/struct_nv_flex_solver_callback.html @@ -77,7 +77,7 @@ Data Fields diff --git a/doc/_static/api/struct_nv_flex_vector.html b/doc/_static/api/struct_nv_flex_vector.html index 135150d..5a88299 100644 --- a/doc/_static/api/struct_nv_flex_vector.html +++ b/doc/_static/api/struct_nv_flex_vector.html @@ -713,7 +713,7 @@ template<typename T > -- cgit v1.2.3