objects
Class Box

java.lang.Object
  extended by objects.Object
      extended by objects.Intersection
          extended by objects.Box
All Implemented Interfaces:
IObject

public class Box
extends Intersection

a box as an intersection of 6 halfspaces


Field Summary
 
Fields inherited from class objects.Object
trans
 
Constructor Summary
Box(double width, double height, double depth)
          a box, as intersection of 6 halfspaces with dimension
Box(double width, double height, double depth, double ut, double vt, double wt)
          a box, as intersection of 6 halfspaces with dimension
 
Method Summary
 double getArea()
           
 IObject getCopy()
           
 void transform(TransformationMatrix4x4 trans)
          transforms the object with the matrix m
 void UniformRandomPoint(Point3D point, Vector3D normal, Point3D prand)
          creates a random point on the surface of the object
 
Methods inherited from class objects.Intersection
addObject, assignMap, assignMaterial, calcIntersection, calculateTextureCoordinates, isInside, normal, q
 
Methods inherited from class objects.Object
getMap, getMaterial, getTransformationMatrix, move, rotate, rotateAroundX, rotateAroundY, rotateAroundZ, scale, scale, setTransformationMatrix
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Box

public Box(double width,
           double height,
           double depth)
a box, as intersection of 6 halfspaces with dimension

Parameters:
width -
height -
depth -

Box

public Box(double width,
           double height,
           double depth,
           double ut,
           double vt,
           double wt)
a box, as intersection of 6 halfspaces with dimension

Parameters:
width -
height -
depth -
Method Detail

transform

public void transform(TransformationMatrix4x4 trans)
Description copied from interface: IObject
transforms the object with the matrix m

Specified by:
transform in interface IObject
Overrides:
transform in class Intersection
Parameters:
trans - the transformation matrix

UniformRandomPoint

public void UniformRandomPoint(Point3D point,
                               Vector3D normal,
                               Point3D prand)
Description copied from interface: IObject
creates a random point on the surface of the object

Specified by:
UniformRandomPoint in interface IObject
Overrides:
UniformRandomPoint in class Object
Parameters:
point - [out] point on the surface
normal - [out] normal at the point on the surface
prand - [in] prand variables used in point generation

getArea

public double getArea()
Specified by:
getArea in interface IObject
Overrides:
getArea in class Object
Returns:
the area of the object

getCopy

public IObject getCopy()
Specified by:
getCopy in interface IObject
Overrides:
getCopy in class Intersection
Returns:
the area of the object