ClothingAssetAuthoring.h
00001 //
00002 // Redistribution and use in source and binary forms, with or without
00003 // modification, are permitted provided that the following conditions
00004 // are met:
00005 //  * Redistributions of source code must retain the above copyright
00006 //    notice, this list of conditions and the following disclaimer.
00007 //  * Redistributions in binary form must reproduce the above copyright
00008 //    notice, this list of conditions and the following disclaimer in the
00009 //    documentation and/or other materials provided with the distribution.
00010 //  * Neither the name of NVIDIA CORPORATION nor the names of its
00011 //    contributors may be used to endorse or promote products derived
00012 //    from this software without specific prior written permission.
00013 //
00014 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
00015 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00016 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00017 // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00018 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00019 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00020 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00021 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00022 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00023 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00024 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00025 //
00026 // Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
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 } // namespace nvidia
00358 } // namespace nvidia
00359 
00360 #endif // CLOTHING_ASSET_AUTHORING_H

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.