www.pudn.com > Ray_Tracing_Materials.rar > Shape.h, change:2004-09-18,size:734b


/* 
   File Name: 
 
      Shape.h 
 
   Created by: 
 
      Allen Sherrod (Programming Ace of www.UltimateGameProgramming.com). 
 
   Description: 
 
      This file holds a base class that represents a shape. 
*/ 
 
 
#ifndef SHAPE_H
#define SHAPE_H 
 
 
#include"Ray.h" 
#include"Sphere.h" 
#include"Triangle.h" 
#include"Plane.h" 
 
#define SPHERE 1 
#define TRIANGLE 2 
#define PLANE 3 
 

class Shape
{
   public:
      Shape() : type(0), sphere(0), triangle(0), plane(0) {}
      int type;
      Sphere *sphere;
      Triangle *triangle;
      Plane *plane;
};

#endif
 
 
// Copyright September 2004 
// All Rights Reserved! 
// Allen Sherrod 
// ProgrammingAce@UltimateGameProgramming.com 
// www.UltimateGameProgramming.com