ShowAxis


This command shows either the x, y, and z axes of the objects in your world, or the axes of the world itself. The axes of the world always remain the same ”they do not change as objects are rotated . The object axes are relative to the object ”they change as the object rotates. There are two commands:

 myworld.ShowObjectAxis() 

and

 myworld.ShowAxis() 

Notes

These commands can be used to help visualize what is happening to your object as it rotates.

Sample Code

The code below shows both of these commands being used. Only one can be used at a time, though, so the one not being used must always be commented out.

 oworld = New World(); ocamera = New Camera(oworld); sphere = oworld.CreateBrick(50,50,50); sphere2 = oworld.CreateBrick(50,50,50); sphere2.SetPosition(100,0,0); ocamera.MoveBack(1200); ocamera.Walk(); sphere.AddAngle(1,2,3,10); //Rotates it in 5 seconds. sphere2.SetRelativeAngle(1,2,3,10); //Rotates it in 5 seconds. //Show the axes of the two objects. oworld.ShowObjectAxis(); //world.ShowAxis(); //Loop While(TRUE) { } 



Elementary Game Programming and Simulators Using Jamagic
Elementary Game Programming & Simulations Using Jamagic (Charles River Media Game Development)
ISBN: 1584502614
EAN: 2147483647
Year: 2002
Pages: 105
Authors: Sergio Perez

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net