home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / graphtal / cone.h < prev    next >
C/C++ Source or Header  |  1992-10-22  |  1KB  |  49 lines

  1. /*
  2.  * Cone.h  - class definition for geometric object cone.
  3.  *
  4.  * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  */
  17.  
  18. #ifndef Cone_H
  19. # define Cone_H
  20.  
  21. #include "GeoObject.h"
  22. #include "Polygon.h"
  23.  
  24. //___________________________________________________________ Cone
  25.  
  26. class Cone : public GeoObject 
  27. {
  28. public:
  29.   static GeoObject* create(real, const Vector&, real, const Vector&);
  30.  
  31.   int intersect(const Ray&, real, real&);
  32.   Vector normal(const Vector&) const;
  33.   PolygonList* tesselate(const BoundingBox&);
  34.  
  35.   int setTransform(TransMatrix*);
  36.   
  37. private:
  38.   Cone(real, const Vector&, real, const Vector&);
  39.  
  40. private:
  41.   /*
  42.    * startDistance is the distance from the origin of the canonical
  43.    * cone at which the cone begins
  44.    */
  45.   real startDistance;
  46. };
  47.  
  48. #endif // Cone_H
  49.