Loading...
Searching...
No Matches
TriangleMesh3.hpp
Go to the documentation of this file.
Definition Matrix.hpp:30
Front-end to create TriangleMesh3 objects step by step.
Definition TriangleMesh3.hpp:256
TriangleMesh3Ptr MakeShared() const
Builds shared pointer of TriangleMesh3 instance.
Builder & WithNormals(const NormalArray &normals)
Returns builder with normals.
Builder & WithNormalIndices(const IndexArray &normalIndices)
Returns builder with normal indices.
Builder & WithPointIndices(const IndexArray &pointIndices)
Returns builder with point indices.
Builder & WithUVs(const UVArray &uvs)
Returns builder with uvs.
Builder & WithUVIndices(const IndexArray &uvIndices)
Returns builder with uv indices.
Builder & WithPoints(const PointArray &points)
Returns builder with points.
void AddUVTriangle(const Vector3UZ &newUVIndices)
Adds a triangle with UV.
~TriangleMesh3() override=default
void WriteObj(std::ostream *stream) const
Writes the mesh in obj format to the output stream.
bool IsInsideLocal(const Vector3D &otherPoint) const override
TriangleMesh3 & operator=(const TriangleMesh3 &other)
Deleted copy assignment operator.
size_t NumberOfTriangles() const
Returns number of triangles.
Array1< Vector2D > Vector2DArray
Definition TriangleMesh3.hpp:33
bool ReadObj(std::istream *stream)
Reads the mesh in obj format from the input stream.
const Vector3D & Normal(size_t i) const
Returns constant reference to the i-th normal.
SurfaceRayIntersection3 ClosestIntersectionLocal(const Ray3D &ray) const override
void AddPointTriangle(const Vector3UZ &newPointIndices)
Adds a triangle with point.
double ClosestDistanceLocal(const Vector3D &otherPoint) const override
Array1< Vector3D > Vector3DArray
Definition TriangleMesh3.hpp:34
Vector3UZ & PointIndex(size_t i)
Returns reference to the point indices of i-th triangle.
bool ReadObj(const std::string &fileName)
Reads the mesh in obj format from the file.
const Vector3UZ & NormalIndex(size_t i) const
Returns constant reference to the normal indices of i-th triangle.
const Vector3UZ & PointIndex(size_t i) const
Returns constant reference to the point indices of i-th triangle.
bool WriteObj(const std::string &fileName) const
Writes the mesh in obj format to the file.
Vector3D ClosestNormalLocal(const Vector3D &otherPoint) const override
bool IntersectsLocal(const Ray3D &ray) const override
const Vector3D & Point(size_t i) const
Returns constant reference to the i-th point.
Vector3UZ & UVIndex(size_t i)
Returns reference to the UV indices of i-th triangle.
void AddNormalTriangle(const Vector3UZ &newNormalIndices)
Adds a triangle with normal.
TriangleMesh3(const Transform3 &_transform=Transform3{}, bool _isNormalFlipped=false)
Constructs an empty triangle mesh.
const Vector3UZ & UVIndex(size_t i) const
Returns constant reference to the UV indices of i-th triangle.
TriangleMesh3 & operator=(TriangleMesh3 &&other) noexcept=delete
Deleted move assignment operator.
TriangleMesh3(TriangleMesh3 &&other) noexcept=delete
Deleted move constructor.
void SetAngleWeightedVertexNormal()
Sets angle weighted vertex normal.
BoundingBox3D BoundingBoxLocal() const override
Returns the bounding box of this surface object in local frame.
TriangleMesh3(PointArray points, NormalArray normals, UVArray uvs, IndexArray pointIndices, IndexArray normalIndices, IndexArray uvIndices, const Transform3 &_transform=Transform3{}, bool _isNormalFlipped=false)
Constructs mesh with points, normals, uvs, and their indices.
Vector3D ClosestPointLocal(const Vector3D &otherPoint) const override
void Set(const TriangleMesh3 &other)
Copies the contents from other mesh.
Vector3UZ & NormalIndex(size_t i)
Returns reference to the normal indices of i-th triangle.
void UpdateQueryEngine() override
Updates internal spatial query engine.
const Vector2D & UV(size_t i) const
Returns constant reference to the i-th UV coordinates.
void UpdateQueryEngine() const
Updates internal spatial query engine.
Definition pybind11Utils.hpp:21
std::shared_ptr< TriangleMesh3 > TriangleMesh3Ptr
Shared pointer for the TriangleMesh3 type.
Definition TriangleMesh3.hpp:250
Struct that represents ray-surface intersection point.
Definition Surface.hpp:26
1.9.8