Main Page   Class List   Class Members  

  • Main Page
  • User's Guide
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

sdk/extensions/authoring/include/NvBlastExtAuthoring.h

Go to the documentation of this file.
00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
00027 
00028 
00029 #ifndef NVBLASTAUTHORING_H
00030 #define NVBLASTAUTHORING_H
00031 
00032 #include "NvBlastExtAuthoringTypes.h"
00033 
00034 namespace Nv
00035 {
00036 namespace Blast
00037 {
00038 class Mesh;
00039 class VoronoiSitesGenerator;
00040 class CutoutSet;
00041 class RandomGeneratorBase;
00042 class FractureTool;
00043 class ConvexMeshBuilder;
00044 class BlastBondGenerator;
00045 class MeshCleaner;
00046 class PatternGenerator;
00047 class Grid;
00048 class GridWalker;
00049 }  // namespace Blast
00050 }  // namespace Nv
00051 
00052 struct NvBlastExtAssetUtilsBondDesc;
00053 
00067 NVBLAST_API Nv::Blast::Mesh*
00068 NvBlastExtAuthoringCreateMesh(const NvcVec3* positions, const NvcVec3* normals, const NvcVec2* uv,
00069                               uint32_t verticesCount, const uint32_t* indices, uint32_t indicesCount);
00070 
00084 NVBLAST_API Nv::Blast::Mesh*
00085 NvBlastExtAuthoringCreateMeshOnlyTriangles(const void* vertices, uint32_t verticesCount, uint32_t* indices,
00086                                            uint32_t indexCount, void* materials = nullptr, uint32_t materialStride = 4);
00087 
00101 NVBLAST_API Nv::Blast::Mesh*
00102 NvBlastExtAuthoringCreateMeshFromFacets(const void* vertices, const void* edges, const void* facets,
00103                                         uint32_t verticesCount, uint32_t edgesCount, uint32_t facetsCount);
00104 
00112 NVBLAST_API Nv::Blast::VoronoiSitesGenerator*
00113 NvBlastExtAuthoringCreateVoronoiSitesGenerator(Nv::Blast::Mesh* mesh, Nv::Blast::RandomGeneratorBase* rng);
00114 
00116 NVBLAST_API Nv::Blast::CutoutSet* NvBlastExtAuthoringCreateCutoutSet();
00117 
00134 NVBLAST_API void
00135 NvBlastExtAuthoringBuildCutoutSet(Nv::Blast::CutoutSet& cutoutSet, const uint8_t* pixelBuffer, uint32_t bufferWidth,
00136                                   uint32_t bufferHeight, float segmentationErrorThreshold, float snapThreshold,
00137                                   bool periodic, bool expandGaps);
00138 
00143 NVBLAST_API Nv::Blast::FractureTool* NvBlastExtAuthoringCreateFractureTool();
00144 
00149 NVBLAST_API Nv::Blast::BlastBondGenerator* NvBlastExtAuthoringCreateBondGenerator(Nv::Blast::ConvexMeshBuilder* builder);
00150 
00160 NVBLAST_API int32_t NvBlastExtAuthoringBuildMeshConvexDecomposition(Nv::Blast::ConvexMeshBuilder* cmb,
00161                                                                     const Nv::Blast::Triangle* mesh,
00162                                                                     uint32_t triangleCount,
00163                                                                     const Nv::Blast::ConvexDecompositionParams& params,
00164                                                                     Nv::Blast::CollisionHull**& convexes);
00165 
00166 
00179 NVBLAST_API void NvBlastExtAuthoringTrimCollisionGeometry(Nv::Blast::ConvexMeshBuilder* cmb, uint32_t chunksCount,
00180                                                           Nv::Blast::CollisionHull** in, const uint32_t* chunkDepth);
00181 
00182 
00190 NVBLAST_API void NvBlastExtAuthoringTransformCollisionHullInPlace(Nv::Blast::CollisionHull* hull, const NvcVec3* scaling,
00191                                                                   const NvcQuat* rotation, const NvcVec3* translation);
00192 
00200 NVBLAST_API Nv::Blast::CollisionHull*
00201 NvBlastExtAuthoringTransformCollisionHull(const Nv::Blast::CollisionHull* hull, const NvcVec3* scaling,
00202                                           const NvcQuat* rotation, const NvcVec3* translation);
00203 
00215 NVBLAST_API Nv::Blast::AuthoringResult*
00216 NvBlastExtAuthoringProcessFracture(Nv::Blast::FractureTool& fTool, Nv::Blast::BlastBondGenerator& bondGenerator,
00217                                    Nv::Blast::ConvexMeshBuilder& collisionBuilder,
00218                                    const Nv::Blast::ConvexDecompositionParams& collisionParam,
00219                                    int32_t defaultSupportDepth = -1);
00220 
00221 
00225 NVBLAST_API void NvBlastExtAuthoringReleaseAuthoringResultCollision(Nv::Blast::ConvexMeshBuilder& collisionBuilder, Nv::Blast::AuthoringResult* ar);
00226 
00230 NVBLAST_API void NvBlastExtAuthoringReleaseAuthoringResult(Nv::Blast::ConvexMeshBuilder& collisionBuilder, Nv::Blast::AuthoringResult* ar);
00231 
00232 
00240 NVBLAST_API void NvBlastExtAuthoringUpdateGraphicsMesh(Nv::Blast::FractureTool& fTool, Nv::Blast::AuthoringResult& ares);
00241 
00251 NVBLAST_API void NvBlastExtAuthoringBuildCollisionMeshes(Nv::Blast::AuthoringResult& ares,
00252                                                          Nv::Blast::ConvexMeshBuilder& collisionBuilder,
00253                                                          const Nv::Blast::ConvexDecompositionParams& collisionParam,
00254                                                          uint32_t chunksToProcessCount, uint32_t* chunksToProcess);
00255 
00260 NVBLAST_API Nv::Blast::MeshCleaner* NvBlastExtAuthoringCreateMeshCleaner();
00261 
00287 NVBLAST_API uint32_t NvBlastExtAuthoringFindAssetConnectingBonds(
00288     const NvBlastAsset** components, const NvcVec3* scales, const NvcQuat* rotations, const NvcVec3* translations,
00289     const uint32_t** convexHullOffsets, const Nv::Blast::CollisionHull*** chunkHulls, uint32_t componentCount,
00290     NvBlastExtAssetUtilsBondDesc*& newBondDescs, float maxSeparation = 0.0f);
00291 
00295 NVBLAST_API Nv::Blast::PatternGenerator* NvBlastExtAuthoringCreatePatternGenerator();
00296 
00300 NVBLAST_API Nv::Blast::Grid* NvBlastExtAuthoringCreateGridAccelerator(uint32_t resolution, const Nv::Blast::Mesh* m);
00301 
00305 NVBLAST_API Nv::Blast::GridWalker* NvBlastExtAuthoringCreateGridWalker(Nv::Blast::Grid* parent);
00306 
00307 #endif  // ifndef NVBLASTAUTHORING_H
Copyright © 2015-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com