Package org.jlab.geom.prim
Class Mesh3D
java.lang.Object
org.jlab.geom.prim.Mesh3D
- All Implemented Interfaces:
- Transformable,- Showable
- Author:
- gavalian
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
Mesh3Dpublic Mesh3D(float[] points, int[] faces) 
 
- 
- 
Method Details- 
setpublic final void set(float[] points, int[] faces) 
- 
translateXYZpublic void translateXYZ(double dx, double dy, double dz) Description copied from interface:TransformableTranslates this object linearly by the amounts specified.- Specified by:
- translateXYZin interface- Transformable
- Parameters:
- dx- amount to translate along the x axis
- dy- amount to translate along the y axis
- dz- amount to translate along the z axis
 
- 
rotateXpublic void rotateX(double angle) Description copied from interface:TransformableRotates this object clockwise around the x axis.- Specified by:
- rotateXin interface- Transformable
- Parameters:
- angle- rotation angle in radians
 
- 
rotateYpublic void rotateY(double angle) Description copied from interface:TransformableRotates this object clockwise around the y axis.- Specified by:
- rotateYin interface- Transformable
- Parameters:
- angle- rotation angle in radians
 
- 
rotateZpublic void rotateZ(double angle) Description copied from interface:TransformableRotates this object clockwise around the z axis.- Specified by:
- rotateZin interface- Transformable
- Parameters:
- angle- rotation angle in radians
 
- 
showpublic void show()
- 
getNumPointspublic int getNumPoints()
- 
getPoint
- 
getNumFacespublic int getNumFaces()
- 
getFace
- 
intersectionPath
- 
intersectionRayFinds intersections of the given ray with this shape. Intersection points will be appended to the given list.- Parameters:
- line- the ray
- intersections- the list of intersections
- Returns:
- the number of intersections that were found
 
- 
intersectionSegmentFinds intersections of the given line segment with this shape. Intersection points will be appended to the given list.- Parameters:
- line- the line segment
- intersections- the list of intersections
- Returns:
- the number of intersections that were found
 
- 
hasIntersectionReturns true if the infinite line intersects this shape.- Parameters:
- line- the infinite line
- Returns:
- true if the line intersects the shape
 
- 
hasIntersectionRayReturns true if the ray intersects this shape.- Parameters:
- line- the ray
- Returns:
- true if the line intersects the shape
 
- 
hasIntersectionSegmentReturns 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
- 
getMeshViewpublic javafx.scene.shape.MeshView getMeshView()
- 
mainMain program for tests- Parameters:
- args-
 
 
-