Package org.jlab.geom.prim
Interface Face3D
- All Superinterfaces:
Showable,Transformable
- All Known Implementing Classes:
Cylindrical3D,Sector3D,Trap3D,Triangle3D
A 3D triangle represented by three points.
Since any three points in 3D space that are not collinear define a plane, a face can be converted into a plane via {link #plane()}.
The normal of the surface of a face is oriented such that when looking antiparallel to the normal towards the face the face's points wound counterclockwise. Conversely, when looking in a direction parallel to the normal, the points are wound in a clockwise fashion.
The intersection of a line with a face can be calculated using the
intersection methods:
intersection(...),
intersectionRay(...),
intersectionSegment(...).
- Author:
- gavalian
-
Method Summary
Modifier and TypeMethodDescriptionintintersection(Line3D line, List<Point3D> intersections) Finds the intersections of the given infinite line with thisFace3D.intintersectionRay(Line3D line, List<Point3D> intersections) Finds the intersections of the given ray with thisFace3D.intintersectionSegment(Line3D line, List<Point3D> intersections) Finds the intersections of the given line segment with thisFace3D.point(int index) Returns the point from thisFace3Dwith corresponding index.Methods inherited from interface org.jlab.geom.prim.Transformable
rotateX, rotateY, rotateZ, translateXYZ
-
Method Details
-
point
Returns the point from thisFace3Dwith corresponding index. If an invalid index is given, then null is returned.- Parameters:
index- index of the point- Returns:
- the point at the corresponding index, otherwise null
-
intersection
Finds the intersections of the given infinite line with thisFace3D. If intersections are found they will be appended to the given list. The return value will indicate the number of intersections that were found.- Parameters:
line- the infinite lineintersections- the list to store the intersections in- Returns:
- the number of intersections found
-
intersectionRay
Finds the intersections of the given ray with thisFace3D. If intersections are found they will be appended to the given list. The return value will indicate the number of intersections that were found.- Parameters:
line- the rayintersections- the list to store the intersections in- Returns:
- the number of intersections found
-
intersectionSegment
Finds the intersections of the given line segment with thisFace3D. If intersections are found they will be appended to the given list. The return value will indicate the number of intersections that were found.- Parameters:
line- the line segmentintersections- the list to store the intersections in- Returns:
- the number of intersections found
-