home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / BSP Tree 1.2 / Sources / Graphics / include / plane_3d.h < prev    next >
Encoding:
Text File  |  1995-03-25  |  2.1 KB  |  38 lines  |  [TEXT/MMCC]

  1. //------------------------------------------------------------------------------
  2. //    File:                    plane_3d.h
  3. //    Date:                    8/26/94
  4. //    Author:                Bretton Wade
  5. //
  6. //    Description:    this file contains the class definition for a plane_3d
  7. //
  8. //------------------------------------------------------------------------------
  9.  
  10. #include "object_3d.h"
  11.  
  12. #ifndef    PLANE_3D
  13. #define    PLANE_3D
  14.  
  15. //------------------------------------------------------------------------------
  16. //    classes
  17. //------------------------------------------------------------------------------
  18. class    plane_3d : public tuple_3d, object_3d                                                                            //    3 dimensional plane_3d class
  19. {                                                                                                                                                                //    begin plane_3d class definition
  20.     public:                                                                                                                                                //    public interface
  21.                 plane_3d (void) {}                                                                                                            //    default constructor
  22.                 plane_3d (const vector_3d &v, const point_3d &p);                                                //    normal constructor
  23.                 plane_3d (const point_3d &a, const point_3d &b, const point_3d &c);            //    normal constructor
  24.                 plane_3d (real a, real b, real c, real d);                                                            //    component constructor
  25.                 plane_3d (const plane_3d &p);                                                                                        //    copy constructor
  26.                 plane_3d (const tuple_3d &t);                                                                                        //    constructor from a tuple_3d
  27. virtual    ~plane_3d    (void);                                                                                                                //    destructor
  28.                 plane_3d    &operator = (const plane_3d &p);                                                            //    assignment operator
  29.                 plane_3d    &operator = (const tuple_3d &t);                                                            //    assignment operator
  30.                 void            Define (const vector_3d &v, const point_3d &p);                                //    compute the plane_3d equation
  31.                 void            Define (const point_3d &a, const point_3d &b, const point_3d &c);//    compute the plane_3d equation
  32.                 void            Invert (void);                                                                                                //    invert the values of the plane_3d equation
  33. virtual    real            RayIntersection (const ray &r) const;                                                    //    return the distance along the ray at which the intersection occurs
  34. };                                                                                                                                                            //    end plane_3d class definition
  35.  
  36. //------------------------------------------------------------------------------
  37.  
  38. #endif    //PLANE_3D