53 void init(
const PxSimpleTriangleMesh& inputMesh, PxReal edgeLengthCostWeight_ = 1e-1f, PxReal flatnessDetectionThreshold_ = 1e-2f);
54 void init(
const PxArray<PxVec3> &vertices,
const PxArray<PxU32> &triIds, PxReal edgeLengthCostWeight_ = 1e-1f, PxReal flatnessDetectionThreshold_ = 1e-2f);
55 void decimateByRatio(PxF32 relativeOutputMeshSize = 0.5f, PxF32 maximalEdgeLength = 0.0f);
56 void decimateBySize(PxI32 targetTriangleCount, PxF32 maximalEdgeLength = 0.0f);
64 bool step(PxF32 maximalEdgeLength);
65 bool getAdjTris(PxI32 triNr, PxI32 vertNr, PxI32& valence,
bool& open,
67 bool getAdjTris(PxI32 triNr, PxI32 vertNr,
PxArray<PxI32>& tris)
const;
69 void replaceNeighbor(PxI32 triNr, PxI32 oldNeighbor, PxI32 newNeighbor);
70 PxI32 getEdgeId(PxI32 triNr, PxI32 edgeNr);
71 bool collapseEdge(PxI32 triNr, PxI32 edgeNr);
72 void evalEdgeCost(PxI32 triNr, PxI32 edgeNr,
float& cost,
float& ratio);
73 void findTriNeighbors();
83 PxI32 currentVertMark;
90 PxReal edgeLengthCostWeight;
91 PxReal flatnessDetectionThreshold;
97 HeapElem() : triNr(0), edgeNr(0), cost(0.0f) {}
98 HeapElem(PxI32 triNr_, PxI32 edgeNr_,
float cost_) :
99 triNr(triNr_), edgeNr(edgeNr_), cost(cost_) {}
106 return cost < e.cost;
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39