public class VHACDParameters 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 |
|---|
VHACDParameters()
Instantiate the default tuning parameters.
|
| Modifier and Type | Method and Description |
|---|---|
VHACDParameters |
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 selected parameters from the specified InputStream.
|
ACDMode |
getACDMode()
Return the decomposition mode (native field: m_mode).
|
double |
getAlpha()
Return the bias toward clipping along symmetry planes (native field:
m_alpha).
|
double |
getBeta()
Return the bias toward clipping along revolution axes (native field:
m_beta).
|
int |
getConvexHullDownSampling()
Return the precision of the convex-hull generation process (native field:
m_convexhullDownsampling).
|
boolean |
getDebugEnabled()
Test whether debug output is enabled.
|
double |
getMaxConcavity()
Return the maximum concavity (native field: m_concavity).
|
int |
getMaxVerticesPerHull()
Return the maximum number of vertices per convex hull (native field:
m_maxNumVerticesPerCH).
|
double |
getMinVolumePerHull()
Return the minimum volume for added vertices (native field:
m_minVolumePerCH).
|
boolean |
getPCA()
Test whether to normalize the mesh (native field: m_pca).
|
int |
getPlaneDownSampling()
Return the granularity of the search (native field: m_planeDownsampling).
|
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.
|
void |
setACDMode(ACDMode mode)
Set approximate convex decomposition mode (native field: m_mode).
|
void |
setAlpha(double alpha)
Set bias toward clipping along symmetry planes (native field: m_alpha).
|
void |
setBeta(double beta)
Set bias toward clipping along revolution axes (native field: m_beta).
|
void |
setConvexHullDownSampling(int precision)
Set precision of the convex-hull generation process during the clipping
plane selection stage (native field: m_convexhullDownsampling).
|
void |
setDebugEnabled(boolean setting)
Alter whether debug output is enabled.
|
void |
setMaxConcavity(double concavity)
Set maximum concavity (native field: m_concavity).
|
void |
setMaxVerticesPerHull(int limit)
Alter the maximum number of vertices per convex hull (native field:
m_maxNumVerticesPerCH).
|
void |
setMinVolumePerHull(double volume)
Set the minimum volume to add vertices to convex hulls (native field:
m_minVolumePerCH).
|
void |
setPCA(boolean v)
Enable/disable normalizing the mesh before applying the convex
decomposition (native field: m_pca).
|
void |
setPlaneDownSampling(int v)
Set granularity of the search for the "best" clipping plane (native
field: m_planeDownsampling).
|
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 selected 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 VHACDParameters()
public void fromInputStream(java.io.InputStream is)
throws java.io.IOException
is - the stream to read (not null)java.io.IOException - from DataInputStreampublic ACDMode getACDMode()
public double getAlpha()
public double getBeta()
public int getConvexHullDownSampling()
public boolean getDebugEnabled()
public double getMaxConcavity()
public int getMaxVerticesPerHull()
public double getMinVolumePerHull()
public boolean getPCA()
public int getPlaneDownSampling()
public int getVoxelResolution()
public void setACDMode(ACDMode mode)
mode - default = VOXELpublic void setAlpha(double alpha)
alpha - default = 0.05, min = 0.0, max = 1.0,public void setBeta(double beta)
beta - default = 0.05, min = 0.0, max = 1.0public void setConvexHullDownSampling(int precision)
precision - default = 4, min = 1, max = 16public void setDebugEnabled(boolean setting)
setting - true → enable, false → disable (default=false)public void setMaxConcavity(double concavity)
concavity - default = 0.0025, min = 0.0, max = 1.0
Note: the native default is 0.001.
public void setMaxVerticesPerHull(int limit)
limit - default = 32, min = 4, max = 1024
Note: the native default is 64.
public void setMinVolumePerHull(double volume)
volume - default = 0.0001, min = 0.0, max = 0.01public void setPCA(boolean v)
v - default = falsepublic void setPlaneDownSampling(int v)
v - default = 4, min = 1, max = 16public void setVoxelResolution(int maxVoxels)
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 VHACDParameters 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