Loading...
Searching...
No Matches
Triangle3.hpp
Go to the documentation of this file.
Definition Matrix.hpp:30
Front-end to create Triangle3 objects step by step.
Definition Triangle3.hpp:101
Builder & WithUVs(const std::array< Vector2D, 3 > &_uvs)
Returns builder with uvs.
Triangle3Ptr MakeShared() const
Builds shared pointer of Triangle3 instance.
Builder & WithPoints(const std::array< Vector3D, 3 > &_points)
Returns builder with points.
Builder & WithNormals(const std::array< Vector3D, 3 > &_normals)
Returns builder with normals.
BoundingBox3D BoundingBoxLocal() const override
Returns the bounding box of this surface object in local frame.
SurfaceRayIntersection3 ClosestIntersectionLocal(const Ray3D &ray) const override
void GetBarycentricCoords(const Vector3D &pt, double *b0, double *b1, double *b2) const
Returns barycentric coordinates for the given point pt.
bool IntersectsLocal(const Ray3D &ray) const override
void SetNormalsToFaceNormal()
Set Triangle3::normals to the face normal.
std::array< Vector3D, 3 > normals
Three normals.
Definition Triangle3.hpp:74
std::array< Vector3D, 3 > points
Three points.
Definition Triangle3.hpp:71
Triangle3(const Transform3 &_transform=Transform3{}, bool _isNormalFlipped=false)
Constructs an empty triangle.
std::array< Vector2D, 3 > uvs
Three UV coordinates.
Definition Triangle3.hpp:77
Triangle3(std::array< Vector3D, 3 > points, std::array< Vector3D, 3 > normals, std::array< Vector2D, 3 > uvs, const Transform3 &_transform=Transform3{}, bool _isNormalFlipped=false)
Constructs a triangle with given points, normals, and uvs.
Vector3D ClosestPointLocal(const Vector3D &otherPoint) const override
Vector3D ClosestNormalLocal(const Vector3D &otherPoint) const override
Definition pybind11Utils.hpp:21
std::shared_ptr< Triangle3 > Triangle3Ptr
Shared pointer for the Triangle3 type.
Definition Triangle3.hpp:95
Struct that represents ray-surface intersection point.
Definition Surface.hpp:26
1.9.8