MeshLib
 
Loading...
Searching...
No Matches
MRMeshC/MRMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRAffineXf.h"
5#include "MRBox.h"
6#include "MRId.h"
7
9
12
14MRMESHC_API MRMesh* mrMeshFromTriangles( const MRVector3f* vertexCoordinates, size_t vertexCoordinatesNum, const MRThreeVertIds* t, size_t tNum );
15
18MRMESHC_API MRMesh* mrMeshFromTrianglesDuplicatingNonManifoldVertices( const MRVector3f* vertexCoordinates, size_t vertexCoordinatesNum, const MRThreeVertIds* t, size_t tNum );
19
23MRMESHC_API MRMesh* mrMeshNewFromPointTriples( const MRTriangle3f* posTriangles, size_t posTrianglesNum, bool duplicateNonManifoldVertices );
24
27
30
32MRMESHC_API size_t mrMeshPointsNum( const MRMesh* mesh );
33
36
39
43
46MRMESHC_API void mrMeshTransform( MRMesh* mesh, const MRAffineXf3f* xf, const MRVertBitSet* region );
47
51
65
67MRMESHC_API void mrMeshAddPartByMask( MRMesh* mesh, const MRMesh* from, const MRFaceBitSet* fromFaces, const MRMeshAddPartByMaskParameters* params );
68
70MRMESHC_API void mrMeshPack( MRMesh* mesh, bool rearrangeTriangles );
71
74MRMESHC_API void mrMeshPackOptimally( MRMesh* mesh, bool preserveAABBTree );
75
78
83
87
MRVertId MRThreeVertIds[3]
a set of 3 vertices; useful for representing a face via its vertex indices
Definition MRMeshC/MRId.h:17
#define MR_EXTERN_C_BEGIN
Definition MRMeshC/MRMeshFwd.h:26
MRBitSet MRVertBitSet
Definition MRMeshC/MRMeshFwd.h:37
#define MR_EXTERN_C_END
Definition MRMeshC/MRMeshFwd.h:27
struct MRMesh MRMesh
Definition MRMeshC/MRMeshFwd.h:42
struct MRMeshTopology MRMeshTopology
Definition MRMeshC/MRMeshFwd.h:41
MRBitSet MRFaceBitSet
Definition MRMeshC/MRMeshFwd.h:36
#define MRMESHC_API
Definition MRMeshC/MRMeshFwd.h:19
struct MREdgePath MREdgePath
Definition MRMeshC/MRMeshFwd.h:46
struct MRTriangulation MRTriangulation
Definition MRMeshC/MRMeshFwd.h:44
MRMESHC_API const MRVector3f * mrMeshPoints(const MRMesh *mesh)
gets read-only access to the mesh vertex coordinates
MRMESHC_API MRTriangulation * mrMeshGetTriangulation(const MRMesh *mesh)
MRMESHC_API MRVector3f mrMeshHoleDirArea(const MRMesh *mesh, MREdgeId e)
MRMESHC_API const MRMeshTopology * mrMeshTopology(const MRMesh *mesh)
gets read-only access to the mesh topology object
MRMESHC_API size_t mrMeshPointsNum(const MRMesh *mesh)
gets count of the mesh vertex coordinates
MRMESHC_API MREdgePath * mrMeshFindHoleRepresentiveEdges(const MRMesh *mesh)
MRMESHC_API MRMesh * mrMeshFromTrianglesDuplicatingNonManifoldVertices(const MRVector3f *vertexCoordinates, size_t vertexCoordinatesNum, const MRThreeVertIds *t, size_t tNum)
MRMESHC_API void mrMeshPackOptimally(MRMesh *mesh, bool preserveAABBTree)
MRMESHC_API MRMesh * mrMeshNewFromPointTriples(const MRTriangle3f *posTriangles, size_t posTrianglesNum, bool duplicateNonManifoldVertices)
MRMESHC_API MRMesh * mrMeshFromTriangles(const MRVector3f *vertexCoordinates, size_t vertexCoordinatesNum, const MRThreeVertIds *t, size_t tNum)
constructs a mesh from vertex coordinates and a set of triangles with given ids
MRMESHC_API void mrMeshPack(MRMesh *mesh, bool rearrangeTriangles)
tightly packs all arrays eliminating lone edges and invalid face, verts and points
MRMESHC_API MRMeshTopology * mrMeshTopologyRef(MRMesh *mesh)
gets read-write access to the mesh topology object
MRMESHC_API void mrMeshTransform(MRMesh *mesh, const MRAffineXf3f *xf, const MRVertBitSet *region)
MRMESHC_API MRVector3f * mrMeshPointsRef(MRMesh *mesh)
gets read-write access to the mesh vertex coordinates
MRMESHC_API void mrMeshAddPartByMask(MRMesh *mesh, const MRMesh *from, const MRFaceBitSet *fromFaces, const MRMeshAddPartByMaskParameters *params)
appends mesh (from) in addition to this mesh: creates new edges, faces, verts and points
struct MRMeshAddPartByMaskParameters MRMeshAddPartByMaskParameters
optional parameters for mrMeshAddPartByMask
MRMESHC_API MRBox3f mrMeshComputeBoundingBox(const MRMesh *mesh, const MRAffineXf3f *toWorld)
MR_EXTERN_C_BEGIN MRMESHC_API MRMesh * mrMeshCopy(const MRMesh *mesh)
creates a copy of a Mesh object
MRMESHC_API void mrMeshFree(MRMesh *mesh)
deallocates a Mesh object
MRVector3f MRTriangle3f[3]
a set of 3 vectors; useful for representing a face via its vertex coordinates
Definition MRMeshC/MRVector3.h:40
affine transformation: y = A*x + b, where A in VxV, and b in V
Definition MRMeshC/MRAffineXf.h:10
Definition MRMeshC/MRBox.h:9
edge index
Definition MRMeshC/MRId.h:8
optional parameters for mrMeshAddPartByMask
Definition MRMeshC/MRMesh.h:54
const MREdgePath * fromContours
contours on from mesh during addition
Definition MRMeshC/MRMesh.h:61
size_t thisContoursNum
Definition MRMeshC/MRMesh.h:59
size_t fromContoursNum
Definition MRMeshC/MRMesh.h:62
const MREdgePath * thisContours
contours on this mesh that have to be stitched with
Definition MRMeshC/MRMesh.h:58
bool flipOrientation
if flipOrientation then every from triangle is inverted before adding
Definition MRMeshC/MRMesh.h:56
three-dimensional vector
Definition MRMeshC/MRVector3.h:9