Ray Tracer  2020
Tube.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef TUBE_H_INCLUDED
4 #define TUBE_H_INCLUDED
5 
6 #include "Object.h"
7 
27 class Tube : public Object {
28 
29 public:
30 
40  Tube(double ratio = 0.5);
41 
45  Tube(const Tube& tube);
46 
48  ~Tube();
49 
55  Tube& operator=(const Tube& tube);
56 
68  std::vector<RayIntersection> intersect(const Ray& ray) const;
69 
70 private:
71 
72  double ratio_;
73 
74 };
75 
76 #endif // TUBE_H_INCLUDED
Object class header file.
Abstract base class for Objects.
Definition: Object.h:35
Rays as a starting Point and Direction.
Definition: Ray.h:20
Class for Tube objects.
Definition: Tube.h:27
std::vector< RayIntersection > intersect(const Ray &ray) const
Tube-Ray intersection computation.
Definition: Tube.cpp:25
double ratio_
Definition: Tube.h:72
Tube & operator=(const Tube &tube)
Tube assignment operator.
Definition: Tube.cpp:17
~Tube()
Tube destructor.
Definition: Tube.cpp:13
Tube(double ratio=0.5)
Tube default constructor.
Definition: Tube.cpp:6