5 #ifndef _SPICA_TRIANGLE_H_
6 #define _SPICA_TRIANGLE_H_
10 #include "core/core.hpp"
11 #include "core/common.h"
12 #include "core/point2d.h"
13 #include "core/point3d.h"
14 #include "core/normal3d.h"
15 #include "core/transform.h"
16 #include "core/shape.h"
38 const Point3d& operator[](
int i)
const;
40 bool intersect(
const Ray& ray,
double* tHit,
42 bool intersect(
const Ray& ray)
const override;
46 Bounds3d worldBound()
const override;
47 Bounds3d objectBound()
const override;
49 double area()
const override;
50 std::vector<Triangle> triangulate()
const override;
58 std::array<Point3d, 3> points_;
59 std::array<Normal3d, 3> normals_;
60 std::array<Point2d, 3> uvs_;
67 #endif // _SPICA_TRIANGLE_H_
Definition: interaction.h:68
Ray class.
Definition: ray.h:24
Definition: triangle.h:20
Definition: interaction.h:23
Abstract shape class.
Definition: shape.h:39