Contents
Class RectangularComponent
java.lang.Object
org.jlab.geom.abs.AbstractComponent
org.jlab.geom.component.PrismaticComponent
org.jlab.geom.component.RectangularComponent
- All Implemented Interfaces:
Component
,Transformable
,Showable
- Direct Known Subclasses:
ScintillatorPaddle
,SiStrip
,TrackerStrip
This class provides a basic implementation of the
Component
interface where the component's
volume
is defined by two rectangles such that the
edges of each rectangle are connected to form trapezoidal sides.
For more information see PrismaticComponent
.
- Author:
- jnhankins
-
Constructor Summary
ConstructorsConstructorDescriptionRectangularComponent
(int componentId, double width, double length, double thickness) Initializes aRectangularComponent
centered on the origin with the direction vector parallel with the y-axis, the midpoint at the origin, the plane on the upstream face with the normal anti-parallel to the z-axis, and the line passing through the midpoints of the top and bottom faces.RectangularComponent
(int componentId, Point3D p0, Point3D p1, Point3D p2, Point3D p3, Point3D p4, Point3D p5, Point3D p6, Point3D p7) Initializes aRectangularComponent
from the given points. -
Method Summary
Methods inherited from class org.jlab.geom.component.PrismaticComponent
getDirection, getLength, getLine, getVolumeIntersection, onRotateX, onRotateY, onRotateZ, onTranslateXYZ
Methods inherited from class org.jlab.geom.abs.AbstractComponent
addVolumeEdge, addVolumePoint, addVolumeTriangleFace, getComponentId, getMidpoint, getNumVolumeEdges, getNumVolumePoints, getVolumeCrossSection, getVolumeEdge, getVolumePoint, getVolumeShape, rotateX, rotateY, rotateZ, show, toString, translateXYZ
-
Constructor Details
-
RectangularComponent
public RectangularComponent(int componentId, double width, double length, double thickness) Initializes aRectangularComponent
centered on the origin with the direction vector parallel with the y-axis, the midpoint at the origin, the plane on the upstream face with the normal anti-parallel to the z-axis, and the line passing through the midpoints of the top and bottom faces.- Parameters:
componentId
- the id of the componentwidth
- the length along the x-axislength
- the length along the y-axisthickness
- the length along the z-axis
-
RectangularComponent
public RectangularComponent(int componentId, Point3D p0, Point3D p1, Point3D p2, Point3D p3, Point3D p4, Point3D p5, Point3D p6, Point3D p7) Initializes aRectangularComponent
from the given points. The line will be from the middle of the bottom face to the middle of the top face. The midpoint will be at the midpoint of the line. The direction vector will parallel the line.- Parameters:
componentId
- the id of the componentp0
- 1st point of the bottom facep1
- 2nd point of the bottom facep2
- 3rd point of the bottom facep3
- 4th point of the bottom facep4
- 1st point of the top facep5
- 2nd point of the top facep6
- 3rd point of the top facep7
- 4th point of the top face
-
-
Method Details