Class Mesh3D
java.lang.Object
org.jlab.geom.prim.Mesh3D
- All Implemented Interfaces:
Transformable, Showable
- Author:
- gavalian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Mesh3Dbox(float dx, float dy, float dz) getCenterX(int order) getCenterY(int order) getCenterZ(int order) voidgetFace(int face, Triangle3D tri) getLineX()getLineY()getLineZ()javafx.scene.shape.MeshViewintintvoidbooleanhasIntersection(Line3D line) Returns true if the infinite line intersects this shape.booleanhasIntersectionRay(Line3D line) Returns true if the ray intersects this shape.booleanhasIntersectionSegment(Line3D line) Returns true if the line segment intersects this shape.voidintersectionPath(Path3D path, List<Point3D> intersections) intintersectionRay(Line3D line, List<Point3D> intersections) Finds intersections of the given ray with this shape.intintersectionSegment(Line3D line, List<Point3D> intersections) Finds intersections of the given line segment with this shape.static voidMain program for testsvoidrotateX(double angle) Rotates this object clockwise around the x axis.voidrotateY(double angle) Rotates this object clockwise around the y axis.voidrotateZ(double angle) Rotates this object clockwise around the z axis.final voidset(float[] points, int[] faces) voidshow()voidtranslateXYZ(double dx, double dy, double dz) Translates this object linearly by the amounts specified.
-
Constructor Details
-
Mesh3D
public Mesh3D(float[] points, int[] faces)
-
-
Method Details
-
set
public final void set(float[] points, int[] faces) -
translateXYZ
public void translateXYZ(double dx, double dy, double dz) Description copied from interface:TransformableTranslates this object linearly by the amounts specified.- Specified by:
translateXYZin interfaceTransformable- Parameters:
dx- amount to translate along the x axisdy- amount to translate along the y axisdz- amount to translate along the z axis
-
rotateX
public void rotateX(double angle) Description copied from interface:TransformableRotates this object clockwise around the x axis.- Specified by:
rotateXin interfaceTransformable- Parameters:
angle- rotation angle in radians
-
rotateY
public void rotateY(double angle) Description copied from interface:TransformableRotates this object clockwise around the y axis.- Specified by:
rotateYin interfaceTransformable- Parameters:
angle- rotation angle in radians
-
rotateZ
public void rotateZ(double angle) Description copied from interface:TransformableRotates this object clockwise around the z axis.- Specified by:
rotateZin interfaceTransformable- Parameters:
angle- rotation angle in radians
-
show
-
getNumPoints
public int getNumPoints() -
getPoint
-
getNumFaces
public int getNumFaces() -
getFace
-
intersectionPath
-
intersectionRay
Finds intersections of the given ray with this shape. Intersection points will be appended to the given list.- Parameters:
line- the rayintersections- the list of intersections- Returns:
- the number of intersections that were found
-
intersectionSegment
Finds intersections of the given line segment with this shape. Intersection points will be appended to the given list.- Parameters:
line- the line segmentintersections- the list of intersections- Returns:
- the number of intersections that were found
-
hasIntersection
Returns true if the infinite line intersects this shape.- Parameters:
line- the infinite line- Returns:
- true if the line intersects the shape
-
hasIntersectionRay
Returns true if the ray intersects this shape.- Parameters:
line- the ray- Returns:
- true if the line intersects the shape
-
hasIntersectionSegment
Returns true if the line segment intersects this shape.- Parameters:
line- the line segment- Returns:
- true if the line intersects the shape
-
getCenterX
-
getCenterY
-
getCenterZ
-
getLineX
-
getLineY
-
getLineZ
-
box
-
getMeshView
public javafx.scene.shape.MeshView getMeshView() -
main
-