rename vars

renamed vars to make more sense with the new option params
This commit is contained in:
marauder2k7 2024-05-16 03:39:18 +01:00
parent bd93ce3637
commit 48848f9706
2 changed files with 8 additions and 8 deletions

View file

@ -183,7 +183,7 @@ public:
void fit26_DOP(); void fit26_DOP();
// Convex Hulls // Convex Hulls
void fitConvexHulls( U32 depth, F32 mergeThreshold, U32 concavityThreshold, U32 maxHullVerts, void fitConvexHulls( U32 depth, F32 minPercentage, U32 maxHulls, U32 maxHullVerts,
F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError ); F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError );
}; };
@ -691,7 +691,7 @@ void MeshFit::fitK_DOP( const Vector<Point3F>& planes )
//--------------------------- //---------------------------
// Best-fit set of convex hulls // Best-fit set of convex hulls
void MeshFit::fitConvexHulls( U32 depth, F32 mergeThreshold, U32 concavityThreshold, U32 maxHullVerts, void MeshFit::fitConvexHulls( U32 depth, F32 minPercentage, U32 maxHulls, U32 maxHullVerts,
F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError ) F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError )
{ {
VHACD::IVHACD::Parameters p; VHACD::IVHACD::Parameters p;
@ -699,9 +699,9 @@ void MeshFit::fitConvexHulls( U32 depth, F32 mergeThreshold, U32 concavityThres
p.m_maxNumVerticesPerCH = maxHullVerts; p.m_maxNumVerticesPerCH = maxHullVerts;
p.m_shrinkWrap = true; p.m_shrinkWrap = true;
p.m_maxRecursionDepth = depth; p.m_maxRecursionDepth = depth;
p.m_minimumVolumePercentErrorAllowed = mergeThreshold; p.m_minimumVolumePercentErrorAllowed = minPercentage;
p.m_resolution = 10000; p.m_resolution = 10000;
p.m_maxConvexHulls = concavityThreshold; p.m_maxConvexHulls = maxHulls;
VHACD::IVHACD* iface = VHACD::CreateVHACD_ASYNC(); VHACD::IVHACD* iface = VHACD::CreateVHACD_ASYNC();
@ -929,8 +929,8 @@ DefineTSShapeConstructorMethod( addPrimitive, bool, ( const char* meshName, cons
return true; return true;
}} }}
DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char* type, const char* target, S32 depth, F32 merge, S32 maxHulls, S32 maxVerts, F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError ), ( 4, 30, 30, 32, 0, 0, 0 ), DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char* type, const char* target, S32 depth, F32 minPercentage, S32 maxHulls, S32 maxVerts, F32 boxMaxError, F32 sphereMaxError, F32 capsuleMaxError ), ( 4, 30, 30, 32, 0, 0, 0 ),
( size, type, target, depth, merge, maxHulls, maxVerts, boxMaxError, sphereMaxError, capsuleMaxError ), false, ( size, type, target, depth, minPercentage, maxHulls, maxVerts, boxMaxError, sphereMaxError, capsuleMaxError ), false,
"Autofit a mesh primitive or set of convex hulls to the shape geometry. Hulls " "Autofit a mesh primitive or set of convex hulls to the shape geometry. Hulls "
"may optionally be converted to boxes, spheres and/or capsules based on their " "may optionally be converted to boxes, spheres and/or capsules based on their "
"volume.\n" "volume.\n"
@ -984,7 +984,7 @@ DefineTSShapeConstructorMethod( addCollisionDetail, bool, ( S32 size, const char
fit.fit26_DOP(); fit.fit26_DOP();
else if ( !dStricmp( type, "convex hulls" ) ) else if ( !dStricmp( type, "convex hulls" ) )
{ {
fit.fitConvexHulls( depth, merge, maxHulls, maxVerts, fit.fitConvexHulls( depth, minPercentage, maxHulls, maxVerts,
boxMaxError, sphereMaxError, capsuleMaxError ); boxMaxError, sphereMaxError, capsuleMaxError );
} }
else else

View file

@ -315,7 +315,7 @@ public:
const char* getImposterSettings(S32 index); const char* getImposterSettings(S32 index);
S32 addImposter(S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle); S32 addImposter(S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle);
bool removeImposter(); bool removeImposter();
bool addCollisionDetail(S32 size, const char* type, const char* target, S32 depth = 4, F32 merge = 30.0f, S32 maxHull = 30, S32 maxVerts = 32, F32 boxMaxError = 0, F32 sphereMaxError = 0, F32 capsuleMaxError = 0); bool addCollisionDetail(S32 size, const char* type, const char* target, S32 depth = 4, F32 minPercentage = 10.0f, S32 maxHull = 30, S32 maxVerts = 32, F32 boxMaxError = 0, F32 sphereMaxError = 0, F32 capsuleMaxError = 0);
///@} ///@}
/// @name Sequences /// @name Sequences