jvx.geom
Class PwPlatonic
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.project.PjWorkshop
-
- jvx.geom.PwPlatonic
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PjWorkshopIf
public class PwPlatonic extends PjWorkshop
Provides selection and creation of classic surface in a workshop. Class contains metadata of Platonic solids and other regular solids.- See Also:
- Serialized Form
- Author:
- Ulrich Reitebuch
- Version:
- 07.07.04, 2.20 revised (ur) Rhombic Dodecahedron and Rhombic Triacontahedron corrected resp. added.
03.09.03, 2.10 revised (ur) Rhombic Dodecahedron scaled to maximal vertex radius 1.
28.12.01, 2.00 revised (kp) Full revision when incorporating the new workshop handling.
01.02.01, 1.10 revised (ur) All solids (except for Rhombic Dodecahedron) scaled to vertex radius 1.
08.09.00, 1.02 revised (ur) Method getSolidName() added.
13.12.99, 1.01 revised (ur) added all remaining Platonic and Archimedean solids.
05.08.99, 1.00 created (ur).
-
-
Field Summary
-
Fields inherited from class jv.object.PsObject
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
-
Fields inherited from interface jv.project.PjWorkshopIf
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
-
-
Constructor Summary
Constructors Constructor and Description PwPlatonic()Constructor.PwPlatonic(PgElementSet geom)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description booleancompute()Update the registered geometry based on the currently selected solid type.static PgElementSetgetSolid(int type)Convenient method to construct a solid of given type.static PgElementSetgetSolid(PgElementSet geom, int type)Assign the data of the selected solid type to the geometry.java.lang.StringgetSolidName()Get the name of the currently selected solid.intgetSolidType()Get the name of the currently selected solid.voidinit()Initialization.voidreset()Reset workshop and geometry to original state.voidsetGeometry(PgElementSet geom)Set geometry which will be filled with the currently selected solid.static PgElementSetsetSolid(PgElementSet geom, int type)Deprecated.use commands getSolid() or setGeometry(PgElementSet);setSolidType(int);voidsetSolid(PgElementSet geom, java.lang.String name)Deprecated.use commands getSolid() or setGeometry(PgElementSet);setSolidType(int);booleansetSolidName(java.lang.String name)Select a solid by specifying its name.booleansetSolidType(int type)Select a solid by specifying its type.-
Methods inherited from class jvx.project.PjWorkshop
cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer, update
-
Methods inherited from class jv.object.PsObject
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
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jv.object.PsUpdateIf
getFather, getName, setParent
-
-
-
-
Field Detail
-
m_cubeVertices
public static final double[][] m_cubeVertices
-
m_cubeElements
public static final int[][] m_cubeElements
-
m_tetrahedronVertices
public static final double[][] m_tetrahedronVertices
-
m_tetrahedronElements
public static final int[][] m_tetrahedronElements
-
m_octahedronVertices
public static final double[][] m_octahedronVertices
-
m_octahedronElements
public static final int[][] m_octahedronElements
-
m_dodecahedronVertices
public static final double[][] m_dodecahedronVertices
-
m_dodecahedronElements
public static final int[][] m_dodecahedronElements
-
m_icosahedronVertices
public static final double[][] m_icosahedronVertices
-
m_icosahedronElements
public static final int[][] m_icosahedronElements
-
m_truncOctahedronVertices
public static final double[][] m_truncOctahedronVertices
-
m_truncOctahedronElements
public static final int[][] m_truncOctahedronElements
-
m_soccerBallVertices
public static final double[][] m_soccerBallVertices
-
m_soccerBallElements
public static final int[][] m_soccerBallElements
-
m_snubCubeVertices
public static final double[][] m_snubCubeVertices
-
m_snubCubeElements
public static final int[][] m_snubCubeElements
-
m_snubDodecahedronVertices
public static final double[][] m_snubDodecahedronVertices
-
m_snubDodecahedronElements
public static final int[][] m_snubDodecahedronElements
-
m_cubeOctahedronVertices
public static final double[][] m_cubeOctahedronVertices
-
m_cubeOctahedronElements
public static final int[][] m_cubeOctahedronElements
-
m_icosiDodecahedronVertices
public static final double[][] m_icosiDodecahedronVertices
-
m_icosiDodecahedronElements
public static final int[][] m_icosiDodecahedronElements
-
m_rhombiCubeOctahedronVertices
public static final double[][] m_rhombiCubeOctahedronVertices
-
m_rhombiCubeOctahedronElements
public static final int[][] m_rhombiCubeOctahedronElements
-
m_rhombIcosiDodecahedronVertices
public static final double[][] m_rhombIcosiDodecahedronVertices
-
m_rhombIcosiDodecahedronElements
public static final int[][] m_rhombIcosiDodecahedronElements
-
m_rhombiTruncatedCubeVertices
public static final double[][] m_rhombiTruncatedCubeVertices
-
m_rhombiTruncatedCubeElements
public static final int[][] m_rhombiTruncatedCubeElements
-
m_truncatedCubeVertices
public static final double[][] m_truncatedCubeVertices
-
m_truncatedCubeElements
public static final int[][] m_truncatedCubeElements
-
m_rhombiTruncatedIcosahedronVertices
public static final double[][] m_rhombiTruncatedIcosahedronVertices
-
m_rhombiTruncatedIcosahedronElements
public static final int[][] m_rhombiTruncatedIcosahedronElements
-
m_truncatedDodecahedronVertices
public static final double[][] m_truncatedDodecahedronVertices
-
m_truncatedDodecahedronElements
public static final int[][] m_truncatedDodecahedronElements
-
m_rhombicDodecahedronVertices
public static final double[][] m_rhombicDodecahedronVertices
-
m_rhombicDodecahedronElements
public static final int[][] m_rhombicDodecahedronElements
-
m_rhombicTriacontahedronVertices
public static final double[][] m_rhombicTriacontahedronVertices
-
m_rhombicTriacontahedronElements
public static final int[][] m_rhombicTriacontahedronElements
-
m_truncatedTetrahedronVertices
public static final double[][] m_truncatedTetrahedronVertices
-
m_truncatedTetrahedronElements
public static final int[][] m_truncatedTetrahedronElements
-
m_pseudoRhombiCubeOctahedronVertices
public static final double[][] m_pseudoRhombiCubeOctahedronVertices
-
m_pseudoRhombiCubeOctahedronElements
public static final int[][] m_pseudoRhombiCubeOctahedronElements
-
TETRAHEDRON
public static final int TETRAHEDRON
- See Also:
- Constant Field Values
-
CUBE
public static final int CUBE
- See Also:
- Constant Field Values
-
OCTAHEDRON
public static final int OCTAHEDRON
- See Also:
- Constant Field Values
-
DODECAHEDRON
public static final int DODECAHEDRON
- See Also:
- Constant Field Values
-
ICOSAHEDRON
public static final int ICOSAHEDRON
- See Also:
- Constant Field Values
-
TRUNCATED_TETRAHEDRON
public static final int TRUNCATED_TETRAHEDRON
- See Also:
- Constant Field Values
-
TRUNCATED_CUBE
public static final int TRUNCATED_CUBE
- See Also:
- Constant Field Values
-
TRUNCATED_OCTAHEDRON
public static final int TRUNCATED_OCTAHEDRON
- See Also:
- Constant Field Values
-
TRUNCATED_DODECAHEDRON
public static final int TRUNCATED_DODECAHEDRON
- See Also:
- Constant Field Values
-
SOCCER_BALL
public static final int SOCCER_BALL
- See Also:
- Constant Field Values
-
CUBE_OCTAHEDRON
public static final int CUBE_OCTAHEDRON
- See Also:
- Constant Field Values
-
ICOSI_DODECAHEDRON
public static final int ICOSI_DODECAHEDRON
- See Also:
- Constant Field Values
-
SNUB_CUBE
public static final int SNUB_CUBE
- See Also:
- Constant Field Values
-
SNUB_DODECAHEDRON
public static final int SNUB_DODECAHEDRON
- See Also:
- Constant Field Values
-
RHOMBI_CUBE_OCTAHEDRON
public static final int RHOMBI_CUBE_OCTAHEDRON
- See Also:
- Constant Field Values
-
RHOMB_ICOSI_DODECAHEDRON
public static final int RHOMB_ICOSI_DODECAHEDRON
- See Also:
- Constant Field Values
-
RHOMBI_TRUNCATED_CUBE
public static final int RHOMBI_TRUNCATED_CUBE
- See Also:
- Constant Field Values
-
RHOMBI_TRUNCATED_ICOSAHEDRON
public static final int RHOMBI_TRUNCATED_ICOSAHEDRON
- See Also:
- Constant Field Values
-
RHOMBIC_DODECAHEDRON
public static final int RHOMBIC_DODECAHEDRON
- See Also:
- Constant Field Values
-
RHOMBIC_TRIACONTAHEDRON
public static final int RHOMBIC_TRIACONTAHEDRON
- See Also:
- Constant Field Values
-
PSEUDO_RHOMBI_CUBE_OCTAHEDRON
public static final int PSEUDO_RHOMBI_CUBE_OCTAHEDRON
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PwPlatonic
public PwPlatonic()
Constructor.
-
PwPlatonic
public PwPlatonic(PgElementSet geom)
Constructor. Geometry will be overwritten with the data of the currently selected Platonic solid when the method compute() is invoked.
-
-
Method Detail
-
init
public void init()
Initialization.- Overrides:
initin classPjWorkshop
-
reset
public void reset()
Reset workshop and geometry to original state.- Overrides:
resetin classPjWorkshop
-
setGeometry
public void setGeometry(PgElementSet geom)
Set geometry which will be filled with the currently selected solid.- See Also:
setSolidType(int),PjWorkshop.removeGeometry()
-
getSolidName
public java.lang.String getSolidName()
Get the name of the currently selected solid.- See Also:
getSolidType(),setSolidType(int)
-
setSolidName
public boolean setSolidName(java.lang.String name)
Select a solid by specifying its name. The set of names is available in PwPlatonic.TODO: This method is a shortcut. If the integer representation of the solid is available, then preferably the method
setSolidType(int)should be used.- Parameters:
name- any value contained in m_solidName.- See Also:
setSolidType(int)
-
getSolidType
public int getSolidType()
Get the name of the currently selected solid.- Returns:
- a value like
PwPlatonic.CUBE. - See Also:
getSolidType(),setSolidType(int)
-
setSolidType
public boolean setSolidType(int type)
Select a solid by specifying its type. The set of types is available in PwPlatonic.- Parameters:
type- any value likePwPlatonic.CUBE.- See Also:
getSolidType()
-
compute
public boolean compute()
Update the registered geometry based on the currently selected solid type.- See Also:
setGeometry(PgElementSet),setSolidType(int)
-
setSolid
public void setSolid(PgElementSet geom, java.lang.String name)
Deprecated. use commands getSolid() or setGeometry(PgElementSet);setSolidType(int);Choose a solid by type and fill an elementSet with the data of the solid.- Parameters:
name- any value like in m_solidName.
-
setSolid
public static PgElementSet setSolid(PgElementSet geom, int type)
Deprecated. use commands getSolid() or setGeometry(PgElementSet);setSolidType(int);Choose a solid by type and fill an element set with the data of the solid.- Parameters:
geom- a non-null element set which is filled with data of solid.type- any value likePwPlatonic.CUBE.- Version:
- 20.05.02, 2.00 revised (kp) Method made static again since used as static method in Overview.nb.
-
getSolid
public static PgElementSet getSolid(int type)
Convenient method to construct a solid of given type. A new element set is constructed and filled with the solid data.- Parameters:
type- any value likePwPlatonic.CUBE.- Returns:
- an element set which is the solid of given type, null if error.
- See Also:
getSolid(PgElementSet, int)
-
getSolid
public static PgElementSet getSolid(PgElementSet geom, int type)
Assign the data of the selected solid type to the geometry. The geometry is filled with the solid data.- Parameters:
geom- a non-null element set which is filled with data of solid.type- any value likePwPlatonic.CUBE.- Returns:
- an element set which is the solid of given type, null if error.
- See Also:
getSolid(int)
-
-
"