Book Image

Learning Object-Oriented Programming

By : Gaston C. Hillar
Book Image

Learning Object-Oriented Programming

By: Gaston C. Hillar

Overview of this book

Table of Contents (16 chapters)
Learning Object-Oriented Programming
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Refactoring existing code in C#


The following code shows an example of the declaration of the method that renders a sphere named RenderSphere and the method that renders a cube named RenderCube in C#:

public static void RenderSphere(
  int x, int y, int z, int radius, 
  int cameraX, int cameraY, int cameraZ, 
  int cameraDirectionX, int cameraDirectionY, int cameraDirectionZ, 
  int cameraVectorX, int cameraVectorY, int cameraVvectorZ, 
  int cameraPerspectiveFieldOfView, 
  int cameraNearClippingPlane, 
  int cameraFarClippingPlane, 
  int directionalLightX, int directionalLightY, int directionalLightZ, 
  int directionalLightColor) 
{
}

public static void RenderCube(
  int x, int y, int z, int edgeLength,
  int cameraX, int cameraY, int cameraZ,
  int cameraDirectionX, int cameraDirectionY, int cameraDirectionZ,
  int cameraVectorX, int cameraVectorY, int cameraVvectorZ,
  int cameraPerspectiveFieldOfView,
  int cameraNearClippingPlane,
  int cameraFarClippingPlane,
  int directionalLightX...