objects
Class HalfSpace

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

public class HalfSpace
extends Object


Field Summary
 
Fields inherited from class objects.Object
trans
 
Constructor Summary
HalfSpace(double a_, double b_, double c_, double d_)
          constructor
HalfSpace(double a_, double b_, double c_, double d_, double ut, double vt)
          constructor
HalfSpace(double a_, double b_, double c_, double d_, double ut, double vt, Vector2D bias)
          constructor
 
Method Summary
 IntersectionInfo calcIntersection(Ray ray)
          calculates the intersection with an ray
 void calculateTextureCoordinates(IntersectionInfo ri)
          calculates the coordinates at ri.nextPosition
 double getArea()
           
 IObject getCopy()
           
 boolean isInside(Point3D p)
           
 Vector3D normal(Point3D p)
          calculate normal via gradient
 double q(Point3D p)
          calculate the value of the quadric at point p
 void transform(TransformationMatrix4x4 m)
          transforms the object with the matrix m
 
Methods inherited from class objects.Object
assignMap, assignMaterial, getMap, getMaterial, getTransformationMatrix, move, rotate, rotateAroundX, rotateAroundY, rotateAroundZ, scale, scale, setTransformationMatrix, UniformRandomPoint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HalfSpace

public HalfSpace(double a_,
                 double b_,
                 double c_,
                 double d_)
constructor

Parameters:
a_ -
b_ -
c_ -
d_ -

HalfSpace

public HalfSpace(double a_,
                 double b_,
                 double c_,
                 double d_,
                 double ut,
                 double vt)
constructor

Parameters:
a_ -
b_ -
c_ -
d_ -
ut - the tiling for texturing in u-direction
vt - the tiling for texturing in v-direction

HalfSpace

public HalfSpace(double a_,
                 double b_,
                 double c_,
                 double d_,
                 double ut,
                 double vt,
                 Vector2D bias)
constructor

Parameters:
a_ -
b_ -
c_ -
d_ -
ut - the tiling for texturing in u-direction
vt - the tiling for texturing in v-direction
bias - the bias of the tiling
Method Detail

calcIntersection

public IntersectionInfo calcIntersection(Ray ray)
Description copied from interface: IObject
calculates the intersection with an ray

Returns:
the intersection info

q

public double q(Point3D p)
Description copied from interface: IObject
calculate the value of the quadric at point p

Parameters:
p - point
Returns:
the value at point p, q(p)<=0 -> inside

isInside

public boolean isInside(Point3D p)
Returns:
is the point inside the object

normal

public Vector3D normal(Point3D p)
Description copied from interface: IObject
calculate normal via gradient

Parameters:
p - the point
Returns:
normal at p

transform

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

Parameters:
m - the transformation matrix

calculateTextureCoordinates

public void calculateTextureCoordinates(IntersectionInfo ri)
Description copied from interface: IObject
calculates the coordinates at ri.nextPosition

Parameters:
ri - intersection information

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()
Returns:
the area of the object