Package geometries
Class Geometry
java.lang.Object
geometries.Geometry
- All Implemented Interfaces:
Intersectible
public abstract class Geometry extends java.lang.Object implements Intersectible
Represents a three dimensional shape
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected Intersectionintersection(Point point)Create an intersection object with this geometry and the givenPoint.abstract NormalizedVectornormal(Point point)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface geometries.Intersectible
boundary, intersect
-
Field Details
-
material
The material of this geometry.
-
-
Constructor Details
-
Geometry
Construct a new Geometry with the given material.- Parameters:
material- TheMaterialthe geometry is made from.
-
-
Method Details
-
normal
Calculates the normal to theGeometryat the givenPoint. If the givenPointis not on the surface of theGeometrythe resulting behaviour is undefined.- Parameters:
point- ThePointat which to calculate the normal.- Returns:
- A
NormalizedVectorperpendicular to the surface of the shape at the givenPoint.
-
intersection
Create an intersection object with this geometry and the givenPoint.- Parameters:
point- The point at which the intersection occurs.- Returns:
- An
Intersectionwith this geometry at the given point.
-