29#ifndef PX_SOFT_BODY_EXT_H
30#define PX_SOFT_BODY_EXT_H
35#include "foundation/PxTransform.h"
36#include "PxSoftBody.h"
43struct PxCookingParams;
44class PxSimpleTriangleMesh;
45class PxInsertionCallback;
68 static void updateMass(
PxSoftBody& softBody,
const PxReal density,
const PxReal maxInvMassRatio);
84 static void setMass(
PxSoftBody& softBody,
const PxReal mass,
const PxReal maxInvMassRatio);
167 const PxFEMSoftBodyMaterial& material, PxCudaContextManager& cudaContextManager, PxReal density = 100.0f, PxU32 solverIterationCount = 30,
188 PxCudaContextManager& cudaContextManager, PxReal maxEdgeLength = -1.0f, PxReal density = 100.0f, PxU32 solverIterationCount = 30,
Material class to represent a set of softbody FEM material properties.
Definition PxFEMSoftBodyMaterial.h:49
Container for bitfield flag variables associated with a specific enum type.
Definition PxFlags.h:73
Callback interface that permits TriangleMesh, Heightfield, ConvexMesh or BVH to be used directly with...
Definition PxInsertionCallback.h:57
A structure describing a triangle mesh.
Definition PxSimpleTriangleMesh.h:83
utility functions for use with PxSoftBody and subclasses
Definition PxSoftBodyExt.h:52
static PxSoftBodyMesh * createSoftBodyMeshNoVoxels(const PxCookingParams ¶ms, const PxSimpleTriangleMesh &surfaceMesh, PxInsertionCallback &insertionCallback, PxReal maxWeightRatioInTet=1.5f, const bool validate=true)
Creates a full SoftBody mesh matching the shape given as input. Uses the same surface-matching mesh f...
Definition ExtSoftBodyExt.cpp:351
static PxSoftBody * createSoftBodyFromMesh(PxSoftBodyMesh *softBodyMesh, const PxTransform &transform, const PxFEMSoftBodyMaterial &material, PxCudaContextManager &cudaContextManager, PxReal density=100.0f, PxU32 solverIterationCount=30, const PxFEMParameters &femParams=PxFEMParameters(), PxReal scale=1.0f)
Creates a SoftBody instance from a SoftBody mesh.
Definition ExtSoftBodyExt.cpp:368
static void commit(PxSoftBody &softBody, PxSoftBodyDataFlags flags, bool flush=false)
Uploads prepared SoftBody data to the GPU. It ensures that the embedded collision mesh matches the si...
Definition ExtSoftBodyExt.cpp:311
static PxSoftBody * createSoftBodyBox(const PxTransform &transform, const PxVec3 &boxDimensions, const PxFEMSoftBodyMaterial &material, PxCudaContextManager &cudaContextManager, PxReal maxEdgeLength=-1.0f, PxReal density=100.0f, PxU32 solverIterationCount=30, const PxFEMParameters &femParams=PxFEMParameters(), PxU32 numVoxelsAlongLongestAABBAxis=10, PxReal scale=1.0f)
Creates a SoftBody instance with a box shape.
Definition ExtSoftBodyExt.cpp:398
static void updateEmbeddedCollisionMesh(PxSoftBody &softBody)
Updates the collision mesh's vertex positions to match the simulation mesh's transformation and scale...
Definition ExtSoftBodyExt.cpp:272
static PxSoftBodyMesh * createSoftBodyMesh(const PxCookingParams ¶ms, const PxSimpleTriangleMesh &surfaceMesh, PxU32 numVoxelsAlongLongestAABBAxis, PxInsertionCallback &insertionCallback, const bool validate=true)
Creates a full SoftBody mesh matching the shape given as input. Uses a voxel mesh for FEM simulation ...
Definition ExtSoftBodyExt.cpp:328
static void setMass(PxSoftBody &softBody, const PxReal mass, const PxReal maxInvMassRatio)
Computes the SoftBody's vertex masses such that the sum of all masses is equal to the provided mass.
Definition ExtSoftBodyExt.cpp:178
static void updateMass(PxSoftBody &softBody, const PxReal density, const PxReal maxInvMassRatio)
Computes the SoftBody's vertex masses from the provided density and the volume of the tetrahedra.
Definition ExtSoftBodyExt.cpp:134
static void transform(PxSoftBody &softBody, const PxTransform &transform, const PxReal scale)
Transforms a SoftBody.
Definition ExtSoftBodyExt.cpp:184
A softbody mesh, containing structures to store collision shape, simulation shape and deformation sta...
Definition PxTetrahedronMesh.h:214
Represents a FEM softbody including everything to calculate its definition like geometry and material...
Definition PxSoftBody.h:104
3 Element vector class.
Definition PxVec3.h:50
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Structure describing parameters affecting mesh cooking.
Definition PxCooking.h:185
Set of parameters to control the sleeping and collision behavior of FEM based objects.
Definition PxFEMParameter.h:45