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

  1. /*
  2.  * Cylinder.h  - class definition for geometric object cylinder.
  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 Cylinder_H
  19. # define Cylinder_H
  20.  
  21. #include "GeoObject.h"
  22. #include "Polygon.h"
  23.  
  24. //___________________________________________________________ Cylinder
  25.  
  26. class Cylinder : public GeoObject 
  27. {
  28. public:
  29.   static GeoObject* create(real, const Vector&, 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.   Cylinder(real, const Vector&, const Vector&);
  39. };
  40.  
  41. #endif // Cylinder_H
  42.