RobinTrace
standard.h
Go to the documentation of this file.
1 
2 #ifndef STANDARD_H
3 #define STANDARD_H
4 
5 #include "shape/shape.h"
6 #include <iostream>
7 
9 class standard: public shape {
10  public:
16  double c;
24  double k; // Quadric constant
25 
27  standard ();
29  standard (double _c, double _k);
31  standard (double _c);
32 
34  virtual void intersect (ray &r) override;
37  virtual Vec3 normal (const ray &r) override;
38 
39  private:
41  virtual std::string print_str () const override;
42 };
43 
44 
45 #endif // STANDARD_H
Eigen::Vector3d Vec3
Definition: Vec3.h:11
Class for individual rays.
Definition: ray.h:9
Virtual class for shapes.
Definition: shape.h:12
Standard shape specialization.
Definition: standard.h:9
virtual Vec3 normal(const ray &r) override
Compute the normal of the standard shape at the current ray r position.
Definition: standard.cpp:60
double c
Curvature.
Definition: standard.h:16
virtual void intersect(ray &r) override
Operate the intersection of ray r with standard shape.
Definition: standard.cpp:39
standard()
Default constructor.
Definition: standard.cpp:6
double k
Quadric constant.
Definition: standard.h:24
virtual std::string print_str() const override
Printer.
Definition: standard.cpp:29