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.

Coordinate Systems<br />

change domains as in X, Y to i, j but simply moves to a new location in the same domain.<br />

The following code shows an example of translating a point by moving it 10 in the X<br />

direction, 100 in the Y direction, and 1000 in the Z direction.<br />

// Create the local transform object<br />

LocalTransform localT = new LocalTransform();<br />

// Initialize the matrix for point translation.<br />

localT.Matrix.Translate(10.0, 100.0, 1000.0);<br />

// Now create forward and inverse translators.<br />

ICoordSysConverter ForwardTranslate = localT.ForwardConverter();<br />

ICoordSysConverter InverseTranslate = localT.InverseConverter();<br />

// Create a point and perform translation and inverse translateion.<br />

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

Point3 pT = ForwardTranslate(p1, out status);<br />

Point3 pI = InverseTranslate(pT, out status);<br />

Usage Scenario<br />

The following code provides a simple and complete example of using the coordinate<br />

system service to reference a pair of coordinate systems and convert data between them.<br />

It also demonstrates how to convert data between Spherical and Cartesian projections.<br />

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