JavaView© v3.95.000

jvx.geom
Class PwPlatonic

java.lang.Object
  extended byjv.object.PsObject
      extended byjvx.project.PjWorkshop
          extended byjvx.geom.PwPlatonic
All Implemented Interfaces:
java.lang.Cloneable, PjWorkshopIf, PsUpdateIf, java.io.Serializable

public class PwPlatonic
extends PjWorkshop

Data of Platonic solids and other regular solids.

See Also:
Serialized Form

Field Summary
static int CUBE
           
static int CUBE_OCTAHEDRON
           
static int DODECAHEDRON
           
static int ICOSAHEDRON
           
static int ICOSI_DODECAHEDRON
           
static int[][] m_cubeElements
           
static int[][] m_cubeOctahedronElements
           
static double[][] m_cubeOctahedronVertices
           
static double[][] m_cubeVertices
           
static int[][] m_dodecahedronElements
           
static double[][] m_dodecahedronVertices
           
static int[][] m_icosahedronElements
           
static double[][] m_icosahedronVertices
           
static int[][] m_icosiDodecahedronElements
           
static double[][] m_icosiDodecahedronVertices
           
static int[][] m_octahedronElements
           
static double[][] m_octahedronVertices
           
static int[][] m_rhombicDodecahedronElements
           
static double[][] m_rhombicDodecahedronVertices
           
static int[][] m_rhombIcosiDodecahedronElements
           
static double[][] m_rhombIcosiDodecahedronVertices
           
static int[][] m_rhombicTriacontahedronElements
           
static double[][] m_rhombicTriacontahedronVertices
           
static int[][] m_rhombiCubeOctahedronElements
           
static double[][] m_rhombiCubeOctahedronVertices
           
static int[][] m_rhombiTruncatedCubeElements
           
static double[][] m_rhombiTruncatedCubeVertices
           
static int[][] m_rhombiTruncatedIcosahedronElements
           
static double[][] m_rhombiTruncatedIcosahedronVertices
           
static int[][] m_snubCubeElements
           
static double[][] m_snubCubeVertices
           
static int[][] m_snubDodecahedronElements
           
static double[][] m_snubDodecahedronVertices
           
static int[][] m_soccerBallElements
           
static double[][] m_soccerBallVertices
           
static int[][] m_tetrahedronElements
           
static double[][] m_tetrahedronVertices
           
static int[][] m_truncatedCubeElements
           
static double[][] m_truncatedCubeVertices
           
static int[][] m_truncatedDodecahedronElements
           
static double[][] m_truncatedDodecahedronVertices
           
static int[][] m_truncatedTetrahedronElements
           
static double[][] m_truncatedTetrahedronVertices
           
static int[][] m_truncOctahedronElements
           
static double[][] m_truncOctahedronVertices
           
static int OCTAHEDRON
           
static int RHOMB_ICOSI_DODECAHEDRON
           
static int RHOMBI_CUBE_OCTAHEDRON
           
static int RHOMBI_TRUNCATED_CUBE
           
static int RHOMBI_TRUNCATED_ICOSAHEDRON
           
static int RHOMBIC_DODECAHEDRON
           
static int RHOMBIC_TRIACONTAHEDRON
           
static int SNUB_CUBE
           
static int SNUB_DODECAHEDRON
           
static int SOCCER_BALL
           
static int TETRAHEDRON
           
static int TRUNCATED_CUBE
           
static int TRUNCATED_DODECAHEDRON
           
static int TRUNCATED_OCTAHEDRON
           
static int TRUNCATED_TETRAHEDRON
           
 
Fields inherited from class jv.object.PsObject
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
 
Constructor Summary
PwPlatonic()
          Constructor.
PwPlatonic(PgElementSet geom)
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class jvx.project.PjWorkshop
cancel, close, getDisplay, getDisplays, getGeometry, getSavedGeometry, getViewer, isModal, ok, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, 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

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
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:
init in class PjWorkshop

reset

public void reset()
Reset workshop and geometry to original state.

Overrides:
reset in class PjWorkshop

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 preferrably 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 like PwPlatonic.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 like PwPlatonic.CUBE.

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 like PwPlatonic.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 like PwPlatonic.CUBE.
Returns:
an element set which is the solid of given type, null if error.
See Also:
getSolid(int)

JavaView© v3.95.000

The software JavaView© is copyright protected. All Rights Reserved.