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

The Plane3 class defines the public field:<br />

Null - The undefined plane consists of an undefined point and an undefined direction.<br />

Plane3 pl3 = Plane3.Null;<br />

Plane3 defines the following public operators:<br />

- (minus) Operator – The minus operator returns a plane with a normal pointing in the<br />

opposite direction.<br />

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

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

Plane3 pl1 = new Plane3(pt1, di1);<br />

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

Plane3 pl4 = -pl1;<br />

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

!= Operator - This operation compares two planes for inequality. This returns true if the<br />

plane instances do not represent the same plane.<br />

Plane3 pl6 = +pl1;<br />

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

+ Operator - This operation returns the same plane.<br />

Plane3 pl6 = +pl1;<br />

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

== Operator - This operation compares two planes for equality. This returns true if the<br />

plane instances represent the same plane.<br />

An instance constructed with a given normal will not be equal to an instance constructed<br />

with a normal in the same orientation but pointing in the opposite direction (even though<br />

all points lying on in the first plane instance will lie on the second instance). Note that<br />

comparing Plane3.Null to any other instance will return false. This is to maintain<br />

consistency with the behavior of floating point NaN comparison.<br />

bool result = (pl6 == pl1);<br />

//result is true;<br />

The Plane3 class defines the following public methods:<br />

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