MeshLib
 
Loading...
Searching...
No Matches
Mesh Class Reference

represents a mesh, including topology (connectivity) information and point coordinates, More...

#include <MRMesh.h>

+ Inheritance diagram for Mesh:

Public Member Functions

 ~Mesh ()
 
array< VertIdGetLeftTriVerts (EdgeId e)
 
void Transform (AffineXf3f^ xf)
 transforms all points
 
void Transform (AffineXf3f^ xf, VertBitSet^ region)
 transforms all points in the region
 
void PackOptimally ()
 packs tightly and rearranges vertices, triangles and edges to put close in space elements in close indices
 

Static Public Member Functions

static Mesh FromTriangles (VertCoords^ points, MR::DotNet::Triangulation^ triangles)
 creates mesh from point coordinates and triangulation
 
static Mesh FromTrianglesDuplicatingNonManifoldVertices (VertCoords^ points, MR::DotNet::Triangulation^ triangles)
 creates mesh from point coordinates and triangulation. If some vertices are not manifold, they will be duplicated
 
static Mesh FromAnySupportedFormat (System::String^ path)
 loads mesh from file of any supported format
 
static void ToAnySupportedFormat (Mesh^ mesh, System::String^ path)
 saves mesh to file of any supported format
 
static bool operator== (Mesh^ a, Mesh^ b)
 
static bool operator!= (Mesh^ a, Mesh^ b)
 
static Mesh MakeCube (Vector3f^ size, Vector3f^ base)
 creates a parallelepiped with given sizes and base
 
static Mesh MakeSphere (float radius, int vertexCount)
 creates a sphere of given radius and vertex count
 
static Mesh MakeTorus (float primaryRadius, float secondaryRadius, int primaryResolution, int secondaryResolution)
 creates a torus with given parameters
 
static Mesh MakeCylinder (float radius, float length)
 
static Mesh MakeCylinder (float radius, float startAngle, float arcSize, float length)
 
static Mesh MakeCylinder (float radius, float startAngle, float arcSize, float length, int resolution)
 
static Mesh MakeCylinder (float radius0, float radius1, float startAngle, float arcSize, float length, int resolution)
 
static MeshProjectionResult FindProjection (Vector3f^ point, MeshPart meshPart)
 
static MeshProjectionResult FindProjection (Vector3f^ point, MeshPart meshPart, float maxDistanceSquared)
 
static MeshProjectionResult FindProjection (Vector3f^ point, MeshPart meshPart, float maxDistanceSquared, AffineXf3f^ xf)
 
static MeshProjectionResult FindProjection (Vector3f^ point, MeshPart meshPart, float maxDistanceSquared, AffineXf3f^ xf, float minDistanceSquared)
 

Public Attributes

internal : Mesh( MR::Mesh* mesh )
 
virtual property VertCoordsReadOnly Points { VertCoordsReadOnly^ get()
 point coordinates
 
virtual property VertBitSetReadOnly ValidPoints { VertBitSetReadOnly^ get()
 set of all valid vertices
 
virtual property Box3f BoundingBox { Box3f^ get()
 
property FaceBitSetReadOnly ValidFaces { FaceBitSetReadOnly^ get()
 set of all valid faces
 
property TriangulationReadOnly Triangulation { TriangulationReadOnly^ get()
 info about triangles
 
property EdgePathReadOnly HoleRepresentiveEdges { EdgePathReadOnly^ get()
 edges with no valid left face for every boundary in the mesh
 
- Public Attributes inherited from MeshOrPoints
property VertCoordsReadOnly Points { VertCoordsReadOnly^ get()
 
property VertBitSetReadOnly ValidPoints { VertBitSetReadOnly^ get()
 
property Box3f BoundingBox { Box3f^ get()
 

Detailed Description

represents a mesh, including topology (connectivity) information and point coordinates,

Constructor & Destructor Documentation

◆ ~Mesh()

Mesh::~Mesh ( )

Member Function Documentation

◆ FindProjection() [1/4]

static MeshProjectionResult Mesh::FindProjection ( Vector3f^ point,
MeshPart meshPart )
static

◆ FindProjection() [2/4]

static MeshProjectionResult Mesh::FindProjection ( Vector3f^ point,
MeshPart meshPart,
float maxDistanceSquared )
static

◆ FindProjection() [3/4]

static MeshProjectionResult Mesh::FindProjection ( Vector3f^ point,
MeshPart meshPart,
float maxDistanceSquared,
AffineXf3f^ xf )
static

◆ FindProjection() [4/4]

static MeshProjectionResult Mesh::FindProjection ( Vector3f^ point,
MeshPart meshPart,
float maxDistanceSquared,
AffineXf3f^ xf,
float minDistanceSquared )
static

◆ FromAnySupportedFormat()

static Mesh Mesh::FromAnySupportedFormat ( System::String^ path)
static

loads mesh from file of any supported format

◆ FromTriangles()

static Mesh Mesh::FromTriangles ( VertCoords^ points,
MR::DotNet::Triangulation^ triangles )
static

creates mesh from point coordinates and triangulation

◆ FromTrianglesDuplicatingNonManifoldVertices()

static Mesh Mesh::FromTrianglesDuplicatingNonManifoldVertices ( VertCoords^ points,
MR::DotNet::Triangulation^ triangles )
static

creates mesh from point coordinates and triangulation. If some vertices are not manifold, they will be duplicated

◆ GetLeftTriVerts()

array< VertId > Mesh::GetLeftTriVerts ( EdgeId e)

gets 3 vertices of the left face ( face-id may not exist, but the shape must be triangular) the vertices are returned in counter-clockwise order if look from mesh outside

◆ MakeCube()

static Mesh Mesh::MakeCube ( Vector3f^ size,
Vector3f^ base )
static

creates a parallelepiped with given sizes and base

◆ MakeCylinder() [1/4]

static Mesh Mesh::MakeCylinder ( float radius,
float length )
static

◆ MakeCylinder() [2/4]

static Mesh Mesh::MakeCylinder ( float radius,
float startAngle,
float arcSize,
float length )
static

◆ MakeCylinder() [3/4]

static Mesh Mesh::MakeCylinder ( float radius,
float startAngle,
float arcSize,
float length,
int resolution )
static

◆ MakeCylinder() [4/4]

static Mesh Mesh::MakeCylinder ( float radius0,
float radius1,
float startAngle,
float arcSize,
float length,
int resolution )
static

◆ MakeSphere()

static Mesh Mesh::MakeSphere ( float radius,
int vertexCount )
static

creates a sphere of given radius and vertex count

◆ MakeTorus()

static Mesh Mesh::MakeTorus ( float primaryRadius,
float secondaryRadius,
int primaryResolution,
int secondaryResolution )
static

creates a torus with given parameters

◆ operator!=()

static bool Mesh::operator!= ( Mesh^ a,
Mesh^ b )
static

◆ operator==()

static bool Mesh::operator== ( Mesh^ a,
Mesh^ b )
static

◆ PackOptimally()

void Mesh::PackOptimally ( )

packs tightly and rearranges vertices, triangles and edges to put close in space elements in close indices

◆ ToAnySupportedFormat()

static void Mesh::ToAnySupportedFormat ( Mesh^ mesh,
System::String^ path )
static

saves mesh to file of any supported format

◆ Transform() [1/2]

void Mesh::Transform ( AffineXf3f^ xf)

transforms all points

◆ Transform() [2/2]

void Mesh::Transform ( AffineXf3f^ xf,
VertBitSet^ region )

transforms all points in the region

Member Data Documentation

◆ __pad0__

internal Mesh::__pad0__

◆ BoundingBox

virtual property Box3f Mesh::BoundingBox { Box3f^ get()

◆ HoleRepresentiveEdges

property EdgePathReadOnly Mesh::HoleRepresentiveEdges { EdgePathReadOnly^ get()

edges with no valid left face for every boundary in the mesh

◆ Points

virtual property VertCoordsReadOnly Mesh::Points { VertCoordsReadOnly^ get()

point coordinates

◆ Triangulation

property TriangulationReadOnly Mesh::Triangulation { TriangulationReadOnly^ get()

info about triangles

◆ ValidFaces

property FaceBitSetReadOnly Mesh::ValidFaces { FaceBitSetReadOnly^ get()

set of all valid faces

◆ ValidPoints

virtual property VertBitSetReadOnly Mesh::ValidPoints { VertBitSetReadOnly^ get()

set of all valid vertices


The documentation for this class was generated from the following file: