00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef CLOTHING_ASSET_AUTHORING_H
00031 #define CLOTHING_ASSET_AUTHORING_H
00032
00033 #include "Asset.h"
00034 #include "IProgressListener.h"
00035 #include "ClothingPhysicalMesh.h"
00036
00037
00038 namespace nvidia
00039 {
00040 namespace apex
00041 {
00042
00043 PX_PUSH_PACK_DEFAULT
00044
00045
00046 class ClothingPhysicalMesh;
00047
00048
00052 class ClothingAssetAuthoring : public AssetAuthoring
00053 {
00054 public:
00055
00059 virtual void setDefaultConstrainCoefficients(const ClothingConstrainCoefficients& coeff) = 0;
00060
00064 virtual void setInvalidConstrainCoefficients(const ClothingConstrainCoefficients& coeff) = 0;
00065
00081 virtual void setMeshes(uint32_t lod, RenderMeshAssetAuthoring* graphicalMesh, ClothingPhysicalMesh* physicalMesh,
00082 float normalResemblance = 25, bool ignoreUnusedVertices = true, IProgressListener* progress = NULL) = 0;
00083
00084
00088 virtual bool addPlatformToGraphicalLod(uint32_t lod, PlatformTag platform) = 0;
00089
00093 virtual bool removePlatform(uint32_t lod, PlatformTag platform) = 0;
00094
00098 virtual uint32_t getNumPlatforms(uint32_t lod) const = 0;
00099
00103 virtual PlatformTag getPlatform(uint32_t lod, uint32_t i) const = 0;
00104
00108 virtual uint32_t getNumLods() const = 0;
00109
00115 virtual int32_t getLodValue(uint32_t lod) const = 0;
00116
00120 virtual void clearMeshes() = 0;
00121
00125 virtual ClothingPhysicalMesh* getClothingPhysicalMesh(uint32_t graphicalLod) const = 0;
00126
00135 virtual void setBoneInfo(uint32_t boneIndex, const char* boneName, const PxMat44& bindPose, int32_t parentIndex) = 0;
00136
00142 virtual void setRootBone(const char* boneName) = 0;
00143
00151 virtual uint32_t addBoneConvex(const char* boneName, const PxVec3* positions, uint32_t numPositions) = 0;
00152
00160 virtual uint32_t addBoneConvex(uint32_t boneIndex, const PxVec3* positions, uint32_t numPositions) = 0;
00161
00170 virtual void addBoneCapsule(const char* boneName, float capsuleRadius, float capsuleHeight, const PxMat44& localPose) = 0;
00171
00180 virtual void addBoneCapsule(uint32_t boneIndex, float capsuleRadius, float capsuleHeight, const PxMat44& localPose) = 0;
00181
00185 virtual void clearBoneActors(const char* boneName) = 0;
00186
00190 virtual void clearBoneActors(uint32_t boneIndex) = 0;
00191
00195 virtual void clearAllBoneActors() = 0;
00196
00209 virtual void setCollision(const char** boneNames, float* radii, PxVec3* localPositions, uint32_t numSpheres, uint16_t* pairs, uint32_t numIndices) = 0;
00210
00214 virtual void setCollision(uint32_t* boneIndices, float* radii, PxVec3* localPositions, uint32_t numSpheres, uint16_t* pairs, uint32_t numIndices) = 0;
00215
00219 virtual void clearCollision() = 0;
00220
00226 virtual void setSimulationHierarchicalLevels(uint32_t levels) = 0;
00227
00228
00232 virtual void setSimulationThickness(float thickness) = 0;
00233
00237 virtual void setSimulationVirtualParticleDensity(float density) = 0;
00238
00242 virtual void setSimulationSleepLinearVelocity(float sleep) = 0;
00243
00247 virtual void setSimulationGravityDirection(const PxVec3& gravity) = 0;
00248
00257 virtual void setSimulationDisableCCD(bool disable) = 0;
00258
00262 virtual void setSimulationTwowayInteraction(bool enable) = 0;
00263
00269 virtual void setSimulationUntangling(bool enable) = 0;
00270
00274 virtual void setSimulationRestLengthScale(float scale) = 0;
00275
00283 virtual void setExportScale(float scale) = 0;
00284
00299 virtual void applyTransformation(const PxMat44& transformation, float scale, bool applyToGraphics, bool applyToPhysics) = 0;
00300
00309 virtual void updateBindPoses(const PxMat44* newBindPoses, uint32_t newBindPosesCount, bool isInternalOrder, bool maintainCollisionWorldSpace) = 0;
00310
00315 virtual void setDeriveNormalsFromBones(bool enable) = 0;
00316
00320 virtual NvParameterized::Interface* getMaterialLibrary() = 0;
00321
00329 virtual bool setMaterialLibrary(NvParameterized::Interface* materialLibrary, uint32_t materialIndex, bool transferOwnership) = 0;
00330
00342 virtual ::NvParameterized::Interface* getRenderMeshAssetAuthoring(uint32_t lodLevel) const = 0;
00343
00347 virtual bool getBoneBindPose(uint32_t boneIndex, PxMat44& bindPose) const = 0;
00348
00352 virtual bool setBoneBindPose(uint32_t boneIndex, const PxMat44& bindPose) = 0;
00353 };
00354
00355 PX_POP_PACK
00356
00357 }
00358 }
00359
00360 #endif // CLOTHING_ASSET_AUTHORING_H