Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- copy(Sector3D)
- set(Arc3D, double)
- setInnerArc(Arc3D)
- setRadialThickness(double)
- outerArc()
- innerArc()
- radialThickness()
- innerRadius()
- outerRadius()
- isInside(Point3D)
- distanceFromEdge(Point3D)
- point(int)
- normal()
- plane()
- intersection(Line3D, List)
- intersectionRay(Line3D, List)
- intersectionSegment(Line3D, List)
- translateXYZ(double, double, double)
- rotateX(double)
- rotateY(double)
- rotateZ(double)
- show()
- toString()
Class Sector3D
java.lang.Object
org.jlab.geom.prim.Sector3D
- All Implemented Interfaces:
Face3D
,Transformable
,Showable
-
Constructor Summary
ConstructorsConstructorDescriptionSector3D()
Constructs a newSector3D
such 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 newSector3D
from the given outer arc and the given radial thickness.Constructs a newSector3D
that is identical to the given sector. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Copies the parameters of the given sector so that this sector is identical to the given sector.double
Computes the minimum distance of the given point from the edges of thisSector3D
.innerArc()
Constructs the inner arc of this sector.double
Returns the inner radius of this sector.int
intersection
(Line3D line, List<Point3D> intersections) Finds the intersections of the given infinite line with thisFace3D
.int
intersectionRay
(Line3D line, List<Point3D> intersections) Finds the intersections of the given ray with thisFace3D
.int
intersectionSegment
(Line3D line, List<Point3D> intersections) Finds the intersections of the given line segment with thisFace3D
.boolean
Test whether the given point is inside the area of thisSector3D
.normal()
outerArc()
Returns the outer arc of this sector.double
Returns the outer radius of this sector.plane()
point
(int index) Returns the point from thisFace3D
with corresponding index.double
Returns the radial thickness of this sector, that is the positive difference between the inner and outer radii.void
rotateX
(double angle) Rotates this object clockwise around the x axis.void
rotateY
(double angle) Rotates this object clockwise around the y axis.void
rotateZ
(double angle) Rotates this object clockwise around the z axis.void
Sets the outer arc of this sector and the radial thickness.void
setInnerArc
(Arc3D outerArc) Sets the outer arc of this sector.void
setRadialThickness
(double dR) Sets the radial thickness of this sector, that is the positive difference between the inner and outer radii.void
show()
InvokesSystem.out.println(this)
.toString()
void
translateXYZ
(double dx, double dy, double dz) Translates this object linearly by the amounts specified.
-
Constructor Details
-
Sector3D
public Sector3D()Constructs a newSector3D
such 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 newSector3D
from the given outer arc and the given radial thickness.- Parameters:
outerArc
- the outer arcdR
- the radial thickness
-
Sector3D
Constructs a newSector3D
that 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
Sector3D
edges, positive if inside or negative if outside
-
point
Description copied from interface:Face3D
Returns the point from thisFace3D
with corresponding index. If an invalid index is given, then null is returned. -
normal
-
plane
-
intersection
Description copied from interface:Face3D
Finds 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:
intersection
in interfaceFace3D
- Parameters:
line
- the infinite lineintersections
- the list to store the intersections in- Returns:
- the number of intersections found
-
intersectionRay
Description copied from interface:Face3D
Finds 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:
intersectionRay
in interfaceFace3D
- Parameters:
line
- the rayintersections
- the list to store the intersections in- Returns:
- the number of intersections found
-
intersectionSegment
Description copied from interface:Face3D
Finds 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:
intersectionSegment
in 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:Transformable
Translates this object linearly by the amounts specified.- Specified by:
translateXYZ
in 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:Transformable
Rotates this object clockwise around the x axis.- Specified by:
rotateX
in interfaceTransformable
- Parameters:
angle
- rotation angle in radians
-
rotateY
public void rotateY(double angle) Description copied from interface:Transformable
Rotates this object clockwise around the y axis.- Specified by:
rotateY
in interfaceTransformable
- Parameters:
angle
- rotation angle in radians
-
rotateZ
public void rotateZ(double angle) Description copied from interface:Transformable
Rotates this object clockwise around the z axis.- Specified by:
rotateZ
in interfaceTransformable
- Parameters:
angle
- rotation angle in radians
-
show
-
toString
-