ucl.physiol.neuroconstruct.project
Class RectangularBox

java.lang.Object
  extended by ucl.physiol.neuroconstruct.project.Region
      extended by ucl.physiol.neuroconstruct.project.RectangularBox
All Implemented Interfaces:
Serializable

public class RectangularBox
extends Region

Extension of Regions in 3D

Author:
Padraig Gleeson
See Also:
Serialized Form

Field Summary
static String DEPTH_PARAM
           
static String HEIGHT_PARAM
           
static String WIDTH_PARAM
           
static String X_PARAM
           
static String Y_PARAM
           
static String Z_PARAM
           
 
Constructor Summary
RectangularBox()
           
RectangularBox(float x, float y, float z, float width, float height, float depth)
           
 
Method Summary
 void addLinesAroundRegion(TransformGroup tg)
           
 com.sun.j3d.utils.geometry.Primitive addPrimitiveForRegion(TransformGroup tg, Appearance app)
          Generate a shape of the region in 3D and add it to the TransformGroup
 Object clone()
          Needs to be used when generating a copy.
 boolean equals(Object otherObj)
           
static SphericalRegion getEnclosingSphere(RectangularBox box)
           
 float getHighestXValue()
           
 float getHighestYValue()
           
 float getHighestZValue()
           
 float getLowestXValue()
          These functions need to be implemented in the subclass for packing purposes and for getting the general location of the region in a generic way
 float getLowestYValue()
           
 float getLowestZValue()
           
 Region getTranslatedRegion(Vector3f trans)
          Gets a new Region of the same type, with coords translated by the specified Vector
 ArrayList<Point3f> getVertices()
           
 double getVolume()
           
 float getXExtent()
           
 float getYExtent()
           
 float getZExtent()
           
 boolean isCellWithinRegion(Point3f point, Cell cell, boolean completelyInside)
          The function to check if the cell mentioned is within the region
 boolean isPointInRegion(Point3f point)
           
static void main(String[] args)
           
 String toString()
          Returns a short summary of the class's state, for GUIs etc.
 
Methods inherited from class ucl.physiol.neuroconstruct.project.Region
getDescription, getParameterList, parametersEqual, setDescription, setParameter, setParameterList
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

X_PARAM

public static final String X_PARAM
See Also:
Constant Field Values

Y_PARAM

public static final String Y_PARAM
See Also:
Constant Field Values

Z_PARAM

public static final String Z_PARAM
See Also:
Constant Field Values

WIDTH_PARAM

public static final String WIDTH_PARAM
See Also:
Constant Field Values

HEIGHT_PARAM

public static final String HEIGHT_PARAM
See Also:
Constant Field Values

DEPTH_PARAM

public static final String DEPTH_PARAM
See Also:
Constant Field Values
Constructor Detail

RectangularBox

public RectangularBox()

RectangularBox

public RectangularBox(float x,
                      float y,
                      float z,
                      float width,
                      float height,
                      float depth)
Method Detail

equals

public boolean equals(Object otherObj)
Specified by:
equals in class Region

getVolume

public double getVolume()
Specified by:
getVolume in class Region

getTranslatedRegion

public Region getTranslatedRegion(Vector3f trans)
Description copied from class: Region
Gets a new Region of the same type, with coords translated by the specified Vector

Specified by:
getTranslatedRegion in class Region

getEnclosingSphere

public static SphericalRegion getEnclosingSphere(RectangularBox box)

clone

public Object clone()
Description copied from class: Region
Needs to be used when generating a copy. Ideally just using the default constructor and copying the internal params but that can't be done here since the class is abstract

Specified by:
clone in class Region

isCellWithinRegion

public boolean isCellWithinRegion(Point3f point,
                                  Cell cell,
                                  boolean completelyInside)
Description copied from class: Region
The function to check if the cell mentioned is within the region

Specified by:
isCellWithinRegion in class Region
Parameters:
point - The point at which the cell is translated to.
cell - The cell to be placed in the region
completelyInside - If true, all soma segments of the cell must be inside region if false, only the start point of the soma must be inside (centre for spherical somas)
Returns:
true if the cell can be placed inside the region

isPointInRegion

public boolean isPointInRegion(Point3f point)
Specified by:
isPointInRegion in class Region

addPrimitiveForRegion

public com.sun.j3d.utils.geometry.Primitive addPrimitiveForRegion(TransformGroup tg,
                                                                  Appearance app)
Description copied from class: Region
Generate a shape of the region in 3D and add it to the TransformGroup

Specified by:
addPrimitiveForRegion in class Region

addLinesAroundRegion

public void addLinesAroundRegion(TransformGroup tg)

getVertices

public ArrayList<Point3f> getVertices()

getLowestXValue

public float getLowestXValue()
Description copied from class: Region
These functions need to be implemented in the subclass for packing purposes and for getting the general location of the region in a generic way

Specified by:
getLowestXValue in class Region

getLowestYValue

public float getLowestYValue()
Specified by:
getLowestYValue in class Region

getLowestZValue

public float getLowestZValue()
Specified by:
getLowestZValue in class Region

getXExtent

public float getXExtent()

getYExtent

public float getYExtent()

getZExtent

public float getZExtent()

getHighestXValue

public float getHighestXValue()
Specified by:
getHighestXValue in class Region

getHighestYValue

public float getHighestYValue()
Specified by:
getHighestYValue in class Region

getHighestZValue

public float getHighestZValue()
Specified by:
getHighestZValue in class Region

toString

public String toString()
Description copied from class: Region
Returns a short summary of the class's state, for GUIs etc. Included here (even though it's in Object) to force the subclasses to implement it

Specified by:
toString in class Region
Returns:
A string rep of internal state

main

public static void main(String[] args)