objects
Class UnitSphere

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

public class UnitSphere
extends Quadric

a sphere with radius 1


Field Summary
 
Fields inherited from class objects.Object
trans
 
Constructor Summary
UnitSphere()
          constructor
 
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.Quadric
calcIntersection, calculateTextureCoordinates, isInside, normal, q
 
Methods inherited from class objects.Object
assignMap, assignMaterial, 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

UnitSphere

public UnitSphere()
constructor

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