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

LineDirection - This property gets the direction by which this line is defined.<br />

Point3 p1 = new Point3(10,10,10);<br />

Direction3 d1 = new Direction3(5,5,5);<br />

Line3 l1 = new Line3(p1, d1);<br />

Direction3 d = l1.LineDirection;<br />

//d = {(5,5,5)}<br />

The line classes define the public fields:<br />

Null - The undefined line is defined by an undefined point and an undefined direction.<br />

Line3 l1 = Line3.Null;<br />

Line3 defines the following public operators:<br />

- (minus) Operator – The minus operator returns a line with opposite direction.<br />

Point3 p1 = new Point3(10,10,10);<br />

Direction3 d1 = new Direction3(5,5,5);<br />

Line3 l1 = new Line3(p1, d1);<br />

//l1 is {5x+5y+5z+-150=0}<br />

Direction3 d = l1.LineDirection;<br />

//d = {(5,5,5)}<br />

Line3 l2 = -l1;<br />

//l2 is {-5x+-5y+-5z+150=0}<br />

d = l2.LineDirection;<br />

//d = {(-5,-5,-5)}<br />

!= Operator – This operation compares two line instances for inequality. Two instances<br />

are equal if their directions are both zero or if their directions are the same and their<br />

offsets in their defining equations are the same. Note that comparing Line3.Null to any<br />

other instance will return false. This is to maintain consistency with the behavior of<br />

floating point NaN comparison.<br />

bool result = (l1 != l2);<br />

//result is true<br />

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