ClothingAsset.h
00001 /* 00002 * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. 00003 * 00004 * NVIDIA CORPORATION and its licensors retain all intellectual property 00005 * and proprietary rights in and to this software, related documentation 00006 * and any modifications thereto. Any use, reproduction, disclosure or 00007 * distribution of this software and related documentation without an express 00008 * license agreement from NVIDIA CORPORATION is strictly prohibited. 00009 */ 00010 00011 00012 #ifndef CLOTHING_ASSET_H 00013 #define CLOTHING_ASSET_H 00014 00015 #include "Asset.h" 00016 00017 namespace nvidia 00018 { 00019 namespace apex 00020 { 00021 00022 PX_PUSH_PACK_DEFAULT 00023 00024 class ClothingActor; 00025 class ClothingPreview; 00026 00027 #define CLOTHING_AUTHORING_TYPE_NAME "ClothingAsset" 00028 00029 00033 struct ClothSolverMode 00034 { 00036 enum Enum 00037 { 00041 v3, 00042 }; 00043 }; 00044 00045 00074 struct ClothingMeshSkinningMap 00075 { 00080 PxVec3 positionBary; 00081 00085 uint32_t vertexIndex0; 00086 00092 PxVec3 normalBary; 00093 00097 uint32_t vertexIndex1; 00098 00104 PxVec3 tangentBary; 00105 00109 uint32_t vertexIndex2; 00110 }; 00111 00115 class ClothingAsset : public Asset 00116 { 00117 protected: 00118 // do not manually delete this object 00119 virtual ~ClothingAsset() {} 00120 public: 00124 virtual uint32_t getNumActors() const = 0; 00125 00129 virtual ClothingActor* getActor(uint32_t index) = 0; 00130 00134 virtual PxBounds3 getBoundingBox() const = 0; 00135 00139 virtual uint32_t getNumGraphicalLodLevels() const = 0; 00140 00144 virtual uint32_t getGraphicalLodValue(uint32_t lodLevel) const = 0; 00145 00149 virtual float getBiggestMaxDistance() const = 0; 00150 00154 virtual ClothSolverMode::Enum getClothSolverMode() const = 0; 00155 00164 virtual bool remapBoneIndex(const char* name, uint32_t newIndex) = 0; 00165 00169 virtual uint32_t getNumBones() const = 0; 00170 00174 virtual uint32_t getNumUsedBones() const = 0; 00175 00179 virtual const char* getBoneName(uint32_t internalIndex) const = 0; 00180 00184 virtual bool getBoneBasePose(uint32_t internalIndex, PxMat44& result) const = 0; 00185 00191 virtual void getBoneMapping(uint32_t* internal2externalMap) const = 0; 00192 00200 virtual const RenderMeshAsset* getRenderMeshAsset(uint32_t lodLevel) const = 0; 00201 00213 virtual uint32_t prepareMorphTargetMapping(const PxVec3* originalPositions, uint32_t numPositions, float epsilon) = 0; 00214 00221 virtual uint32_t getMeshSkinningMapSize(uint32_t lod) = 0; 00222 00233 virtual void getMeshSkinningMap(uint32_t lod, ClothingMeshSkinningMap* map) = 0; 00234 00238 virtual bool releaseGraphicalData() = 0; 00239 }; 00240 00241 PX_POP_PACK 00242 00243 } // namespace nvidia 00244 } // namespace nvidia 00245 00246 #endif // CLOTHING_ASSET_H
Generated on Fri Dec 15 2017 13:58:35 Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.