gumbo.graphic.math
Class Polygon3.Immutable

java.lang.Object
  |
  +--gumbo.graphic.math.Plane3
        |
        +--gumbo.graphic.math.Polygon3
              |
              +--gumbo.graphic.math.Polygon3.Immutable
All Implemented Interfaces:
Graphic, GraphicGeometry, java.io.Serializable, TransformableGraphic
Enclosing class:
Polygon3

public static class Polygon3.Immutable
extends Polygon3

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class gumbo.graphic.math.Polygon3
Polygon3.Immutable
 
Constructor Summary
Polygon3.Immutable(Polygon3 target)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 double getDistance()
          Gets the distance from the origin to this plane.
 java.lang.Object getGraphic()
          Default implementation: Returns this (non-native implementation).
 SpaceNode getGraphicLocalSpace()
          Default implementation: Returns null (absolute reference space).
 UnitVector3 getNormal()
          Gets an immutable view of the normal vector for this plane.
 Plane3 getPlane3()
          Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object.
 Polygon3 getPolygon3()
          Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object.
 int hashCode()
           
 Plane3 setDistance(double dist)
          Sets the distance from the origin to this plane along its normal vector.
 Plane3 setNormal(UnitVector3 vector)
          Sets the normal vector for this plane.
 java.lang.String toString()
           
 void transformGraphic(Matrix4 matrix)
          Default implementation: Uses setPosition() and setDirection() for subclass compatibility.
 void transformGraphic(SpaceNode from, SpaceNode to)
          Default implementation: Uses setPosition() and setDirection() for subclass compatibility.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Polygon3.Immutable

public Polygon3.Immutable(Polygon3 target)
Method Detail

getPolygon3

public Polygon3 getPolygon3()
Description copied from class: Polygon3
Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object.

Overrides:
getPolygon3 in class Polygon3
Returns:
The view. Never null.

setDistance

public Plane3 setDistance(double dist)
Description copied from class: Plane3
Sets the distance from the origin to this plane along its normal vector. Master partial state mutator.

Overrides:
setDistance in class Plane3

setNormal

public Plane3 setNormal(UnitVector3 vector)
Description copied from class: Plane3
Sets the normal vector for this plane. Master partial state mutator.

Overrides:
setNormal in class Plane3

getDistance

public double getDistance()
Description copied from class: Plane3
Gets the distance from the origin to this plane. Master partial state accessor.

Overrides:
getDistance in class Plane3

getNormal

public UnitVector3 getNormal()
Description copied from class: Plane3
Gets an immutable view of the normal vector for this plane. Master partial state accessor.

Overrides:
getNormal in class Plane3

getPlane3

public Plane3 getPlane3()
Description copied from class: Plane3
Gets a singleton immutable view of this object with the same identity (hashCode(), equals()) as this object.

Overrides:
getPlane3 in class Plane3
Returns:
The view. Never null.

transformGraphic

public void transformGraphic(SpaceNode from,
                             SpaceNode to)
Description copied from class: Plane3
Default implementation: Uses setPosition() and setDirection() for subclass compatibility.

Specified by:
transformGraphic in interface TransformableGraphic
Overrides:
transformGraphic in class Plane3
Parameters:
from - The current reference space. Never null.
to - The new reference space. Never null.

transformGraphic

public void transformGraphic(Matrix4 matrix)
Description copied from class: Plane3
Default implementation: Uses setPosition() and setDirection() for subclass compatibility.

Specified by:
transformGraphic in interface TransformableGraphic
Overrides:
transformGraphic in class Plane3
Parameters:
matrix - Value of the transform matrix. Never null.

getGraphicLocalSpace

public SpaceNode getGraphicLocalSpace()
Description copied from class: Plane3
Default implementation: Returns null (absolute reference space).

Specified by:
getGraphicLocalSpace in interface GraphicGeometry
Overrides:
getGraphicLocalSpace in class Plane3
Returns:
Reference to the space. If null, absolute space.

getGraphic

public java.lang.Object getGraphic()
Description copied from class: Plane3
Default implementation: Returns this (non-native implementation).

Specified by:
getGraphic in interface Graphic
Overrides:
getGraphic in class Plane3
Returns:
The target graphic object. Possibly this object (self-proxy, direct implementation), but never null.

toString

public java.lang.String toString()
Overrides:
toString in class Plane3

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Polygon3

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object