public class PwPlatonic extends PjWorkshop
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
Constructor and Description |
---|
PwPlatonic()
Constructor.
|
PwPlatonic(PgElementSet geom)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compute()
Update the registered geometry based on the currently selected solid type.
|
static PgElementSet |
getSolid(int type)
Convenient method to construct a solid of given type.
|
static PgElementSet |
getSolid(PgElementSet geom,
int type)
Assign the data of the selected solid type to the geometry.
|
java.lang.String |
getSolidName()
Get the name of the currently selected solid.
|
int |
getSolidType()
Get the name of the currently selected solid.
|
void |
init()
Initialization.
|
void |
reset()
Reset workshop and geometry to original state.
|
void |
setGeometry(PgElementSet geom)
Set geometry which will be filled with the currently selected solid.
|
static PgElementSet |
setSolid(PgElementSet geom,
int type)
Deprecated.
use commands getSolid() or setGeometry(PgElementSet);setSolidType(int);
|
void |
setSolid(PgElementSet geom,
java.lang.String name)
Deprecated.
use commands getSolid() or setGeometry(PgElementSet);setSolidType(int);
|
boolean |
setSolidName(java.lang.String name)
Select a solid by specifying its name.
|
boolean |
setSolidType(int type)
Select a solid by specifying its type.
|
cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, openDialog, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer, update
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFather, getName, setParent
public static final double[][] m_cubeVertices
public static final int[][] m_cubeElements
public static final double[][] m_tetrahedronVertices
public static final int[][] m_tetrahedronElements
public static final double[][] m_octahedronVertices
public static final int[][] m_octahedronElements
public static final double[][] m_dodecahedronVertices
public static final int[][] m_dodecahedronElements
public static final double[][] m_icosahedronVertices
public static final int[][] m_icosahedronElements
public static final double[][] m_truncOctahedronVertices
public static final int[][] m_truncOctahedronElements
public static final double[][] m_soccerBallVertices
public static final int[][] m_soccerBallElements
public static final double[][] m_snubCubeVertices
public static final int[][] m_snubCubeElements
public static final double[][] m_snubDodecahedronVertices
public static final int[][] m_snubDodecahedronElements
public static final double[][] m_cubeOctahedronVertices
public static final int[][] m_cubeOctahedronElements
public static final double[][] m_icosiDodecahedronVertices
public static final int[][] m_icosiDodecahedronElements
public static final double[][] m_rhombiCubeOctahedronVertices
public static final int[][] m_rhombiCubeOctahedronElements
public static final double[][] m_rhombIcosiDodecahedronVertices
public static final int[][] m_rhombIcosiDodecahedronElements
public static final double[][] m_rhombiTruncatedCubeVertices
public static final int[][] m_rhombiTruncatedCubeElements
public static final double[][] m_truncatedCubeVertices
public static final int[][] m_truncatedCubeElements
public static final double[][] m_rhombiTruncatedIcosahedronVertices
public static final int[][] m_rhombiTruncatedIcosahedronElements
public static final double[][] m_truncatedDodecahedronVertices
public static final int[][] m_truncatedDodecahedronElements
public static final double[][] m_rhombicDodecahedronVertices
public static final int[][] m_rhombicDodecahedronElements
public static final double[][] m_rhombicTriacontahedronVertices
public static final int[][] m_rhombicTriacontahedronElements
public static final double[][] m_truncatedTetrahedronVertices
public static final int[][] m_truncatedTetrahedronElements
public static final double[][] m_pseudoRhombiCubeOctahedronVertices
public static final int[][] m_pseudoRhombiCubeOctahedronElements
public static final int TETRAHEDRON
public static final int CUBE
public static final int OCTAHEDRON
public static final int DODECAHEDRON
public static final int ICOSAHEDRON
public static final int TRUNCATED_TETRAHEDRON
public static final int TRUNCATED_CUBE
public static final int TRUNCATED_OCTAHEDRON
public static final int TRUNCATED_DODECAHEDRON
public static final int SOCCER_BALL
public static final int CUBE_OCTAHEDRON
public static final int ICOSI_DODECAHEDRON
public static final int SNUB_CUBE
public static final int SNUB_DODECAHEDRON
public static final int RHOMBI_CUBE_OCTAHEDRON
public static final int RHOMB_ICOSI_DODECAHEDRON
public static final int RHOMBI_TRUNCATED_CUBE
public static final int RHOMBI_TRUNCATED_ICOSAHEDRON
public static final int RHOMBIC_DODECAHEDRON
public static final int RHOMBIC_TRIACONTAHEDRON
public static final int PSEUDO_RHOMBI_CUBE_OCTAHEDRON
public PwPlatonic()
public PwPlatonic(PgElementSet geom)
public void init()
init
in class PjWorkshop
public void reset()
reset
in class PjWorkshop
public void setGeometry(PgElementSet geom)
setSolidType(int)
,
PjWorkshop.removeGeometry()
public java.lang.String getSolidName()
getSolidType()
,
setSolidType(int)
public boolean setSolidName(java.lang.String name)
TODO: This method is a shortcut. If the integer representation of the solid is
available, then preferrably the method setSolidType(int)
should be used.
name
- any value contained in m_solidName.setSolidType(int)
public int getSolidType()
PwPlatonic.CUBE
.getSolidType()
,
setSolidType(int)
public boolean setSolidType(int type)
type
- any value like PwPlatonic.CUBE
.getSolidType()
public boolean compute()
setGeometry(PgElementSet)
,
setSolidType(int)
public void setSolid(PgElementSet geom, java.lang.String name)
name
- any value like in m_solidName.public static PgElementSet setSolid(PgElementSet geom, int type)
geom
- a non-null element set which is filled with data of solid.type
- any value like PwPlatonic.CUBE
.public static PgElementSet getSolid(int type)
type
- any value like PwPlatonic.CUBE
.getSolid(PgElementSet, int)
public static PgElementSet getSolid(PgElementSet geom, int type)
geom
- a non-null element set which is filled with data of solid.type
- any value like PwPlatonic.CUBE
.getSolid(int)
"