Interface Component
- All Superinterfaces:
- Showable,- Transformable
- All Known Implementing Classes:
- AbstractComponent,- AlertDCWire,- ConcaveComponent,- DriftChamberWire,- MeshComponent,- PrismaticComponent,- RectangularComponent,- ScintillatorMesh,- ScintillatorPaddle,- SiStrip,- TrackerStrip
An object implementing this interface represents single sensing component within a detector and provides access to essential geometry information about that component.
 Factory: Factory
 Hierarchy: 
 
 
 Detector → 
 Sector → 
 Superlayer → 
 Layer → 
 Component
 
 Component contains a Point3D called midpoint which generally represents the geometric center of the
 Component but may be redefined as needed by specific kinds of
 Components.
 
 Component also contains a double value called 
 length that represents the length of the component.
 What this value measures is dependent on the type of component.
 
 Componets are also enclosed in volume that are defined points, edges, 
 and faces.
- Author:
- jnhankins
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the component's id number.doubleReturns the length of this component.Returns the midpoint of this component.intReturns the number of edges between the points that define thevolume.intReturns the number of points that define thevolume.getType()Returns a string that identifies the specific subtype of this component.getVolumeCrossSection(Transformation3D transformation) Returns the cross section of a plane through the the component'svolumeas a list of lines in the xy-plane.getVolumeEdge(int e) Returns the edge on thevolumewith the specified index.booleangetVolumeIntersection(Line3D line, Point3D inIntersect, Point3D outIntersect) Returns true if the given line segment intersect thevolume-shapetwice (one incoming intersection and one out going) and stores the incoming and outgoing intersection points are stored in the first and second Point3D objects given as arguments respectively.getVolumePoint(int p) Returns the point on thevolumewith the specified index.Returns the volume of the component.voidshow()InvokesSystem.out.println(this).Methods inherited from interface org.jlab.geom.prim.TransformablerotateX, rotateY, rotateZ, translateXYZ
- 
Method Details- 
getComponentIdint getComponentId()Returns the component's id number.- Returns:
- the id
 
- 
getNumVolumePointsint getNumVolumePoints()Returns the number of points that define thevolume.- Returns:
- the number of volume points
 
- 
getVolumePointReturns the point on thevolumewith the specified index.- Parameters:
- p- the index of the point
- Returns:
- the point on the volume
 
- 
getNumVolumeEdgesint getNumVolumeEdges()Returns the number of edges between the points that define thevolume.- Returns:
- the number of volume edges
 
- 
getVolumeEdgeReturns the edge on thevolumewith the specified index.Though edges are returned as Line3Dobjects and a majority components have edges which are all straight line segments, edges are not required to be straight lines. The edge may, in reality, be curved, in which case the returnedLine3Dis merely storing the two points bounding a curved path segment. Thus, special care must be taken to ensure that the edge is in fact a straight line segment if one intends to use it as such.- Parameters:
- e- the index of the edge
- Returns:
- the edge on the volume
 
- 
getVolumeShapeShape3D getVolumeShape()Returns the volume of the component.A volume is represented by a Shape3Dobject which contains a list of triangularFace3Dobjects. This these triangles bound a closed closed volume.- Returns:
- the volume
 
- 
getVolumeCrossSectionReturns the cross section of a plane through the the component'svolumeas a list of lines in the xy-plane.This method takes a Transformation3D object as an argument, then constructs a new Plane3Dobject in the xy-plane and applies the transformation to the plane. The intersection of the volume's shape with the transformed plane is then calculated and stored in a list of lines. The inverse of the transformation is then applied to each line in the list ensuring that each line in the returned list is in the xy-plane.- Parameters:
- transformation- the transformation to apply to the plane
- Returns:
- a list of lines in the xy-plane representing the cross section
 
- 
getVolumeIntersectionReturns true if the given line segment intersect thevolume-shapetwice (one incoming intersection and one out going) and stores the incoming and outgoing intersection points are stored in the first and second Point3D objects given as arguments respectively.The incoming intersection is defined such that the incoming intersection point is closer to the origin of the line than the outgoing intersection point. - Parameters:
- line- the line segment
- inIntersect- the incoming intersection
- outIntersect- the outgoing intersection
- Returns:
- true if two intersections are found
 
- 
getMidpointPoint3D getMidpoint()Returns the midpoint of this component. By convention, the midpoint of a component is normally the geometric center of the component's volume but the definition of midpoint may vary by component type.- Returns:
- the midpoint
 
- 
getLengthdouble getLength()Returns the length of this component.- Returns:
- the length
 
- 
getTypeString getType()Returns a string that identifies the specific subtype of this component.- Returns:
- a string naming this component's type
 
- 
showvoid show()InvokesSystem.out.println(this).
 
-