objects
Class Box
java.lang.Object
objects.Object
objects.Intersection
objects.Box
- All Implemented Interfaces:
- IObject
public class Box
- extends Intersection
a box as an intersection of 6 halfspaces
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 |
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 |
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
-
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 surfacenormal
- [out] normal at the point on the surfaceprand
- [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