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

The Segment3 class definition is:<br />

public sealed class Segment3<br />

{<br />

public Segment3 (Point3 begin, Direction3 direction,<br />

double length);<br />

public Segment3 (Point3 begin, Point3 end);<br />

public Segment3 (Point3 begin, Vector3 vector);<br />

public Segment3 (Segment3 input);<br />

Point3 Begin { get; }<br />

Point3 End { get; }<br />

bool IsDegenerate { get; }<br />

double Length { get; }<br />

Vector3 Vector { get; }<br />

public static readonly Segmetn3 Null = new Segment3 (Point3.Null,<br />

Point3.Null);<br />

public override bool Equals (object other);<br />

public override int GetHashCode ();<br />

public static bool IsNull (Segment3 obj);<br />

public override string ToString ();<br />

public static Segment3 operator – (Segment3 arg);<br />

public static bool operator != (Segment3 lhs, Segment3 rhs);<br />

public static Segment3 operator + (Segment3 arg);<br />

public static bool operator == (Segment3 lhs, Segment3 rhs);<br />

}<br />

The Segment2 and Segment3 classes provide the same constructors, properties, and<br />

methods. They vary only in the dimensions available. Segment2 objects are constructed<br />

from Point2 and Vector2 objects, and Segment3 objects are constructed from<br />

Point3 and Vector3 objects. The following sections detail the constructors, properties,<br />

and methods available using Segment3 for the examples.<br />

Each segment type has multiple constructors. We will use Segment3 for our examples.<br />

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