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 returns the same line.<br />

Line3 l3 = +l1;<br />

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

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

bool result = (l1 == l3);<br />

//result is true<br />

Line classes define the following public methods (Line3 for examples):<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 />

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

Line3 l2 = +l1;<br />

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

bool result = l1.Equals(l2);<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 />

Line3 l1 = Line3.Null;<br />

//create a null Line<br />

bool result = Line3.IsNull(l1);<br />

//result is true<br />

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

string formatted as an equation: ax + by + cz + d = 0 where a, b, c, and d are constants.<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!