O'Reilly logo

Beginning 3D Game Programming by Tom Miller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

IMoveableObject Indeed

Have you noticed that you haven't implemented the IMoveableObject members yet? If you've tried to compile, you have because you can't compile the class until you do. Listing 14.9 contains the implementation of these members.

Listing 14.9. IMoveableObject Implementation
 /// <summary> /// Draw the player (the tank) in the world /// </summary> /// <param name="device">Device used to render tank</param> public void Draw(GameEngine engine, Camera c) { if (gameTank != null) { // Only draw the tank if it lies in the view frustum if (c.ObjectInFrustum(this)) { gameTank.Draw(engine); } } } /// <summary> /// The tank's current position /// </summary> public Vector3 Position { get { return gameTank.Position; } set { gameTank.Position ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required