TriangleMesh3.hpp
Go to the documentation of this file.
const Vector3UZ & NormalIndex(size_t i) const
Returns constant reference to the normal indices of i-th triangle.
void AddUVTriangle(const Vector3UZ &newUVIndices)
Adds a triangle with UV.
void AddNormalTriangle(const Vector3UZ &newNormalIndices)
Adds a triangle with normal.
const Vector3UZ & PointIndex(size_t i) const
Returns constant reference to the point indices of i-th triangle.
Vector3D ClosestPointLocal(const Vector3D &otherPoint) const override
TriangleMesh3(const Transform3 &_transform=Transform3{}, bool _isNormalFlipped=false)
Constructs an empty triangle mesh.
size_t NumberOfTriangles() const
Returns number of triangles.
double ClosestDistanceLocal(const Vector3D &otherPoint) const override
SurfaceRayIntersection3 ClosestIntersectionLocal(const Ray3D &ray) const override
TriangleMesh3 & operator=(const TriangleMesh3 &other)
Deleted copy assignment operator.
BoundingBox3D BoundingBoxLocal() const override
Returns the bounding box of this surface object in local frame.
bool ReadObj(std::istream *stream)
Reads the mesh in obj format from the input stream.
const Vector2D & UV(size_t i) const
Returns constant reference to the i-th UV coordinates.
Array1< Vector3D > Vector3DArray
Definition: TriangleMesh3.hpp:34
const Vector3D & Normal(size_t i) const
Returns constant reference to the i-th normal.
void WriteObj(std::ostream *stream) const
Writes the mesh in obj format to the output stream.
const Vector3UZ & UVIndex(size_t i) const
Returns constant reference to the UV indices of i-th triangle.
Front-end to create TriangleMesh3 objects step by step.
Definition: TriangleMesh3.hpp:255
void UpdateQueryEngine() override
Updates internal spatial query engine.
Definition: Matrix.hpp:27
Definition: pybind11Utils.hpp:20
std::shared_ptr< TriangleMesh3 > TriangleMesh3Ptr
Shared pointer for the TriangleMesh3 type.
Definition: TriangleMesh3.hpp:250
Array1< Vector2D > Vector2DArray
Definition: TriangleMesh3.hpp:33
Definition: Array-Impl.hpp:19
Struct that represents ray-surface intersection point.
Definition: Surface.hpp:25
void AddPointTriangle(const Vector3UZ &newPointIndices)
Adds a triangle with point.
Vector3D ClosestNormalLocal(const Vector3D &otherPoint) const override
bool IsInsideLocal(const Vector3D &otherPoint) const override
const Vector3D & Point(size_t i) const
Returns constant reference to the i-th point.
~TriangleMesh3() override=default
void SetAngleWeightedVertexNormal()
Sets angle weighted vertex normal.
void Set(const TriangleMesh3 &other)
Copies the contents from other mesh.
bool IntersectsLocal(const Ray3D &ray) const override