Geogram
Version 1.9.1
A programming library of geometric algorithms
|
Global Vorpaline namespace. More...
Namespaces | |
CmdLine | |
Utilities to process command line arguments. | |
exact | |
Exact geometric types. | |
FileSystem | |
Abstraction layer for file-system management. | |
Geom | |
Geometric functions and utilities. | |
MatrixUtil | |
Utilities for manipulating matrices. | |
Memory | |
Utilities for memory management. | |
MeshCellDescriptors | |
Gathers declarations of global cell descriptors. | |
Numeric | |
Defines numeric types used in Vorpaline. | |
PCK | |
PCK (Predicate Construction Kit) implements a set of geometric predicates. PCK uses arithmetic filters (Meyer and Pion), expansion arithmetics (Shewchuk) and simulation of simplicity (Edelsbrunner). | |
Permutation | |
Utilities for manipulating permutations. | |
Process | |
Abstraction layer for process management and multi-threading. | |
Progress | |
Framework for tracking the progression of a task. | |
Classes | |
struct | FF_param |
struct | HexdomParam |
struct | IdPair |
struct | BBox1 |
struct | FacetsExtraConnectivity |
struct | FacetsExtraConnectivityWithInvalidFacets |
class | FFopt |
struct | AxisPermutation |
struct | Frame |
struct | CoTan3D |
class | TrglGradient |
struct | Basis3d |
struct | UncenteredPCA3D |
struct | BBox |
struct | HBoxes |
struct | DynamicHBoxes |
struct | FacetIntersect |
struct | TrFan |
struct | Coeff |
struct | NaiveSparseMatrix |
struct | RemoveColMatrix |
struct | MatrixM |
struct | MatrixMixedConstrainedSolver |
class | PGPopt |
struct | Poly2d |
struct | Poly3d |
struct | SphericalHarmonicL4 |
class | LinearLeastSquares |
Computes the linear least squares regression of a function evaluated in 3d. More... | |
class | OptimalTransportMap |
Computes semi-discrete optimal transport maps. More... | |
class | OptimalTransportMap2d |
Computes semi-discrete optimal transport maps. More... | |
class | OptimalTransportMap3d |
Computes semi-discrete optimal transport maps. More... | |
class | OptimalTransportMapOnSurface |
Computes semi-discrete optimal transport maps. More... | |
class | VSDM |
Voronoi Square Distance Minimization. More... | |
class | AttributeStoreObserver |
Base class for attributes. They are notified whenever the AttributeStore is modified. More... | |
class | AttributeStoreCreator |
Internal class for creating an AttributeStore from the type name of its elements. More... | |
class | AttributeStore |
Notifies a set of AttributeStoreObservers each time the stored array changes size and/or base address and/or dimension. More... | |
class | TypedAttributeStore |
Stores an array of elements of a given type, and notifies a set of AttributeStoreObservers each time the storead array changes size and/or base address. More... | |
class | TypedAttributeStoreCreator |
Implementation of AttributeStoreCreator for a specific type. More... | |
class | geo_register_attribute_type |
Helper class to register new attribute types. More... | |
class | AttributesManager |
Managers a set of attributes attached to an object. More... | |
class | AttributeBase |
Base class for Attributes, that manipulates an attribute stored in an AttributesManager. More... | |
class | Attribute |
Manages an attribute attached to a set of object. More... | |
class | Attribute< bool > |
Specialization of Attribute for booleans. More... | |
class | ScalarAttributeAdapterBase |
Access to an attribute as a double regardless its type. More... | |
class | ReadOnlyScalarAttributeAdapter |
Readonly access to an attribute as a double regardless its type. More... | |
class | ReadWriteScalarAttributeAdapter |
Readwrite access to an attribute as a double regardless its type. More... | |
class | BinaryStream |
Binary stream base class. More... | |
class | BinaryInputStream |
Binary input file. More... | |
class | BinaryOutputStream |
Binary output file. More... | |
class | BooleanExpression |
A simple parser for boolean expressions. More... | |
class | Counted |
Base class for reference-counted objects. More... | |
class | DebugStream |
Easy to use functions to save geometry to a Alias Wavefront .obj file for debugging. More... | |
class | VariableObserver |
Observes Environment variables. More... | |
class | VariableObserverList |
List of VariableObservers. More... | |
class | Environment |
Application environment. More... | |
class | SystemEnvironment |
System environment. More... | |
class | InstanceRepo |
Repository of unique instances. More... | |
class | Factory |
Factory of typed objects. More... | |
struct | FactoryCreator0 |
Factory creator without constructor arguments. More... | |
class | Factory0 |
Factory for types without constructor arguments. More... | |
struct | FactoryCreator1 |
Factory creator with one argument. More... | |
class | Factory1 |
Factory for types with one constructor argument. More... | |
class | GeoFileException |
GeoFile exception. More... | |
class | GeoFile |
Base class for reading or writing Geogram structured binary files. More... | |
class | InputGeoFile |
Used to read a structured binary file. More... | |
class | OutputGeoFile |
Used to write a structured binary file. More... | |
struct | Plane |
A 3D Plane. More... | |
class | Box |
Axis-aligned bounding box. More... | |
class | Box2d |
Axis-aligned bounding box. More... | |
struct | Ray |
A Ray, in parametric form. More... | |
class | LineInput |
Reads an ASCII file line per line. More... | |
class | LoggerStreamBuf |
Stream buffer used by the LoggerStreams. More... | |
class | LoggerStream |
Stream used by the Logger. More... | |
class | LoggerClient |
Logger client base class. More... | |
class | ConsoleLogger |
Logger client that redirects messages to standard output. More... | |
class | FileLogger |
Logger client that redirects messages to a file. More... | |
class | Logger |
Generic logging framework. More... | |
class | Matrix |
A matrix type. More... | |
class | vector |
Vector with aligned memory allocation. More... | |
class | vector< bool > |
Specialization of vector for elements of type bool. More... | |
class | PackedArrays |
Efficient storage for array of arrays. More... | |
class | Thread |
Platform-independent base class for running threads. More... | |
class | TypedThreadGroup |
Typed collection of Threads. More... | |
class | ThreadManager |
Platform-independent base class for running concurrent threads. More... | |
class | MonoThreadingThreadManager |
Single thread ThreadManager. More... | |
class | ProgressClient |
Task progress listener. More... | |
struct | TaskCanceled |
Exception thrown when a task is canceled. More... | |
class | ProgressTask |
Tracks the progress of a task. More... | |
class | Quaternion |
Quaternions are useful for representing rotations. More... | |
class | index_as_iterator |
Wraps an integer to be used with the range-based for construct. More... | |
class | index_range |
A generic index_range bounded by two "non-iterators". More... | |
class | const_index_ptr_in_array |
Encapsulates a const pointer to an element in an index_t array. More... | |
class | index_ptr_in_array |
Encapsulates a pointer to an element in an index_t array. More... | |
class | index_ptr_range |
class | const_index_ptr_range |
class | rationalg |
rationalg (generic rational) is used to compute the sign of rational fractions exactly. More... | |
class | SmartPointer |
A smart pointer with reference-counted copy semantics. More... | |
class | Stopwatch |
Scope restricted stopwatch. More... | |
class | vecng |
Generic maths vector. More... | |
class | vecng< 2, T > |
Specialization of class vecng for DIM == 2. More... | |
class | vecng< 3, T > |
Specialization of class vecng for DIM == 3. More... | |
class | vecng< 4, T > |
Specialization of class vecn3 for DIM == 4. More... | |
class | vec2Hg |
2d vector with homogeneous coordinates More... | |
class | vec2HgLexicoCompare |
Comparator class for vec2Hg \detail Used to create maps indexed by vec2Hg or SOS symbolic perturbation. More... | |
class | vec3Hg |
3d vector with homogeneous coordinates More... | |
class | vec3HgLexicoCompare |
Comparator class for vec3Hg \detail Used to create maps indexed by vec3Hg or SOS symbolic perturbation. More... | |
class | Cavity |
Represents the set of tetrahedra on the boundary of the cavity in a 3D Delaunay triangulation. More... | |
class | CDTBase2d |
Base class for constrained Delaunay triangulation. More... | |
class | CDT2d |
Constrained Delaunay triangulation. More... | |
class | ExactCDT2d |
Constrained Delaunay Triangulation with vertices that are exact points. Can be used to implement 2D CSG. More... | |
class | Delaunay |
Abstract interface for Delaunay triangulation in Nd. More... | |
class | Delaunay2d |
Implementation of Delaunay in 2d. More... | |
class | RegularWeightedDelaunay2d |
Regular Delaunay triangulation of weighted points. More... | |
class | Delaunay3d |
Implementation of Delaunay in 3d. More... | |
class | RegularWeightedDelaunay3d |
Regular Delaunay triangulation of weighted points. More... | |
class | Delaunay_NearestNeighbors |
Delaunay interface for NearestNeighbors search. More... | |
class | CellStatusArray |
An array of cell status codes associates to each tetrahedron in a Delaunay tetrahedralization. More... | |
class | LocalFeatureSize |
Computes an approximation of lfs (local feature size). More... | |
class | ParallelDelaunay3d |
Multithreaded implementation of Delaunay in 3d. More... | |
class | Periodic |
Utilities for managing 3D periodic space. More... | |
class | PeriodicDelaunay3d |
Multithreaded implementation of Delaunay in 3d with optional periodic boundary conditions. More... | |
class | GenColor |
A generic color type. More... | |
class | Colormap |
A Colormap. More... | |
class | Image |
An image. More... | |
class | ImageLibrary |
Manages the ImageSerializer repository and the named images. More... | |
class | geo_declare_image_serializer |
Declares an image serializer for a given extension. More... | |
class | ImageRasterizer |
Draws triangles in an image. More... | |
class | ImageSerializer |
Loads and saves images. More... | |
class | ImageSerializer_pgm |
class | ImageSerializerSTB |
Loads and saves images. More... | |
class | ImageSerializerSTBRead |
An image serializer that can read images. More... | |
class | ImageSerializerSTBReadWrite |
An image serializer that can read and write images. More... | |
class | ImageSerializer_xpm |
class | StructuringElement |
A structuring element, that is the definition of neighborhood used by a morphological operation. More... | |
class | MorphoMath |
Implements morphological operators for images. More... | |
class | lua_to |
Converts LUA variables to C++ variables. More... | |
class | lua_to< int > |
lua_to specialization for int. More... | |
class | lua_to< Numeric::uint32 > |
lua_to specialization for Numeric::uint32. More... | |
class | lua_to< Numeric::uint64 > |
lua_to specialization for Numeric::uint64. More... | |
class | lua_to< Numeric::int64 > |
lua_to specialization for Numeric::int64. More... | |
class | lua_to< float > |
lua_to specialization for float. More... | |
class | lua_to< double > |
lua_to specialization for double. More... | |
class | lua_to< bool > |
lua_to specialization for bool. More... | |
class | lua_to< const char * > |
lua_to specialization for raw string (const char*). More... | |
class | lua_to< const std::string & > |
lua_to specialization for reference to std::string. More... | |
class | lua_to< std::string > |
lua_to specialization for std::string. More... | |
class | lua_wrapper |
Manages wrappers around C++ functions to be called from LUA. More... | |
struct | basic_bindex |
A couple of two indices. More... | |
struct | basic_trindex |
A triple of three indices. More... | |
struct | basic_quadindex |
A tuple of four indices. More... | |
class | MeshSubElementsStore |
Base class for mesh sub-element storage. More... | |
class | MeshElements |
Base class for mesh elements. More... | |
class | MeshVertices |
The vertices of a mesh. More... | |
class | MeshEdges |
The edges of a mesh. More... | |
class | MeshFacetsStore |
Stores the facets of a mesh (low-level store) More... | |
class | MeshFacetCornersStore |
Stores the facet corners of a mesh (low-level store) More... | |
class | MeshFacets |
The facets of a mesh. More... | |
struct | CellDescriptor |
Lookup tables that describe the combinatorics of each cell type. More... | |
class | MeshCellsStore |
Stores the cells of a mesh (low-level store) More... | |
class | MeshCellCornersStore |
Stores the cell corners of a mesh (low-level store) More... | |
class | MeshCellFacetsStore |
Stores the cell facets of a mesh (low-level store) More... | |
class | MeshCells |
The cells of a mesh. More... | |
class | Mesh |
Represents a mesh. More... | |
class | AABB |
Base class for Axis Aligned Bounding Box trees. More... | |
class | MeshAABB2d |
Base class for Axis Aligned Bounding Box trees of mesh elements with 2d boxes. More... | |
class | MeshAABB3d |
Base class for Axis Aligned Bounding Box trees of mesh elements with 3d boxes. More... | |
class | MeshFacetsAABB |
Axis Aligned Bounding Box tree of mesh facets in 3D. More... | |
class | MeshCellsAABB |
Axis Aligned Bounding Box tree of mesh cells. More... | |
class | MeshFacetsAABB2d |
Axis Aligned Bounding Box tree of mesh facets in 2D. More... | |
class | CSGMesh |
A Mesh with reference counting and bounding box. More... | |
class | CSGBuilder |
Implements CSG objects and instructions. More... | |
class | CSGCompiler |
Creates meshes from OpenSCAD .csg files. More... | |
class | FrameField |
Represents a 3D frame field, i.e. a function that associates a 3d orthonormal basis to each point in 3D space. More... | |
class | MeshHalfedges |
Exposes a half-edge like API for traversing a Mesh. More... | |
class | MeshIOFlags |
Mesh load/save flags. More... | |
class | MeshIOHandler |
Mesh loader and saver. More... | |
class | MeshSplitCallbacks |
A set of callbacks that specify how vertices attributes should be interpolated by subdivision functions. More... | |
class | MeshSurfaceIntersection |
Computes surface intersections. More... | |
class | MeshInTriangle |
Meshes a single triangle with the constraints that come from the intersections with the other triangles. More... | |
struct | IsectInfo |
Stores information about a triangle-triangle intersection. More... | |
class | CoplanarFacets |
Detects and retriangulates a set of coplanar facets for MeshSurfaceIntersection. More... | |
struct | MeshTetrahedralizeParameters |
Parameters for mesh_tetrahedralize() More... | |
class | expansion_nt |
Expansion_nt (expansion Number Type) is used to compute the sign of polynoms exactly. More... | |
class | intervalBase |
Base class for interval arithmetics. More... | |
class | intervalRU |
Interval arithmetics in round to upper (RU) mode. More... | |
class | intervalRN |
Number type for interval arithmetics. More... | |
class | expansion |
Represents numbers in arbitrary precision with a low-level API. More... | |
class | Optimizer |
Optimizer minimizes a multivariate function. More... | |
class | ParamValidator |
Tests whether texture coordinates attached to a surface mesh define a valid parameterization. More... | |
class | KdTree |
Base class for all Kd-tree implementations. More... | |
class | BalancedKdTree |
Implements NearestNeighborSearch using a balanced Kd-tree. More... | |
class | AdaptiveKdTree |
Implements NearestNeighborSearch using an Adaptive Kd-tree. More... | |
class | NearestNeighborSearch |
Abstract interface for nearest neighbor search algorithms. More... | |
class | PrincipalAxes3d |
class | CentroidalVoronoiTesselation |
CentroidalVoronoiTesselation is the main component of the remeshing algorithm. More... | |
class | IntegrationSimplex |
Computes an objective function and its gradient over a restricted Voronoi diagram. More... | |
class | RestrictedVoronoiDiagram |
Computes a Restricted Voronoi Diagram (RVD). More... | |
class | RVDCallback |
Baseclass for user functions called for each element (polygon or polyhedron) of a restricted Voronoi diagram traversal. More... | |
class | RVDPolygonCallback |
Baseclass for user functions called for each polygon of a surfacic restricted Voronoi diagram. More... | |
class | RVDPolyhedronCallback |
Baseclass for user functions called for each polyhedron of a volumetric restricted Voronoi diagram. More... | |
class | BuildRVDMesh |
Constructs a polyhedral mesh from a restricted Voronoi diagram. More... | |
class | RVDVertexMap |
RVDVertexMap maps symbolic vertices to unique ids. More... | |
class | RVDMeshBuilder |
Builds a Mesh using the symbolic information in the vertices computed by a RestrictedVoronoiDiagram. More... | |
class | FrameBufferObject |
An OpenGL frame buffer object. More... | |
class | AmbientOcclusionImpl |
Implementation of AmbientOcclusion full screen effect. More... | |
class | FullScreenEffectImpl |
Implementation of full screen effects. More... | |
class | UnsharpMaskingImpl |
Implementation of UnsharpMasking full screen effect. More... | |
class | Application |
Base class for all applications. More... | |
class | ArcBall |
Enables to interactively define a rotation. More... | |
class | CommandInvoker |
Abstract class for calling functions or calling member functions. More... | |
class | Command |
Manages the GUI of a command with ImGUI. More... | |
class | FunctionCommandInvoker |
An implementation of CommandInvoker that calls a function. More... | |
class | MemberFunctionCommandInvoker |
An implementation of CommandInvoker that calls a member function of an object. More... | |
class | Console |
A console, that displays logger messages, and where the user can enter commands. More... | |
class | SimpleApplication |
class | SimpleMeshApplication |
An Application that manipulates a single Mesh. More... | |
class | StatusBar |
StatusBar displays the progress bar. More... | |
class | TextEditor |
A minimalistic text editor. More... | |
class | MeshGfx |
Draws a mesh using OpenGL. More... | |
Typedefs | |
typedef vecng< 3, Numeric::int32 > | vec3i |
Represents points and vectors in 3d with integer coordinates. More... | |
typedef SmartPointer< AttributeStoreCreator > | AttributeStoreCreator_var |
An automatic reference-counted pointer to an AttributeStoreCreator. | |
typedef vecng< 2, Numeric::float64 > | vec2 |
Represents points and vectors in 2d. More... | |
typedef vecng< 3, Numeric::float64 > | vec3 |
Represents points and vectors in 3d. More... | |
typedef vecng< 4, Numeric::float64 > | vec4 |
Represents points and vectors in 4d. More... | |
typedef vecng< 2, Numeric::float32 > | vec2f |
Represents points and vectors in 2d with single-precision coordinates. More... | |
typedef vecng< 3, Numeric::float32 > | vec3f |
Represents points and vectors in 3d with single-precision coordinates. More... | |
typedef vecng< 4, Numeric::float32 > | vec4f |
Represents points and vectors in 4d with single-precision coordinates. More... | |
typedef vecng< 2, Numeric::int32 > | vec2i |
Represents points and vectors in 2d with integer coordinates. More... | |
typedef vecng< 4, Numeric::int32 > | vec4i |
Represents points and vectors in 4d with integer coordinates. More... | |
typedef Matrix< 2, Numeric::float64 > | mat2 |
Represents a 2x2 matrix. More... | |
typedef Matrix< 3, Numeric::float64 > | mat3 |
Represents a 3x3 matrix. More... | |
typedef Matrix< 4, Numeric::float64 > | mat4 |
Represents a 4x4 matrix. More... | |
typedef Box | Box3d |
typedef SmartPointer< LoggerClient > | LoggerClient_var |
typedef geo_index_t | index_t |
The type for storing and manipulating indices. | |
typedef geo_signed_index_t | signed_index_t |
The type for storing and manipulating indices differences. More... | |
typedef geo_coord_index_t | coord_index_t |
The type for storing coordinate indices, and iterating on the coordinates of a point. | |
typedef SmartPointer< Thread > | Thread_var |
typedef std::vector< Thread_var > | ThreadGroup |
Collection of Threads. More... | |
typedef SmartPointer< ThreadManager > | ThreadManager_var |
typedef SmartPointer< ProgressClient > | ProgressClient_var |
typedef GenColor< Numeric::float64 > | Color |
Default representation of colors. More... | |
typedef SmartPointer< Colormap > | Colormap_var |
An automatic reference-counted pointer to a Colormap. | |
typedef SmartPointer< Image > | Image_var |
typedef SmartPointer< ImageSerializer > | ImageSerializer_var |
An automatic reference-counted pointer to an ImageSerializer. | |
typedef int(* | lua_test_func) (lua_State *L, int idx) |
A pointer to a LUA function to test an argument in the LUA stack. | |
typedef AABB< Box2d > | AABB2d |
typedef AABB< Box3d > | AABB3d |
typedef SmartPointer< CSGMesh > | CSGMesh_var |
A smart pointer to a CSGMesh. | |
typedef std::vector< CSGMesh_var > | CSGScope |
A list of CSGMesh. More... | |
typedef void(* | ManifoldHarmonicsCallback) (index_t eigen_index, double eigen_val, const double *eigen_vector, void *client_data) |
A function pointer to be used with mesh_compute_manifold_harmonics_by_bands() | |
typedef std::pair< TriangleRegion, TriangleRegion > | TriangleIsect |
Encodes the symbolic representation of a triangle intersection, as a pair of TriangleRegion. | |
typedef vecng< 2, expansion_nt > | vec2E |
vec2 with coordinates as expansions More... | |
typedef vecng< 3, expansion_nt > | vec3E |
vec3 with coordinates as expansions More... | |
typedef vecng< 2, interval_nt > | vec2I |
vec2 with coordinates as interval_nt More... | |
typedef vecng< 3, interval_nt > | vec3I |
vec3 with coordinates as interval_nt More... | |
typedef vec2Hg< expansion_nt > | vec2HE |
2D vector in homogeneous coordinates with coordinates as expansions More... | |
typedef vec3Hg< expansion_nt > | vec3HE |
3D vector in homogeneous coordinates with coordinates as expansions More... | |
typedef vec2Hg< interval_nt > | vec2HI |
2D vector in homogeneous coordinates with coordinates as intervals. More... | |
typedef vec3Hg< interval_nt > | vec3HI |
3D vector in homogeneous coordinates with coordinates as intervals. More... | |
typedef rationalg< expansion_nt > | rational_nt |
typedef intervalRN | interval_nt |
typedef GEOGen::SymbolicVertex | SymbolicVertex |
Symbolic representation of a RestrictedVoronoiDiagram vertex. | |
typedef SmartPointer< IntegrationSimplex > | IntegrationSimplex_var |
typedef SmartPointer< RestrictedVoronoiDiagram > | RestrictedVoronoiDiagram_var |
Smart pointer to a RestrictedVoronoiDiagram object. | |
typedef SmartPointer< AmbientOcclusionImpl > | AmbientOcclusionImpl_var |
An automatic reference-counted pointer to an AmbientOcclusionImpl. | |
typedef SmartPointer< FullScreenEffectImpl > | FullScreenEffectImpl_var |
An automatic reference-counted pointer to a FullScreenEffectImpl. | |
typedef SmartPointer< UnsharpMaskingImpl > | UnsharpMaskingImpl_var |
An automatic reference-counted pointer to an UnsharpMaskingImpl. | |
typedef SmartPointer< CommandInvoker > | CommandInvoker_var |
Automatic reference-counted pointer to a CommandInvoker. More... | |
typedef SmartPointer< Console > | Console_var |
typedef SmartPointer< StatusBar > | StatusBar_var |
Enumerations | |
enum | OTLinearSolver { OT_PRECG , OT_SUPERLU , OT_CHOLMOD } |
Specifies the linear solver to be used with OptimalTransport. | |
enum | AssertMode { ASSERT_THROW , ASSERT_ABORT , ASSERT_BREAKPOINT } |
Assert termination mode. More... | |
enum | { GEOGRAM_INSTALL_NONE = 0 , GEOGRAM_INSTALL_HANDLERS = 1 , GEOGRAM_INSTALL_LOCALE = 2 , GEOGRAM_INSTALL_ERRNO = 4 , GEOGRAM_INSTALL_FPE = 8 , GEOGRAM_INSTALL_BIBLIO = 16 , GEOGRAM_INSTALL_ALL } |
Symbolic constants for GEO::initialize() More... | |
enum | Sign { NEGATIVE = -1 , ZERO = 0 , POSITIVE = 1 } |
Integer constants that represent the sign of a value. More... | |
enum | MeshCellType { MESH_TET = 0 , MESH_HEX = 1 , MESH_PRISM = 2 , MESH_PYRAMID = 3 , MESH_CONNECTOR = 4 , MESH_NB_CELL_TYPES = 5 } |
enum | MeshElementsFlags |
Indicates the mesh elements (vertices, facets or cells) present in a mesh. More... | |
enum | MeshCompareFlags { MESH_COMPARE_OK = 0 , MESH_COMPARE_DIMENSIONS = 1 , MESH_COMPARE_NB_VERTICES = 2 , MESH_COMPARE_NB_FACETS = 4 , MESH_COMPARE_NB_FACET_BORDERS = 8 , MESH_COMPARE_AREAS = 16 , MESH_COMPARE_TOPOLOGY = 32 , MESH_COMPARE_NB_TETS = 64 , MESH_COMPARE_NB_TET_BORDERS = 128 , MESH_COMPARE_SURFACE_PROPS , MESH_COMPARE_VOLUME_PROPS , MESH_COMPARE_ALL = MESH_COMPARE_VOLUME_PROPS } |
Flags used to compare two meshes. More... | |
enum | MeshDecimateMode { MESH_DECIMATE_FAST = 0 , MESH_DECIMATE_DUP_F = 1 , MESH_DECIMATE_DEG_3 = 2 , MESH_DECIMATE_KEEP_B = 4 , MESH_DECIMATE_DEFAULT } |
Determines the operating mode of mesh_decimate_vertex_clustering(). The flags can be combined with the 'bitwise or' (|) operator. MESH_REPAIR_DEFAULT fits most uses. More... | |
enum | MeshAttributesFlags { MESH_NO_ATTRIBUTES = 0 , MESH_VERTEX_REGION = 1 , MESH_VERTEX_TEX_COORD = 2 , MESH_VERTEX_COLOR = 4 , MESH_FACET_REGION = 8 , MESH_CELL_REGION = 16 , MESH_EDGE_REGION = 32 , MESH_ALL_ATTRIBUTES = 255 } |
Indicates the attributes stored in a mesh and attached to the mesh elements (vertices, facets or volumes). More... | |
enum | LaplaceBeltramiDiscretization { COMBINATORIAL , UNIFORM , FEM_P1 , FEM_P1_LUMPED } |
enum | MeshPartitionMode { MESH_PARTITION_HILBERT = 1 , MESH_PARTITION_CONNECTED_COMPONENTS = 2 } |
Strategy for mesh partitioning. More... | |
enum | MeshOrder { MESH_ORDER_HILBERT , MESH_ORDER_MORTON } |
Strategy for spatial sorting. More... | |
enum | MeshRepairMode { MESH_REPAIR_TOPOLOGY = 0 , MESH_REPAIR_COLOCATE = 1 , MESH_REPAIR_DUP_F = 2 , MESH_REPAIR_TRIANGULATE = 4 , MESH_REPAIR_RECONSTRUCT = 8 , MESH_REPAIR_QUIET = 16 , MESH_REPAIR_DEFAULT } |
Determines the operating mode of mesh_repair(). The flags can be combined with the 'bitwise or' (|) operator. MESH_REPAIR_DEFAULT fits most uses. More... | |
enum | MeshBooleanOperationFlags { MESH_BOOL_OPS_DEFAULT = 0 , MESH_BOOL_OPS_VERBOSE = 1 , MESH_BOOL_OPS_ATTRIBS = 2 , MESH_BOOL_OPS_NO_SIMPLIFY = 4 } |
enum | TriangleRegion { T1_RGN_P0 = 0 , T1_RGN_P1 = 1 , T1_RGN_P2 = 2 , T2_RGN_P0 = 3 , T2_RGN_P1 = 4 , T2_RGN_P2 = 5 , T1_RGN_E0 = 6 , T1_RGN_E1 = 7 , T1_RGN_E2 = 8 , T2_RGN_E0 = 9 , T2_RGN_E1 = 10 , T2_RGN_E2 = 11 , T1_RGN_T = 12 , T2_RGN_T = 13 , T_RGN_NB = 14 } |
Encodes the location of a point within a triangle. More... | |
enum | ChartParameterizer { PARAM_PROJECTION , PARAM_LSCM , PARAM_SPECTRAL_LSCM , PARAM_ABF } |
Parameterizer used to flatten individual charts. | |
enum | ChartPacker { PACK_NONE , PACK_TETRIS , PACK_XATLAS } |
Packer used to organize the charts in texture space. | |
enum | MeshSegmenter { SEGMENT_GEOMETRIC_VSA_L2 , SEGMENT_GEOMETRIC_VSA_L12 , SEGMENT_SPECTRAL_8 , SEGMENT_SPECTRAL_20 , SEGMENT_SPECTRAL_100 , SEGMENT_INERTIA_AXIS } |
enum | EventAction { EVENT_ACTION_UP =0 , EVENT_ACTION_DOWN =1 , EVENT_ACTION_DRAG =2 , EVENT_ACTION_UNKNOWN =255 } |
enum | EventSource { EVENT_SOURCE_KEYBOARD =0 , EVENT_SOURCE_MOUSE =1 , EVENT_SOURCE_FINGER =2 , EVENT_SOURCE_STYLUS =3 } |
enum | { geo_imgui_string_length = 4096 } |
Maximum string length for ImGUI. TODO replace with ImGui functions to handle dynamic buffer with InputText(). | |
Functions | |
template<class T > | |
void | min_equal (T &A, T B) |
template<class T > | |
void | max_equal (T &A, T B) |
double | nint (double x) |
index_t | next_mod (index_t i, index_t imax) |
index_t | prev_mod (index_t i, index_t imax) |
template<class T > | |
T | clamp (T in, T vmin, T vmax) |
void | show (mat3 r) |
vec3 | col (const mat3 &M, index_t j) |
vec3 | operator* (const mat3 &M, const vec3 &v) |
mat3 | mat3_from_coeffs (double a00, double a01, double a02, double a10, double a11, double a12, double a20, double a21, double a22) |
mat3 | mat3_from_coeffs (double *c) |
double | trace (const mat3 &m) |
double | Frobenius_norm (const mat3 &m) |
vec3i | snap_to_integer (const vec3 &f) |
bool | is_integer (double d) |
template<class T > | |
T & | aupp (int id, vector< T > &data) |
template<class T > | |
T & | aupp (index_t id, vector< T > &data) |
void | merge_hex_boundary_and_quadtri (Mesh *hex, Mesh *quad) |
void | halfedge_manip_example (Mesh *m) |
void | create_facet_adjacence (Mesh *m, bool has_border=false) |
void | compute_tet_edge_graph (Mesh *m, vector< index_t > &v2e, bool store_both_directions) |
void | restore_v2e (Mesh *m, vector< index_t > &v2e) |
void | cell_edges_in_RCS (Mesh *m, vector< index_t > &offset_from_org, vector< index_t > &dest) |
bool | v2f_is_valid (Mesh *m, vector< vector< index_t > > &v2f, vector< index_t > &to_kill) |
void EXPLORAGRAM_API | view_FF_with_gyphs (Mesh *m, Mesh *render, bool SH, double scale_in) |
void EXPLORAGRAM_API | view_U_locks (Mesh *m, Mesh *render, double scale_in, bool extractall) |
bool | is_identity_auvp (const mat3 &m, double eps=1e-15) |
mat3 EXPLORAGRAM_API | normalize_columns (const mat3 &B) |
mat3 EXPLORAGRAM_API | invert_columns_norm (const mat3 &B) |
mat3 EXPLORAGRAM_API | rotx (double angle) |
mat3 EXPLORAGRAM_API | roty (double angle) |
mat3 EXPLORAGRAM_API | rotz (double angle) |
mat3 | euler_to_mat3 (vec3 xyz) |
vec3 | mat3_to_euler (const mat3 &r) |
vec3i | operator* (const AxisPermutation &p, const vec3i &v) |
AxisPermutation EXPLORAGRAM_API | Rij (Mesh *m, Attribute< mat3 > &B, index_t i, index_t j) |
bool EXPLORAGRAM_API | triangle_is_frame_singular (Mesh *m, Attribute< mat3 > &B, index_t c, index_t cf) |
bool | triangle_is_frame_singular___give_stable_direction (Mesh *m, int &stable_dir_index, Attribute< mat3 > &B, index_t c, index_t cf, index_t cfv=0) |
bool | triangle_is_frame_singular___give_stable_direction (Mesh *m, vec3 &stable_dir_geom, Attribute< mat3 > &B, index_t c, index_t cf, index_t cfv=0) |
int EXPLORAGRAM_API | NoDivTriTriIsect (double V0[3], double V1[3], double V2[3], double U0[3], double U1[3], double U2[3]) |
int EXPLORAGRAM_API | triBoxOverlap (float boxcenter[3], float boxhalfsize[3], float triverts[3][3]) |
void | hex_set_2_hex_mesh (Mesh *hex, Mesh *quadtri=nullptr) |
void | kill_intersecting_hexes (Mesh *hex) |
void | export_hexes (Mesh *m, Mesh *hex) |
void | export_points (Mesh *m, Mesh *pts) |
void EXPLORAGRAM_API | bourrin_subdivide_hexes (Mesh *m) |
void EXPLORAGRAM_API | bourrin_quadrangulate_facets (Mesh *m) |
bool EXPLORAGRAM_API | next_crunch (Mesh *m, Mesh *newhex, bool newmodel=false, int nb_max_punch=1000000) |
void EXPLORAGRAM_API | prepare_crunch (Mesh *m, bool subdivide, bool revert) |
void EXPLORAGRAM_API | punch_and_cut (Mesh *m, Mesh *newhex, int nb_iter, int nb_punch_per_iter, bool check_validity) |
void EXPLORAGRAM_API | hex_crunch (Mesh *m, Mesh *hex) |
void EXPLORAGRAM_API | quadrangulate_easy_boundary (Mesh *m) |
void | fill_cavity_with_tetgen (Mesh *input, Mesh *tri, bool with_pyramid) |
void | add_hexes_to_tetmesh (Mesh *hex, Mesh *tet_mesh) |
void | Baudoin_mesher (Mesh *m) |
void | hex_dominant (Mesh *cavity, Mesh *hexahedrons, Mesh *result) |
double | tetra_volume_sign (vec3 A, vec3 B, vec3 C, vec3 D) |
bool | same_sign (double a, double b) |
vector< BBox > | facets_bbox (Mesh *m) |
bool | polyintersect (vector< vec3 > &P, vector< vec3 > &Q) |
vector< index_t > | get_intersecting_faces (Mesh *m) |
void | check_no_intersecting_faces (Mesh *m, bool allow_duplicated=false) |
void EXPLORAGRAM_API | get_facet_stats (Mesh *m, const char *msg="get_facet_stats", bool export_attribs=false) |
bool EXPLORAGRAM_API | surface_is_tetgenifiable (Mesh *m) |
bool EXPLORAGRAM_API | volume_is_tetgenifiable (Mesh *m) |
bool EXPLORAGRAM_API | surface_is_manifold (Mesh *m, std::string &msg) |
bool EXPLORAGRAM_API | volume_boundary_is_manifold (Mesh *m, std::string &msg) |
double EXPLORAGRAM_API | tet_vol (vec3 A, vec3 B, vec3 C, vec3 D) |
void EXPLORAGRAM_API | get_hex_proportion (Mesh *m, double &nb_hex_prop, double &vol_hex_prop) |
bool EXPLORAGRAM_API | have_negative_tet_volume (Mesh *m) |
vec3 | facet_normal (Mesh *m, index_t f) |
index_t | cell_facet_corner_id (Mesh *m, index_t c, index_t cf, index_t cfc) |
void EXPLORAGRAM_API | compute_3D_edge_cot_w (Mesh *m, Attribute< index_t > &v2e, double anisoZ_cotW) |
void EXPLORAGRAM_API | kill_isolated_vertices (Mesh *m) |
void EXPLORAGRAM_API | merge_vertices (Mesh *m, double eps) |
void EXPLORAGRAM_API | facets_smooth_geom (Mesh *m, std::vector< bool > &lock_v, double fit_coeff=.95) |
void EXPLORAGRAM_API | cells_smooth_geom (Mesh *m, std::vector< bool > &lock_v, double fit_coeff=.95) |
void EXPLORAGRAM_API | facets_smooth_geom (Mesh *m, double fit_coeff=.95) |
void EXPLORAGRAM_API | cells_smooth_geom (Mesh *m, double fit_coeff=.95) |
void EXPLORAGRAM_API | create_non_manifold_facet_adjacence (Mesh *m) |
vec3 * | X (Mesh *m) |
vec3 | cell_bary (Mesh *m, index_t c) |
vec3 | cell_facet_bary (Mesh *m, index_t c, index_t lf) |
vec3 | facet_bary (Mesh *m, index_t f) |
EXPLORAGRAM_API double | get_cell_average_edge_size (Mesh *mesh) |
EXPLORAGRAM_API double | get_facet_average_edge_size (Mesh *mesh) |
EXPLORAGRAM_API vec3 | tet_facet_cross (Mesh *m, index_t c, index_t lf) |
EXPLORAGRAM_API index_t | next_cell_around_oriented_edge (Mesh *m, index_t cell_id, index_t v_org, index_t v_dest) |
const index_t * | MTcase (double iso, double v0, double v1, double v2, double v3) |
index_t | add_facet_to_mesh (Mesh *m, vector< vec3 > &pts, Attribute< vec2 > *uv=nullptr, vector< vec2 > *lU=nullptr) |
template<class T > | |
void | get_range (Attribute< T > &attr, double &v_min, double &v_max) |
vector< vector< index_t > > | generate_v2f (Mesh *m) |
bool | find_self_intersections (Mesh *facets_with_quads_and_tri_only, vector< index_t > &intersections) |
bool | lock_self_intersecting_regions (Mesh *facets_with_quads_and_tri_only, vector< BBox > ®ions_to_lock) |
bool | lock_self_intersecting_regions (Mesh *facets_with_quads_and_tri_only, Attribute< bool > &verts_to_remove, Attribute< index_t > &undo) |
bool | try_simplify (Mesh *m, Attribute< index_t > &chart, Attribute< bool > &verts_to_remove, Attribute< index_t > &undo) |
std::ostream & | operator<< (std::ostream &os, const GEO::vector< Coeff > &obj) |
bool | coeffCmp (const Coeff &A, const Coeff &B) |
void | order_AND_make_unique (vector< Coeff > &c) |
void | add_to_sorted_sparse_vector (vector< Coeff > &L, index_t index, double val) |
Adds a coefficient in a sparse vector. More... | |
void | mult (const vector< Coeff > &c, NaiveSparseMatrix &B, vector< Coeff > &result) |
void EXPLORAGRAM_API | produce_hexdom_input (Mesh *m, std::string &error_msg, bool hilbert_sort=true, bool relaxed=false) |
void | find_degenerate_facets (Mesh *m, vector< index_t > °enerate) |
void | export_boundary_with_uv (Mesh *m, Mesh *hex, const char *uv_name, const char *singtri_name) |
Creates a surfacic parameterized mesh from the boundary of an input volumetric parameterized mesh. More... | |
void | imprint (Mesh *m, const char *uv_name, const char *singular_name) |
void | split_edges_by_iso_uvs (Mesh *hex, const char *uv_name, const char *singular_name) |
void | facets_split (Mesh *m, const char *uv_name, const char *singular_name) |
void | mark_charts (Mesh *m, const char *uv_name, const char *charts_name, const char *singular_name) |
void | simplify_quad_charts (Mesh *m) |
bool | export_quadtri_from_charts (Mesh *hex) |
void | add_edge (Mesh *m, vec3 P0, vec3 P1, double value=0) |
void | add_triangle (Mesh *m, vec3 P0, vec3 P1, vec3 P2, double value=0) |
void | current_test (Mesh *m, Mesh *debug_mesh) |
bool EXPLORAGRAM_API | try_quadrangulate (vector< vec2 > &pts, vector< index_t > &quads) |
std::istream & | operator>> (std::istream &input, SphericalHarmonicL4 &gna) |
std::ostream & | operator<< (std::ostream &output, const SphericalHarmonicL4 &gna) |
void EXPLORAGRAM_API | compute_Laguerre_centroids_2d (Mesh *omega, index_t nb_points, const double *points, double *centroids, Mesh *RVD=nullptr, bool verbose=false, index_t nb_air_particles=0, const double *air_particles=nullptr, index_t air_particles_stride=0, double air_fraction=0.0, const double *weights_in=nullptr, double *weights_out=nullptr, index_t nb_iter=1000) |
Computes the centroids of the Laguerre cells that correspond to optimal transport in 2D. More... | |
void EXPLORAGRAM_API | compute_Laguerre_centroids_3d (Mesh *omega, index_t nb_points, const double *points, double *centroids, RVDPolyhedronCallback *cb=nullptr, bool verbose=false, index_t nb_iter=2000) |
Computes the centroids of the Laguerre cells that correspond to optimal transport. More... | |
void EXPLORAGRAM_API | compute_morph (CentroidalVoronoiTesselation &CVT, OptimalTransportMap3d &OTM, Mesh &morph, bool filter_tets=true) |
Computes a shape that interpolates the two input tet meshes. More... | |
void EXPLORAGRAM_API | compute_singular_surface (CentroidalVoronoiTesselation &CVT, OptimalTransportMap3d &OTM, Mesh &singular_set) |
Computes the surface that corresponds to discontinuities in the optimal transport map. More... | |
void EXPLORAGRAM_API | compute_Laguerre_centroids_on_surface (Mesh *omega, index_t nb_points, const double *points, double *centroids, Mesh *RVD=nullptr, bool verbose=false) |
Computes the centroids of the Laguerre cells that correspond to optimal transport over a surface embedded in 3D. More... | |
void EXPLORAGRAM_API | recenter_mesh (const Mesh &M1, Mesh &M2) |
Translates a mesh in such a way that its center matches the center of another mesh. More... | |
double EXPLORAGRAM_API | mesh_tets_volume (const Mesh &M) |
Computes the volume of a tetrahedral mesh. More... | |
void EXPLORAGRAM_API | rescale_mesh (const Mesh &M1, Mesh &M2) |
Rescales a mesh in such a way that its total volume matches the volume of a reference mesh. More... | |
void EXPLORAGRAM_API | set_density (Mesh &M, double mass1, double mass2, const std::string &func_str, Mesh *distance_reference=nullptr) |
Creates a "weight" attribute with varying values. More... | |
void EXPLORAGRAM_API | sample (CentroidalVoronoiTesselation &CVT, index_t nb_points, bool project_on_border, bool BRIO=true, bool multilevel=true, double ratio=0.125, vector< index_t > *levels=nullptr) |
Computes a point sampling of a surfacic or volumetric mesh. More... | |
bool | uses_parallel_algorithm () |
Checks whether parallel algorithms are used. More... | |
template<typename ITERATOR > | |
void | sort (const ITERATOR &begin, const ITERATOR &end) |
Sorts elements in parallel. More... | |
template<typename ITERATOR , typename CMP > | |
void | sort (const ITERATOR &begin, const ITERATOR &end, const CMP &cmp) |
Sorts elements in parallel. More... | |
template<typename VECTOR > | |
void | sort_unique (VECTOR &v) |
Sorts a vector and suppresses all duplicated elements. More... | |
template<typename ITERATOR > | |
void | sort_3 (ITERATOR items) |
Specialized sort routine for 3 elements. More... | |
template<typename ITERATOR > | |
void | sort_4 (ITERATOR items) |
Specialized sort routine for 4 elements. More... | |
template<typename ITERATOR > | |
void | random_shuffle (const ITERATOR &begin, const ITERATOR &end) |
Applies a random permutation to a sequence. More... | |
template<class T > | |
void | geo_argused (const T &) |
Suppresses compiler warnings about unused parameters. More... | |
void | set_assert_mode (AssertMode mode) |
Sets assertion mode. More... | |
AssertMode | assert_mode () |
Returns the current assert termination mode. | |
GEO_NORETURN_DECL void | geo_abort () GEO_NORETURN |
Aborts the program. More... | |
GEO_NORETURN_DECL void | geo_breakpoint () GEO_NORETURN |
Generates a debugger breakpoint programmatically. More... | |
GEO_NORETURN_DECL void | geo_assertion_failed (const std::string &condition_string, const std::string &file, int line) GEO_NORETURN |
Prints an assertion failure. More... | |
GEO_NORETURN_DECL void | geo_range_assertion_failed (double value, double min_value, double max_value, const std::string &file, int line) GEO_NORETURN |
Prints a range assertion failure. More... | |
GEO_NORETURN_DECL void | geo_should_not_have_reached (const std::string &file, int line) GEO_NORETURN |
Prints an unreachable location failure. More... | |
void | initialize (int flags=GEOGRAM_INSTALL_NONE) |
Initialize Geogram. More... | |
void | terminate () |
Cleans up Geogram. More... | |
template<class T > | |
T | det2x2 (const T &a11, const T &a12, const T &a21, const T &a22) |
Computes a two-by-two determinant. | |
template<class T > | |
T | det3x3 (const T &a11, const T &a12, const T &a13, const T &a21, const T &a22, const T &a23, const T &a31, const T &a32, const T &a33) |
Computes a three-by-three determinant. | |
template<class T > | |
T | det4x4 (const T &a11, const T &a12, const T &a13, const T &a14, const T &a21, const T &a22, const T &a23, const T &a24, const T &a31, const T &a32, const T &a33, const T &a34, const T &a41, const T &a42, const T &a43, const T &a44) |
Computes a four-by-four determinant. | |
template<class T > | |
bool | read_ascii_attribute (FILE *file, Memory::pointer base_addr, index_t nb_elements) |
Reads an ASCII attribute from a file. More... | |
template<class T > | |
bool | write_ascii_attribute (FILE *file, Memory::pointer base_addr, index_t nb_elements) |
Writes an ASCII attribute to a file. More... | |
template<> | |
bool | read_ascii_attribute< char > (FILE *file, Memory::pointer base_addr, index_t nb_elements) |
Reads an ASCII attribute from a file. More... | |
template<> | |
bool | write_ascii_attribute< char > (FILE *file, Memory::pointer base_addr, index_t nb_elements) |
Writes an ASCII attribute to a file. More... | |
template<> | |
bool | read_ascii_attribute< bool > (FILE *file, Memory::pointer base_addr, index_t nb_elements) |
Reads an ASCII attribute from a file. More... | |
template<> | |
bool | write_ascii_attribute< bool > (FILE *file, Memory::pointer base_addr, index_t nb_elements) |
Writes an ASCII attribute to a file. More... | |
double | det (const mat2 &M) |
Computes the determinant of a 2x2 matrix. More... | |
bool | bboxes_overlap (const Box &B1, const Box &B2) |
Tests whether two Boxes have a non-empty intersection. More... | |
void | bbox_union (Box &target, const Box &B1, const Box &B2) |
Computes the smallest Box that encloses two Boxes. More... | |
bool | bboxes_overlap (const Box2d &B1, const Box2d &B2) |
Tests whether two Box2d have a non-empty intersection. More... | |
void | bbox_union (Box2d &target, const Box2d &B1, const Box2d &B2) |
Computes the smallest Box2d that encloses two Box2d. More... | |
template<class FT > | |
vecng< 3, FT > | transform_vector (const vecng< 3, FT > &v, const Matrix< 4, FT > &m) |
Applies a 3d transform to a 3d vector. More... | |
template<class FT > | |
vecng< 3, FT > | transform_point (const vecng< 3, FT > &v, const Matrix< 4, FT > &m) |
Applies a 3d transform to a 3d point. More... | |
template<class FT > | |
vecng< 3, FT > | transform_point (const Matrix< 4, FT > &m, const vecng< 3, FT > &v) |
Applies a 3d transform to a 3d point. More... | |
template<class FT > | |
vecng< 4, FT > | transform_vector (const vecng< 4, FT > &v, const Matrix< 4, FT > &m) |
Applies a 4d transform to a 4d point. More... | |
mat4 | create_translation_matrix (const vec3 &T) |
Creates a translation matrix from a vector. More... | |
mat4 | create_scaling_matrix (double s) |
Creates a scaling matrix. More... | |
template<index_t DIM, class FT > | |
vecng< DIM, FT > | operator* (const Matrix< DIM, FT > &M, const vecng< DIM, FT > &x) |
Computes a matrix vector product. More... | |
template<index_t DIM, class FT > | |
vecng< DIM, FT > | mult (const Matrix< DIM, FT > &M, const vecng< DIM, FT > &x) |
Computes a matrix vector product. More... | |
template<class T > | |
Sign | geo_sgn (const T &x) |
Gets the sign of a value. More... | |
template<class T > | |
Sign | geo_cmp (const T &a, const T &b) |
Compares two values. More... | |
template<class T > | |
T | geo_sqr (T x) |
Gets the square value of a value. More... | |
template<class T > | |
void | geo_clamp (T &x, T min, T max) |
Clamps a value to a range. More... | |
index_t | max_index_t () |
Gets the maximum positive value of type index_t. | |
signed_index_t | max_signed_index_t () |
Gets the maximum positive value of type signed_index_t. | |
signed_index_t | min_signed_index_t () |
Gets the minimum negative value of type signed_index_t. | |
double | round (double x) |
void | parallel_for (index_t from, index_t to, std::function< void(index_t)> func, index_t threads_per_core=1, bool interleaved=false) |
Executes a loop with concurrent threads. More... | |
void | parallel_for_slice (index_t from, index_t to, std::function< void(index_t, index_t)> func, index_t threads_per_core=1) |
Executes a loop with concurrent threads. More... | |
void | parallel (std::function< void()> f1, std::function< void()> f2) |
Calls functions in parallel. More... | |
void | parallel (std::function< void()> f1, std::function< void()> f2, std::function< void()> f3, std::function< void()> f4) |
Calls functions in parallel. More... | |
void | parallel (std::function< void()> f1, std::function< void()> f2, std::function< void()> f3, std::function< void()> f4, std::function< void()> f5, std::function< void()> f6, std::function< void()> f7, std::function< void()> f8) |
Calls functions in parallel. More... | |
std::ostream & | operator<< (std::ostream &out, const Quaternion &q) |
Writes a Quaternion to a stream. More... | |
std::istream & | operator>> (std::istream &in, Quaternion &q) |
Reads a Quaternion from a stream. More... | |
Quaternion | operator+ (const Quaternion &a, const Quaternion &b) |
Computes the sum of two Quaternion. More... | |
Quaternion | operator- (const Quaternion &a, const Quaternion &b) |
Computes the difference between two Quaternion. More... | |
Quaternion | operator- (const Quaternion &a) |
Computes the opposite of a Quaternion. More... | |
Quaternion | operator* (const Quaternion &a, const Quaternion &b) |
Computes the product of two Quaternion. More... | |
Quaternion | operator* (const Quaternion &a, double t) |
Computes the product of a Quaternion and a scalar. More... | |
Quaternion | operator* (double t, const Quaternion &a) |
Computes the product of a scalar and a Quaternion. More... | |
template<class T > | |
Sign | geo_sgn (const rationalg< T > &x) |
Specialization of geo_sgn() for rationalg. More... | |
template<class T > | |
Sign | geo_cmp (const rationalg< T > &a, const rationalg< T > &b) |
Specialization of geo_cmp() for rationalg. More... | |
template<class T > | |
vec2Hg< T > | operator- (const vec2Hg< T > &p1, const vec2Hg< T > &p2) |
template<class T > | |
vec3Hg< T > | operator- (const vec3Hg< T > &p1, const vec3Hg< T > &p2) |
template<class T > | |
vec2Hg< T > | mix (const rationalg< T > &t, const vecng< 2, double > &p1, const vecng< 2, double > &p2) |
template<class T > | |
vec3Hg< T > | mix (const rationalg< T > &t, const vecng< 3, double > &p1, const vecng< 3, double > &p2) |
template<class T > | |
vec2Hg< T > | mix (const rationalg< T > &t, const vec2Hg< T > &p1, const vec2Hg< T > &p2) |
template<class T > | |
vec3Hg< T > | mix (const rationalg< T > &t, const vec3Hg< T > &p1, const vec3Hg< T > &p2) |
int | my_lua_isboolean (lua_State *L, int idx) |
Tests whether a LUA variable is a boolean. More... | |
int | my_lua_islightuserdata (lua_State *L, int idx) |
Tests whether a LUA variable is a light user data. More... | |
int | my_lua_ispositiveinteger (lua_State *L, int idx) |
Tests whether a LUA variable is a positive integer. More... | |
void | lua_set_error (lua_State *L, const char *error) |
Memorizes an error message in LUA registry. More... | |
void | lua_set_error (lua_State *L, const std::string &error) |
Memorizes an error message in LUA registry. More... | |
void | lua_clear_error (lua_State *L) |
Clears the last error message in LUA registry. More... | |
bool | lua_has_error (lua_State *L) |
Tests whether an error message was memorized in the registry. More... | |
bool | lua_check_type (lua_State *L, int idx, lua_test_func test) |
Tests whether a LUA variable has the correct type. More... | |
bool | lua_check_nb_args (lua_State *L, int expected_nb_args) |
Tests whether the expected number of arguments was pushed onto the stack. More... | |
int | lua_notify_last_error (lua_State *L) |
Takes the last error message memorized in the registry and sends it back to LUA. More... | |
template<class T > | |
void | lua_push (lua_State *L, T x) |
Converts and pushes a C++ variable onto the LUA stack. More... | |
template<> | |
void | lua_push (lua_State *L, int x) |
Specialization of lua_push() for int. | |
template<> | |
void | lua_push (lua_State *L, Numeric::uint32 x) |
Specialization of lua_push() for Numeric::uint32. | |
template<> | |
void | lua_push (lua_State *L, Numeric::uint64 x) |
Specialization of lua_push() for Numeric::uint64. | |
template<> | |
void | lua_push (lua_State *L, Numeric::int64 x) |
Specialization of lua_push() for Numeric::int64. | |
template<> | |
void | lua_push (lua_State *L, float x) |
Specialization of lua_push() for float. | |
template<> | |
void | lua_push (lua_State *L, double x) |
Specialization of lua_push() for double. | |
template<> | |
void | lua_push (lua_State *L, bool x) |
Specialization of lua_push() for bool. | |
template<> | |
void | lua_push (lua_State *L, const char *x) |
Specialization of lua_push() for raw string (const char*). | |
template<> | |
void | lua_push (lua_State *L, const std::string &x) |
Specialization of lua_push() for reference to std::string. | |
template<> | |
void | lua_push (lua_State *L, std::string x) |
Specialization of lua_push() for std::string. | |
template<class T > | |
void | lua_push (lua_State *L, const std::vector< T > &x) |
Specialization of lua_push() for vectors. More... | |
template<class R > | |
int | lua_wrap (lua_State *L, R(*fptr)(void)) |
Calls a C++ function from LUA. More... | |
template<class R , class T1 > | |
int | lua_wrap (lua_State *L, R(*fptr)(T1)) |
Calls a C++ function from LUA. More... | |
template<class R , class T1 , class T2 > | |
int | lua_wrap (lua_State *L, R(*fptr)(T1, T2)) |
Calls a C++ function from LUA. More... | |
template<class R , class T1 , class T2 , class T3 > | |
int | lua_wrap (lua_State *L, R(*fptr)(T1, T2, T3)) |
Calls a C++ function from LUA. More... | |
template<class R , class T1 , class T2 , class T3 , class T4 > | |
int | lua_wrap (lua_State *L, R(*fptr)(T1, T2, T3, T4)) |
Calls a C++ function from LUA. More... | |
template<> | |
int | lua_wrap (lua_State *L, void(*fptr)(void)) |
Calls a C++ function from LUA. More... | |
template<class T1 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5, T6)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5, T6, T7)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5, T6, T7, T8)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5, T6, T7, T8, T9)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)) |
Calls a C++ function from LUA. More... | |
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 > | |
int | lua_wrap (lua_State *L, void(*fptr)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)) |
Calls a C++ function from LUA. More... | |
template<> | |
int | lua_wrap (lua_State *L, lua_CFunction fptr) |
Specialization of the wrapper for functions that are "already wrapped". More... | |
template<class FPTR > | |
void | lua_pushwrapper (lua_State *L, FPTR f) |
Pushes a wrapper for a given C++ function onto the LUA stack. More... | |
template<> | |
void | lua_pushwrapper (lua_State *L, lua_CFunction f) |
Specialization for lua_CFunction. More... | |
template<class FPTR > | |
void | lua_bindwrapperwithname (lua_State *L, FPTR f, const std::string &name) |
Binds a wrapper to a name in the table at the top of the LUA stack. More... | |
template<class FPTR > | |
void | lua_bindwrapperwithnameglobal (lua_State *L, FPTR f, const std::string &name) |
Binds a wrapper to a name in the global scole. More... | |
std::string | lua_wrappername (lua_State *L, const char *functionname) |
Converts a C++ function name into a LUA function name. More... | |
void | bake_mesh_facet_normals (Mesh *mesh, Image *target) |
Bakes the facet normals of a parameterized mesh into an image. More... | |
void | bake_mesh_vertex_normals (Mesh *mesh, Image *target) |
Bakes the facet normals of a parameterized mesh into an image. More... | |
void | bake_mesh_attribute (Mesh *mesh, Image *target, Attribute< double > &attribute, double bias=0.0, double scale=1.0) |
Bakes an attribute of a parameterized mesh. More... | |
void | bake_mesh_geometry (Mesh *mesh, Image *target, bool clear=true) |
Bakes mesh geometry into an image (creates a geometry image). More... | |
void | bake_mesh_facet_normals_indirect (Image *geometry, Image *target, Mesh *highres) |
Bakes facet normals from a (in general) high resolution mesh to a (in general) parameterized lower resolution mesh represented as a geometry image. More... | |
void | bake_mesh_points_attribute_indirect (Image *geometry, Image *target, Mesh *highres, Attribute< double > &attribute, double bias=0.0, double scale=1.0) |
Bakes a vertex attribute from a (in general) high resolution point set to a (in general) parameterized lower resolution mesh represented as a geometry image. More... | |
MeshCompareFlags | mesh_compare (const Mesh &M1, const Mesh &M2, MeshCompareFlags flags=MESH_COMPARE_SURFACE_PROPS, double tolerance=0.0, bool verbose=true) |
Compares two meshes. Compares the two meshes M1 and M2 according to the comparison flags flags (see MeshCompareFlags). The function returns a comparison status similar to the comparison flags: More... | |
void | mesh_decimate_vertex_clustering (Mesh &M, index_t nb_bins, MeshDecimateMode mode=MESH_DECIMATE_DEFAULT, geo_index_t *vertices_flags=nullptr) |
Generates a simplified representation of a mesh. More... | |
index_t | remove_degree3_vertices (Mesh &M, double max_dist) |
Removes degree 3 vertices. More... | |
double | mesh_one_sided_Hausdorff_distance (Mesh &m1, Mesh &m2, double sampling_dist) |
Computes an approximation of the single sided Hausdorff distance dH(m1->m2) between two surfacic meshes. More... | |
double | mesh_symmetric_Hausdorff_distance (Mesh &m1, Mesh &m2, double sampling_dist) |
Computes an approximation of the symmetric Hausdorff distance dH(m1<->m2) between two surfacic meshes. More... | |
void | fill_holes (Mesh &M, double max_area=0.0, index_t max_edges=max_index_t(), bool repair=true) |
Fills holes in mesh by generating new triangles. More... | |
void | tessellate_facets (Mesh &M, index_t max_nb_vertices) |
Subdivides the facets with more than nb_vertices. More... | |
void | compute_normals (Mesh &M) |
Computes the normals to the vertices, and stores them as additional coordinates. More... | |
void | simple_Laplacian_smooth (Mesh &M, index_t nb_iter, bool normals_only) |
Smoothes a mesh. More... | |
void | get_bbox (const Mesh &M, double *xyzmin, double *xyzmax) |
Gets the bounding box of a mesh. More... | |
double | bbox_diagonal (const Mesh &M) |
Computes the length of the bounding box diagonal of a mesh. More... | |
void | set_anisotropy (Mesh &M, double s) |
Normalizes and scales the stored vertex normals by a factor. More... | |
void | unset_anisotropy (Mesh &M) |
Normalizes the stored vertex normals. More... | |
void | compute_sizing_field (Mesh &M, double gradation=1.0, index_t nb_lfs_samples=0) |
Computes a sizing field using an estimate of lfs (local feature size). More... | |
void | normalize_embedding_area (Mesh &M) |
Computes vertices weights in such a way that triangle areas are normalized. More... | |
double | mesh_cell_volume (const Mesh &M, index_t c) |
Computes the volume of a cell in a mesh. More... | |
double | mesh_cells_volume (const Mesh &M) |
Computes the volume of the cells of a mesh. More... | |
vec3 | mesh_cell_facet_normal (const Mesh &M, index_t c, index_t lf) |
Computes the normal of a cell facet. More... | |
double | surface_average_edge_length (const Mesh &M) |
Computes the average edge length in a surface. More... | |
std::ostream & | operator<< (std::ostream &out, const MeshHalfedges::Halfedge &H) |
Displays a Halfedge. More... | |
bool | mesh_load (const std::string &filename, Mesh &M, const MeshIOFlags &ioflags=MeshIOFlags()) |
Loads a mesh from a file. More... | |
bool | mesh_load (InputGeoFile &geofile, Mesh &M, const MeshIOFlags &ioflags=MeshIOFlags()) |
Loads a mesh from a GeoFile ('.geogram' file format). More... | |
bool | mesh_save (const Mesh &M, const std::string &filename, const MeshIOFlags &ioflags=MeshIOFlags()) |
Saves a mesh to a file. More... | |
bool | mesh_save (const Mesh &M, OutputGeoFile &geofile, const MeshIOFlags &ioflags=MeshIOFlags()) |
Saves a mesh to a GeoFile ('.geogram' file format) More... | |
void | mesh_io_initialize () |
void | glue_edges (Mesh &M, index_t f1, index_t c1, index_t f2, index_t c2) |
Glues two edges on the border of a surface mesh. More... | |
void | unglue_edges (Mesh &M, index_t f1, index_t c1) |
Unglues an edge from its opposite edge. More... | |
void | mesh_compute_manifold_harmonics (Mesh &M, index_t nb_eigens, LaplaceBeltramiDiscretization discretization, const std::string &attribute_name="eigen", double shift=0.0, bool print_spectrum=false) |
Computes the Manifold Harmonics basis functions. More... | |
void | mesh_compute_manifold_harmonics_by_bands (Mesh &M, index_t nb_eigens, LaplaceBeltramiDiscretization discretization, ManifoldHarmonicsCallback callback, index_t nb_eigens_per_band=30, double initial_shift=0.0, void *client_data=nullptr) |
Computes Laplacian eigenfunctions band by band. More... | |
void | mesh_partition (Mesh &M, MeshPartitionMode mode, vector< index_t > &facet_ptr, vector< index_t > &tet_ptr, index_t nb_parts=0) |
Partitions a mesh into a fixed number of parts. More... | |
void | mesh_partition (Mesh &M, MeshPartitionMode mode, vector< index_t > &facet_ptr, index_t nb_parts=0) |
Partitions a mesh into a fixed number of parts. More... | |
void | remove_small_facets (Mesh &M, double min_facet_area) |
Removes the facets that have an area smaller than a given threshold. More... | |
void | remove_small_connected_components (Mesh &M, double min_component_area, index_t min_component_facets=0.0) |
Removes the connected components that have an area smaller than a given threshold. More... | |
void | orient_normals (Mesh &M) |
Orients the normals in such a way that each connected component has a positive signed volume. More... | |
void | invert_normals (Mesh &M) |
Inverts all the normals of a mesh. More... | |
void | expand_border (Mesh &M, double epsilon) |
Enlarges a surface by moving the vertices on the border. More... | |
void | remove_degree2_vertices (Mesh &M) |
Removes the degree 2 vertices in a surface mesh. More... | |
void | remesh_smooth (Mesh &M_in, Mesh &M_out, index_t nb_points, coord_index_t dim=0, index_t nb_Lloyd_iter=5, index_t nb_Newton_iter=30, index_t Newton_m=7, bool adjust=true, double adjust_max_edge_distance=0.5) |
Remeshes a 'smooth' shape (that is, without management of sharp features). More... | |
void | mesh_adjust_surface (Mesh &surface, Mesh &reference, double max_edge_distance=0.5, bool project_borders=false) |
Adjusts a surface mesh in such a way that minimizes its distance to a reference surface mesh. More... | |
void | mesh_reorder (Mesh &M, MeshOrder order=MESH_ORDER_HILBERT) |
Reorders all the elements of a mesh. More... | |
void | compute_Hilbert_order (index_t total_nb_vertices, const double *vertices, vector< index_t > &sorted_indices, index_t first, index_t last, index_t dimension, index_t stride=3) |
Computes the Hilbert order for a set of 3D points. More... | |
void | compute_BRIO_order (index_t nb_vertices, const double *vertices, vector< index_t > &sorted_indices, index_t dimension, index_t stride=3, index_t threshold=64, double ratio=0.125, vector< index_t > *levels=nullptr) |
Computes the BRIO order for a set of 3D points. More... | |
void | Hilbert_sort_periodic (index_t nb_vertices, const double *vertices, vector< index_t > &sorted_indices, index_t dimension, index_t stride, vector< index_t >::iterator first, vector< index_t >::iterator last, const vec3 &period) |
Spatially sort a set of vertices in periodic space. More... | |
void | Hilbert_sort_periodic (index_t nb_vertices, const double *vertices, vector< index_t > &sorted_indices, index_t dimension, index_t stride, vector< index_t >::iterator first, vector< index_t >::iterator last, double period=1.0) |
void | mesh_repair (Mesh &M, MeshRepairMode mode=MESH_REPAIR_DEFAULT, double colocate_epsilon=0.0) |
Fixes some defaults in a mesh. More... | |
void | mesh_postprocess_RDT (Mesh &M, bool verbose=false) |
Post-processes a Restricted Delaunay Triangulation. More... | |
void | mesh_reorient (Mesh &M, vector< index_t > *moebius_facets=nullptr) |
Reorients the facets of a mesh coherently. More... | |
void | mesh_detect_colocated_vertices (const Mesh &M, vector< index_t > &v_colocated_index, double colocate_epsilon=0.0) |
Detects colocated vertices in a mesh. More... | |
void | mesh_detect_isolated_vertices (const Mesh &M, vector< index_t > &v_is_isolated) |
Detects isolated vertices in a mesh. More... | |
void | mesh_detect_degenerate_facets (const Mesh &M, vector< index_t > &f_is_degenerate) |
Detects degenerate facets in a mesh. More... | |
void | mesh_colocate_vertices_no_check (Mesh &M, double colocate_epsilon=0.0, bool verbose=false) |
Merges the vertices of a mesh that are at the same geometric location. More... | |
void | mesh_remove_bad_facets_no_check (Mesh &M, bool check_duplicates=true) |
Removes the degenerate and the duplicated facets in a surface mesh. More... | |
void | mesh_connect_and_reorient_facets_no_check (Mesh &M) |
Connects the facets and consistently orient manifold components. More... | |
template<index_t DIM> | |
double | mesh_facet_mass (const Mesh &mesh, index_t f, Attribute< double > &vertex_weight) |
Computes the mass of a mesh facet. More... | |
template<index_t DIM> | |
bool | mesh_generate_random_samples_on_surface (const Mesh &mesh, double *p, index_t nb_points, Attribute< double > &weight, signed_index_t facets_begin_in=-1, signed_index_t facets_end_in=-1) |
Generates a set of random samples over a surfacic mesh. More... | |
template<index_t DIM> | |
double | mesh_tetra_mass (const Mesh &mesh, index_t t) |
Computes the mass of a mesh tetrahedron. More... | |
template<index_t DIM> | |
double | mesh_tetra_mass (const Mesh &mesh, index_t t, const Attribute< double > &weight) |
Computes the mass of a mesh tetrahedron. More... | |
template<index_t DIM> | |
bool | mesh_generate_random_samples_in_volume (const Mesh &mesh, double *p, index_t nb_points, Attribute< double > &vertex_weight, signed_index_t tets_begin_in=-1, signed_index_t tets_end_in=-1) |
Generates a set of random samples in a volumetric mesh. More... | |
void | mesh_smooth (Mesh &M) |
Smooths the shape of a mesh. More... | |
void | mesh_split_triangles (Mesh &M, index_t facets_begin=0, index_t facets_end=index_t(-1), MeshSplitCallbacks *cb=nullptr) |
Splits each triangle of a surface mesh into four. More... | |
void | mesh_split_quads (Mesh &M, index_t facets_begin=0, index_t facets_end=index_t(-1), MeshSplitCallbacks *cb=nullptr) |
Splits each facet of a surface mesh into quads. More... | |
void | mesh_split_catmull_clark (Mesh &M, MeshSplitCallbacks *cb=nullptr) |
Splits a mesh using Catmull-Clark subdivision rule. More... | |
void | mesh_triangulate_center_vertex (Mesh &M, index_t facets_begin=0, index_t facets_end=index_t(-1), MeshSplitCallbacks *cb=nullptr) |
Splits each n-sided facet of a surface into n triangles by inserting a vertex in the center. More... | |
void | mesh_boolean_operation (Mesh &result, Mesh &A, Mesh &B, const std::string &operation, MeshBooleanOperationFlags flags=MESH_BOOL_OPS_DEFAULT) |
Computes a boolean operation with two surface meshes. More... | |
void | mesh_boolean_operation (Mesh &result, Mesh &A, Mesh &B, const std::string &operation, bool verbose) |
Computes a boolean operation with two surface meshes. More... | |
void | mesh_union (Mesh &result, Mesh &A, Mesh &B, MeshBooleanOperationFlags flags=MESH_BOOL_OPS_DEFAULT) |
Computes the union of two surface meshes. More... | |
void | mesh_union (Mesh &result, Mesh &A, Mesh &B, bool verbose) |
Computes the union of two surface meshes. More... | |
void | mesh_intersection (Mesh &result, Mesh &A, Mesh &B, MeshBooleanOperationFlags flags=MESH_BOOL_OPS_DEFAULT) |
Computes the intersection of two surface meshes. More... | |
void | mesh_intersection (Mesh &result, Mesh &A, Mesh &B, bool verbose) |
Computes the intersection of two surface meshes. More... | |
void | mesh_difference (Mesh &result, Mesh &A, Mesh &B, MeshBooleanOperationFlags flags=MESH_BOOL_OPS_DEFAULT) |
Computes the difference of two surface meshes. More... | |
void | mesh_difference (Mesh &result, Mesh &A, Mesh &B, bool verbose) |
Computes the difference of two surface meshes. More... | |
void | mesh_remove_intersections (Mesh &M, index_t max_iter=3, bool verbose=false) |
Attempts to make a surface mesh conformal by removing intersecting facets and re-triangulating the holes. More... | |
bool | mesh_facets_have_intersection (Mesh &M, index_t f1, index_t f2) |
Tests whether two mesh facets have a non-degenerate intersection. More... | |
bool | mesh_tetrahedralize (Mesh &M, const MeshTetrahedralizeParameters ¶ms) |
Fills a closed surface mesh with tetrahedra. More... | |
bool | mesh_tetrahedralize (Mesh &M, bool preprocess=true, bool refine=false, double quality=2.0, bool keep_regions=false, double eps=0.001) |
Fills a closed surface mesh with tetrahedra. More... | |
index_t | get_connected_components (const Mesh &M, vector< index_t > &component) |
Computes the connected components of a Mesh. More... | |
index_t | mesh_nb_connected_components (const Mesh &M) |
Computes the number of connected components of a Mesh. | |
signed_index_t | mesh_Xi (const Mesh &M) |
Computes the Euler-Poincare characteristic of a surfacic Mesh. More... | |
signed_index_t | mesh_nb_borders (const Mesh &M) |
Computes the number of borders of a Mesh. More... | |
bool | meshes_have_same_topology (const Mesh &M1, const Mesh &M2, bool verbose=false) |
Compares the topological invariants of two meshes. More... | |
bool | is_in_T1 (TriangleRegion R) |
Tests whether a region belongs to triangle T1. More... | |
TriangleRegion | swap_T1_T2 (TriangleRegion R) |
Replaces T1 with T2 or T2 with T1 in a region code. More... | |
bool | triangles_intersections (const vec3 &p0, const vec3 &p1, const vec3 &p2, const vec3 &q0, const vec3 &q1, const vec3 &q2, vector< TriangleIsect > &result) |
Triangle-triangle intersection with symbolic information. More... | |
bool | triangles_intersections (const vec3 &p0, const vec3 &p1, const vec3 &p2, const vec3 &q0, const vec3 &q1, const vec3 &q2) |
Triangle-triangle intersection predicate. More... | |
std::string | region_to_string (TriangleRegion rgn) |
Converts a triangle region code to a string. More... | |
coord_index_t | region_dim (TriangleRegion r) |
Gets the dimension of a triangle region. More... | |
void | get_triangle_vertices (TriangleRegion T, TriangleRegion &p0, TriangleRegion &p1, TriangleRegion &p2) |
Gets the vertices of a triangle. More... | |
void | get_triangle_edges (TriangleRegion T, TriangleRegion &e0, TriangleRegion &e1, TriangleRegion &e2) |
Gets the edges of a triangle. More... | |
void | get_edge_vertices (TriangleRegion E, TriangleRegion &q0, TriangleRegion &q1) |
Gets the vertices of an edge. More... | |
TriangleRegion | regions_convex_hull (TriangleRegion R1, TriangleRegion R2) |
Computes the convex hull of two regions. More... | |
std::ostream & | operator<< (std::ostream &out, const TriangleIsect &I) |
Prints a triangle intersection element to a stream. More... | |
std::ostream & | operator<< (std::ostream &out, vector< TriangleIsect > &II) |
Prints the result of a triangle intersection to a stream. More... | |
template<class VEC3 = vec3> | |
VEC3 | make_vec3 (const vec3 &p1, const vec3 &p2) |
Creates a vector with coordinates of arbitrary type from two points with double coordinates. More... | |
template<class VEC2 > | |
VEC2 | make_vec2 (const vec2 &p1, const vec2 &p2) |
Creates a vector with coordinates of arbitrary type from two points with double coordinates. More... | |
template<class VEC3 > | |
VEC3 | triangle_normal (const vec3 &p1, const vec3 &p2, const vec3 &p3) |
Computes the normal to a triangle from its three vertices. More... | |
template<> | |
vec2E | make_vec2< vec2E > (const vec2 &p1, const vec2 &p2) |
Specialization of make_vec2() for vec2E. | |
template<> | |
vec3E | make_vec3< vec3E > (const vec3 &p1, const vec3 &p2) |
Specialization of make_vec3() for vec3E. | |
template<> | |
Sign | geo_sgn (const expansion_nt &x) |
Specialization of geo_sgn() for expansion_nt. More... | |
template<> | |
Sign | geo_cmp (const expansion_nt &x, const expansion_nt &y) |
Specialization of geo_cmp() for expansion_nt. More... | |
bool | expansion_nt_is_zero (const expansion_nt &x) |
Tests whether an expansion_nt is zero. More... | |
bool | expansion_nt_is_one (const expansion_nt &x) |
Tests whether an expansion_nt is equal to one. More... | |
Sign | expansion_nt_compare (const expansion_nt &x, const expansion_nt &y) |
Compares two expansion_nt. More... | |
expansion_nt | expansion_nt_square (const expansion_nt &x) |
Computes the square of an expansion_nt. More... | |
expansion_nt | expansion_nt_determinant (const expansion_nt &a00, const expansion_nt &a01, const expansion_nt &a10, const expansion_nt &a11) |
Computes a 2x2 determinant. More... | |
expansion_nt | expansion_nt_determinant (const expansion_nt &a00, const expansion_nt &a01, const expansion_nt &a02, const expansion_nt &a10, const expansion_nt &a11, const expansion_nt &a12, const expansion_nt &a20, const expansion_nt &a21, const expansion_nt &a22) |
Computes a 3x3 determinant. More... | |
expansion_nt | expansion_nt_determinant (const expansion_nt &a00, const expansion_nt &a01, const expansion_nt &a02, const expansion_nt &a03, const expansion_nt &a10, const expansion_nt &a11, const expansion_nt &a12, const expansion_nt &a13, const expansion_nt &a20, const expansion_nt &a21, const expansion_nt &a22, const expansion_nt &a23, const expansion_nt &a30, const expansion_nt &a31, const expansion_nt &a32, const expansion_nt &a33) |
Computes a 4x4 determinant. More... | |
intervalRU | operator+ (const intervalRU &a, const intervalRU &b) |
intervalRU | operator- (const intervalRU &a, const intervalRU &b) |
intervalRU | operator* (const intervalRU &a, const intervalRU &b) |
intervalRN | operator+ (const intervalRN &a, const intervalRN &b) |
intervalRN | operator- (const intervalRN &a, const intervalRN &b) |
intervalRN | operator* (const intervalRN &a, const intervalRN &b) |
template<> | |
vec2Hg< interval_nt > | operator- (const vec2Hg< interval_nt > &p1, const vec2Hg< interval_nt > &p2) |
Specialization of 2d homogeneous-coord vector difference for interval_nt coordinates. More... | |
template<> | |
vec3Hg< interval_nt > | operator- (const vec3Hg< interval_nt > &p1, const vec3Hg< interval_nt > &p2) |
Specialization of 3d homogeneous-coord vector difference for interval_nt coordinates. More... | |
Sign | sign_of_expansion_determinant (const expansion &a00, const expansion &a01, const expansion &a10, const expansion &a11) |
Computes the sign of a 2x2 determinant. More... | |
Sign | sign_of_expansion_determinant (const expansion &a00, const expansion &a01, const expansion &a02, const expansion &a10, const expansion &a11, const expansion &a12, const expansion &a20, const expansion &a21, const expansion &a22) |
Computes the sign of a 3x3 determinant. More... | |
Sign | sign_of_expansion_determinant (const expansion &a00, const expansion &a01, const expansion &a02, const expansion &a03, const expansion &a10, const expansion &a11, const expansion &a12, const expansion &a13, const expansion &a20, const expansion &a21, const expansion &a22, const expansion &a23, const expansion &a30, const expansion &a31, const expansion &a32, const expansion &a33) |
Computes the sign of a 4x4 determinant. More... | |
void | grow_expansion_zeroelim (const expansion &e, double b, expansion &h) |
Adds a scalar to an expansion, eliminating zero components from the output expansion. More... | |
void | scale_expansion_zeroelim (const expansion &e, double b, expansion &h) |
Multiplies an expansion by a scalar, eliminating zero components from the output expansion. More... | |
void | fast_expansion_sum_zeroelim (const expansion &e, const expansion &f, expansion &h) |
Sums two expansions, eliminating zero components from the output expansion (sets h = e + f ). More... | |
void | fast_expansion_diff_zeroelim (const expansion &e, const expansion &f, expansion &h) |
Computes the difference of two expansions, eliminating zero components from the output expansion. More... | |
void | mesh_compute_ABF_plus_plus (Mesh &M, const std::string &attribute_name="tex_coord", bool verbose=false) |
Computes texture coordinates using Least Squares Conformal Maps. More... | |
void | mesh_make_atlas (Mesh &mesh, double hard_angles_threshold=45.0, ChartParameterizer param=PARAM_ABF, ChartPacker pack=PACK_XATLAS, bool verbose=false) |
Generates u,v coordinates for a given mesh. More... | |
index_t | mesh_get_charts (Mesh &mesh) |
Gets the charts attribute from a parameterized mesh. More... | |
void | mesh_compute_LSCM (Mesh &M, const std::string &attribute_name="tex_coord", bool spectral=false, const std::string &angle_attribute_name="", bool verbose=false) |
Computes texture coordinates using Least Squares Conformal Maps. More... | |
void | pack_atlas_only_normalize_charts (Mesh &mesh) |
Normalizes chart texture coordinates. More... | |
void | pack_atlas_using_xatlas (Mesh &mesh) |
Packs an atlas using the xatlas library. More... | |
void | pack_atlas_using_tetris_packer (Mesh &mesh) |
Packs an atlas using the tetris packer algorithm. More... | |
index_t | mesh_segment (Mesh &mesh, MeshSegmenter segmenter, index_t nb_segments, bool verbose=false) |
Computes a segmentation of a mesh. More... | |
void | Co3Ne_smooth (Mesh &M, index_t nb_neighbors, index_t nb_iterations) |
Smoothes a point set by projection onto the nearest neighbors best approximating plane. More... | |
bool | Co3Ne_compute_normals (Mesh &M, index_t nb_neighbors, bool reorient=false) |
Computes the normals to a point set. The normal is obtained from the nearest neighbors best approximating plane. Normals are stored in the "normal" vertex attribute. More... | |
void | Co3Ne_reconstruct (Mesh &M, double radius) |
Given a pointset with normals stored in the "normal" vertex attribute, reconstruct the triangles. More... | |
void | Co3Ne_smooth_and_reconstruct (Mesh &M, index_t nb_neighbors, index_t nb_iterations, double radius) |
Computes the normals and reconstructs the triangles of a pointset. More... | |
void | glupVertex (const vec2 &v) |
Sends a vertex to OpenGL. More... | |
void | glupColor (const vec3 &v) |
Sends a RGB color to OpenGL. More... | |
void | glupTexCoord (const vec2 &v) |
Sends 2d texture coordinates to OpenGL. More... | |
void | glupTranslate (const vec3 &v) |
Applies a translation. More... | |
void GEOGRAM_GFX_API | glupMapTexCoords1d (double minval, double maxval, index_t mult=1) |
Maps texture coordinates from a specified interval to the unit interval. More... | |
void GEOGRAM_GFX_API | glupMultMatrix (const mat4 &m) |
Multiplies the current GLUP matrix with another one. More... | |
void GEOGRAM_GFX_API | glupLoadMatrix (const mat4 &m) |
Replaces the current GLUP matrix with a user defined one. More... | |
GLint64 GEOGRAM_GFX_API | get_size_of_bound_buffer_object (GLenum target) |
Gets the size (in bytes) of the OpenGL buffer bound to a specified target. More... | |
void GEOGRAM_GFX_API | update_buffer_object (GLuint &buffer_id, GLenum target, size_t new_size, const void *data) |
Updates the content of an OpenGL buffer object, and resizes it if need be. More... | |
void GEOGRAM_GFX_API | stream_buffer_object (GLuint &buffer_id, GLenum target, size_t new_size, const void *data) |
Updates the content of an OpenGL buffer object in streaming mode. More... | |
void GEOGRAM_GFX_API | update_or_check_buffer_object (GLuint &buffer_id, GLenum target, size_t new_size, const void *data, bool update) |
Updates the content of an OpenGL buffer object, and resizes it if need be, or tests whether it has the size it should have. More... | |
void GEOGRAM_GFX_API | check_gl (const char *file, int line, bool warning_only=false) |
Tests for OpenGL errors and displays a message if OpenGL errors were encountered. More... | |
void GEOGRAM_GFX_API | clear_gl_error_flags (const char *file, int line) |
Clears all error flags set by previous OpenGL calls. More... | |
void GEOGRAM_GFX_API | draw_unit_textured_quad (bool BW=false) |
Draws a textured quad. More... | |
void GEOGRAM_GFX_API | glTexImage2Dxpm (char const *const *xpm_data) |
std::string GEOGRAM_GFX_API | icon_UTF8 (const char *name) |
Gets an icon by name. More... | |
Variables | |
const index_t | NOT_AN_ID = index_t(-1) |
const index_t EXPLORAGRAM_API | quad_rand_split [2][3] |
const index_t EXPLORAGRAM_API | quad_split [4][3] |
const index_t EXPLORAGRAM_API | diamon_split [12][3] |
const index_t EXPLORAGRAM_API | diamon_quad_split [16][3] |
EXPLORAGRAM_API const index_t | tet_edge_vertices [6][2] |
EXPLORAGRAM_API const index_t | MT [16][4] |
const index_t | SPHERE_MODEL_NB_PTS = 642 |
const index_t | SPHERE_MODEL_NB_TRIANGLES = 1280 |
EXPLORAGRAM_API const vec3 | SPHERE_MODEL_PTS [SPHERE_MODEL_NB_PTS] |
EXPLORAGRAM_API const index_t | SPHERE_MODEL_TRIANGLES [SPHERE_MODEL_NB_TRIANGLES][3] |
double | expansion_splitter_ |
double | expansion_epsilon_ |
Global Vorpaline namespace.
This namespace contains all the Vorpaline classes and functions organized in sub-namespaces.
typedef GenColor<Numeric::float64> GEO::Color |
Automatic reference-counted pointer to a CommandInvoker.
Used internally by Command.
typedef std::vector< CSGMesh_var > GEO::CSGScope |
A list of CSGMesh.
The meshes are stored as smart pointers.
Definition at line 127 of file mesh_CSG.h.
Smart pointer that contains a LoggerClient object
typedef Matrix<2, Numeric::float64> GEO::mat2 |
Represents a 2x2 matrix.
Syntax is (mostly) compatible with GLSL.
Definition at line 121 of file geometry.h.
typedef Matrix<3, Numeric::float64> GEO::mat3 |
Represents a 3x3 matrix.
Syntax is (mostly) compatible with GLSL.
Definition at line 127 of file geometry.h.
typedef Matrix<4, Numeric::float64> GEO::mat4 |
Represents a 4x4 matrix.
Syntax is (mostly) compatible with GLSL.
Definition at line 133 of file geometry.h.
Smart pointer that contains a ProgressClient object
Definition at line 116 of file progress.h.
typedef SmartPointer<Thread> GEO::Thread_var |
typedef std::vector<Thread_var> GEO::ThreadGroup |
Smart pointer that contains a ThreadManager object
typedef vecng<2, Numeric::float64> GEO::vec2 |
Represents points and vectors in 2d.
Syntax is (mostly) compatible with GLSL.
Definition at line 59 of file geometry.h.
typedef vecng<2,expansion_nt> GEO::vec2E |
vec2 with coordinates as expansions
Coordinates support +,-,*
Definition at line 80 of file exact_geometry.h.
typedef vecng<2, Numeric::float32> GEO::vec2f |
Represents points and vectors in 2d with single-precision coordinates.
Syntax is (mostly) compatible with GLSL.
Definition at line 78 of file geometry.h.
typedef vec2Hg<expansion_nt> GEO::vec2HE |
2D vector in homogeneous coordinates with coordinates as expansions
Coordinates support +,-,* and / by multiplying w.
Definition at line 108 of file exact_geometry.h.
typedef vec2Hg<interval_nt> GEO::vec2HI |
2D vector in homogeneous coordinates with coordinates as intervals.
Used to write arithmetic filters for geometric predicates.
Definition at line 124 of file exact_geometry.h.
typedef vecng<2, Numeric::int32> GEO::vec2i |
Represents points and vectors in 2d with integer coordinates.
Syntax is (mostly) compatible with GLSL.
Definition at line 100 of file geometry.h.
typedef vecng<2,interval_nt> GEO::vec2I |
vec2 with coordinates as interval_nt
Used to write arithmetic filters for geometric predicates.
Definition at line 93 of file exact_geometry.h.
typedef vecng<3, Numeric::float64> GEO::vec3 |
Represents points and vectors in 3d.
Syntax is (mostly) compatible with GLSL.
Definition at line 65 of file geometry.h.
typedef vecng<3,expansion_nt> GEO::vec3E |
vec3 with coordinates as expansions
Coordinates support +,-,*
Definition at line 86 of file exact_geometry.h.
typedef vecng<3, Numeric::float32> GEO::vec3f |
Represents points and vectors in 3d with single-precision coordinates.
Syntax is (mostly) compatible with GLSL.
Definition at line 85 of file geometry.h.
typedef vec3Hg<expansion_nt> GEO::vec3HE |
3D vector in homogeneous coordinates with coordinates as expansions
Coordinates support +,-,* and / by multiplying w.
Definition at line 116 of file exact_geometry.h.
typedef vec3Hg<interval_nt> GEO::vec3HI |
3D vector in homogeneous coordinates with coordinates as intervals.
Used to write arithmetic filters for geometric predicates.
Definition at line 132 of file exact_geometry.h.
typedef vecng< 3, Numeric::int32 > GEO::vec3i |
typedef vecng<3,interval_nt> GEO::vec3I |
vec3 with coordinates as interval_nt
Used to write arithmetic filters for geometric predicates.
Definition at line 100 of file exact_geometry.h.
typedef vecng<4, Numeric::float64> GEO::vec4 |
Represents points and vectors in 4d.
Syntax is (mostly) compatible with GLSL.
Definition at line 71 of file geometry.h.
typedef vecng<4, Numeric::float32> GEO::vec4f |
Represents points and vectors in 4d with single-precision coordinates.
Syntax is (mostly) compatible with GLSL.
Definition at line 92 of file geometry.h.
typedef vecng<4, Numeric::int32> GEO::vec4i |
Represents points and vectors in 4d with integer coordinates.
Syntax is (mostly) compatible with GLSL.
Definition at line 114 of file geometry.h.
anonymous enum |
Symbolic constants for GEO::initialize()
enum GEO::AssertMode |
Assert termination mode.
Defines how assertion failures should terminate the program. By default, Assertion failures throw an exception.
Enumerator | |
---|---|
ASSERT_THROW | Assertion failures throw an exception |
ASSERT_ABORT | Assertion failures call abort() |
ASSERT_BREAKPOINT | Assertion failures generate a breakpoint in the debugger |
Flags used to compare two meshes.
These flags can be bit-or'ed together to tell mesh_compare() which properties of the meshes to compare. MeshCompareFlags provides 2 reasonable default flags:
Enumerator | |
---|---|
MESH_COMPARE_OK | The mesh comparison is OK |
MESH_COMPARE_DIMENSIONS | Compares mesh dimensions |
MESH_COMPARE_NB_VERTICES | Compares mesh number of vertices |
MESH_COMPARE_NB_FACETS | Compares mesh number of facets |
MESH_COMPARE_NB_FACET_BORDERS | Compares mesh number of facets borders |
MESH_COMPARE_AREAS | Compares mesh areas (see Geom::mesh_area()) |
MESH_COMPARE_TOPOLOGY | Compares mesh topology (see meshes_have_same_topology()) |
MESH_COMPARE_NB_TETS | Compares mesh number of tets |
MESH_COMPARE_NB_TET_BORDERS | Compares mesh number of tets borders |
MESH_COMPARE_SURFACE_PROPS | Reasonable flags used to compare surfaces |
MESH_COMPARE_VOLUME_PROPS | Reasonable flags used to compare volumes |
MESH_COMPARE_ALL | Compare all properties |
Definition at line 63 of file mesh_compare.h.
Determines the operating mode of mesh_decimate_vertex_clustering(). The flags can be combined with the 'bitwise or' (|) operator. MESH_REPAIR_DEFAULT fits most uses.
Definition at line 61 of file mesh_decimate.h.
|
related |
enum GEO::MeshOrder |
Strategy for spatial sorting.
Definition at line 62 of file mesh_reorder.h.
Strategy for mesh partitioning.
Enumerator | |
---|---|
MESH_PARTITION_HILBERT | Mesh parts are index slices of equal sizes in Hilbert order |
MESH_PARTITION_CONNECTED_COMPONENTS | Mesh parts are the connected components of the mesh |
Definition at line 59 of file mesh_partition.h.
enum GEO::MeshRepairMode |
Determines the operating mode of mesh_repair(). The flags can be combined with the 'bitwise or' (|) operator. MESH_REPAIR_DEFAULT fits most uses.
Definition at line 59 of file mesh_repair.h.
enum GEO::MeshSegmenter |
Definition at line 54 of file mesh_segmentation.h.
enum GEO::Sign |
enum GEO::TriangleRegion |
Encodes the location of a point within a triangle.
A point can be located in 6 different regions, that correspond to the three vertices, three edges and interior of a triangle.
Definition at line 64 of file triangle_intersection.h.
|
inline |
uv is a pointer because it is an optional parameter (can be nullptr)
Definition at line 133 of file mesh_utils.h.
Adds a coefficient in a sparse vector.
If the coefficient already exists, then val
is added to the existing coefficient, else a new coefficient is created and inserted in such a way that the vector remains sorted.
[in,out] | L | a reference to the sparse vector, represented by a vector<Coeff>. |
[in] | index | the index of the coefficient to add. |
[in] | val | the value of the coefficient to add. |
Definition at line 147 of file mixed_constrained_solver.h.
void GEO::bake_mesh_attribute | ( | Mesh * | mesh, |
Image * | target, | ||
Attribute< double > & | attribute, | ||
double | bias = 0.0 , |
||
double | scale = 1.0 |
||
) |
Bakes an attribute of a parameterized mesh.
The attribute is baked over the previous content of the image (the image is not cleared).
[in] | mesh | a pointer to the input mesh, with a texture coordinates stored in the "tex_coord" facet corner attribute. |
[out] | target | the target image. |
[in] | attribute | the attribute, can be a vertex, facet corner or facet attribute. Vertex and facet corner attributes are linearly interpolated. If it is a vector attribute, its available components are copied to the r,g,b,a components of the interpolated color. |
[in] | bias | optional value to be added to the attribute values before storing them into the color components. |
[in] | scale | optional value that scales the attribute values after bias is added and before storing them into the color components. |
Bakes the facet normals of a parameterized mesh into an image.
The facet normals are baked over the previous content of the image (the image is not cleared).
[in] | mesh | a pointer to the input esh, with a texture coordinates stored in the "tex_coord" facet corner attribute. |
[out] | target | the target image. |
Bakes facet normals from a (in general) high resolution mesh to a (in general) parameterized lower resolution mesh represented as a geometry image.
The facet normals are baked over the previous content of the image (the image is not cleared). The implementation uses a MeshFacetsAABB that changes the order of the elements of highres
. Whenever a pixel of geometry
has both its r,g,b components set to Numeric::max_float64(), the corresponding pixel in target
is left unchanged.
[in] | geometry | the geometry image |
[out] | target | the target image |
[in] | highres | the high-resolution mesh |
geometry
and target
have the same size, and geometry
uses FLOAT64 component encoding. Bakes mesh geometry into an image (creates a geometry image).
[in] | mesh | a pointer to the input mesh, with a texture coordinates stored in the "tex_coord" facet corner attribute. |
[out] | target | a pointer to the geometry image. It should use Image::FLOAT64 storage for the color components. |
[in] | clear | if set, then all the pixel components of the target geometry image are set to Numeric:max_float64() before rasterizing the facets. |
void GEO::bake_mesh_points_attribute_indirect | ( | Image * | geometry, |
Image * | target, | ||
Mesh * | highres, | ||
Attribute< double > & | attribute, | ||
double | bias = 0.0 , |
||
double | scale = 1.0 |
||
) |
Bakes a vertex attribute from a (in general) high resolution point set to a (in general) parameterized lower resolution mesh represented as a geometry image.
The attribute is baked over the previous content of the image (the image is not cleared). Whenever a pixel of geometry
has both its r,g,b components set to Numeric::max_float64(), the corresponding pixel in target
is left unchanged.
[in] | geometry | the geometry image |
[out] | target | the target image |
[in] | highres | the high-resolution pointset. |
[in] | attribute | the vertex attribute of highres to be baked. |
[in] | bias | optional value to be added to the attribute values before storing them into the color components. |
[in] | scale | optional value that scales the attribute values after bias is added and before storing them into the color components. |
Bakes the facet normals of a parameterized mesh into an image.
The facet normals are baked over the previous content of the image (the image is not cleared). Normals are linearly interpolated in mesh facets.
[in] | mesh | a pointer to the input esh, with a texture coordinates stored in the "tex_coord" facet corner attribute. |
[out] | target | the target image. |
double GEO::bbox_diagonal | ( | const Mesh & | M | ) |
Computes the length of the bounding box diagonal of a mesh.
[in] | M | the mesh |
M's
bounding box diagonal Computes the smallest Box that encloses two Boxes.
[out] | target | the smallest axis-aligned box that encloses B1 and B2 |
[in] | B1 | first box |
[in] | B2 | second box |
Definition at line 720 of file geometry.h.
Computes the smallest Box2d that encloses two Box2d.
[out] | target | the smallest axis-aligned box that encloses B1 and B2 |
[in] | B1 | first box |
[in] | B2 | second box |
Definition at line 782 of file geometry.h.
Tests whether two Boxes have a non-empty intersection.
[in] | B1 | first box |
[in] | B2 | second box |
B1
and B2
have a non-empty intersection, false otherwise. Definition at line 701 of file geometry.h.
Tests whether two Box2d have a non-empty intersection.
[in] | B1 | first box |
[in] | B2 | second box |
B1
and B2
have a non-empty intersection, false otherwise. Definition at line 763 of file geometry.h.
void GEO::cell_edges_in_RCS | ( | Mesh * | m, |
vector< index_t > & | offset_from_org, | ||
vector< index_t > & | dest | ||
) |
store oriented edges in a Row Column Storage structure neigborgs of vertex v are dest[i] with i in offset_from_org[v]...offset_from_org[v+1]
void GEOGRAM_GFX_API GEO::check_gl | ( | const char * | file, |
int | line, | ||
bool | warning_only = false |
||
) |
Tests for OpenGL errors and displays a message if OpenGL errors were encountered.
[in] | file | current sourcefile, as given by FILE |
[in] | line | current line, as given by LINE |
[in] | warning_only | if true, then errors are reported as warnings. |
void GEOGRAM_GFX_API GEO::clear_gl_error_flags | ( | const char * | file, |
int | line | ||
) |
Clears all error flags set by previous OpenGL calls.
This function shoud be called to ensure that subsequent calls to check_gl() will not report any error. This is necessary to workaround some buggy or incomplete implementations of OpenGL. In debug mode, error are always reported.
[in] | file | current sourcefile, as given by FILE |
[in] | line | current line, as given by LINE |
Computes the normals to a point set. The normal is obtained from the nearest neighbors best approximating plane. Normals are stored in the "normal" vertex attribute.
[in] | M | the pointset (facets and tets are ignored if present) |
[in] | nb_neighbors | number of neighbors used to compute the best approximating tangent planes |
[in] | reorient | if true, try to orient the normals by propagation over the KNN graph. |
true | if normals where successfully computed. |
false | otherwise (when the user pushes the cancel button). |
void GEO::Co3Ne_reconstruct | ( | Mesh & | M, |
double | radius | ||
) |
Given a pointset with normals stored in the "normal" vertex attribute, reconstruct the triangles.
[in,out] | M | input pointset and output mesh |
[in] | radius | maximum distance used to connect neighbors with triangles |
Smoothes a point set by projection onto the nearest neighbors best approximating plane.
[in,out] | M | the pointset (facets and tets are ignored if present) |
[in] | nb_neighbors | number of neighbors used to compute the best approximating tangent planes |
[in] | nb_iterations | number of iterations |
void GEO::Co3Ne_smooth_and_reconstruct | ( | Mesh & | M, |
index_t | nb_neighbors, | ||
index_t | nb_iterations, | ||
double | radius | ||
) |
Computes the normals and reconstructs the triangles of a pointset.
The normal is obtained from the nearest neighbors best approximating plane. The normals are used "on the fly" and not stored, therefore calling this function is more efficient than calling Co3Ne_compute_normals() then Co3Ne_reconstruct().
[in,out] | M | the input pointset and the output mesh |
[in] | nb_neighbors | number of neighbors used to compute the best approximating tangent planes |
[in] | nb_iterations | number of smoothing iterations |
[in] | radius | maximum distance used to connect neighbors with triangles |
void GEO::compute_BRIO_order | ( | index_t | nb_vertices, |
const double * | vertices, | ||
vector< index_t > & | sorted_indices, | ||
index_t | dimension, | ||
index_t | stride = 3 , |
||
index_t | threshold = 64 , |
||
double | ratio = 0.125 , |
||
vector< index_t > * | levels = nullptr |
||
) |
Computes the BRIO order for a set of 3D points.
It is used to accelerate incremental insertion in Delaunay triangulation. See the following reference: -Incremental constructions con brio. Nina Amenta, Sunghee Choi, Gunter Rote, Symposium on Computational Geometry conf. proc., 2003
[in] | nb_vertices | number of vertices to sort |
[in] | vertices | pointer to the coordinates of the vertices |
[out] | sorted_indices | a vector of element indices to be sorted spatially |
[in] | dimension | number of vertices coordinates |
[in] | stride | number of doubles between two consecutive vertices |
[in] | threshold | minimum size of interval to be sorted |
[in] | ratio | splitting ratio between current interval and the rest to be sorted |
[out] | levels | if non-nullptr, indices that correspond to level l are in the range levels[l] (included) ... levels[l+1] (excluded) |
void GEO::compute_Hilbert_order | ( | index_t | total_nb_vertices, |
const double * | vertices, | ||
vector< index_t > & | sorted_indices, | ||
index_t | first, | ||
index_t | last, | ||
index_t | dimension, | ||
index_t | stride = 3 |
||
) |
Computes the Hilbert order for a set of 3D points.
This variant sorts a subsequence of the indices vector. The implementation is inspired by:
[in] | total_nb_vertices | total number of vertices in the vertices array, used to test indices in debug mode |
[in] | vertices | pointer to the coordinates of the vertices |
[in,out] | sorted_indices | a vector of vertex indices, sorted spatially on exit |
[in] | first | index of the first element in sorted_indices to be sorted |
[in] | last | one position past the index of the last element in sorted_indices to be sorted |
[in] | dimension | number of vertices coordinates |
[in] | stride | number of doubles between two consecutive vertices |
void EXPLORAGRAM_API GEO::compute_Laguerre_centroids_2d | ( | Mesh * | omega, |
index_t | nb_points, | ||
const double * | points, | ||
double * | centroids, | ||
Mesh * | RVD = nullptr , |
||
bool | verbose = false , |
||
index_t | nb_air_particles = 0 , |
||
const double * | air_particles = nullptr , |
||
index_t | air_particles_stride = 0 , |
||
double | air_fraction = 0.0 , |
||
const double * | weights_in = nullptr , |
||
double * | weights_out = nullptr , |
||
index_t | nb_iter = 1000 |
||
) |
Computes the centroids of the Laguerre cells that correspond to optimal transport in 2D.
[in] | omega | a reference to the mesh that represents the domain |
[in] | nb_points | number of points |
[in] | points | a pointer to the coordinates of the points |
[out] | centroids | a pointer to the computed centroids of the Laguerre cells that correspond to the optimal transport of the uniform measure to the points |
[out] | RVD | if non-nullptr, a mesh with the restricted Voronoi diagram. |
[in] | nb_air_particles | number of air particles. |
[in] | air_particles | a pointer to the array of doubles with the coordinates of the air particles. |
[in] | stride | number of doubles between two consecutive air particles in the array, or 0 if tightly packed. |
[in] | air_fraction | the fraction of the total mass occupied by air. |
[in] | weights_in | an optional array of nb_points doubles corresponding to the initial value of the weight vector. |
[out] | weights_out | the computed value of the weights. |
[in] | nb_iter | maximum number of Newton iterations. |
void EXPLORAGRAM_API GEO::compute_Laguerre_centroids_3d | ( | Mesh * | omega, |
index_t | nb_points, | ||
const double * | points, | ||
double * | centroids, | ||
RVDPolyhedronCallback * | cb = nullptr , |
||
bool | verbose = false , |
||
index_t | nb_iter = 2000 |
||
) |
Computes the centroids of the Laguerre cells that correspond to optimal transport.
[in] | omega | a reference to the mesh that represents the domain |
[in] | nb_points | number of points |
[in] | points | a pointer to the coordinates of the points |
[out] | centroids | a pointer to the computed centroids of the Laguerre cells that correspond to the optimal transport of the uniform measure to the points |
[in] | cb | an optional RVD polyhedron callback to be called on the restricted power diagram once it is computed. |
void EXPLORAGRAM_API GEO::compute_Laguerre_centroids_on_surface | ( | Mesh * | omega, |
index_t | nb_points, | ||
const double * | points, | ||
double * | centroids, | ||
Mesh * | RVD = nullptr , |
||
bool | verbose = false |
||
) |
Computes the centroids of the Laguerre cells that correspond to optimal transport over a surface embedded in 3D.
[in] | omega | a reference to the mesh that represents the domain |
[in] | nb_points | number of points |
[in] | points | a pointer to the coordinates of the points |
[out] | centroids | a pointer to the computed centroids of the Laguerre cells that correspond to the optimal transport of the uniform measure to the points |
void EXPLORAGRAM_API GEO::compute_morph | ( | CentroidalVoronoiTesselation & | CVT, |
OptimalTransportMap3d & | OTM, | ||
Mesh & | morph, | ||
bool | filter_tets = true |
||
) |
Computes a shape that interpolates the two input tet meshes.
The shape is composed of tetrahedra
[in] | CVT | the Centroidal Voronoi Tesselation used to sample the second shape |
[in] | OTM | the Optimal Transport Map |
[out] | morph | mesh where to store the morphing shape. It uses 6d coordinates (original location + final location). |
[in] | filter_tets | if true, remove the tetrahedra that are outside the source mesh. |
void GEO::compute_normals | ( | Mesh & | M | ) |
Computes the normals to the vertices, and stores them as additional coordinates.
[in,out] | M | the mesh |
void EXPLORAGRAM_API GEO::compute_singular_surface | ( | CentroidalVoronoiTesselation & | CVT, |
OptimalTransportMap3d & | OTM, | ||
Mesh & | singular_set | ||
) |
Computes the surface that corresponds to discontinuities in the optimal transport map.
The surface is determined as the facets of Voronoi cells that are adjacent in Pow(X)|M1 but not in Vor(X)|M2
[in] | CVT | the Centroidal Voronoi Tesselation used to sample the second shape M2 |
[in] | OTM | the Optimal Transport Map with the power diagram that samples the first shape M1 |
[out] | singular_set | where to store the singular surface |
Computes a sizing field using an estimate of lfs (local feature size).
The sizing field is stored in M's
vertices weights.
[in,out] | M | the mesh |
[in] | gradation | the exponent to be applied to the sizing field |
[in] | nb_lfs_samples | if set to 0, the vertices of M are used, else M is resampled (needed if M's facets density is highly irregular). |
for each edge of a tet mesh, generate an edge in m->edges edges are sorted by id of their first vertex and the first edge a vertex v is stored in Attribute<index_t>(m->vertices.attributes(), "v2e");
void GEO::create_facet_adjacence | ( | Mesh * | m, |
bool | has_border = false |
||
) |
export adjacency defined by shared vertices (for compatibility with other geomgram algo)
|
inline |
Creates a scaling matrix.
The scaling matrix is in homogeneous coordinates, with the same convention as OpenGL (transforms row vectors mutliplied on the left).
[in] | s | the scaling coefficient |
Definition at line 957 of file geometry.h.
Creates a translation matrix from a vector.
The translation matrix is in homogeneous coordinates, with the same convention as OpenGL (transforms row vectors mutliplied on the left).
[in] | T | a const reference to the translation vector |
Definition at line 940 of file geometry.h.
|
inline |
Computes the determinant of a 2x2 matrix.
Computes the determinant of a 4x4 matrix.
Computes the determinant of a 3x3 matrix.
[in] | M | a const reference to the matrix |
Definition at line 142 of file geometry.h.
void GEOGRAM_GFX_API GEO::draw_unit_textured_quad | ( | bool | BW = false | ) |
Draws a textured quad.
[in] | BW | if set, copy the red channel to the output red, green blue channels (and set alpha to 1.0). |
The textured quad spans the [-1,1]x[-1,1] square with texture coordinates in [0,1]x[0,1]. If no program is currently bound, then a default one is used, and it uses the texture bound to unit 0 of GL_TEXTURE_2D. If a program is bound, then it is used. Vertices coordinates are sent to vertex attribute 0 and texture coordinates to vertex attribute 1.
void GEO::expand_border | ( | Mesh & | M, |
double | epsilon | ||
) |
Enlarges a surface by moving the vertices on the border.
Shifts the vertices on the border by epsilon along a direction tangent to the surface and normal to the border. This enlarges the surface in such a way that small holes are geometrically closed (but not combinatorially). Subsequent remeshing with CentroidalVoronoiTesselation results in a watertight surface.
[in,out] | M | the mesh to be processed |
[in] | epsilon | the distance along which border vertices are shifted |
|
inline |
Compares two expansion_nt.
Optimized using the low-level API
[in] | x,y | the two expansion_nt to compare |
POSITIVE | if x is greater than y |
ZERO | if x equals y |
NEGATIVE | if x is smaller than y |
Definition at line 874 of file expansion_nt.h.
expansion_nt GEO::expansion_nt_determinant | ( | const expansion_nt & | a00, |
const expansion_nt & | a01, | ||
const expansion_nt & | a02, | ||
const expansion_nt & | a03, | ||
const expansion_nt & | a10, | ||
const expansion_nt & | a11, | ||
const expansion_nt & | a12, | ||
const expansion_nt & | a13, | ||
const expansion_nt & | a20, | ||
const expansion_nt & | a21, | ||
const expansion_nt & | a22, | ||
const expansion_nt & | a23, | ||
const expansion_nt & | a30, | ||
const expansion_nt & | a31, | ||
const expansion_nt & | a32, | ||
const expansion_nt & | a33 | ||
) |
Computes a 4x4 determinant.
Specialization using the low-evel API for expansions. This gains some performance as compared to using CGAL's determinant template with expansion_nt.
expansion_nt GEO::expansion_nt_determinant | ( | const expansion_nt & | a00, |
const expansion_nt & | a01, | ||
const expansion_nt & | a02, | ||
const expansion_nt & | a10, | ||
const expansion_nt & | a11, | ||
const expansion_nt & | a12, | ||
const expansion_nt & | a20, | ||
const expansion_nt & | a21, | ||
const expansion_nt & | a22 | ||
) |
Computes a 3x3 determinant.
Specialization using the low-evel API for expansions. This gains some performance as compared to using CGAL's determinant template with expansion_nt.
expansion_nt GEO::expansion_nt_determinant | ( | const expansion_nt & | a00, |
const expansion_nt & | a01, | ||
const expansion_nt & | a10, | ||
const expansion_nt & | a11 | ||
) |
Computes a 2x2 determinant.
Specialization using the low-evel API for expansions. This gains some performance as compared to using CGAL's determinant template with expansion_nt.
|
inline |
Tests whether an expansion_nt is equal to one.
Optimized using the low-level API
[in] | x | a const reference to the expansion_nt to be tested |
true | if x is equal to one |
false | otherwise |
Definition at line 861 of file expansion_nt.h.
|
inline |
Tests whether an expansion_nt is zero.
Optimized using the low-level API
[in] | x | a const reference to the expansion_nt to be tested |
true | if x is equal to zero |
false | otherwise |
Definition at line 850 of file expansion_nt.h.
|
inline |
Computes the square of an expansion_nt.
Optimized using the low-level API
[in] | x | the expansion_nt to be squared |
x
* x
Definition at line 887 of file expansion_nt.h.
void GEO::export_boundary_with_uv | ( | Mesh * | m, |
Mesh * | hex, | ||
const char * | uv_name, | ||
const char * | singtri_name | ||
) |
Creates a surfacic parameterized mesh from the boundary of an input volumetric parameterized mesh.
The parameterization is stored in m
in a cell corners attribute of type vec3 called "U". The input parameterization is supposed to be snapped, i.e. abs(coord - round(coord)) < 0.05 for each coordinate. The input mesh m
also has a boolean cell attribute called "has_param" that indicates whether each cell has a valid parameterization.
[in] | m | the volumetric parameterized mesh |
[out] | hex | the generated surfacic parametrized mesh |
[in] | uv_name | the name of a created facet corner attribute with the 2d parameterization as a vec2 attached to the facet corners. |
[in] | singtri_name | the name of a created facet attribute with an index_t that indicates whether the facet is singular. |
unit vector: weighted sum of normal of a triangle fan around the barycenter
Definition at line 67 of file mesh_inspector.h.
Computes the difference of two expansions, eliminating zero components from the output expansion.
[in] | e | first expansion |
[in] | f | second expansion to be subtracted from e |
[out] | h | the result e - f |
Sets h
= (e
- f
). h
cannot be e
or f
. This function is adapted from Jonathan Shewchuk's code. See the long version of his paper for details. If round-to-even is used (as with IEEE 754), maintains the strongly nonoverlapping property. (That is, if e is strongly nonoverlapping, h will be also.) Does NOT maintain the nonoverlapping or nonadjacent properties.
Sums two expansions, eliminating zero components from the output expansion (sets h
= e
+ f
).
[in] | e | the first expansion |
[in] | f | the second expansion |
[out] | h | the result e + f |
h cannot be e or f. This function is adapted from Jonathan Shewchuk's code. See the long version of his paper for details. If round-to-even is used (as with IEEE 754), maintains the strongly nonoverlapping property. (That is, if e is strongly nonoverlapping, h will be also.) Does NOT maintain the nonoverlapping or nonadjacent properties.
void GEO::fill_holes | ( | Mesh & | M, |
double | max_area = 0.0 , |
||
index_t | max_edges = max_index_t() , |
||
bool | repair = true |
||
) |
Fills holes in mesh by generating new triangles.
This fills specific holes in mesh M
with new triangles. This only fills the holes for which the total area of the generated triangles is smaller than max_area
and for which the number of edges is smaller than max_edges
. This does not generate new vertices.
[in,out] | M | the mesh to modify |
[in] | max_area | maximum area of a hole to be filled, larger holes are ignored. |
[in] | max_edges | maximum number of edges around a hole to be filled, larger holes are ignored. |
[in] | repair | if true (default), then the newly generated triangles are connected to their neighbors and the zero-length edges are discarted. |
GEO_NORETURN_DECL void GEO::geo_abort | ( | ) |
Aborts the program.
On Linux, this calls the system function abort(). On Windows, abort() is more difficult to see under debugger, so this creates a segmentation fault by deferencing a null pointer.
|
inline |
GEO_NORETURN_DECL void GEO::geo_assertion_failed | ( | const std::string & | condition_string, |
const std::string & | file, | ||
int | line | ||
) |
Prints an assertion failure.
This function is called when a boolean condition is not met. It prints an error message and terminates the program according to the current assert termination mode.
[in] | condition_string | string representation of the condition |
[in] | file | file where the assertion failed |
[in] | line | line where the assertion failed |
GEO_NORETURN_DECL void GEO::geo_breakpoint | ( | ) |
Generates a debugger breakpoint programmatically.
On Windows, generates a breakpoint using __debugbreak(), on other systems, calls geo_abort().
|
inline |
|
inline |
Specialization of geo_cmp() for expansion_nt.
x,y | const references to two expansion_nt |
POSITIVE | if x > y |
ZERO | if x == y |
NEGATIVE | if x < y |
Definition at line 835 of file expansion_nt.h.
Specialization of geo_cmp() for rationalg.
a,b | const references to two rationalg |
POSITIVE | if a > b |
ZERO | if a == b |
NEGATIVE | if a < b |
Definition at line 729 of file rationalg.h.
|
inline |
GEO_NORETURN_DECL void GEO::geo_range_assertion_failed | ( | double | value, |
double | min_value, | ||
double | max_value, | ||
const std::string & | file, | ||
int | line | ||
) |
Prints a range assertion failure.
This function is called when a value is out of a legal range. It prints an error message and terminates the program according to the current assert termination mode.
[in] | value | the illegal value |
[in] | min_value | minimum allowed value |
[in] | max_value | maximum allowed value |
[in] | file | file where the assertion failed |
[in] | line | line where the assertion failed |
|
inline |
Specialization of geo_sgn() for expansion_nt.
x | a const reference to an expansion_nt |
Definition at line 824 of file expansion_nt.h.
Specialization of geo_sgn() for rationalg.
x | a const reference to a rationalg |
Definition at line 718 of file rationalg.h.
|
inline |
Gets the sign of a value.
Returns -1, 0, or 1 whether value x
is resp. negative, zero or positive. The function uses operator<() and operator>() to compare the value to 0 (zero). The integer constant zero must make senses for the type of the value, or T must be constructible from integer constant zero.
[in] | x | the value to test |
T | the type of the value |
GEO_NORETURN_DECL void GEO::geo_should_not_have_reached | ( | const std::string & | file, |
int | line | ||
) |
Prints an unreachable location failure.
This function is called when execution reaches a point that it should not reach. It prints an error message and terminates the program according to the current assert termination mode.
[in] | file | file containing the unreachable location |
[in] | line | line of the unreachable location |
|
inline |
void GEO::get_bbox | ( | const Mesh & | M, |
double * | xyzmin, | ||
double * | xyzmax | ||
) |
Gets the bounding box of a mesh.
[in] | M | The mesh |
[out] | xyzmin | the lower corner of the bounding box |
[out] | xyzmax | the upper corner of the bounding box |
Computes the connected components of a Mesh.
[in] | M | the input mesh |
[out] | component | component[f] contains the index of the connected component that facet f belongs to. |
void GEO::get_edge_vertices | ( | TriangleRegion | E, |
TriangleRegion & | q0, | ||
TriangleRegion & | q1 | ||
) |
Gets the vertices of an edge.
[in] | E | the region code of an edge |
[out] | q0,q1 | the region codes of the two vertices of the edge |
GLint64 GEOGRAM_GFX_API GEO::get_size_of_bound_buffer_object | ( | GLenum | target | ) |
Gets the size (in bytes) of the OpenGL buffer bound to a specified target.
[in] | target | buffer object target (GL_ARRAY_BUFFER, GL_INDEX_BUFFER ...) |
target
. void GEO::get_triangle_edges | ( | TriangleRegion | T, |
TriangleRegion & | e0, | ||
TriangleRegion & | e1, | ||
TriangleRegion & | e2 | ||
) |
Gets the edges of a triangle.
[in] | T | one of T1_RGN_T, T2_RGN_T |
[out] | e0,e1,e2 | the region codes of the three edges of the triangle |
void GEO::get_triangle_vertices | ( | TriangleRegion | T, |
TriangleRegion & | p0, | ||
TriangleRegion & | p1, | ||
TriangleRegion & | p2 | ||
) |
Gets the vertices of a triangle.
[in] | T | one of T1_RGN_T, T2_RGN_T |
[out] | p0,p1,p2 | the region codes of the three vertices of the triangle |
Glues two edges on the border of a surface mesh.
[in] | M | a reference to the mesh |
[in] | f1,c1 | the first edge, as a corner seen from a facet |
[in] | f2,c2 | the second edge, as a corner seen from a facet |
|
inline |
void GEOGRAM_GFX_API GEO::glupLoadMatrix | ( | const mat4 & | m | ) |
Replaces the current GLUP matrix with a user defined one.
[in] | m | a const reference to the matrix. |
void GEOGRAM_GFX_API GEO::glupMapTexCoords1d | ( | double | minval, |
double | maxval, | ||
index_t | mult = 1 |
||
) |
Maps texture coordinates from a specified interval to the unit interval.
This changes the GLUP texture matrix. GLUP matrix mode is reset to GLUP_MODELVIEW_MATRIX on exit.
[in] | minval | minimum value, to be mapped to 0 |
[in] | maxval | maximum value, to be mapped to 1 |
[in] | mult | multiplicator, applied after the mapping |
void GEOGRAM_GFX_API GEO::glupMultMatrix | ( | const mat4 & | m | ) |
Multiplies the current GLUP matrix with another one.
[in] | m | a const reference to the matrix. |
|
inline |
|
inline |
|
inline |
Adds a scalar to an expansion, eliminating zero components from the output expansion.
[in] | e | first expansion |
[in] | b | double to be added to e |
[out] | h | the result e + b |
Sets h
= (e
+ b
). e
and h
can be the same. This function is adapted from Jonathan Shewchuk's code. See the long version of his paper for details. Maintains the nonoverlapping property. If round-to-even is used (as with IEEE 754), maintains the strongly nonoverlapping and nonadjacent properties as well. (That is, if e has one of these properties, so will h.)
void GEO::Hilbert_sort_periodic | ( | index_t | nb_vertices, |
const double * | vertices, | ||
vector< index_t > & | sorted_indices, | ||
index_t | dimension, | ||
index_t | stride, | ||
vector< index_t >::iterator | first, | ||
vector< index_t >::iterator | last, | ||
const vec3 & | period | ||
) |
Spatially sort a set of vertices in periodic space.
[in] | nb_vertices | total number of vertices, including the virtual periodic copies. This is 27 times the number of stored vertices. |
[in] | vertices | pointer to the coordinates of the vertices |
[in,out] | sorted_indices | a vector of vertex indices, sorted |
[in] | dimension | number of vertices coordinates. Only 3 is supported. |
[in] | stride | number of doubles between two consecutive vertices spatially on exit |
[in] | first | index of the first element in sorted_indices to be sorted |
[in] | last | one position past the index of the last element in sorted_indices to be sorted |
[in] | period | the translation to be applied in periodic mode |
std::string GEOGRAM_GFX_API GEO::icon_UTF8 | ( | const char * | name | ) |
Gets an icon by name.
[in] | name | the symbolic name of the icon. |
void GEO::initialize | ( | int | flags = GEOGRAM_INSTALL_NONE | ) |
Initialize Geogram.
[in] | flags | an or combination of
|
GEOGRAM_INSTALL_BIBLIO to enable global citation database.
This function must be called once at the very beginning of a program to initialize the Vorpaline library. It also installs a exit() handler that calls function terminate() when the program exists normally. If it is called multiple times, then the supplemental calls have no effect.
void GEO::invert_normals | ( | Mesh & | M | ) |
Inverts all the normals of a mesh.
[in,out] | M | the mesh to be processed |
|
inline |
Tests whether a region belongs to triangle T1.
true | if region belongs to T1 |
false | if region belongs to T2 |
Definition at line 93 of file triangle_intersection.h.
void EXPLORAGRAM_API GEO::kill_isolated_vertices | ( | Mesh * | m | ) |
remove vertices that are not referenced in cells/facets/edges
|
inline |
Binds a wrapper to a name in the table at the top of the LUA stack.
[in] | L | a pointer to the LUA state. |
[in] | f | a pointer to the C++ function to be wrapped. It cannot be a non-static object member function. |
Definition at line 1291 of file lua_wrap.h.
|
inline |
Binds a wrapper to a name in the global scole.
[in] | L | a pointer to the LUA state. |
[in] | f | a pointer to the C++ function to be wrapped. It cannot be a non-static object member function. |
Definition at line 1308 of file lua_wrap.h.
|
inline |
Tests whether the expected number of arguments was pushed onto the stack.
If the number of elements on the stack does not match the expected number of arguments, then an error message is memorized in the registry.
[in] | L | a pointer to the LUA state |
[in] | expected_nb_args | the expected number of arguments |
true | if the expected number of arguments were pushed onto the stack |
false | otherwise |
Definition at line 201 of file lua_wrap.h.
|
inline |
Tests whether a LUA variable has the correct type.
If the LUA variable does not have the correct type, then an error message is memorized in the registry.
[in] | L | a pointer to the LUA state |
[in] | idx | the index of the variable |
[in] | test | a function to test the type, taking as argument L and idx , and returning 1 if the type of the argument is correct and 0 otherwise. |
true | if the type is corret |
false | otherwise |
Definition at line 178 of file lua_wrap.h.
|
inline |
Clears the last error message in LUA registry.
[in] | L | a pointer to the LUA state. |
Definition at line 149 of file lua_wrap.h.
|
inline |
Tests whether an error message was memorized in the registry.
[in] | L | a pointer to the LUA state. |
Definition at line 159 of file lua_wrap.h.
|
inline |
Takes the last error message memorized in the registry and sends it back to LUA.
This function is called by wrappers right before returning each time an error is detected.
the | return value supposed to be returned by the wrapper, as follows: if(error occured) {
return lua_notify_last_error(L);
}
int lua_notify_last_error(lua_State *L) Takes the last error message memorized in the registry and sends it back to LUA. Definition: lua_wrap.h:225 |
Definition at line 225 of file lua_wrap.h.
|
inline |
Specialization of lua_push() for vectors.
It pushes a table, indexed by integers, from 1 to n (rather than 0 to n-1, following LUA indexing convention).
Definition at line 566 of file lua_wrap.h.
|
inline |
Converts and pushes a C++ variable onto the LUA stack.
This version is a placeholder. The actual implementation is done in the specializations.
[in] | L | a pointer to the LUA state. |
[in] | x | the variable to be pushed. |
Definition at line 484 of file lua_wrap.h.
|
inline |
Pushes a wrapper for a given C++ function onto the LUA stack.
[in] | L | a pointer to the LUA state. |
[in] | f | a pointer to the C++ function to be pushed. It cannot be a non-static object member function. |
Definition at line 1269 of file lua_wrap.h.
|
inline |
Specialization for lua_CFunction.
No need for a wrapper if it is already a LUA function.
Definition at line 1277 of file lua_wrap.h.
|
inline |
Memorizes an error message in LUA registry.
This is used by C++/LUA interoperability functions to memorize an error. The error message can be passed back to LUA when exiting a wrapper.
[in] | L | a pointer to the LUA state. |
[in] | error | the error message. It will be copied. |
Definition at line 128 of file lua_wrap.h.
|
inline |
Memorizes an error message in LUA registry.
This is used by C++/LUA interoperability functions to memorize an error. The error message can be passed back to LUA when exiting a wrapper.
[in] | L | a pointer to the LUA state. |
[in] | error | the error message. It will be copied. |
Definition at line 141 of file lua_wrap.h.
|
inline |
Specialization of the wrapper for functions that are "already wrapped".
Definition at line 1210 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack, and the return value pushed onto the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 625 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack, and the return value pushed onto the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 648 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack, and the return value pushed onto the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 673 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack, and the return value pushed onto the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 701 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack, and the return value pushed onto the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 609 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 743 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 762 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 786 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 810 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 838 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 870 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 905 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 943 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 983 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 1025 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 1070 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 1116 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 1165 of file lua_wrap.h.
|
inline |
Calls a C++ function from LUA.
The arguments are converted from the LUA stack. Whenever an error occurs, (invalid number of arguments or type error), it is captured and an error message is returned to the caller.
Definition at line 729 of file lua_wrap.h.
|
inline |
Converts a C++ function name into a LUA function name.
Removes all namespaces from the name.
[in] | L | a pointer to the LUA state (unused). |
[in] | functionname | the C++ function name. |
Definition at line 1324 of file lua_wrap.h.
Creates a vector with coordinates of arbitrary type from two points with double coordinates.
[in] | p1,p2 | the two vectors |
p2
- p1
VEC2 | the type of the returned vector |
Definition at line 161 of file exact_geometry.h.
Creates a vector with coordinates of arbitrary type from two points with double coordinates.
[in] | p1,p2 | the two vectors |
p2
- p1
VEC3 | the type of the returned vector |
Definition at line 144 of file exact_geometry.h.
void EXPLORAGRAM_API GEO::merge_vertices | ( | Mesh * | m, |
double | eps | ||
) |
merges vertices that are close (see GEO::colocate for details about distance guaranty) update references to vertices in cells/facets/edges
void GEO::mesh_adjust_surface | ( | Mesh & | surface, |
Mesh & | reference, | ||
double | max_edge_distance = 0.5 , |
||
bool | project_borders = false |
||
) |
Adjusts a surface mesh in such a way that minimizes its distance to a reference surface mesh.
[in,out] | surface | the surface mesh to be adjusted |
[in] | reference | the reference surface mesh |
[in] | max_edge_distance | distance along which searching for nearest vertex, relative to average edge length in the neighborhood of the considered vertex |
[in] | project_borders | if set, in a final post-processing, project the vertices on the border of the surface onto the borders of the reference surface. Whereas it improves a bit the borders, it results in a worse approximation on the facets adjacent to the border, hence it is off by default |
Internally it uses an AABB, hence the order of the facets of reference
can be changed.
|
inline |
Computes a boolean operation with two surface meshes.
A and B need to be two closed surface mesh without intersections.
[in] | A,B | the two operands. |
[out] | result | the computed mesh. |
[in] | operation | one of "A+B", "A*B", "A-B", "B-A" |
[in] | verbose | if set, display additional information during computation |
Definition at line 1162 of file mesh_surface_intersection.h.
void GEO::mesh_boolean_operation | ( | Mesh & | result, |
Mesh & | A, | ||
Mesh & | B, | ||
const std::string & | operation, | ||
MeshBooleanOperationFlags | flags = MESH_BOOL_OPS_DEFAULT |
||
) |
Computes a boolean operation with two surface meshes.
A and B need to be two closed surface mesh without intersections.
[in] | A,B | the two operands. |
[out] | result | the computed mesh. |
[in] | operation | one of "A+B", "A*B", "A-B", "B-A" |
[in] | flags | MESH_BOOL_OPS_DEFAULT or an '|'-combination of:
|
Computes the normal of a cell facet.
[in] | M | a const reference to the mesh |
[in] | c | the index of the cell |
[in] | lf | the local index of the facet within cell c |
lf
in cell c
Computes the volume of a cell in a mesh.
[in] | M | a const reference to the mesh |
[in] | c | the index of the cell |
double GEO::mesh_cells_volume | ( | const Mesh & | M | ) |
Computes the volume of the cells of a mesh.
[in] | M | a const reference to the mesh |
void GEO::mesh_colocate_vertices_no_check | ( | Mesh & | M, |
double | colocate_epsilon = 0.0 , |
||
bool | verbose = false |
||
) |
Merges the vertices of a mesh that are at the same geometric location.
Does not check for manifoldness, and does not recompute facet connects (one needs to call mesh.facets.connect()).
[in] | M | the mesh |
[in] | colocate_epsilon | tolerance for merging vertices |
MeshCompareFlags GEO::mesh_compare | ( | const Mesh & | M1, |
const Mesh & | M2, | ||
MeshCompareFlags | flags = MESH_COMPARE_SURFACE_PROPS , |
||
double | tolerance = 0.0 , |
||
bool | verbose = true |
||
) |
Compares two meshes. Compares the two meshes M1
and M2
according to the comparison flags flags
(see MeshCompareFlags). The function returns a comparison status similar to the comparison flags:
flags
, the same flag f is set in the status[in] | M1 | the first input mesh |
[in] | M2 | the second input mesh |
[in] | flags | specifies which properties of the meshes should be compared. By default it is set to MESH_COMPARE_SURFACE_PROPS information for the two meshes |
[in] | tolerance | relative tolerance used to compare floating point values (such as the mash areas) |
[in] | verbose | enables/disables the display of mesh information for the two meshes, as well mesh comparison error messages. |
MESH_COMPARE_OK | if meshes M1 and M2 are identical according to the comparison criteria |
the | comparison status otherwise. |
void GEO::mesh_compute_ABF_plus_plus | ( | Mesh & | M, |
const std::string & | attribute_name = "tex_coord" , |
||
bool | verbose = false |
||
) |
Computes texture coordinates using Least Squares Conformal Maps.
The method is described in the following reference: ABF++: fast and robust angle-based flattening, A. Sheffer, B. Levy, M. Mogilnitsky, A. Bogomyakov, ACM Transactions on Graphics, 2005
[in,out] | M | a reference to a surface mesh. Facets need to be triangulated. |
[in] | attribute_name | the name of the vertex attribute where texture coordinates are stored. |
[in] | verbose | if true, messages with statistics are displayed in the logger during computation. |
void GEO::mesh_compute_LSCM | ( | Mesh & | M, |
const std::string & | attribute_name = "tex_coord" , |
||
bool | spectral = false , |
||
const std::string & | angle_attribute_name = "" , |
||
bool | verbose = false |
||
) |
Computes texture coordinates using Least Squares Conformal Maps.
The method is described in the following references:
[in,out] | M | a reference to a surface mesh |
[in] | attribute_name | the name of the vertex attribute where texture coordinates are stored. |
[in] | spectral | if true, use spectral conformal parameterization, otherwise use least squares conformal maps. Spectral mode requires support of the ARPACK OpenNL extension. |
[in] | angle_attribute_name | if specified, the desired angles in the 2D map. If unspecified, the desired angles are read on the 3D mesh. |
[in] | verbose | if true, display statistics during computation. |
void GEO::mesh_compute_manifold_harmonics | ( | Mesh & | M, |
index_t | nb_eigens, | ||
LaplaceBeltramiDiscretization | discretization, | ||
const std::string & | attribute_name = "eigen" , |
||
double | shift = 0.0 , |
||
bool | print_spectrum = false |
||
) |
Computes the Manifold Harmonics basis functions.
The computed eigenvectors are stored in a vertex attribute.
[in] | M | a reference to a surface mesh |
[in] | nb_eigens | number of eigenfunctions to compute |
[in] | discretization | the discretization of the Laplace-Beltrami operator, one of:
|
[in] | shift | eigen shift applied to explore a certain part of the spectrum. |
[in] | print_spectrum | if true, prints eigenvalues to the terminal. |
void GEO::mesh_compute_manifold_harmonics_by_bands | ( | Mesh & | M, |
index_t | nb_eigens, | ||
LaplaceBeltramiDiscretization | discretization, | ||
ManifoldHarmonicsCallback | callback, | ||
index_t | nb_eigens_per_band = 30 , |
||
double | initial_shift = 0.0 , |
||
void * | client_data = nullptr |
||
) |
Computes Laplacian eigenfunctions band by band.
This function should be used when a large number of eigenfunctions should be computed.
[in] | M | a const reference to a surface mesh |
[in] | nb_eigens | total number of eigenpairs to compute |
[in] | callback | the client function to be called for each computed eigenpair |
[in] | nb_eigens_per_band | the number of eigenpairs to be computed in each band |
[in] | initial_shift | the initial location in the spectrum |
[in] | client_data | a pointer passed to the client callback |
void GEO::mesh_connect_and_reorient_facets_no_check | ( | Mesh & | M | ) |
Connects the facets and consistently orient manifold components.
This may leave some non-manifold edges, with more than two facets indicent to them.
void GEO::mesh_decimate_vertex_clustering | ( | Mesh & | M, |
index_t | nb_bins, | ||
MeshDecimateMode | mode = MESH_DECIMATE_DEFAULT , |
||
geo_index_t * | vertices_flags = nullptr |
||
) |
Generates a simplified representation of a mesh.
[in,out] | M | the mesh to decimate |
[in] | nb_bins | the higher, the more detailed mesh. |
[in] | mode | a combination of MeshDecimateMode flags. Combine them with the 'bitwise or' (|) operator. |
[in] | vertices_flags | an array of flags associated with each vertex of mesh_id , or nullptr if unspecified. Memory is managed by client code. If vertices_flags [v] is non-zero, then vertex v is preserved, else it can be discarded. |
void GEO::mesh_detect_colocated_vertices | ( | const Mesh & | M, |
vector< index_t > & | v_colocated_index, | ||
double | colocate_epsilon = 0.0 |
||
) |
Detects colocated vertices in a mesh.
Example of function to remove duplicated vertices in a pointset:
[in] | M | a const reference to the mesh |
[out] | v_colocated_index | on exit, a vector of size M.vertices.nb(), such that for each vertex index v, v_colocated_index[v] contains either v (if v should be kept) or the index of the vertex that v is colocated with. |
[in] | colocate_epsilon | if the distance between two mesh vertices is smaller than colocate_epsilon, then they are colocated. |
Detects degenerate facets in a mesh.
A facet is degenerate if it is incident to the same vertex several times.
[in] | M | a const reference to the mesh |
[out] | f_is_degenerate | on exit, a vector of size M.facets.nb(), such that f_is_degenerate[f] is equal to 1 if f is degenerate or 0 if f is not degenerate. |
Detects isolated vertices in a mesh.
A vertex is isolated if no mesh element (edge, facet or cell) is incident to it.
[in] | M | a const reference to the mesh |
[out] | v_is_isolated | on exit, a vector of size M.vertices.nb(), such that v_is_isolated[v] is equal to 1 if v is isolated or 0 if v is not isolated. |
Computes the difference of two surface meshes.
A and B need to be two closed surface mesh without intersections.
[in] | A,B | the two operands. |
[out] | result | the computed mesh. |
[in] | verbose | if set, display additional information during computation |
Definition at line 1269 of file mesh_surface_intersection.h.
|
inline |
Computes the difference of two surface meshes.
A and B need to be two closed surface mesh without intersections.
[in] | A,B | the two operands. |
[out] | result | the computed mesh. |
[in] | flags | MESH_BOOL_OPS_DEFAULT or an '|'-combination of:
|
Definition at line 1253 of file mesh_surface_intersection.h.
|
inline |
Computes the mass of a mesh facet.
The function can optionally take into account the vertex weights.
[in] | mesh | the surface mesh |
[in] | f | a facet index in mesh |
[in] | vertex_weight | a reference to a vertex attribute. If it is bound, it is used to weight the vertices. |
f
in mesh
Definition at line 69 of file mesh_sampling.h.
Tests whether two mesh facets have a non-degenerate intersection.
If the facets are polygonal, they are triangulated from the first vertex, and intersections between each pair of triangles is tested.
true | if the two facets have an intersection. If they share a vertex, it does not count as an intersection. |
false | otherwise. |
|
inline |
Generates a set of random samples in a volumetric mesh.
[in] | mesh | the mesh |
[out] | p | pointer to an array of generated samples, of size nb_points times DIM. To be allocated by the caller. |
[in] | nb_points | number of points to generate |
[in] | vertex_weight | if bound, vertex weights are taken into account |
[in] | tets_begin_in | if specified, first index of the tetrahedron sequence in which points should be generated. If left unspecified (-1), points are generated over all the tetrahedra of the mesh. |
[in] | tets_end_in | if specified, one position past the last index of the tetrahedron sequence in which points should be generated. If left unspecified (-1), points are generated over all the tetrahedra of the mesh. |
DIM | dimension of the points, specified as a template argument for efficiency reasons |
Definition at line 287 of file mesh_sampling.h.
|
inline |
Generates a set of random samples over a surfacic mesh.
[in] | mesh | the mesh |
[out] | p | pointer to an array of generated samples, of size nb_points times DIM. To be allocated by the caller. |
[in] | nb_points | number of points to generate |
[in] | weight | a reference to a vertex attribute. If bound, it is taken into account. |
[in] | facets_begin_in | if specified, first index of the facet sequence in which points should be generated. If left unspecified (-1), points are generated over all the facets of the mesh. |
[in] | facets_end_in | if specified, one position past the last index of the facet sequence in which points should be generated. If left unspecified (-1), points are generated over all the facets of the mesh. |
DIM | dimension of the points, specified as a template argument for efficiency reasons |
Definition at line 120 of file mesh_sampling.h.
Gets the charts attribute from a parameterized mesh.
The charts are stored in a facet attribute named "chart" of type index_t
[in,out] | mesh | a parameterized mesh |
Computes the intersection of two surface meshes.
A and B need to be two closed surface mesh without intersections.
[in] | A,B | the two operands. |
[out] | result | the computed mesh. |
[in] | verbose | if set, display additional information during computation |
Definition at line 1235 of file mesh_surface_intersection.h.
|
inline |
Computes the intersection of two surface meshes.
A and B need to be two closed surface mesh without intersections.
[in] | A,B | the two operands. |
[out] | result | the computed mesh. |
[in] | flags | MESH_BOOL_OPS_DEFAULT or an '|'-combination of:
|
Definition at line 1219 of file mesh_surface_intersection.h.
bool GEO::mesh_load | ( | const std::string & | filename, |
Mesh & | M, | ||
const MeshIOFlags & | ioflags = MeshIOFlags() |
||
) |
Loads a mesh from a file.
Loads the contents of the mesh file filename
and stores the resulting mesh to M
. The file format is determined by the filename's
extension, which determines the appropriate MeshIOHandler to use to read the file.
[in] | filename | name of the file to be loaded with optional path |
[out] | M | the loaded mesh |
[in] | ioflags | specifies which attributes and elements should be loaded |
bool GEO::mesh_load | ( | InputGeoFile & | geofile, |
Mesh & | M, | ||
const MeshIOFlags & | ioflags = MeshIOFlags() |
||
) |
Loads a mesh from a GeoFile ('.geogram' file format).
Loads the contents of the InputGeoFile geofile
and stores the resulting mesh to M
. This function can be used to load several meshes that are stored in the same GeoFile.
[in] | geofile | a reference to the InputGeoFile |
[out] | M | the loaded mesh |
[in] | ioflags | specifies which attributes and elements should be loaded |
void GEO::mesh_make_atlas | ( | Mesh & | mesh, |
double | hard_angles_threshold = 45.0 , |
||
ChartParameterizer | param = PARAM_ABF , |
||
ChartPacker | pack = PACK_XATLAS , |
||
bool | verbose = false |
||
) |
Generates u,v coordinates for a given mesh.
The generated u,v coordinates are stored in an attribute attached to the facet corners. The mesh is first decomposed into a set of charts, then each chart is flatenned using param
. After parameterization, if distortion is too high, the chart is further decomposed into smaller charts. Finally, all the charts are packed in texture space using pack
. If the mesh has a facet attribute named "chart", then it is used to initialize the segmentation.
[in,out] | mesh | the mesh to be parameterized. For now, only triangulated meshes are supported. |
[in] | hard_angle_threshold | edges for which the dihedral angle is larger than this threshold are considered as chart boundaries (in degrees) |
[in] | param | one of:
|
[in] | pack | one of:
|
signed_index_t GEO::mesh_nb_borders | ( | const Mesh & | M | ) |
Computes the number of borders of a Mesh.
[in] | M | the input mesh |
Computes an approximation of the single sided Hausdorff distance dH(m1->m2) between two surfacic meshes.
The single sided Hausdorff distance dH(m1,m2) is defined as: \(dH(m1->m2) = Max(min(d(p,q) | q \in m2) | p \in m1)\)
The mesh m1
is sampled as discrete locations and the max of the distances between these samples and m2
is returned.
m1
and m2
are used (line segments and volumetric cells are ignored). Note that the order of the mesh facets are changed.[in] | m1,m2 | two surfacic meshes whose distance is computed |
[in] | sampling_dist | average distance between two samples (the smaller, the more accurate). At least all the vertices of m1 are sampled, and additional random samples on the surface are added until sampling density is reached, i.e. nb_samples >= area(m1) / sampling_dist^2 |
void GEO::mesh_partition | ( | Mesh & | M, |
MeshPartitionMode | mode, | ||
vector< index_t > & | facet_ptr, | ||
index_t | nb_parts = 0 |
||
) |
Partitions a mesh into a fixed number of parts.
The mesh facets are reordered in such a way that each mesh part contains a contiguous set of facet indices.
[in,out] | M | the mesh to partition |
[in] | mode | one of MESH_PARTITION_HILBERT, MESH_PARTITION_CONNECTED_COMPONENTS. |
[out] | facet_ptr | on exit, part p's facets are facet_ptr[p] ... facet_ptr[p+1]-1 |
[in] | nb_parts | number of parts to create. Ignored if mode = MESH_PARTITION_CONNECTED_COMPONENTS |
void GEO::mesh_partition | ( | Mesh & | M, |
MeshPartitionMode | mode, | ||
vector< index_t > & | facet_ptr, | ||
vector< index_t > & | tet_ptr, | ||
index_t | nb_parts = 0 |
||
) |
Partitions a mesh into a fixed number of parts.
The mesh facets and tetrahedra are reordered in such a way that each mesh part contains a contiguous set of facet indices.
[in,out] | M | the mesh to partition |
[in] | mode | one of MESH_PARTITION_HILBERT, MESH_PARTITION_CONNECTED_COMPONENTS. |
[out] | facet_ptr | on exit, part p's facets are facet_ptr[p] ... facet_ptr[p+1]-1 |
[out] | tet_ptr | on exit, part p's tetrahedra are tet_ptr[p] ... tet_ptr[p+1]-1 |
[in] | nb_parts | number of parts to create. Ignored if mode = MESH_PARTITION_CONNECTED_COMPONENTS |
void GEO::mesh_postprocess_RDT | ( | Mesh & | M, |
bool | verbose = false |
||
) |
Post-processes a Restricted Delaunay Triangulation.
Reconstructs the triangle-triangle connectivity and removes some degeneracies (vertices with a unique triangle incident to them).
void GEO::mesh_remove_bad_facets_no_check | ( | Mesh & | M, |
bool | check_duplicates = true |
||
) |
Removes the degenerate and the duplicated facets in a surface mesh.
Does not recompute facet connections ( one needs to call mesh.facets.connect()).
[in] | M | the mesh |
[in] | check_duplicates | if set, removes the duplicated facets (facets that have the same vertices, regardless the orientation). |
Attempts to make a surface mesh conformal by removing intersecting facets and re-triangulating the holes.
[in] | verbose | if set, display additional information during computation |
void GEO::mesh_reorder | ( | Mesh & | M, |
MeshOrder | order = MESH_ORDER_HILBERT |
||
) |
Reorders all the elements of a mesh.
It is used for both improving data locality and for implementing mesh partitioning.
[in] | M | the mesh to reorder |
[in] | order | the reordering scheme |
Reorients the facets of a mesh coherently.
The input mesh may have facets that have incoherent orientations, i.e. edges that do not respect the Moebius law (two facets that share an edge, one oriented clockwise and the other one anticlockwise). This function detects and repairs such configurations by flipping the incoherent facets. Facet-facet links (corner_adjacent_facet) need to be initialized as follows: for two corners c1, c2, if we have:
[in,out] | M | the mesh to reorient |
[out] | moebius_facets | a pointer to a vector. On exit, *moebius_facets[f] has a non-zero value if facet f is incident to an edge that could not be consistently oriented. If nullptr, then this information is not returned. |
void GEO::mesh_repair | ( | Mesh & | M, |
MeshRepairMode | mode = MESH_REPAIR_DEFAULT , |
||
double | colocate_epsilon = 0.0 |
||
) |
Fixes some defaults in a mesh.
[in,out] | M | the mesh to repair |
[in] | mode | a combination of MeshRepairMode flags. Combine them with the 'bitwise or' (|) operator. |
[in] | colocate_epsilon | tolerance used to colocate vertices (if MESH_REPAIR_COLOCATE is set in mode). |
bool GEO::mesh_save | ( | const Mesh & | M, |
const std::string & | filename, | ||
const MeshIOFlags & | ioflags = MeshIOFlags() |
||
) |
Saves a mesh to a file.
Saves mesh M
to the file filename
. The file format is determined by the filename's
extension, which determines the appropriate MeshIOHandler to use to write the file.
[in] | M | the mesh to save |
[in] | filename | name of the file |
[in] | ioflags | specifies which attributes and elements should be saved |
bool GEO::mesh_save | ( | const Mesh & | M, |
OutputGeoFile & | geofile, | ||
const MeshIOFlags & | ioflags = MeshIOFlags() |
||
) |
Saves a mesh to a GeoFile ('.geogram' file format)
Saves mesh M
to the GeoFile geofile
. This function can be used to write several meshes into the same GeoFile.
[in] | M | the mesh to save |
[in] | geofile | a reference to the OutputGeoFile |
[in] | ioflags | specifies which attributes and elements should be saved |
index_t GEO::mesh_segment | ( | Mesh & | mesh, |
MeshSegmenter | segmenter, | ||
index_t | nb_segments, | ||
bool | verbose = false |
||
) |
Computes a segmentation of a mesh.
The segmentation is stored in the "chart" facet attribute.
[in,out] | mesh | the mesh to be segmented. For now, only triangulated meshes are supported. |
[in] | segmenter | one of SEGMENT_GEOMETRIC_VSA_L2, SEGMENT_GEOMETRIC_VSA_L12, SEGMENT_SPECTRAL_8, SEGMENT_SPECTRAL_20, SEGMENT_SPECTRAL_100 |
[in] | nb_segments | desired number of segment |
void GEO::mesh_smooth | ( | Mesh & | M | ) |
Smooths the shape of a mesh.
The vertices in the current vertex selection are locked, and all the other ones are optimized.
[in] | M | a reference to a surface mesh |
void GEO::mesh_split_catmull_clark | ( | Mesh & | M, |
MeshSplitCallbacks * | cb = nullptr |
||
) |
Splits a mesh using Catmull-Clark subdivision rule.
If the surface mesh has a boundary, then its geometry is left unchanged.
[in,out] | M | a reference to a surface mesh. |
[in] | cb | an optional pointer to a MeshSplitCallbacks, indicating how vertices attributes should be interpolated. |
void GEO::mesh_split_quads | ( | Mesh & | M, |
index_t | facets_begin = 0 , |
||
index_t | facets_end = index_t(-1) , |
||
MeshSplitCallbacks * | cb = nullptr |
||
) |
Splits each facet of a surface mesh into quads.
[in,out] | M | a reference to a surface mesh |
[in] | facets_begin | (optional) index of the first facet to be split |
[in] | facets_end | (optional) one position past the index of the last facet to be split or index_t(-1) if unspecified. |
[in] | cb | an optional pointer to a MeshSplitCallbacks, indicating how vertices attributes should be interpolated. |
void GEO::mesh_split_triangles | ( | Mesh & | M, |
index_t | facets_begin = 0 , |
||
index_t | facets_end = index_t(-1) , |
||
MeshSplitCallbacks * | cb = nullptr |
||
) |
Splits each triangle of a surface mesh into four.
[in,out] | M | a reference to a surface mesh |
[in] | facets_begin | (optional) index of the first facet to be split |
[in] | facets_end | (optional) one position past the index of the last facet to be split or index_t(-1) if unspecified |
[in] | cb | an optional pointer to a MeshSplitCallbacks, indicating how vertices attributes should be interpolated. |
Computes an approximation of the symmetric Hausdorff distance dH(m1<->m2) between two surfacic meshes.
The symmetric Hausdorff distance dH(m1<->m2) is defined as: dH(m1<->m2) = Max(dH(m1->m2),dH(m2->m1))
m1
and m2
are used (line segments and volumetric cells are ignored). Note that the order of the mesh facets are changed.[in] | m1,m2 | two surfacic meshes whose distance is computed |
[in] | sampling_dist | average distance between two samples (the smaller, the more accurate). At least all the vertices of m1 (resp. m2) are sampled, and additional random samples on the surface are added until sampling density is reached, i.e. nb_samples_m1 >= area(m1) / sampling_dist^2 (resp. m2). |
Computes the mass of a mesh tetrahedron.
The function can optionally take into account the vertex weights.
[in] | mesh | the surface mesh |
[in] | t | a tetrahedron index in mesh |
t
in mesh
Definition at line 212 of file mesh_sampling.h.
|
inline |
Computes the mass of a mesh tetrahedron.
The function can optionally take into account the vertex weights.
[in] | mesh | the surface mesh |
[in] | t | a tetrahedron index in mesh |
[in] | weight | a reference to a vertex weight attribute. If it is bound, it is taken into account in mass computation |
t
in mesh
Definition at line 245 of file mesh_sampling.h.
|
inline |
Fills a closed surface mesh with tetrahedra.
A constrained Delaunay triangulation algorithm needs to be interfaced (e.g., compiling with tetgen support).
[in,out] | M | a reference to a mesh |
[in] | preprocess | if true, the surface mesh is preprocessed to fix some defects (small gaps and intersections). If preprocess is set and borders are detected after preprocessing, then the function returns false. If preprocess is set to false, then the caller is supposed to provide a correct set of input constraints (that may have dangling borders / internal constraints). |
[in] | refine | if true, inserts additional vertices to improve the quality of the mesh elements |
[in] | quality | typically in [1.0, 2.0], specifies the desired quality of mesh elements (1.0 means maximum quality, and generates a higher number of elements). |
[in] | keep_regions | if set, then all internal regions are kept, and a region cell attribute is created, else only tetrahedra in the outermost region are kept. |
[in] | eps | threshold for merging verties if preprocess is set, in percentage of bounding box diagonal. Use 0 to merge strictly colocated vertices |
true | if the mesh was successfuly tetrahedralized |
false | otherwise |
Definition at line 146 of file mesh_tetrahedralize.h.
bool GEO::mesh_tetrahedralize | ( | Mesh & | M, |
const MeshTetrahedralizeParameters & | params | ||
) |
Fills a closed surface mesh with tetrahedra.
A constrained Delaunay triangulation algorithm needs to be interfaced (e.g., compiling with tetgen support).
[in,out] | M | a reference to the input surface mesh. On exit, the (optionally pre-processed) same surface mesh filled with tetrahedra |
[in] | params | a reference to a MeshTetrahedralizeParameters |
true | if the mesh was successfuly tetrahedralized |
false | otherwise |
double EXPLORAGRAM_API GEO::mesh_tets_volume | ( | const Mesh & | M | ) |
Computes the volume of a tetrahedral mesh.
[in] | M | a const reference to the mesh |
void GEO::mesh_triangulate_center_vertex | ( | Mesh & | M, |
index_t | facets_begin = 0 , |
||
index_t | facets_end = index_t(-1) , |
||
MeshSplitCallbacks * | cb = nullptr |
||
) |
Splits each n-sided facet of a surface into n triangles by inserting a vertex in the center.
[in,out] | M | a reference to a surface mesh |
[in] | facets_begin | (optional) index of the first facet to be split |
[in] | facets_end | (optional) one position past the index of the last facet to be split or index_t(-1) if unspecified |
[in] | cb | an optional pointer to a MeshSplitCallbacks, indicating how vertices attributes should be interpolated. |
Computes the union of two surface meshes.
A and B need to be two closed surface mesh without intersections.
[in] | A,B | the two operands. |
[out] | result | the computed mesh. |
[in] | verbose | if set, display additional information during computation |
Definition at line 1200 of file mesh_surface_intersection.h.
|
inline |
Computes the union of two surface meshes.
A and B need to be two closed surface mesh without intersections.
[in] | A,B | the two operands. |
[out] | result | the computed mesh. |
[in] | flags | MESH_BOOL_OPS_DEFAULT or an '|'-combination of:
|
Definition at line 1184 of file mesh_surface_intersection.h.
signed_index_t GEO::mesh_Xi | ( | const Mesh & | M | ) |
Computes the Euler-Poincare characteristic of a surfacic Mesh.
[in] | M | the input mesh |
Compares the topological invariants of two meshes.
The topological invariants are: the number of connected components (get_connected_components()), the Euler-Poincare characteristic (computed by mesh_Xi()) and the number of borders (computed by mesh_number_of_borders()). These are displayed if verbose
is set to true.
[in] | M1 | the first input mesh |
[in] | M2 | the second input mesh |
[in] | verbose | enables/disables the display of topological information for the two meshes |
true | if meshes M1 and M2 have the same topology, |
false | otherwise. |
|
inline |
Tests whether a LUA variable is a boolean.
lua_isboolean() is a macro, and we needed a true function here (to be passed to lua_check_type()).
[in] | L | a pointer to the LUA state |
[in] | idx | an index in the LUA stack |
a | non-zero integer if the variable at index idx in the LUA state L is a boolean. |
0 | otherwise. |
Definition at line 84 of file lua_wrap.h.
|
inline |
Tests whether a LUA variable is a light user data.
lua_isuserdata() is a macro, and we needed a true function here (to be passed to lua_check_type()).
[in] | L | a pointer to the LUA state |
[in] | idx | an index in the LUA stack |
a | non-zero integer if the variable at index idx in the LUA state L is a light user data. |
0 | otherwise. |
Definition at line 99 of file lua_wrap.h.
|
inline |
Tests whether a LUA variable is a positive integer.
[in] | L | a pointer to the LUA state |
[in] | idx | an index in the LUA stack |
a | non-zero integer if the variable at index idx in the LUA state L is a positive integer. |
0 | otherwise. |
Definition at line 112 of file lua_wrap.h.
void GEO::normalize_embedding_area | ( | Mesh & | M | ) |
Computes vertices weights in such a way that triangle areas are normalized.
If this function is used, then CentroidalVoronoiTesselation generates Voronoi cells of equal areas.
[in,out] | M | the mesh |
|
inline |
Computes the product of two Quaternion.
[in] | a | a const reference to the first Quaternion |
[in] | b | a const reference to the second Quaternion |
a
and b
Definition at line 274 of file quaternion.h.
|
inline |
Computes the product of a Quaternion and a scalar.
[in] | a | a const reference to the Quaternion |
[in] | t | the scalar |
a
and t
Definition at line 287 of file quaternion.h.
|
inline |
Computes the product of a scalar and a Quaternion.
[in] | t | the scalar |
[in] | a | a const reference to the second Quaternion |
t
and a
Definition at line 298 of file quaternion.h.
|
inline |
Computes the sum of two Quaternion.
[in] | a | a const reference to the first Quaternion |
[in] | b | a const reference to the second Quaternion |
a
and b
Definition at line 239 of file quaternion.h.
|
inline |
Computes the opposite of a Quaternion.
[in] | a | a const reference to the Quaternion |
a
Definition at line 264 of file quaternion.h.
|
inline |
Computes the difference between two Quaternion.
[in] | a | a const reference to the first Quaternion |
[in] | b | a const reference to the second Quaternion |
a
and b
Definition at line 252 of file quaternion.h.
|
inline |
Specialization of 2d homogeneous-coord vector difference for interval_nt coordinates.
We cannot check for p1.w and p2.w equality (since they might be in the same interval without being equal), so we always reduce to the same denominator.
Definition at line 730 of file interval_nt.h.
|
inline |
Specialization of 3d homogeneous-coord vector difference for interval_nt coordinates.
We cannot check for p1.w and p2.w equality (since they might be in the same interval without being equal), so we always reduce to the same denominator.
Definition at line 748 of file interval_nt.h.
|
inline |
Displays a Halfedge.
[out] | out | the stream where to print the Halfedge |
[in] | H | the Halfedge |
out
Definition at line 305 of file mesh_halfedges.h.
|
inline |
Writes a Quaternion to a stream.
[in,out] | out | the stream |
[in] | q | a const reference to the quaternion |
Definition at line 213 of file quaternion.h.
|
inline |
Prints a triangle intersection element to a stream.
Used for debugging purposes.
[in] | out | the stream. |
[in] | I | the intersection element to be printed. |
Definition at line 231 of file triangle_intersection.h.
|
inline |
Prints the result of a triangle intersection to a stream.
Used for debugging purposes.
[in] | out | the stream. |
[in] | II | the intersections to be printed. |
Definition at line 248 of file triangle_intersection.h.
|
inline |
Reads a Quaternion from a stream.
[in,out] | in | the stream |
[out] | q | a reference to the quaternion |
Definition at line 225 of file quaternion.h.
void GEO::orient_normals | ( | Mesh & | M | ) |
Orients the normals in such a way that each connected component has a positive signed volume.
[in,out] | M | the mesh to be processed |
void GEO::pack_atlas_only_normalize_charts | ( | Mesh & | mesh | ) |
Normalizes chart texture coordinates.
Ensure that each chart has a texture area proportional to its 3D area.
void GEO::pack_atlas_using_tetris_packer | ( | Mesh & | mesh | ) |
Packs an atlas using the tetris packer algorithm.
The mesh needs to have a parameterization stored in the tex_coord facet_corner attribute. The method is decribed in the following referene:
[in,out] | mesh | a reference to the mesh |
void GEO::pack_atlas_using_xatlas | ( | Mesh & | mesh | ) |
Packs an atlas using the xatlas library.
The mesh needs to have a parameterization stored in the tex_coord facet_corner attribute.
[in,out] | mesh | a reference to the mesh |
void GEO::parallel | ( | std::function< void()> | f1, |
std::function< void()> | f2 | ||
) |
Calls functions in parallel.
Can be typically used with lambdas that capture this. See mesh/mesh_reorder.cpp and points/kd_tree.cpp for examples.
[in] | f1,f2 | functions to be called in parallel. |
void GEO::parallel | ( | std::function< void()> | f1, |
std::function< void()> | f2, | ||
std::function< void()> | f3, | ||
std::function< void()> | f4 | ||
) |
Calls functions in parallel.
Can be typically used with lambdas that capture this. See mesh/mesh_reorder.cpp and points/kd_tree.cpp for examples.
[in] | f1,f2,f3,f4 | functions to be called in parallel. |
void GEO::parallel | ( | std::function< void()> | f1, |
std::function< void()> | f2, | ||
std::function< void()> | f3, | ||
std::function< void()> | f4, | ||
std::function< void()> | f5, | ||
std::function< void()> | f6, | ||
std::function< void()> | f7, | ||
std::function< void()> | f8 | ||
) |
Calls functions in parallel.
Can be typically used with lambdas that capture this. See mesh/mesh_reorder.cpp and points/kd_tree.cpp for examples.
[in] | f1,f2,f3,f4,f5,f6,f7,f8 | functions to be called in parallel. |
void GEO::parallel_for | ( | index_t | from, |
index_t | to, | ||
std::function< void(index_t)> | func, | ||
index_t | threads_per_core = 1 , |
||
bool | interleaved = false |
||
) |
Executes a loop with concurrent threads.
Executes a parallel for loop from index to
index to
, calling functional object func
at each iteration.
Calling parallel_for(from, to, func) is equivalent to the following loop, computed in parallel:
When applicable, iterations are executed by concurrent threads: the range of the loop is split in to several contiguous sub-ranges, each of them being executed by a separate thread.
If parameter interleaved
is set to true, the loop range is decomposed in interleaved index sets. Interleaved execution may improve cache coherency.
[in] | func | function that takes an index_t. |
[in] | from | the first iteration index |
[in] | to | one position past the last iteration index |
[in] | threads_per_core | number of threads to allocate per physical core (default is 1). |
[in] | interleaved | if set to true , indices are allocated to threads with an interleaved pattern. |
void GEO::parallel_for_slice | ( | index_t | from, |
index_t | to, | ||
std::function< void(index_t, index_t)> | func, | ||
index_t | threads_per_core = 1 |
||
) |
Executes a loop with concurrent threads.
When applicable, iterations are executed by concurrent threads: the range of the loop is split in to several contiguous sub-ranges, each of them being executed by a separate thread.
Calling parallel_for(func, from, to) is equivalent to the following loop, computed in parallel:
where i1,i2,...in are automatically generated. Typically one interval per physical core is generated.
[in] | func | functional object that accepts two arguments of type index_t. |
[in] | from | first iteration index of the loop |
[in] | to | one position past the last iteration index |
[in] | threads_per_core | number of threads to allocate per physical core (default is 1). |
|
inline |
Applies a random permutation to a sequence.
A drop-in replacement of std::random_shuffle(), that is deprecated since c++17
[in] | begin,end | first position and one item past last position of the sequence to be randomly permuted |
Definition at line 208 of file algorithm.h.
|
inline |
Reads an ASCII attribute from a file.
[in] | file | the input file, obtained through fopen() |
[out] | base_addr | an array with sufficient space for storing nb_elements of type T |
[in] | nb_elements | the number of elements to be read |
true | on success |
false | otherwise |
T | the type of the elements to be read |
|
inline |
Reads an ASCII attribute from a file.
Template specialization for bool.
[in] | file | the input file, obtained through fopen() |
[out] | base_addr | an array with sufficient space for storing nb_elements of type bool (1 byte per element) |
[in] | nb_elements | the number of elements to be read |
true | on success |
false | otherwise |
|
inline |
Reads an ASCII attribute from a file.
Template specialization for char, needed because we want chars to appear as integers in ASCII files.
[in] | file | the input file, obtained through fopen() |
[out] | base_addr | an array with sufficient space for storing nb_elements of type char |
[in] | nb_elements | the number of elements to be read |
true | on success |
false | otherwise |
void EXPLORAGRAM_API GEO::recenter_mesh | ( | const Mesh & | M1, |
Mesh & | M2 | ||
) |
Translates a mesh in such a way that its center matches the center of another mesh.
[in] | M1 | the reference volumetric mesh |
[in,out] | M2 | the volumetric mesh that will be recentered |
coord_index_t GEO::region_dim | ( | TriangleRegion | r | ) |
Gets the dimension of a triangle region.
[in] | r | a triangle region |
0 | for vertices |
1 | for edges |
2 | for the interior |
std::string GEO::region_to_string | ( | TriangleRegion | rgn | ) |
Converts a triangle region code to a string.
[in] | rgn | the triangle region code. |
rgn
. TriangleRegion GEO::regions_convex_hull | ( | TriangleRegion | R1, |
TriangleRegion | R2 | ||
) |
Computes the convex hull of two regions.
The function is purely combinatorial.
R1
and R2
are in the same triangle (they both start with T1_ or they both start with T2_). [in] | R1,R2 | the two regions |
void GEO::remesh_smooth | ( | Mesh & | M_in, |
Mesh & | M_out, | ||
index_t | nb_points, | ||
coord_index_t | dim = 0 , |
||
index_t | nb_Lloyd_iter = 5 , |
||
index_t | nb_Newton_iter = 30 , |
||
index_t | Newton_m = 7 , |
||
bool | adjust = true , |
||
double | adjust_max_edge_distance = 0.5 |
||
) |
Remeshes a 'smooth' shape (that is, without management of sharp features).
[in] | M_in | input mesh |
[out] | M_out | result |
[in] | nb_points | desired number of points (note: may generate more points to solve problematic configurations) |
[in] | dim | dimension in which to do the remesh. Use dim=6 and set_anisotropy(M_in,s) for anisotropic remesh, dim=3 for isotropic remesh, dim=0 uses M_in.dimension(). |
[in] | nb_Lloyd_iter | number of Lloyd relaxation iterations (used to initialize Newton iterations with a more homogeneous distribution) |
[in] | nb_Newton_iter | number of Newton iterations |
[in] | Newton_m | number of evaluations used for Hessian approximation |
[in] | adjust | if set, call mesh_adjust_surface() to improve the placement of the points in such a way that the facets of M_out better approximate M_in |
[in] | adjust_max_edge_distance | distance along which searching for nearest vertex, relative to average edge length in the neighborhood of the considered vertex |
Example 1 - isotropic remesh:
Example 2 - anisotropic remesh:
void GEO::remove_degree2_vertices | ( | Mesh & | M | ) |
Removes the degree 2 vertices in a surface mesh.
Degree two vertices cause some combinatorial problems in some algorithms, since they make the same pair of facets adjacent twice. This function disconnects the concerned facets.
Removes degree 3 vertices.
[in,out] | M | the mesh to modify |
[in] | max_dist | only vertices for which the distance to the neighbors supporting place is smaller than max_dist are removed. |
void GEO::remove_small_connected_components | ( | Mesh & | M, |
double | min_component_area, | ||
index_t | min_component_facets = 0.0 |
||
) |
Removes the connected components that have an area smaller than a given threshold.
[in,out] | M | the mesh to be processed |
[in] | min_component_area | the connected components with an area smaller than this threshold are removed |
[in] | min_component_facets | the connected components with less than min_component_facets facets are removed |
void GEO::remove_small_facets | ( | Mesh & | M, |
double | min_facet_area | ||
) |
Removes the facets that have an area smaller than a given threshold.
[in,out] | M | the mesh to be processed |
[in] | min_facet_area | facets with an area smaller than this threshold are removed |
void EXPLORAGRAM_API GEO::rescale_mesh | ( | const Mesh & | M1, |
Mesh & | M2 | ||
) |
Rescales a mesh in such a way that its total volume matches the volume of a reference mesh.
[in] | M1 | the reference volumetric mesh |
[in,out] | M2 | the volumetric mesh that will be rescaled |
void EXPLORAGRAM_API GEO::sample | ( | CentroidalVoronoiTesselation & | CVT, |
index_t | nb_points, | ||
bool | project_on_border, | ||
bool | BRIO = true , |
||
bool | multilevel = true , |
||
double | ratio = 0.125 , |
||
vector< index_t > * | levels = nullptr |
||
) |
Computes a point sampling of a surfacic or volumetric mesh.
If CVT
is in volumetric mode and the mesh has cells, then the sampling is in the volume, else the sampling is on the surface (facets) of the mesh.
[in,out] | CVT | a CentroidalVoronoiTesselation plugged on the volumetric mesh to be sampled |
[in] | nb_points | number of points to be created |
[in] | project_on_border | if true, points near the border are projected onto the boundary of M . Needs VORPALINE to be supported. |
[in] | BRIO | if true, use Biased Random Insertion Order [Amenta et.al] |
[in] | multilevel | if true, use multilevel sampling (note: BRIO implies multilevel) |
[in] | ratio | ratio between the sizes of two sucessive levels |
[in] | levels | if specified, the indices that indicate the beginning of each level will be copied to this vector. |
Multiplies an expansion by a scalar, eliminating zero components from the output expansion.
[in] | e | an expansion |
[in] | b | the double to be multiplied by e |
[out] | h | the result b * e |
(sets h
= b
* e
). e
and h
cannot be the same. This function is adapted from Jonathan Shewchuk's code. See either version of his paper for details. Maintains the nonoverlapping property. If round-to-even is used (as with IEEE 754), maintains the strongly nonoverlapping and nonadjacent properties as well. (That is, if e has one of these properties, so will h.)
void GEO::set_anisotropy | ( | Mesh & | M, |
double | s | ||
) |
Normalizes and scales the stored vertex normals by a factor.
If no normal are stored, then they are created and computed. Normals are stored in coordinates 3,4,5 of the vertices.
[in,out] | M | the mesh |
[in] | s | the factor used to scale the normals |
void GEO::set_assert_mode | ( | AssertMode | mode | ) |
void EXPLORAGRAM_API GEO::set_density | ( | Mesh & | M, |
double | mass1, | ||
double | mass2, | ||
const std::string & | func_str, | ||
Mesh * | distance_reference = nullptr |
||
) |
Creates a "weight" attribute with varying values.
[in,out] | M | a reference to the volumetric mesh that should be decorated with densities |
[in] | mass1 | minimum value of the density |
[out] | mass2 | maximum value of the density |
[in] | func_str | specification of the function to be used, in the form "(+|-)?func(^pow)?", where func is one of X,Y,Z,R,sin,dist |
[in] | distance_reference | if func is "dist" and if non-nullptr, distance is computed relative to distance_reference , else it is computed relative to M . \TODO the same thing is refered here as "mass", "density" and "weight", this is a total mess. |
Sign GEO::sign_of_expansion_determinant | ( | const expansion & | a00, |
const expansion & | a01, | ||
const expansion & | a02, | ||
const expansion & | a03, | ||
const expansion & | a10, | ||
const expansion & | a11, | ||
const expansion & | a12, | ||
const expansion & | a13, | ||
const expansion & | a20, | ||
const expansion & | a21, | ||
const expansion & | a22, | ||
const expansion & | a23, | ||
const expansion & | a30, | ||
const expansion & | a31, | ||
const expansion & | a32, | ||
const expansion & | a33 | ||
) |
Computes the sign of a 4x4 determinant.
Specialization using the low-evel API for expansions. This gains some performance as compared to using CGAL's determinant template with expansion_nt.
Sign GEO::sign_of_expansion_determinant | ( | const expansion & | a00, |
const expansion & | a01, | ||
const expansion & | a02, | ||
const expansion & | a10, | ||
const expansion & | a11, | ||
const expansion & | a12, | ||
const expansion & | a20, | ||
const expansion & | a21, | ||
const expansion & | a22 | ||
) |
Computes the sign of a 3x3 determinant.
Specialization using the low-evel API for expansions. This gains some performance as compared to using CGAL's determinant template with expansion_nt.
Sign GEO::sign_of_expansion_determinant | ( | const expansion & | a00, |
const expansion & | a01, | ||
const expansion & | a10, | ||
const expansion & | a11 | ||
) |
Computes the sign of a 2x2 determinant.
Specialization using the low-evel API for expansions. This gains some performance as compared to using CGAL's determinant template with expansion_nt.
Smoothes a mesh.
Moves each point of mesh M
to the barycenter of its neighbors. This operation is repeated the specified number of times nb_iter
.
[in,out] | M | the mesh to smooth |
[in] | nb_iter | number of smoothing iterations |
[in] | normals_only | if set, only stored normals are smoothed. |
|
inline |
Sorts elements in parallel.
Sorts elements in the iterator range [begin
..end
) using a parallel version of the standard std::sort()
algorithm (if possible). The elements are compared using operator<(). Whether to use the parallel or the standard version of the std::sort() algorithm is controlled by the "algo:parallel" environment property.
[in] | begin | first element to sort |
[in] | end | one position past the last element to sort |
ITERATOR | the type of the iterator |
Definition at line 90 of file algorithm.h.
|
inline |
Sorts elements in parallel.
Sorts elements in the iterator range [begin
..end
) using a parallel version of the standard std::sort()
algorithm (if possible). The elements are compared using comparator cmp
. Comparator cmp
must implement an operator() with the following signature:
Whether to use the parallel or the standard version of the std::sort() algorithm is controlled by the "algo:parallel" environment property.
[in] | begin | first element to sort |
[in] | end | one position past the last element to sort |
[in] | cmp | comparison object. |
ITERATOR | the type of the iterator |
CMP | the type of the comparator |
Definition at line 126 of file algorithm.h.
|
inline |
Specialized sort routine for 3 elements.
std::sort is slower than specialized sort on small sequences of elements.
[in] | items | a random access iterator iterator to the first element. |
Definition at line 163 of file algorithm.h.
|
inline |
Specialized sort routine for 4 elements.
std::sort is slower than specialized sort on small sequences of elements.
[in] | items | a random access iterator iterator to the first element. |
Definition at line 181 of file algorithm.h.
|
inline |
Sorts a vector and suppresses all duplicated elements.
[in,out] | v | the vector |
Definition at line 147 of file algorithm.h.
void GEOGRAM_GFX_API GEO::stream_buffer_object | ( | GLuint & | buffer_id, |
GLenum | target, | ||
size_t | new_size, | ||
const void * | data | ||
) |
Updates the content of an OpenGL buffer object in streaming mode.
Streaming mode means that there will be many updates of the contents of the same buffer object. stream_buffer_object() does the same thing as update_buffer_object(), but may be faster than update_buffer_object() in this situation.
[in,out] | buffer_id | OpenGL opaque id of the buffer object. 0 means uninitialized. may be changed on exit if the buffer needed to be created or destroyed. |
[in] | target | buffer object target (GL_ARRAY_BUFFER, GL_INDEX_BUFFER ...) |
[in] | new_size | of the buffer data, in bytes |
[in] | data | pointer to the data to be copied into the buffer, of length new_size |
double GEO::surface_average_edge_length | ( | const Mesh & | M | ) |
Computes the average edge length in a surface.
[in] | M | a const reference to a surface mesh |
TriangleRegion GEO::swap_T1_T2 | ( | TriangleRegion | R | ) |
Replaces T1 with T2 or T2 with T1 in a region code.
[in] | R | a region |
void GEO::terminate | ( | ) |
Cleans up Geogram.
This function is called automatically when the program exists normally.
Subdivides the facets with more than nb_vertices.
[in] | M | a reference to a surface mesh. |
[in] | max_nb_vertices | maximum number of vertices in a facet. |
vecng<3,FT> GEO::transform_point | ( | const Matrix< 4, FT > & | m, |
const vecng< 3, FT > & | v | ||
) |
Applies a 3d transform to a 3d point.
Convention is the same as in math, i.e. vector is a column vector, multiplied on the right of the transform. Internally, the point is converted into a 4d vector, with w coordinate set to one. Transformed coordinates are divided by the transformed w to form a 3d point.
[in] | v | the input 3d point to be transformed |
[in] | m | the transform, as a 4x4 matrix, using homogeneous coordinates |
FT | type of the coordinates |
Definition at line 880 of file geometry.h.
vecng<3,FT> GEO::transform_point | ( | const vecng< 3, FT > & | v, |
const Matrix< 4, FT > & | m | ||
) |
Applies a 3d transform to a 3d point.
Convention is the same as in OpenGL, i.e. vector is a row vector, multiplied on the left of the transform. Internally, the point is converted into a 4d vector, with w coordinate set to one. Transformed coordinates are divided by the transformed w to form a 3d point.
[in] | v | the input 3d point to be transformed |
[in] | m | the transform, as a 4x4 matrix, using homogeneous coordinates |
FT | type of the coordinates |
Definition at line 840 of file geometry.h.
vecng<3,FT> GEO::transform_vector | ( | const vecng< 3, FT > & | v, |
const Matrix< 4, FT > & | m | ||
) |
Applies a 3d transform to a 3d vector.
Convention is the same as in OpenGL, i.e. vector is a row vector, multiplied on the left of the transform. Internally, the vector is converted into a 4d vector, with w coordinate set to zero.
[in] | v | the input 3d vector to be transformed |
[in] | m | the transform, as a 4x4 matrix, using homogeneous coordinates |
FT | type of the coordinates |
Definition at line 804 of file geometry.h.
vecng<4,FT> GEO::transform_vector | ( | const vecng< 4, FT > & | v, |
const Matrix< 4, FT > & | m | ||
) |
Applies a 4d transform to a 4d point.
Convention is the same as in OpenGL, i.e. vector is a row vector, multiplied on the left of the transform.
[in] | v | the input 4d point to be transformed |
[in] | m | the transform, as a 4x4 matrix |
FT | type of the coordinates |
Definition at line 914 of file geometry.h.
|
inline |
Computes the normal to a triangle from its three vertices.
[in] | p1,p2,p3 | the three vertices of the triangle |
VEC3 | the type of the returned vector |
Definition at line 180 of file exact_geometry.h.
bool GEO::triangles_intersections | ( | const vec3 & | p0, |
const vec3 & | p1, | ||
const vec3 & | p2, | ||
const vec3 & | q0, | ||
const vec3 & | q1, | ||
const vec3 & | q2 | ||
) |
Triangle-triangle intersection predicate.
[in] | p0,p1,p2 | first triangle |
[in] | q0,q1,q2 | second triangle |
true | if there is a non-degenerate intersection |
false | otherwise. Degenerate intersection cases are:
|
bool GEO::triangles_intersections | ( | const vec3 & | p0, |
const vec3 & | p1, | ||
const vec3 & | p2, | ||
const vec3 & | q0, | ||
const vec3 & | q1, | ||
const vec3 & | q2, | ||
vector< TriangleIsect > & | result | ||
) |
Triangle-triangle intersection with symbolic information.
The input triangles are supposed to be non-degenerate (their three vertices are supposed to be distinct and not co-linear). For now, when intersection is surfacic (overlapping pair of co-planar triangles), the vertices of the intersection are not sorted. One can order them by computing their convex hull.
[in] | p0,p1,p2 | first triangle |
[in] | q0,q1,q2 | second triangle |
[out] | result | the intersection in symbolic form, as TriangleRegion pairs. There can be between 0 and 6 intersection pairs in the result. |
true | if there is a non-degenerate intersection |
false | otherwise. Degenerate intersection cases are:
|
Unglues an edge from its opposite edge.
[in] | M | a reference to the mesh |
[in] | f1,c1 | the edge, as a corner seen from a facet |
void GEO::unset_anisotropy | ( | Mesh & | M | ) |
Normalizes the stored vertex normals.
[in,out] | M | the mesh |
void GEOGRAM_GFX_API GEO::update_buffer_object | ( | GLuint & | buffer_id, |
GLenum | target, | ||
size_t | new_size, | ||
const void * | data | ||
) |
Updates the content of an OpenGL buffer object, and resizes it if need be.
[in,out] | buffer_id | OpenGL opaque id of the buffer object. 0 means uninitialized. may be changed on exit if the buffer needed to be created or destroyed. |
[in] | target | buffer object target (GL_ARRAY_BUFFER, GL_INDEX_BUFFER ...) |
[in] | new_size | of the buffer data, in bytes |
[in] | data | pointer to the data to be copied into the buffer, of length new_size |
void GEOGRAM_GFX_API GEO::update_or_check_buffer_object | ( | GLuint & | buffer_id, |
GLenum | target, | ||
size_t | new_size, | ||
const void * | data, | ||
bool | update | ||
) |
Updates the content of an OpenGL buffer object, and resizes it if need be, or tests whether it has the size it should have.
[in,out] | buffer_id | OpenGL opaque id of the buffer object. 0 means uninitialized. may be changed on exit if the buffer needed to be created or destroyed. |
[in] | target | buffer object target (GL_ARRAY_BUFFER, GL_INDEX_BUFFER ...) |
[in] | new_size | of the buffer data, in bytes |
[in] | data | pointer to the data to be copied into the buffer, of length new_size |
[in] | update |
|
bool GEO::uses_parallel_algorithm | ( | ) |
Checks whether parallel algorithms are used.
Some algorithms such as sort() can be used in parallel or sequential mode. Behavior is toggled by the "algo:parallel" environment variable.
true | if parallel algorithms are used. |
false | if sequential algorithms are used. |
check that v2f[v] gives all facets that are adjacent to v are not to be killed
|
inline |
Writes an ASCII attribute to a file.
[in] | file | the output file, obtained through fopen() |
[in] | base_addr | an array with nb_elements of type T |
[in] | nb_elements | the number of elements to be written |
true | on success |
false | otherwise |
T | the type of the elements to be written |
|
inline |
Writes an ASCII attribute to a file.
Template specialization for bool.
[in] | file | the output file, obtained through fopen() |
[in] | base_addr | an array with nb_elements of type bool (1 byte per element) |
[in] | nb_elements | the number of elements to be written |
true | on success |
false | otherwise |
|
inline |
Writes an ASCII attribute to a file.
Template specialization for char, needed because we want chars to appear as integers in ASCII files.
[in] | file | the output file, obtained through fopen() |
[in] | base_addr | an array with nb_elements of type char |
[in] | nb_elements | the number of elements to be written |
true | on success |
false | otherwise |