Main Page Class List Class Members

NvBlastExtAuthoringMeshUtils.h
Go to the documentation of this file.
1 #include <cinttypes>
2 #include <map>
3 #include <set>
4 #include <vector>
5 #include "NvBlastExtAuthoringTypes.h"
6
7 namespace physx
8 {
9 class PxVec3;
10 };
11
12 namespace Nv
13 {
14 namespace Blast
15 {
16
17 class Mesh;
18
31 void setCuttingBox(const physx::PxVec3& point, const physx::PxVec3& normal, Mesh* mesh, float size, int64_t id);
39 Mesh* getCuttingBox(const physx::PxVec3& point, const physx::PxVec3& normal, float size, int64_t id, int32_t interiorMaterialId);
40
46 Mesh* getBigBox(const physx::PxVec3& point, float size, int32_t interiorMaterialId);
47
61 Mesh* getNoisyCuttingBoxPair(const physx::PxVec3& point, const physx::PxVec3& normal, float size, float jaggedPlaneSize, physx::PxVec3 resolution, int64_t id, float amplitude, float frequency, int32_t octaves, int32_t seed, int32_t interiorMaterialId);
62
63
68 void inverseNormalAndIndices(Mesh* mesh);
69
70 struct CmpVec
71 {
72 bool operator()(const physx::PxVec3& v1, const physx::PxVec3& v2) const;
73 };
74
75 typedef std::map<physx::PxVec3, std::map<uint32_t, uint32_t>, CmpVec> PointMap;
76
77 struct SharedFace
78 {
79 SharedFace() {}
80 SharedFace(uint32_t inW, uint32_t inH, int64_t inUD, int32_t inMatId) : w(inW), h(inH), f(Facet( 0, 3, inUD, inMatId ))
81 {
82 vertices.reserve((w + 1) * (h + 1));
83 }
84 uint32_t w, h;
85 Facet f;
86 std::vector<Nv::Blast::Vertex> vertices;
87 std::vector<Nv::Blast::Edge> edges;
88 std::vector<Nv::Blast::Facet> facets;
89 };
90
91 struct CmpSharedFace
92 {
93 bool operator()(const std::pair<physx::PxVec3, physx::PxVec3>& pv1, const std::pair<physx::PxVec3, physx::PxVec3>& pv2) const;
94 };
95
96 typedef std::map<std::pair<physx::PxVec3, physx::PxVec3>, SharedFace, CmpSharedFace> SharedFacesMap;
97
98 struct CutoutConfiguration;
99
100 void buildCuttingConeFaces(const CutoutConfiguration& conf, const std::vector<std::vector<physx::PxVec3>>& points,
101 float heightBot, float heightTop, float conicityBot, float conicityTop,
102 int64_t& id, int32_t seed, int32_t interiorMaterialId, SharedFacesMap& sharedFacesMap);
103
119 Mesh* getCuttingCone(const CutoutConfiguration& conf,
120 const std::vector<physx::PxVec3>& points, const std::set<int32_t>& smoothingGroups,
121 float heightBot, float heightTop, float conicityBot, float conicityTop,
122 int64_t& id, int32_t seed, int32_t interiorMaterialId, const SharedFacesMap& sharedFacesMap, bool inverseNormals = false);
123
124 };
125 };
physx
Definition: NvBlastExtApexSharedParts.h:34
Nv::Blast::getNoisyCuttingBoxPair
Mesh * getNoisyCuttingBoxPair(const physx::PxVec3 &point, const physx::PxVec3 &normal, float size, float jaggedPlaneSize, physx::PxVec3 resolution, int64_t id, float amplitude, float frequency, int32_t octaves, int32_t seed, int32_t interiorMaterialId)
Nv::Blast::SharedFace::SharedFace
SharedFace(uint32_t inW, uint32_t inH, int64_t inUD, int32_t inMatId)
Definition: NvBlastExtAuthoringMeshUtils.h:80
Nv::Blast::getCuttingBox
Mesh * getCuttingBox(const physx::PxVec3 &point, const physx::PxVec3 &normal, float size, int64_t id, int32_t interiorMaterialId)
Nv::Blast::setCuttingBox
void setCuttingBox(const physx::PxVec3 &point, const physx::PxVec3 &normal, Mesh *mesh, float size, int64_t id)
Nv::Blast::buildCuttingConeFaces
void buildCuttingConeFaces(const CutoutConfiguration &conf, const std::vector< std::vector< physx::PxVec3 >> &points, float heightBot, float heightTop, float conicityBot, float conicityTop, int64_t &id, int32_t seed, int32_t interiorMaterialId, SharedFacesMap &sharedFacesMap)
Nv::Blast::VecMath::normal
NV_INLINE float normal(const float a[3], float r[3])
Definition: NvBlastMath.h:93
Nv::Blast::SharedFace::vertices
std::vector< Nv::Blast::Vertex > vertices
Definition: NvBlastExtAuthoringMeshUtils.h:86
Nv::Blast::SharedFace::w
uint32_t w
Definition: NvBlastExtAuthoringMeshUtils.h:84
NvBlastExtAuthoringTypes.h
Nv::Blast::Mesh
Definition: NvBlastExtAuthoringMesh.h:42
Nv::Blast::Facet
Definition: NvBlastExtAuthoringTypes.h:106
Nv::Blast::getBigBox
Mesh * getBigBox(const physx::PxVec3 &point, float size, int32_t interiorMaterialId)
Nv::Blast::SharedFace
Definition: NvBlastExtAuthoringMeshUtils.h:77
Nv::Blast::SharedFacesMap
std::map< std::pair< physx::PxVec3, physx::PxVec3 >, SharedFace, CmpSharedFace > SharedFacesMap
Definition: NvBlastExtAuthoringMeshUtils.h:96
Nv::Blast::CmpVec
Definition: NvBlastExtAuthoringMeshUtils.h:70
Nv::Blast::SharedFace::f
Facet f
Definition: NvBlastExtAuthoringMeshUtils.h:85
Nv::Blast::CmpSharedFace
Definition: NvBlastExtAuthoringMeshUtils.h:91
Nv::Blast::PointMap
std::map< physx::PxVec3, std::map< uint32_t, uint32_t >, CmpVec > PointMap
Definition: NvBlastExtAuthoringMeshUtils.h:75
Nv::Blast::getCuttingCone
Mesh * getCuttingCone(const CutoutConfiguration &conf, const std::vector< physx::PxVec3 > &points, const std::set< int32_t > &smoothingGroups, float heightBot, float heightTop, float conicityBot, float conicityTop, int64_t &id, int32_t seed, int32_t interiorMaterialId, const SharedFacesMap &sharedFacesMap, bool inverseNormals=false)
Nv::Blast::SharedFace::SharedFace
SharedFace()
Definition: NvBlastExtAuthoringMeshUtils.h:79
Nv::Blast::CutoutConfiguration
Definition: NvBlastExtAuthoringFractureTool.h:133
Nv::Blast::SharedFace::edges
std::vector< Nv::Blast::Edge > edges
Definition: NvBlastExtAuthoringMeshUtils.h:87
Nv::Blast::inverseNormalAndIndices
void inverseNormalAndIndices(Mesh *mesh)
w
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btVector3.h:281
Nv
Definition: NvBlastArray.h:37
Nv::Blast::SharedFace::facets
std::vector< Nv::Blast::Facet > facets
Definition: NvBlastExtAuthoringMeshUtils.h:88