raja.shape
Class Cone

java.lang.Object
  |
  +--raja.shape.BasicForm
        |
        +--raja.shape.Cone
All Implemented Interfaces:
Form, Serializable, Shape3D, Writable

public class Cone
extends BasicForm
implements Serializable, Writable

See Also:
Serialized Form

Field Summary
protected  double angle
           
protected  Vector3D direction
           
protected  double k
           
protected  Point3D origin
           
 
Constructor Summary
Cone(Point3D origin, Vector3D direction, double angle)
           
 
Method Summary
static Object build(ObjectReader reader)
           
 Point3D computeIntersection(Ray r)
           
 Vector3D computeNormal(Point3D p)
           
 boolean exactlyContains(Point3D p)
           
 boolean exactlyStrictlyContains(Point3D p)
           
 String toString()
           
 void write(ObjectWriter writer)
           
 
Methods inherited from class raja.shape.BasicForm
contains, hasLG, intersection, intersects, solve2ndOrder, strictlyContains
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

origin

protected Point3D origin

direction

protected Vector3D direction

angle

protected double angle

k

protected double k
Constructor Detail

Cone

public Cone(Point3D origin,
            Vector3D direction,
            double angle)
Method Detail

build

public static Object build(ObjectReader reader)
                    throws IOException

computeIntersection

public Point3D computeIntersection(Ray r)
Overrides:
computeIntersection in class BasicForm

exactlyContains

public boolean exactlyContains(Point3D p)
Overrides:
exactlyContains in class BasicForm

exactlyStrictlyContains

public boolean exactlyStrictlyContains(Point3D p)
Overrides:
exactlyStrictlyContains in class BasicForm

computeNormal

public Vector3D computeNormal(Point3D p)
Overrides:
computeNormal in class BasicForm

toString

public String toString()
Overrides:
toString in class Object

write

public void write(ObjectWriter writer)
           throws IOException
Specified by:
write in interface Writable