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 />

diagonal distance across a lattice cell. If the lattices are equal but the corners are not in<br />

the same order, then the comparison will fail.<br />

LatticeInfo latticeB = new LatticeInfo(...);<br />

if (lattice.Equals(latticeB))<br />

{<br />

...<br />

}<br />

GetHashCode - The hash code is based only on the number of bins. This avoids problems<br />

with almost-equal positions. It returns an integer hash code.<br />

ToString - The default ToString representation includes the number of bins but no<br />

more detailed information.<br />

Line2 and Line3 Classes<br />

The Slb.<strong>Ocean</strong>.Geometry namespace defines two sealed line classes called Line2<br />

and Line3. These classes represent lines of the form ax + by + c = 0 and ax + by + cz<br />

+ d = 0 respectively. The points defining the lines are defined by Point2 or Point3<br />

objects.<br />

The Line2 class definition is:<br />

public sealed class Line2<br />

{<br />

public Line2 (Line2 input);<br />

public Line2 (Point2 point, Direction2 direction);<br />

public Line2 (Point2 point0, Point2 point1);<br />

public bool IsDegenerate { get; }<br />

public Direction2 LineDirection { get; }<br />

public static readonly Line2 Null = new Line2 (Point2.Null,<br />

Direction2.Null);<br />

<strong>Schlumberger</strong> Private<br />

<strong>Ocean</strong> Services 4-173

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

Saved successfully!

Ooh no, something went wrong!