Public Member Functions
nvidia::apex::ClothingAssetAuthoring Class Reference

The clothing authoring asset. This is used to generate streams that can then be deserialized into a regular asset. More...

#include <ClothingAssetAuthoring.h>

List of all members.

Public Member Functions

virtual void setDefaultConstrainCoefficients (const ClothingConstrainCoefficients &coeff)=0
 set the default value for all coefficients if none is available
virtual void setInvalidConstrainCoefficients (const ClothingConstrainCoefficients &coeff)=0
 set the value which is considered invalid when painting
virtual void setMeshes (uint32_t lod, RenderMeshAssetAuthoring *graphicalMesh, ClothingPhysicalMesh *physicalMesh, float normalResemblance=25, bool ignoreUnusedVertices=true, IProgressListener *progress=NULL)=0
 Sets the graphical and physical mesh for the given graphical lod level.
virtual bool addPlatformToGraphicalLod (uint32_t lod, PlatformTag platform)=0
 Assigns a platform tag to a graphical lod.
virtual bool removePlatform (uint32_t lod, PlatformTag platform)=0
 Removes a platform tag from a graphical lod.
virtual uint32_t getNumPlatforms (uint32_t lod) const =0
 Get number of platform tags for a given lod.
virtual PlatformTag getPlatform (uint32_t lod, uint32_t i) const =0
 Get i-th platform tag of given lod;.
virtual uint32_t getNumLods () const =0
 Returns the number of LoDs that have been set in the ClothingAssetAuthoring::setMeshes call.
virtual int32_t getLodValue (uint32_t lod) const =0
 Returns the n-th LoD value from the ClothingAssetAuthoring::setMeshes call.
virtual void clearMeshes ()=0
 Clears all lods and meshes.
virtual ClothingPhysicalMeshgetClothingPhysicalMesh (uint32_t graphicalLod) const =0
 Returns a reference to the internal copy of the physical mesh for the given graphical lod. Returned object MUST be destroyed by the user immediately after use.
virtual void setBoneInfo (uint32_t boneIndex, const char *boneName, const PxMat44 &bindPose, int32_t parentIndex)=0
 assigns name and bindpose to a bone. This needs to be called for every bone at least once
virtual void setRootBone (const char *boneName)=0
 Specifies the root bone.
virtual uint32_t addBoneConvex (const char *boneName, const PxVec3 *positions, uint32_t numPositions)=0
 add a convex collision representation to a bone, vertices must be in bone-bind-pose space!
virtual uint32_t addBoneConvex (uint32_t boneIndex, const PxVec3 *positions, uint32_t numPositions)=0
 add a convex collision representation to a bone, vertices must be in bone-bind-pose space!
virtual void addBoneCapsule (const char *boneName, float capsuleRadius, float capsuleHeight, const PxMat44 &localPose)=0
 add a capsule to the bone's collision. all relative to bone-bind-pose space!
virtual void addBoneCapsule (uint32_t boneIndex, float capsuleRadius, float capsuleHeight, const PxMat44 &localPose)=0
 add a capsule to the bone's collision. all relative to bone-bind-pose space!
virtual void clearBoneActors (const char *boneName)=0
 clear all collision information for a given bone name
virtual void clearBoneActors (uint32_t boneIndex)=0
 clear all collision information for a given bone index
virtual void clearAllBoneActors ()=0
 clear all collision information for any bone
virtual void setCollision (const char **boneNames, float *radii, PxVec3 *localPositions, uint32_t numSpheres, uint16_t *pairs, uint32_t numIndices)=0
 Set up the collision volumes for PhysX3. The boneNames, radii and localPositions array need to be of size numSpheres, each triplet describes a sphere that is attached to a bone. The pairs array describes connections between pairs of spheres. It defines capsules with 2 radii.
virtual void setCollision (uint32_t *boneIndices, float *radii, PxVec3 *localPositions, uint32_t numSpheres, uint16_t *pairs, uint32_t numIndices)=0
 Set up the collision volumes for PhysX3.
virtual void clearCollision ()=0
 Clear the collision volumes for PhysX3.
virtual void setSimulationHierarchicalLevels (uint32_t levels)=0
 Number of hierarchical levels. 0 to turn off.
virtual void setSimulationThickness (float thickness)=0
 The radius of the cloth/softbody particles.
virtual void setSimulationVirtualParticleDensity (float density)=0
 The amount of virtual particles created. 0 means none, 1 means 2 or 3 per triangle.
virtual void setSimulationSleepLinearVelocity (float sleep)=0
 The sleep velocity. If all vertices of a cloth/softbody are below this velocity for some time, it falls asleep.
virtual void setSimulationGravityDirection (const PxVec3 &gravity)=0
 The direction of gravity. Can be used for cooking.
virtual void setSimulationDisableCCD (bool disable)=0
 Turn off Continuous collision detection for clothing.
virtual void setSimulationTwowayInteraction (bool enable)=0
 Turns on twoway interaction with rigid body. Only of limited use for clothing.
virtual void setSimulationUntangling (bool enable)=0
 EXPERIMENTAL: Turns on local untangling.
virtual void setSimulationRestLengthScale (float scale)=0
 The scale of the cloth rest length.
virtual void setExportScale (float scale)=0
 Provide a scaling to the serialize functionality.
virtual void applyTransformation (const PxMat44 &transformation, float scale, bool applyToGraphics, bool applyToPhysics)=0
 Apply an arbitrary transformation to either the physical, the graphical mesh or both.
virtual void updateBindPoses (const PxMat44 *newBindPoses, uint32_t newBindPosesCount, bool isInternalOrder, bool maintainCollisionWorldSpace)=0
 Move every bone bind pose to a new position.
virtual void setDeriveNormalsFromBones (bool enable)=0
 If enabled, the normals of the physical mesh are derived from the directions of the physical vertex to the bind poses of the assigned bones.
virtual
NvParameterized::Interface * 
getMaterialLibrary ()=0
 Returns the material interface.
virtual bool setMaterialLibrary (NvParameterized::Interface *materialLibrary, uint32_t materialIndex, bool transferOwnership)=0
 Adds a new material library to the asset.
virtual
::NvParameterized::Interface * 
getRenderMeshAssetAuthoring (uint32_t lodLevel) const =0
 Gets the parameterized render mesh associated with this asset.
virtual bool getBoneBindPose (uint32_t boneIndex, PxMat44 &bindPose) const =0
 Retrieves the bind pose transform of this bone.
virtual bool setBoneBindPose (uint32_t boneIndex, const PxMat44 &bindPose)=0
 Directly sets the bind pose transform of this bone.

Detailed Description

The clothing authoring asset. This is used to generate streams that can then be deserialized into a regular asset.


Member Function Documentation

virtual void nvidia::apex::ClothingAssetAuthoring::addBoneCapsule ( const char *  boneName,
float  capsuleRadius,
float  capsuleHeight,
const PxMat44 &  localPose 
) [pure virtual]

add a capsule to the bone's collision. all relative to bone-bind-pose space!

Parameters:
[in]boneNamename of the bone this collision info is for.
[in]capsuleRadiusThe radius of the capsule. if set to 0, bone collision will default back to convex
[in]capsuleHeightThe height of the capsule
[in]localPoseThe frame of the capsule relative to the frame of the bone (not world space)
virtual void nvidia::apex::ClothingAssetAuthoring::addBoneCapsule ( uint32_t  boneIndex,
float  capsuleRadius,
float  capsuleHeight,
const PxMat44 &  localPose 
) [pure virtual]

add a capsule to the bone's collision. all relative to bone-bind-pose space!

Parameters:
[in]boneIndexindex of the bone this collision info is for.
[in]capsuleRadiusif set to 0, bone collision will default back to convex
[in]capsuleHeightThe height of the capsule
[in]localPoseThe frame of the capsule relative to the frame of the bone (not world space)
virtual uint32_t nvidia::apex::ClothingAssetAuthoring::addBoneConvex ( const char *  boneName,
const PxVec3 *  positions,
uint32_t  numPositions 
) [pure virtual]

add a convex collision representation to a bone, vertices must be in bone-bind-pose space!

Parameters:
[in]boneNamename of the bone this collision info is for.
[in]positionsarray of vertices with the positions.
[in]numPositionsnumber of elements in positions array. if set to 0, bone collision will be capsule.
virtual uint32_t nvidia::apex::ClothingAssetAuthoring::addBoneConvex ( uint32_t  boneIndex,
const PxVec3 *  positions,
uint32_t  numPositions 
) [pure virtual]

add a convex collision representation to a bone, vertices must be in bone-bind-pose space!

Parameters:
[in]boneIndexindex of the bone this collision info is for.
[in]positionsarray of vertices with the positions.
[in]numPositionsnumber of elements in positions array. if set to 0, bone collision will be capsule.
virtual void nvidia::apex::ClothingAssetAuthoring::applyTransformation ( const PxMat44 &  transformation,
float  scale,
bool  applyToGraphics,
bool  applyToPhysics 
) [pure virtual]

Apply an arbitrary transformation to either the physical, the graphical mesh or both.

This is a permanent transformation and it changes the object state. Should only be called immediately before serialization and without further modifying the object later on.

Parameters:
transformationThis matrix is allowed to contain a translation and a rotation.
scaleApply a uniform scaling as well
applyToGraphicsApply the transformation and scale to the graphical part of the asset
applyToPhysicsApply the transformation and scale to the physical part of the asset
Note:
if the 3x3 part of the transformation parameter contains mirroring of axis (= negative determinant) some additional processing is done. This includes flipping of simulation triangles and adaption of the mesh-mesh skinning.
virtual int32_t nvidia::apex::ClothingAssetAuthoring::getLodValue ( uint32_t  lod) const [pure virtual]

Returns the n-th LoD value from the ClothingAssetAuthoring::setMeshes call.

Note:
These values do not have to be a continuous list
virtual ::NvParameterized::Interface* nvidia::apex::ClothingAssetAuthoring::getRenderMeshAssetAuthoring ( uint32_t  lodLevel) const [pure virtual]

Gets the parameterized render mesh associated with this asset.

Parameters:
[in]lodLevelThe LoD level of the render mesh asset
Returns:
NULL if lodLevel is not valid
See also:
ClothingAssetAuthoring::getNumLods()
Note:
Under no circumstances you should modify the positions of the render mesh asset's vertices. This will certainly break clothing
virtual void nvidia::apex::ClothingAssetAuthoring::setBoneInfo ( uint32_t  boneIndex,
const char *  boneName,
const PxMat44 &  bindPose,
int32_t  parentIndex 
) [pure virtual]

assigns name and bindpose to a bone. This needs to be called for every bone at least once

Parameters:
[in]boneIndexThe bone index the information is provided for.
[in]boneNameThe bone name. An internal copy of this string will be made.
[in]bindPoseThe bind or rest pose of this bone.
[in]parentIndexThe bone index of the parent bone, -1 for root bones.
virtual void nvidia::apex::ClothingAssetAuthoring::setCollision ( const char **  boneNames,
float *  radii,
PxVec3 *  localPositions,
uint32_t  numSpheres,
uint16_t *  pairs,
uint32_t  numIndices 
) [pure virtual]

Set up the collision volumes for PhysX3. The boneNames, radii and localPositions array need to be of size numSpheres, each triplet describes a sphere that is attached to a bone. The pairs array describes connections between pairs of spheres. It defines capsules with 2 radii.

Parameters:
[in]boneNamesnames of the bones to which a spheres are added
[in]radiiradii of the spheres
[in]localPositionssphere positions relative to the bone
[in]numSpheresnumber of spheres that are being defined
[in]pairspairs of indices that reference 2 spheres to define a capsule with 2 radii
[in]numIndicessize of the pairs array
virtual void nvidia::apex::ClothingAssetAuthoring::setExportScale ( float  scale) [pure virtual]

Provide a scaling to the serialize functionality.

This is useful when the game runs in a different scale than the tool this asset was created in

Deprecated:
Only works with deprecated serialization, use applyTransformation instead!
virtual bool nvidia::apex::ClothingAssetAuthoring::setMaterialLibrary ( NvParameterized::Interface *  materialLibrary,
uint32_t  materialIndex,
bool  transferOwnership 
) [pure virtual]

Adds a new material library to the asset.

Parameters:
[in]materialLibraryUser-generated material library object.
[in]materialIndexDefault value for the Actor to know which material to use in the library
[in]transferOwnershipHands ownership to the authoring asset.
virtual void nvidia::apex::ClothingAssetAuthoring::setMeshes ( uint32_t  lod,
RenderMeshAssetAuthoring *  graphicalMesh,
ClothingPhysicalMesh physicalMesh,
float  normalResemblance = 25,
bool  ignoreUnusedVertices = true,
IProgressListener *  progress = NULL 
) [pure virtual]

Sets the graphical and physical mesh for the given graphical lod level.

Parameters:
[in]lodIdentifier for that lod level.
[in]graphicalMeshThe graphical mesh to be rendered in that lod level.
[in]physicalMeshThe physical mesh to be simulated on that lod level. The reference to the same physical mesh can be given for different graphical lods. It is copied internally.
Note: If the same physical mesh is used several time, the paint values are copied from the graphical mesh the first time the physical mesh is passed in here.
[in]normalResemblanceThis angle (in degrees) specifies how similar the normal from the physical and graphical mesh need to be in order for them to be accepted as immediate mode skinning pairs. Use 90 or bigger for any resemblance. Must be in range (0, 90], but it's highly recommended to use more than 5 degrees.
[in]ignoreUnusedVerticesAll Vertices that have the 'usedForPhysics' property set to false will be ignored when transferring the painted values from the graphical to the physical mesh
[in]progressProgress bar callback class.
virtual void nvidia::apex::ClothingAssetAuthoring::setRootBone ( const char *  boneName) [pure virtual]

Specifies the root bone.

Parameters:
[in]boneNameThe bone name.
virtual void nvidia::apex::ClothingAssetAuthoring::setSimulationDisableCCD ( bool  disable) [pure virtual]

Turn off Continuous collision detection for clothing.

Fast moving objects can cause massive forces to the cloth, especially when some kinematic actors move large distances within one frame. Without CCD those collisions are not detected and thus don't influence the cloth.

Note:
Whenever the isContinuous parameter in ClothingActor::updateState is set to false, cloth CCD will be temporarily disabled as well
virtual void nvidia::apex::ClothingAssetAuthoring::setSimulationHierarchicalLevels ( uint32_t  levels) [pure virtual]

Number of hierarchical levels. 0 to turn off.

If either the hierarchical solver iterations or the hierarchical levels are set to 0, this feature is turned off

virtual void nvidia::apex::ClothingAssetAuthoring::setSimulationUntangling ( bool  enable) [pure virtual]

EXPERIMENTAL: Turns on local untangling.

See also:
CLF_UNTANGLING
virtual void nvidia::apex::ClothingAssetAuthoring::updateBindPoses ( const PxMat44 *  newBindPoses,
uint32_t  newBindPosesCount,
bool  isInternalOrder,
bool  maintainCollisionWorldSpace 
) [pure virtual]

Move every bone bind pose to a new position.

Parameters:
newBindPosesarray of matrices for the new bind poses. This must be in object space (not relative to the parent bone!)
newBindPosesCountnumber of matrices in the specified array
isInternalOrderusing internal numbering or external numbering?
maintainCollisionWorldSpaceThe collision volumes do not move to the new bone bind pose

The documentation for this class was generated from the following file:

Generated on Sat Dec 1 2018 15:51:51

Copyright © 2012-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.