Class Sector3D
java.lang.Object
org.jlab.geom.prim.Sector3D
- All Implemented Interfaces:
Face3D, Transformable, Showable
-
Constructor Summary
ConstructorsConstructorDescriptionSector3D()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 Summary
Modifier 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
-
Sector3D
public 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.
-
Sector3D
Constructs a newSector3Dfrom the given outer arc and the given radial thickness.- Parameters:
outerArc- the outer arcdR- the radial thickness
-
Sector3D
Constructs a newSector3Dthat is identical to the given sector.- Parameters:
sector- the sector to copy
-
-
Method Details
-
copy
Copies the parameters of the given sector so that this sector is identical to the given sector.- Parameters:
sector- the sector to copy
-
set
Sets the outer arc of this sector and the radial thickness.- Parameters:
outerArc- the outer arcdR- the radial thickness
-
setInnerArc
Sets the outer arc of this sector.- Parameters:
outerArc- the outer arc
-
setRadialThickness
public 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
-
outerArc
-
innerArc
-
radialThickness
public double radialThickness()Returns the radial thickness of this sector, that is the positive difference between the inner and outer radii.- Returns:
- the radial thickness
-
innerRadius
public double innerRadius()Returns the inner radius of this sector.- Returns:
- the inner radius
-
outerRadius
public double outerRadius()Returns the outer radius of this sector.- Returns:
- the outer radius
-
isInside
Test whether the given point is inside the area of thisSector3D.- Parameters:
p- the given point- Returns:
- true if inside or false if outside
-
distanceFromEdge
Computes 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
-
point
Description copied from interface:Face3DReturns the point from thisFace3Dwith corresponding index. If an invalid index is given, then null is returned. -
normal
-
plane
-
intersection
Description 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 interfaceFace3D- Parameters:
line- the infinite lineintersections- the list to store the intersections in- Returns:
- the number of intersections found
-
intersectionRay
Description 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 interfaceFace3D- Parameters:
line- the rayintersections- the list to store the intersections in- Returns:
- the number of intersections found
-
intersectionSegment
Description 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 interfaceFace3D- Parameters:
line- the line segmentintersections- the list to store the intersections in- Returns:
- the number of intersections found
-
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
-
toString
-