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

  1. /*
  2.  * Ray.h - class definition for ray manipulations.
  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 Ray_H
  19. # define Ray_H
  20.  
  21. #include "Vector.h"
  22.  
  23. class TransMatrix;
  24.  
  25. //___________________________________________________________ Ray
  26.  
  27. class Ray
  28. {
  29. public:
  30.   Ray(const Vector&, const Vector&);
  31.  
  32.   real transform(const TransMatrix&);
  33.   const Vector& getOrig() const;
  34.   const Vector& getDir() const;
  35.     
  36. private:
  37.   Vector orig; // origin 
  38.   Vector dir;  // direction
  39. };
  40.  
  41. inline const Vector& Ray::getOrig() const {
  42.   return orig;
  43. }
  44.  
  45. inline const Vector& Ray::getDir() const {
  46.   return dir;
  47. }
  48.  
  49. #endif // Ray_H
  50.