02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Geometry<br />

Null – This method returns a Point3 whose X, Y, and Z properties are undefined.<br />

Point3.Null = (NaN, NaN, NaN)<br />

Zero – This method returns a Point3 whose X, Y, and Z properties are all 0.0.<br />

Point3.Zero = (0.0, 0.0, 0.0)<br />

The following public operators are defined for the Point2 and Point3 classes:<br />

- (minus) Operator – Given a pair of points, this operator will compute the vector that<br />

defines the distance between them. The vector contains values for the differences<br />

between the X, Y, and Z properties.<br />

Point3 pt1 = new Point3(10, 20, 30);<br />

Point3 pt2 = new Point3(20, 30, 40);<br />

Vector3 vt = pt1 - pt2;<br />

//vt is (-10,-10,-10)<br />

- (minus) Operator – Given a point and a vector, this operator will compute the point at<br />

the other end of the vector from the input point by subtracting the vector from the point.<br />

Point3 pt = new Point3(20, 30, 40);<br />

Vector3 vt = new Vector3(10, 10, 10);<br />

Point3 pt3 = pt – vt;<br />

//pt3 is (10, 20, 30)<br />

+ Operator – This operation adds the vector to the point to create a new point.<br />

Point3 pt = new Point3(20, 30, 40);<br />

Vector3 vt = new Vector(10, 10, 10);<br />

Point3 pt3 = pt + vt;<br />

//pt3 is (30, 40, 50)<br />

4-136 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!