public class Vhacd4Parameters extends NativePhysicsObject implements java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger
message logger for this class
|
loggerN| Constructor and Description |
|---|
Vhacd4Parameters()
Instantiate the default tuning parameters.
|
| Modifier and Type | Method and Description |
|---|---|
Vhacd4Parameters |
clone()
Create a copy of these parameters.
|
boolean |
equals(java.lang.Object otherObject)
Test for exact equivalence with another Object.
|
void |
fromInputStream(java.io.InputStream is)
Read all parameters from the specified InputStream.
|
boolean |
getDebugEnabled()
Test whether debug output is enabled.
|
FillMode |
getFillMode()
Return the algorithm that fills voxels to create a solid object (native
field: m_fillMode).
|
int |
getMaxHulls()
Return the maximum number of convex hulls (native field:
m_maxConvexHulls).
|
int |
getMaxRecursion()
Return the maximum recursion depth (native field: m_maxRecursionDepth).
|
int |
getMaxVerticesPerHull()
Return the maximum number of vertices per convex hull (native field:
m_maxNumVerticesPerCH).
|
int |
getMinEdgeLength()
Return the minimum edge length (native field: m_minEdgeLength).
|
double |
getVolumePercentError()
Return the tolerance for the percent difference between the voxel volume
and the volume of the hull (native field:
m_minimumVolumePercentErrorAllowed).
|
int |
getVoxelResolution()
Return the maximum number of voxels generated during the voxelization
stage (native field: m_resolution).
|
int |
hashCode()
Generate the hash code for this instance.
|
boolean |
isAsync()
Test whether V-HACD should run on a new thread (native field:
m_asyncACD).
|
boolean |
isFindBestPlane()
Test whether V-HACD should try to find the optimal location for splitting
hulls (native field: m_findBestPlane).
|
boolean |
isShrinkWrap()
Test whether V-HACD should shrinkwrap voxel positions to the source mesh
(native field: m_shrinkWrap).
|
void |
nextFillMode()
Advance the fill mode to the next value.
|
void |
setAsync(boolean setting)
Alter whether V-HACD should run on a new thread (native field:
m_asyncACD).
|
void |
setDebugEnabled(boolean setting)
Alter whether debug output is enabled.
|
void |
setFillMode(FillMode mode)
Specify the algorithm that fills voxels to create a solid object (native
field: m_fillMode).
|
void |
setFindBestPlane(boolean setting)
Alter whether V-HACD should try to find the optimal location for
splitting hulls (native field: m_findBestPlane).
|
void |
setMaxHulls(int limit)
Alter the maximum number of convex hulls (native field:
m_maxConvexHulls).
|
void |
setMaxRecursion(int depth)
Alter the maximum recursion depth (native field: m_maxRecursionDepth).
|
void |
setMaxVerticesPerHull(int limit)
Alter the maximum number of vertices per convex hull (native field:
m_maxNumVerticesPerCH).
|
void |
setMinEdgeLength(int length)
Alter the minimum edge length (native field: m_minEdgeLength).
|
void |
setShrinkWrap(boolean setting)
Alter whether to shrinkwrap voxel positions to the source mesh (native
field: m_shrinkWrap).
|
void |
setVolumePercentError(double percentage)
Alter the tolerance for the percent difference between the voxel volume
and the volume of the hull (native field:
m_minimumVolumePercentErrorAllowed).
|
void |
setVoxelResolution(int maxVoxels)
Alter the maximum number of voxels generated during the voxelization
stage (native field: m_resolution).
|
java.util.Map<java.lang.String,java.lang.Object> |
toMap()
Represent this instance as a Map, in order to make comparisons easier.
|
void |
toOutputStream(java.io.OutputStream os)
Write all parameters to the specified OutputStream.
|
java.lang.String |
toString()
Represent this instance as a String.
|
compareTo, countTrackers, dumpTrackers, freeUnusedObjects, hasAssignedNativeObject, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, unassignNativeObjectpublic static final java.util.logging.Logger logger
public Vhacd4Parameters()
public void fromInputStream(java.io.InputStream is)
throws java.io.IOException
is - the stream to read (not null)java.io.IOException - from DataInputStreampublic boolean getDebugEnabled()
public FillMode getFillMode()
public int getMaxHulls()
public int getMaxRecursion()
public int getMaxVerticesPerHull()
public int getMinEdgeLength()
public double getVolumePercentError()
public int getVoxelResolution()
public boolean isAsync()
public boolean isFindBestPlane()
public boolean isShrinkWrap()
public void nextFillMode()
public void setAsync(boolean setting)
setting - true → create new thread, false → use the
existing thread (default=true)public void setDebugEnabled(boolean setting)
setting - true → enable, false → disable (default=false)public void setFillMode(FillMode mode)
mode - the desired algorithm (not null, default=FloodFill)public void setFindBestPlane(boolean setting)
setting - find optimal location, false → split in the middle
(default=false)public void setMaxHulls(int limit)
limit - default = 64, min = 1, max = 1024)public void setMaxRecursion(int depth)
Note: the native default is 10.
depth - default = 14, min = 2, max = 64public void setMaxVerticesPerHull(int limit)
Note: the native default is 64.
limit - default = 32, min = 4, max = 2_048)public void setMinEdgeLength(int length)
length - default = 2, min = 1, max = 32)public void setShrinkWrap(boolean setting)
setting - true → enable shrinkwrap, false → disable
shrinkwrap (default=true)public void setVolumePercentError(double percentage)
percentage - default = 1, min = 0, max = 100public void setVoxelResolution(int maxVoxels)
Note: the native default is 400_000.
maxVoxels - default = 100_000, min = 10_000, max = 64_000_000public java.util.Map<java.lang.String,java.lang.Object> toMap()
public void toOutputStream(java.io.OutputStream os)
throws java.io.IOException
os - the stream to write (not null)java.io.IOException - from DataOutputStreampublic Vhacd4Parameters clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object otherObject)
equals in class NativePhysicsObjectotherObject - (may be null, unaffected)public int hashCode()
hashCode in class NativePhysicsObjectpublic java.lang.String toString()
toString in class NativePhysicsObject