Class SphericalLayout
- java.lang.Object
-
- repast.simphony.visualization.visualization3D.layout.SphericalLayout
-
- All Implemented Interfaces:
Layout
public class SphericalLayout extends Object implements Layout
z between -R and R, phi between 0 and 2 pi, each with a uniform distribution To find the latitude (theta) of this point, note that z=Rsin(theta), so theta=sin-1(z/R); its longitude is (surprise!) phi. In rectilinear coordinates, x=Rcos(theta)cos(phi), y=Rcos(theta)sin(phi), z=Rsin(theta)= (surprise!) z.- Version:
- $Revision: 1.1 $ $Date: 2006/01/06 22:35:19 $
- Author:
- Nick Collier
-
-
Constructor Summary
Constructors Constructor Description SphericalLayout()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Box
getBoundingBox()
Gets a bounding box that describes the extent of this layout in location coordinates.VisualizationProperties
getLayoutProperties()
Gets the layout properties for this layout.float[]
getLocation(Object o)
Gets the location of the specified object as determined by this layout.String
getName()
Gets the name of the layoutvoid
setLayoutProperties(VisualizationProperties props)
Sets the layout properties for this layout.void
setProjection(Projection projection)
Sets the projection associated with this Layout.void
update()
Updates this layout.
-
-
-
Method Detail
-
getLocation
public float[] getLocation(Object o)
Description copied from interface:Layout
Gets the location of the specified object as determined by this layout.- Specified by:
getLocation
in interfaceLayout
- Parameters:
o
- the object whose location we want.- Returns:
- the location of the object.
-
setProjection
public void setProjection(Projection projection)
Description copied from interface:Layout
Sets the projection associated with this Layout.- Specified by:
setProjection
in interfaceLayout
- Parameters:
projection
- the associated projection.
-
setLayoutProperties
public void setLayoutProperties(VisualizationProperties props)
Sets the layout properties for this layout.- Specified by:
setLayoutProperties
in interfaceLayout
- Parameters:
props
- the layout properties
-
getLayoutProperties
public VisualizationProperties getLayoutProperties()
Gets the layout properties for this layout.- Specified by:
getLayoutProperties
in interfaceLayout
- Returns:
- the layout properties for this layout.
-
update
public void update()
Description copied from interface:Layout
Updates this layout.
-
getName
public String getName()
Description copied from interface:Layout
Gets the name of the layout
-
getBoundingBox
public Box getBoundingBox()
Description copied from interface:Layout
Gets a bounding box that describes the extent of this layout in location coordinates.- Specified by:
getBoundingBox
in interfaceLayout
- Returns:
- a bounding box that describes the extent of this layout in location coordinates, or a 0 size box if the extent is unknown.
-
-