final class PredefinedMeshManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
PredefinedMeshManager.BoxCacheLoader |
private static class |
PredefinedMeshManager.CylinderCacheLoader |
private static class |
PredefinedMeshManager.SphereCacheLoader |
private static class |
PredefinedMeshManager.TriangleMeshCache |
Modifier and Type | Field and Description |
---|---|
private PredefinedMeshManager.TriangleMeshCache |
boxCache |
private PredefinedMeshManager.TriangleMeshCache |
cylinderCache |
private static int |
INITAL_CAPACITY |
private static PredefinedMeshManager |
INSTANCE |
private static float |
LOAD_FACTOR |
private PredefinedMeshManager.TriangleMeshCache |
sphereCache |
Modifier | Constructor and Description |
---|---|
private |
PredefinedMeshManager() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
dispose() |
(package private) TriangleMesh |
getBoxMesh(float w,
float h,
float d,
Shape3D.Key key) |
(package private) TriangleMesh |
getCylinderMesh(float h,
float r,
int div,
Shape3D.Key key) |
(package private) static PredefinedMeshManager |
getInstance() |
(package private) TriangleMesh |
getSphereMesh(float r,
int div,
Shape3D.Key key) |
(package private) void |
invalidateBoxMesh(Shape3D.Key key) |
(package private) void |
invalidateCylinderMesh(Shape3D.Key key) |
(package private) void |
invalidateSphereMesh(Shape3D.Key key) |
(package private) void |
printStats() |
(package private) void |
test_clearCaches()
Note: The only user of this method is in unit test: PredefinedMeshManagerTest.
|
(package private) int |
test_getBoxCacheSize()
Note: The only user of this method is in unit test: PredefinedMeshManagerTest.
|
(package private) int |
test_getCylinderCacheSize()
Note: The only user of this method is in unit test: PredefinedMeshManagerTest.
|
(package private) int |
test_getSphereCacheSize()
Note: The only user of this method is in unit test: PredefinedMeshManagerTest.
|
private static final int INITAL_CAPACITY
private static final float LOAD_FACTOR
private static final PredefinedMeshManager INSTANCE
private PredefinedMeshManager.TriangleMeshCache boxCache
private PredefinedMeshManager.TriangleMeshCache sphereCache
private PredefinedMeshManager.TriangleMeshCache cylinderCache
static PredefinedMeshManager getInstance()
TriangleMesh getBoxMesh(float w, float h, float d, Shape3D.Key key)
TriangleMesh getSphereMesh(float r, int div, Shape3D.Key key)
TriangleMesh getCylinderMesh(float h, float r, int div, Shape3D.Key key)
void invalidateBoxMesh(Shape3D.Key key)
void invalidateSphereMesh(Shape3D.Key key)
void invalidateCylinderMesh(Shape3D.Key key)
void dispose()
void printStats()
void test_clearCaches()
int test_getBoxCacheSize()
int test_getSphereCacheSize()
int test_getCylinderCacheSize()