#include <Factory.h>
Public Member Functions | |
virtual Cloth * | clone (const Cloth &cloth)=0 |
Create a copy of a cloth instance. | |
virtual Cloth * | createCloth (Range< const physx::PxVec4 > particles, Fabric &fabric)=0 |
Create cloth object. | |
virtual Fabric * | createFabric (uint32_t numParticles, Range< const uint32_t > phaseIndices, Range< const uint32_t > sets, Range< const float > restvalues, Range< const float > stiffnessValues, Range< const uint32_t > indices, Range< const uint32_t > anchors, Range< const float > tetherLengths, Range< const uint32_t > triangles)=0 |
Create fabric data used to setup cloth object. | |
virtual Solver * | createSolver ()=0 |
Create cloth solver object. | |
virtual void | extractCollisionData (const Cloth &cloth, Range< physx::PxVec4 > spheres, Range< uint32_t > capsules, Range< physx::PxVec4 > planes, Range< uint32_t > convexes, Range< physx::PxVec3 > triangles) const =0 |
Extract current collision spheres and capsules from a cloth object. | |
virtual void | extractFabricData (const Fabric &fabric, Range< uint32_t > phaseIndices, Range< uint32_t > sets, Range< float > restvalues, Range< float > stiffnessValues, Range< uint32_t > indices, Range< uint32_t > anchors, Range< float > tetherLengths, Range< uint32_t > triangles) const =0 |
Extract original data from a fabric object. | |
virtual void | extractMotionConstraints (const Cloth &cloth, Range< physx::PxVec4 > destConstraints) const =0 |
Extract current motion constraints from a cloth object Use the getNum* methods on Cloth to get the memory requirements before calling this function. | |
virtual void | extractParticleAccelerations (const Cloth &cloth, Range< physx::PxVec4 > destAccelerations) const =0 |
Extract current particle accelerations from a cloth object. | |
virtual void | extractRestPositions (const Cloth &cloth, Range< physx::PxVec4 > destRestPositions) const =0 |
Extract particle rest positions from cloth object. | |
virtual void | extractSelfCollisionIndices (const Cloth &cloth, Range< uint32_t > destIndices) const =0 |
Extract self collision indices from cloth object. | |
virtual void | extractSeparationConstraints (const Cloth &cloth, Range< physx::PxVec4 > destConstraints) const =0 |
Extract current separation constraints from a cloth object. | |
virtual void | extractVirtualParticles (const Cloth &cloth, Range< uint32_t[4]> destIndices, Range< physx::PxVec3 > destWeights) const =0 |
Extract virtual particles from a cloth object. | |
virtual Platform | getPlatform () const =0 |
Protected Member Functions | |
Factory (const Factory &) | |
Factory () | |
Factory & | operator= (const Factory &) |
virtual | ~Factory () |
Friends | |
NV_CLOTH_IMPORT void | NV_CLOTH_CALL_CONV::NvClothDestroyFactory (nv::cloth::Factory *) |
nv::cloth::Factory::Factory | ( | ) | [inline, protected] |
nv::cloth::Factory::Factory | ( | const Factory & | ) | [protected] |
virtual nv::cloth::Factory::~Factory | ( | ) | [inline, protected, virtual] |
Create a copy of a cloth instance.
cloth | the instance to be cloned, need not match the factory type |
virtual Cloth* nv::cloth::Factory::createCloth | ( | Range< const physx::PxVec4 > | particles, | |
Fabric & | fabric | |||
) | [pure virtual] |
Create cloth object.
particles | initial particle positions. | |
fabric | edge distance constraint structure |
virtual Fabric* nv::cloth::Factory::createFabric | ( | uint32_t | numParticles, | |
Range< const uint32_t > | phaseIndices, | |||
Range< const uint32_t > | sets, | |||
Range< const float > | restvalues, | |||
Range< const float > | stiffnessValues, | |||
Range< const uint32_t > | indices, | |||
Range< const uint32_t > | anchors, | |||
Range< const float > | tetherLengths, | |||
Range< const uint32_t > | triangles | |||
) | [pure virtual] |
Create fabric data used to setup cloth object.
Look at the cooking extension for helper functions to create fabrics from meshes. The returned fabric will have a refcount of 1.
numParticles | number of particles, must be larger than any particle index | |
phaseIndices | map from phase to set index | |
sets | inclusive prefix sum of restvalue count per set | |
restvalues | array of constraint rest values | |
indices | array of particle index pair per constraint |
virtual Solver* nv::cloth::Factory::createSolver | ( | ) | [pure virtual] |
Create cloth solver object.
virtual void nv::cloth::Factory::extractCollisionData | ( | const Cloth & | cloth, | |
Range< physx::PxVec4 > | spheres, | |||
Range< uint32_t > | capsules, | |||
Range< physx::PxVec4 > | planes, | |||
Range< uint32_t > | convexes, | |||
Range< physx::PxVec3 > | triangles | |||
) | const [pure virtual] |
Extract current collision spheres and capsules from a cloth object.
Use the getNum* methods on Cloth to get the memory requirements before calling this function.
cloth | the instance to extract from, must match factory type | |
spheres | pre-allocated memory range to write spheres | |
capsules | pre-allocated memory range to write capsules | |
planes | pre-allocated memory range to write planes | |
convexes | pre-allocated memory range to write convexes | |
triangles | pre-allocated memory range to write triangles |
virtual void nv::cloth::Factory::extractFabricData | ( | const Fabric & | fabric, | |
Range< uint32_t > | phaseIndices, | |||
Range< uint32_t > | sets, | |||
Range< float > | restvalues, | |||
Range< float > | stiffnessValues, | |||
Range< uint32_t > | indices, | |||
Range< uint32_t > | anchors, | |||
Range< float > | tetherLengths, | |||
Range< uint32_t > | triangles | |||
) | const [pure virtual] |
Extract original data from a fabric object.
Use the getNum* methods on Cloth to get the memory requirements before calling this function.
fabric | to extract from, must match factory type | |
phaseIndices | pre-allocated memory range to write phase => set indices | |
sets | pre-allocated memory range to write sets | |
restvalues | pre-allocated memory range to write restvalues | |
indices | pre-allocated memory range to write indices |
virtual void nv::cloth::Factory::extractMotionConstraints | ( | const Cloth & | cloth, | |
Range< physx::PxVec4 > | destConstraints | |||
) | const [pure virtual] |
Extract current motion constraints from a cloth object Use the getNum* methods on Cloth to get the memory requirements before calling this function.
cloth | the instance to extract from, must match factory type | |
destConstraints | pre-allocated memory range to write constraints |
virtual void nv::cloth::Factory::extractParticleAccelerations | ( | const Cloth & | cloth, | |
Range< physx::PxVec4 > | destAccelerations | |||
) | const [pure virtual] |
Extract current particle accelerations from a cloth object.
cloth | the instance to extract from, must match factory type | |
destAccelerations | pre-allocated memory range to write accelerations |
virtual void nv::cloth::Factory::extractRestPositions | ( | const Cloth & | cloth, | |
Range< physx::PxVec4 > | destRestPositions | |||
) | const [pure virtual] |
Extract particle rest positions from cloth object.
cloth | the instance to extract from, must match factory type | |
destRestPositions | pre-allocated memory range to write rest positions |
virtual void nv::cloth::Factory::extractSelfCollisionIndices | ( | const Cloth & | cloth, | |
Range< uint32_t > | destIndices | |||
) | const [pure virtual] |
Extract self collision indices from cloth object.
cloth | the instance to extract from, must match factory type | |
destIndices | pre-allocated memory range to write indices |
virtual void nv::cloth::Factory::extractSeparationConstraints | ( | const Cloth & | cloth, | |
Range< physx::PxVec4 > | destConstraints | |||
) | const [pure virtual] |
Extract current separation constraints from a cloth object.
cloth | the instance to extract from, must match factory type | |
destConstraints | pre-allocated memory range to write constraints |
virtual void nv::cloth::Factory::extractVirtualParticles | ( | const Cloth & | cloth, | |
Range< uint32_t[4]> | destIndices, | |||
Range< physx::PxVec3 > | destWeights | |||
) | const [pure virtual] |
Extract virtual particles from a cloth object.
cloth | the instance to extract from, must match factory type | |
destIndices | pre-allocated memory range to write indices | |
destWeights | pre-allocated memory range to write weights |
virtual Platform nv::cloth::Factory::getPlatform | ( | ) | const [pure virtual] |
NV_CLOTH_IMPORT void NV_CLOTH_CALL_CONV::NvClothDestroyFactory | ( | nv::cloth::Factory * | ) | [friend] |