Class com.oroinc.yaray.Disc
All Packages Class Hierarchy This Package Previous Next Index
Class com.oroinc.yaray.Disc
java.lang.Object
|
+----com.oroinc.yaray.WorldObject
|
+----com.oroinc.yaray.Disc
- public class Disc
- extends WorldObject
A Disc WorldObject.
Copyright © 1996, 1997 Original Reusable Objects, Inc.
All rights reserved.
- Author:
- Daniel F. Savarese
-
Disc(GeometricVector, Point, float, Pigment, Finish)
- Creates a Disc object with the given characteristics.
-
getColor(World, Ray, Color)
- Given a world description and the ray that intersects the disc, returns
the color of the disc at the point of intersection.
-
intersect(IntersectionRay)
- Determines if ray intersects disc.
Disc
public Disc(GeometricVector normal,
Point center,
float radius,
Pigment pigment,
Finish finish)
- Creates a Disc object with the given characteristics.
- Parameters:
- normal - The normal of the disc surface.
- center - The center of the disc.
- radius - The radius of the disc.
- pigment - The pigment of the disc.
- finish - The finish of the disc.
intersect
public boolean intersect(IntersectionRay ray)
- Determines if ray intersects disc. If it does, checks that
point of intersection is closer to origin of ray than any previous
point of intersection. If it is closer, returns true, if not,
returns false.
- Parameters:
- ray - Ray to be tested for intersection.
- Returns:
- true If ray intersects disc and is closer to origin than any
previous point of intersection, false otherwise.
- Overrides:
- intersect in class WorldObject
getColor
public void getColor(World world,
Ray intersection,
Color colorResult)
- Given a world description and the ray that intersects the disc, returns
the color of the disc at the point of intersection.
- Parameters:
- world - The world containing the disc.
- intersection - The current ray being traced.
- colorResult - The color at the point of intersection if any.
- Overrides:
- getColor in class WorldObject
All Packages Class Hierarchy This Package Previous Next Index