public class RegularPolygon extends Object
Modifier and Type | Field and Description |
---|---|
private double |
_area |
private int |
_nsides |
private double |
_r |
(package private) Hep3Vector[] |
_vertices |
Constructor and Description |
---|
RegularPolygon(int nsides,
double radius)
Fully qualified constructor
|
Modifier and Type | Method and Description |
---|---|
double |
area()
The area of this polygon
|
Hep3Vector[] |
getVertices()
Return the coordinates of the polygon vertices.
|
Inside |
inside(Hep3Vector pos)
Determines whether a point lies within or outside of this solid.
|
private double |
t(Hep3Vector a,
Hep3Vector b,
Hep3Vector c) |
String |
toString() |
private int _nsides
private double _r
Hep3Vector[] _vertices
private double _area
public RegularPolygon(int nsides, double radius)
nsides
- the number of sides of the polygonradius
- the radius of the circumscribed circlepublic Hep3Vector[] getVertices()
public double area()
public Inside inside(Hep3Vector pos)
pos
- the point to checkprivate double t(Hep3Vector a, Hep3Vector b, Hep3Vector c)
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.