Package org.jlab.geom.prim
Class Sector3D
java.lang.Object
org.jlab.geom.prim.Sector3D
- All Implemented Interfaces:
- Face3D,- Transformable,- Showable
A sector represented by an 
arc and a radial
 thickness. Sectors are regions of a plane bounded by two angles and two
 radii relative to some reference point.- Author:
- jnhankins
- 
Constructor SummaryConstructorsConstructorDescriptionSector3D()Constructs a newSector3Dsuch that the sector is bounded by two arcs such that the origin points of the inner and outer arcs begin at begin at (1, 0, 0) and (2, 0, 0) and end at (0, 1, 0) and (0, 2, 0) respectively.Constructs a newSector3Dfrom the given outer arc and the given radial thickness.Constructs a newSector3Dthat is identical to the given sector.
- 
Method SummaryModifier and TypeMethodDescriptionvoidCopies the parameters of the given sector so that this sector is identical to the given sector.doubleComputes the minimum distance of the given point from the edges of thisSector3D.innerArc()Constructs the inner arc of this sector.doubleReturns the inner radius of this sector.intintersection(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.booleanTest whether the given point is inside the area of thisSector3D.normal()outerArc()Returns the outer arc of this sector.doubleReturns the outer radius of this sector.plane()point(int index) Returns the point from thisFace3Dwith corresponding index.doubleReturns the radial thickness of this sector, that is the positive difference between the inner and outer radii.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 outer arc of this sector and the radial thickness.voidsetInnerArc(Arc3D outerArc) Sets the outer arc of this sector.voidsetRadialThickness(double dR) Sets the radial thickness of this sector, that is the positive difference between the inner and outer radii.voidshow()InvokesSystem.out.println(this).toString()voidtranslateXYZ(double dx, double dy, double dz) Translates this object linearly by the amounts specified.
- 
Constructor Details- 
Sector3Dpublic Sector3D()Constructs a newSector3Dsuch that the sector is bounded by two arcs such that the origin points of the inner and outer arcs begin at begin at (1, 0, 0) and (2, 0, 0) and end at (0, 1, 0) and (0, 2, 0) respectively.This sector is coplanar with the xy-plane. The inner and outer radius of this sector will differ by one unit. This sector has a coverage of 90 degrees. 
- 
Sector3DConstructs a newSector3Dfrom the given outer arc and the given radial thickness.- Parameters:
- outerArc- the outer arc
- dR- the radial thickness
 
- 
Sector3DConstructs a newSector3Dthat is identical to the given sector.- Parameters:
- sector- the sector to copy
 
 
- 
- 
Method Details- 
copyCopies the parameters of the given sector so that this sector is identical to the given sector.- Parameters:
- sector- the sector to copy
 
- 
setSets the outer arc of this sector and the radial thickness.- Parameters:
- outerArc- the outer arc
- dR- the radial thickness
 
- 
setInnerArcSets the outer arc of this sector.- Parameters:
- outerArc- the outer arc
 
- 
setRadialThicknesspublic void setRadialThickness(double dR) Sets the radial thickness of this sector, that is the positive difference between the inner and outer radii.- Parameters:
- dR- the radial thickness
 
- 
outerArcReturns the outer arc of this sector.- Returns:
- the outer arc
 
- 
innerArcConstructs the inner arc of this sector.- Returns:
- the inner arc.
 
- 
radialThicknesspublic double radialThickness()Returns the radial thickness of this sector, that is the positive difference between the inner and outer radii.- Returns:
- the radial thickness
 
- 
innerRadiuspublic double innerRadius()Returns the inner radius of this sector.- Returns:
- the inner radius
 
- 
outerRadiuspublic double outerRadius()Returns the outer radius of this sector.- Returns:
- the outer radius
 
- 
isInsideTest whether the given point is inside the area of thisSector3D.- Parameters:
- p- the given point
- Returns:
- true if inside or false if outside
 
- 
distanceFromEdgeComputes the minimum distance of the given point from the edges of thisSector3D.- Parameters:
- p- the given point
- Returns:
- the signed distance to the Sector3Dedges, positive if inside or negative if outside
 
- 
pointDescription copied from interface:Face3DReturns the point from thisFace3Dwith corresponding index. If an invalid index is given, then null is returned.
- 
normal
- 
plane
- 
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
 
- 
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
 
-