02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Geometry<br />

== Operator - This operation compares two instances for equality.<br />

Segment3 seg = new Segment3(new Point3 (1, 2, 3),<br />

new Point3 (5, 10, 15));<br />

//seg is {(1,2,3),(5,10,15)}<br />

Segment3 seg1 = +seg;<br />

bool result = (seg1 == seg)<br />

//result is true<br />

Segment3 class defines the following public methods:<br />

Equals - This method compares this instance with another object for equality. Returns<br />

true if this instance is equal to the other object.<br />

Segment3 seg = new Segment3(new Point3 (1, 2, 3),<br />

new Point3 (5, 10, 15));<br />

//seg is {(1,2,3),(5,10,15)}<br />

Segment3 seg1 = +seg;<br />

bool result = seg.Equals(seg1);<br />

//result is true<br />

GetHashCode - This method gets the hash code for this instance.<br />

IsNull - This method determines if the given instance has a Null definition.<br />

//create a null Segment<br />

Segment3 seg = Segment3.Null;<br />

bool result = Segment3.IsNull(seg);<br />

//result is true<br />

ToString - This method gets the string representation of this segment. This returns a<br />

string formatted to indicate that it represents a segment. The string appears as "{point} o-<br />

--o {point}" where {point} is formatted using the Point2 or Point3 ToString<br />

method. The “o---o” indicates the data is a segment.<br />

LatticeInfo Class<br />

The Slb.<strong>Ocean</strong>.Geometry namespace defines LatticeInfo class to define a lattice.<br />

A lattice describes the real world location of a 2-dimensional array of sample values. This is<br />

4-166 <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!