1 package org.lcsim.spacegeom;
2
3
4
5
6
7
8 import static org.lcsim.spacegeom.Representation.Cartesian;
9
10 public class CartesianPoint extends SpacePoint
11 {
12 protected CartesianPoint() {
13
14 }
15
16
17
18
19
20
21
22 public CartesianPoint(double x, double y, double z)
23 {
24 _x = x;
25 _y = y;
26 _z = z;
27 _representation = Cartesian;
28 _xy = Double.NaN;
29 _xyz = Math.sqrt(_x*_x + _y*_y + _z*_z);
30 _phi = Double.NaN;
31 _theta = Double.NaN;
32 }
33
34
35
36
37
38 public CartesianPoint(double[] x)
39 {
40 this(x[0], x[1], x[2]);
41 }
42 }