Package org.jlab.geom.prim
Class Cylindrical3D
java.lang.Object
org.jlab.geom.prim.Cylindrical3D
- All Implemented Interfaces:
- Face3D,- Transformable,- Showable
A horizontal cylindrical segment represented by an 
 
arc and a height.  Cylindrical segments
 are portions of a cylinder (constant radius from some line) with finite
 height that are bounded by an arc.- Author:
- jnhankins
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a newCylindrical3Dsuch that the arc of the surface is centered around the z axis, the radius is one, the arc begins at x=1 y=0 and ends at x=0, y=1, and the arc has unit height such that it extends from z=0 to z=1.Cylindrical3D(Arc3D arc, double height) Constructs a newCylindrical3Dfrom the given arc and height.Cylindrical3D(Cylindrical3D cylindricalSeg) Constructs a newCylindrical3Dthat is identical to the given cylindrical segment.
- 
Method SummaryModifier and TypeMethodDescriptionbaseArc()Returns the base of this cylindrical segment.voidcopy(Cylindrical3D cylindricalSeg) Sets the core parameters of this cylindrical segment such that this surface becomes identical to the given surface.doubledistanceToEdge(Point3D point) Distance between the point and the closest cylinder edgegetAxis()returns the axis of this cylinder.doubleheight()Returns the height of this cylindrical segment.highArc()Constructs the arc at the top of this cylindrical segment.intintersection(Line3D line, List<Point3D> intersections) Finds the intersections of the given infinite line with thisFace3D.doubleintersectionLength(Line3D line, List<Point3D> intersections) Compute the intersections of a ray within the 3D volumeintintersectionRay(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.booleanisOnSurface(Point3D point) Returns true if the given point is on the surface of this cylindrical segment.point(int index) Returns the point from thisFace3Dwith corresponding index.voidrotateX(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.voidSets the parameters of this cylindrical segment to equal the given parameters.voidSets the base of this cylindrical segment.voidSets the axis of this cylinder.voidsetHeight(double height) Sets the height of this cylindrical segment.voidshow()InvokesSystem.out.println(this).toString()voidtranslateXYZ(double dx, double dy, double dz) Translates this object linearly by the amounts specified.
- 
Constructor Details- 
Cylindrical3Dpublic Cylindrical3D()Constructs a newCylindrical3Dsuch that the arc of the surface is centered around the z axis, the radius is one, the arc begins at x=1 y=0 and ends at x=0, y=1, and the arc has unit height such that it extends from z=0 to z=1.
- 
Cylindrical3DConstructs a newCylindrical3Dfrom the given arc and height.- Parameters:
- arc- the base of the cylindrical segment
- height- the height
 
- 
Cylindrical3DConstructs a newCylindrical3Dthat is identical to the given cylindrical segment.- Parameters:
- cylindricalSeg- the cylindrical segment to copy
 
 
- 
- 
Method Details- 
copySets the core parameters of this cylindrical segment such that this surface becomes identical to the given surface.- Parameters:
- cylindricalSeg- the cylindrical segment to copy
 
- 
setSets the parameters of this cylindrical segment to equal the given parameters.- Parameters:
- arc- the base of the cylindrical segment
- height- the height
 
- 
setArcSets the base of this cylindrical segment.- Parameters:
- arc- the base of the cylindrical segment
 
- 
setAxisSets the axis of this cylinder.- Parameters:
- axis- the base of the cylindrical segment
 
- 
getAxisreturns the axis of this cylinder.- Returns:
- the axis of the cylindrical segment
 
- 
setHeightpublic void setHeight(double height) Sets the height of this cylindrical segment.- Parameters:
- height- the height
 
- 
baseArcReturns the base of this cylindrical segment.- Returns:
- the base of this cylindrical segment
 
- 
highArcConstructs the arc at the top of this cylindrical segment.- Returns:
- the arc at the top of this cylindrical segment
 
- 
heightpublic double height()Returns the height of this cylindrical segment.- Returns:
- the height of this cylindrical segment.
 
- 
intersectionDescription copied from interface:Face3DFinds 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.- Specified by:
- intersectionin interface- Face3D
- Parameters:
- line- the infinite line
- intersections- the list to store the intersections in
- Returns:
- the number of intersections found
 
- 
intersectionRayDescription copied from interface:Face3DFinds 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.- Specified by:
- intersectionRayin interface- Face3D
- Parameters:
- line- the ray
- intersections- the list to store the intersections in
- Returns:
- the number of intersections found
 
- 
intersectionSegmentDescription copied from interface:Face3DFinds 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.- Specified by:
- intersectionSegmentin interface- Face3D
- Parameters:
- line- the line segment
- intersections- the list to store the intersections in
- Returns:
- the number of intersections found
 
- 
intersectionLengthCompute the intersections of a ray within the 3D volume- Parameters:
- line-
- intersections-
- Returns:
- ray path length within the volume
 
- 
isOnSurfaceReturns true if the given point is on the surface of this cylindrical segment.- Parameters:
- point- the point
- Returns:
- true if the point is on the surface
 
- 
distanceToEdgeDistance between the point and the closest cylinder edge- Parameters:
- point- the point
- Returns:
- distance if point is on the surface, 0 otherwise
 
- 
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()InvokesSystem.out.println(this).
- 
toString
- 
pointDescription copied from interface:Face3DReturns the point from thisFace3Dwith corresponding index. If an invalid index is given, then null is returned.
 
-