Triangle class
#include <darts/triangle.h>
An instance of a triangle for a given face in a mesh.
Base classes
- class Surface
- This is the abstract superclass for all surfaces.
Constructors, destructors, conversion operators
Public functions
- auto intersect(const Ray3f& ray, HitRecord& hit) const -> bool override
- Ray-Surface intersection test.
- auto bounds() const -> Box3f override
- Return the surface's world-space AABB.
- auto vertices() const -> Mat33f
- Return the three vertices of the triangle as columns of a 3x3 matrix.
- auto texture_coords() const -> Mat23f
- Return the three texture coordinates of the triangle as the columns of a 2x3 matrix.
- auto colors() const -> Mat33f
- Return the three vertex colors of the triangle as the columns of a 3x3 matrix.
Function documentation
bool Triangle:: intersect(const Ray3f& ray,
HitRecord& hit) const override
Ray-Surface intersection test.
Parameters | |
---|---|
ray in | A 3-dimensional ray data structure with minimum/maximum extent information |
hit out | A detailed intersection record, which will be filled by the intersection query |
Returns | True if an intersection was found |
Intersect a ray against this surface and return detailed intersection information.