libigl v2.5.0
|
Namespaces | |
namespace | copyleft |
namespace | embree |
namespace | matlab |
namespace | mosek |
namespace | opengl |
namespace | predicates |
namespace | serialization |
namespace | spectra |
namespace | stb |
namespace | triangle |
namespace | xml |
Classes | |
class | AABB |
Implementation of semi-general purpose axis-aligned bounding box hierarchy. More... | |
struct | active_set_params |
Input parameters controling active_set. More... | |
struct | ARAPData |
Parameters and precomputed values for arap solver. More... | |
struct | ArapDOFData |
Structure that contains fields for all precomputed data or data that needs to be remembered at update. More... | |
struct | AtA_cached_data |
Hold precomputed data for AtA_cached. More... | |
class | BBWData |
Container for BBW computation related data and flags. More... | |
struct | FastWindingNumberBVH |
Structure for caching precomputation for fast winding number for triangle soups. | |
struct | FileMemoryBuffer |
struct | FileMemoryStream |
Class to convert a FILE * to an std::istream. More... | |
class | HalfEdgeIterator |
Fake halfedge for fast and easy navigation on triangle meshes with vertex_triangle_adjacency and triangle_triangle adjacency. More... | |
struct | HeatGeodesicsData |
Precomputation data for heat_geodesics_solve. More... | |
struct | Hit |
Reimplementation of the embree::Hit struct from embree1.0. More... | |
struct | IndexDimLessThan |
Comparison struct for use with functions like std::sort. More... | |
struct | IndexedPointer |
struct | IndexedPointerBase |
struct | IndexEquals |
Comparison struct used by unique. More... | |
struct | IndexLessThan |
Comparison struct used by sort http://bytes.com/topic/c/answers/132045-sort-get-index. More... | |
struct | IndexRowEquals |
Comparison struct for use with functions like std::sort. More... | |
struct | IndexRowLessThan |
Comparison struct For use with functions like std::sort. More... | |
struct | IndexVectorLessThan |
Comparison struct for vectors for use with functions like std::sort. More... | |
struct | KelvinletParams |
Parameters for controling kelvinlets. More... | |
struct | min_quad_with_fixed_data |
Parameters and precomputed values for min_quad_with_fixed. More... | |
class | MshLoader |
Class for loading information from .msh file depends only on c++stl library. More... | |
class | MshSaver |
Class for dumping information to .msh file depends only on c++stl library current implementation works only with 3D information. More... | |
class | Serializable |
struct | SerializableBase |
struct | ShapeupData |
Parameters and precomputed data for ShapeUp. More... | |
struct | SLIMData |
Parameters and precomputed data for computing a SLIM map as derived in "Scalable Locally Injective Maps" [Rabinovich et al. More... | |
class | SortableRow |
A row of things that can be sorted against other rows. More... | |
class | Timer |
Simple timer class. More... | |
class | WindingNumberAABB |
Class for building an AABB tree to implement the divide and conquer algorithm described in [Jacobson et al. More... | |
class | WindingNumberTree |
Space partitioning tree for computing winding number hierarchically. More... | |
Typedefs | |
using | decimate_cost_and_placement_callback = std::function< void(const int, const Eigen::MatrixXd &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, const Eigen::VectorXi &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, double &, Eigen::RowVectorXd &)> |
Function handle used to control the cost of each edge collapse in igl::decimate. | |
using | decimate_stopping_condition_callback = std::function< bool(const Eigen::MatrixXd &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, const Eigen::VectorXi &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, const igl::min_heap< std::tuple< double, int, int > > &, const Eigen::VectorXi &, const Eigen::MatrixXd &, const int, const int, const int, const int, const int)> |
Function handle used to control whether the queue processing in igl::decimate should stop. | |
using | decimate_pre_collapse_callback = std::function< bool(const Eigen::MatrixXd &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, const Eigen::VectorXi &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, const igl::min_heap< std::tuple< double, int, int > > &, const Eigen::VectorXi &, const Eigen::MatrixXd &, const int)> |
Function handle called just before collapse_edge is attempted. | |
using | decimate_post_collapse_callback = std::function< void(const Eigen::MatrixXd &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, const Eigen::VectorXi &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, const igl::min_heap< std::tuple< double, int, int > > &, const Eigen::VectorXi &, const Eigen::MatrixXd &, const int, const int, const int, const int, const int, const bool)> |
Function handle called just after collapse_edge is attempted. | |
using | DEFAULT_URBG = std::mt19937 |
template<class T > | |
using | min_heap = std::priority_queue< T, std::vector< T >, std::greater< T > > |
Templated min heap (reverses sort order of std::priority_queue) | |
using | shapeup_projection_function = std::function< bool(const Eigen::PlainObjectBase< Eigen::MatrixXd > &, const Eigen::PlainObjectBase< Eigen::VectorXi > &, const Eigen::PlainObjectBase< Eigen::MatrixXi > &, Eigen::PlainObjectBase< Eigen::MatrixXd > &)> |
Every function here defines a local projection for ShapeUp, and must have the following structure to qualify: | |
Functions | |
template<typename DerivedS , typename DerivedV , typename DerivedA > | |
void | accumarray (const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedA > &A) |
Accumulate values in V using subscripts in S. | |
template<typename DerivedS , typename DerivedA > | |
void | accumarray (const Eigen::MatrixBase< DerivedS > &S, const typename DerivedA::Scalar V, Eigen::PlainObjectBase< DerivedA > &A) |
Accumulate constant value V using subscripts in S. | |
template<typename AT , typename DerivedB , typename Derivedknown , typename DerivedY , typename AeqT , typename DerivedBeq , typename AieqT , typename DerivedBieq , typename Derivedlx , typename Derivedux , typename DerivedZ > | |
igl::SolverStatus | active_set (const Eigen::SparseMatrix< AT > &A, const Eigen::PlainObjectBase< DerivedB > &B, const Eigen::PlainObjectBase< Derivedknown > &known, const Eigen::PlainObjectBase< DerivedY > &Y, const Eigen::SparseMatrix< AeqT > &Aeq, const Eigen::PlainObjectBase< DerivedBeq > &Beq, const Eigen::SparseMatrix< AieqT > &Aieq, const Eigen::PlainObjectBase< DerivedBieq > &Bieq, const Eigen::PlainObjectBase< Derivedlx > &lx, const Eigen::PlainObjectBase< Derivedux > &ux, const igl::active_set_params ¶ms, Eigen::PlainObjectBase< DerivedZ > &Z) |
Minimize convex quadratic energy subject to linear inequality constraints. | |
template<typename Index , typename IndexVector > | |
void | adjacency_list (const Eigen::MatrixBase< Index > &F, std::vector< std::vector< IndexVector > > &A, bool sorted=false) |
Constructs the graph adjacency list of a given mesh (V,F) | |
template<typename Index > | |
void | adjacency_list (const std::vector< std::vector< Index > > &F, std::vector< std::vector< Index > > &A) |
Constructs the graph adjacency list of a given polygon mesh (V,F) | |
template<typename DerivedF , typename T > | |
void | adjacency_matrix (const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< T > &A) |
Constructs the graph adjacency matrix of a given mesh (V,F) | |
template<typename DerivedI , typename DerivedC , typename T > | |
void | adjacency_matrix (const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedC > &C, Eigen::SparseMatrix< T > &A) |
Constructs an vertex adjacency for a polygon mesh. | |
template<typename AType , typename DerivedB > | |
void | all (const Eigen::SparseMatrix< AType > &A, const int dim, Eigen::PlainObjectBase< DerivedB > &B) |
Check whether all values are logically true along a dimension. | |
template<typename Mat > | |
void | all_pairs_distances (const Mat &V, const Mat &U, const bool squared, Mat &D) |
Compute distances between each point i in V and point j in U. | |
template<typename DerivedP , typename DerivedN , typename DerivedS > | |
void | ambient_occlusion (const std::function< bool(const Eigen::Vector3f &, const Eigen::Vector3f &) > &shoot_ray, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const int num_samples, Eigen::PlainObjectBase< DerivedS > &S) |
Compute ambient occlusion per given point using ray-mesh intersection function handle. | |
template<typename DerivedV , int DIM, typename DerivedF , typename DerivedP , typename DerivedN , typename DerivedS > | |
void | ambient_occlusion (const igl::AABB< DerivedV, DIM > &aabb, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const int num_samples, Eigen::PlainObjectBase< DerivedS > &S) |
Compute ambient occlusion per given point for mesh (V,F) with precomputed AABB tree. | |
template<typename DerivedV , typename DerivedF , typename DerivedP , typename DerivedN , typename DerivedS > | |
void | ambient_occlusion (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const int num_samples, Eigen::PlainObjectBase< DerivedS > &S) |
Compute ambient occlusion per given point for mesh (V,F) | |
double | angular_distance (const Eigen::Quaterniond &A, const Eigen::Quaterniond &B) |
The "angular distance" between two unit quaternions is the angle of the smallest rotation (treated as an Axis and Angle) that takes A to B. | |
template<typename AType , typename DerivedB > | |
void | any (const Eigen::SparseMatrix< AType > &A, const int dim, Eigen::PlainObjectBase< DerivedB > &B) |
Check whether any values are logically true along a dimension. | |
template<typename DerivedV , typename DerivedF , typename Derivedb > | |
bool | arap_precomputation (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const int dim, const Eigen::MatrixBase< Derivedb > &b, ARAPData &data) |
Compute necessary information to start using an ARAP deformation using local-global solver as described in "As-rigid-as-possible surface
modeling" [Sorkine and Alexa 2007]. | |
template<typename Derivedbc , typename DerivedU > | |
bool | arap_solve (const Eigen::MatrixBase< Derivedbc > &bc, ARAPData &data, Eigen::MatrixBase< DerivedU > &U) |
Conduct arap solve. | |
template<typename LbsMatrixType , typename SSCALAR > | |
bool | arap_dof_precomputation (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const LbsMatrixType &M, const Eigen::Matrix< int, Eigen::Dynamic, 1 > &G, ArapDOFData< LbsMatrixType, SSCALAR > &data) |
Precomputes the system to optimize for "Fast Automatic Skinning
Transformations" [Jacobson et al. 2012] skinning degrees of freedom optimization using as-rigid-as-possible energy. | |
template<typename LbsMatrixType , typename SSCALAR > | |
bool | arap_dof_recomputation (const Eigen::Matrix< int, Eigen::Dynamic, 1 > &fixed_dim, const Eigen::SparseMatrix< double > &A_eq, ArapDOFData< LbsMatrixType, SSCALAR > &data) |
Should always be called after arap_dof_precomputation, but may be called in between successive calls to arap_dof_update, recomputes precomputation given that there are only changes in free and fixed. | |
template<typename LbsMatrixType , typename SSCALAR > | |
bool | arap_dof_update (const ArapDOFData< LbsMatrixType, SSCALAR > &data, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &B_eq, const Eigen::MatrixXd &L0, const int max_iters, const double tol, Eigen::MatrixXd &L) |
Optimizes the transformations attached to each weight function based on precomputed system. | |
template<typename MatV , typename MatF , typename MatK > | |
void | arap_linear_block (const MatV &V, const MatF &F, const int d, const igl::ARAPEnergyType energy, MatK &Kd) |
Constructs a block of the matrix which constructs the linear terms of a given arap energy. | |
template<typename MatV , typename MatF , typename MatK > | |
void | arap_linear_block_spokes (const MatV &V, const MatF &F, const int d, MatK &Kd) |
Constructs a block of the matrix which constructs the linear terms for spokes energy. | |
template<typename MatV , typename MatF , typename MatK > | |
void | arap_linear_block_spokes_and_rims (const MatV &V, const MatF &F, const int d, MatK &Kd) |
Constructs a block of the matrix which constructs the linear terms for spokes and rims energy. | |
template<typename MatV , typename MatF , typename MatK > | |
void | arap_linear_block_elements (const MatV &V, const MatF &F, const int d, MatK &Kd) |
Constructs a block of the matrix which constructs the linear terms for per element energy. | |
template<typename DerivedV , typename DerivedF , typename DerivedK > | |
void | arap_rhs (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const int dim, const igl::ARAPEnergyType energy, Eigen::SparseCompressedBase< DerivedK > &K) |
Right-hand side constructor of global poisson solve for various Arap energies. | |
template<typename Scalar > | |
void | AtA_cached_precompute (const Eigen::SparseMatrix< Scalar > &A, AtA_cached_data &data, Eigen::SparseMatrix< Scalar > &AtA) |
Computes At * W * A, where A is sparse and W is diagonal. | |
template<typename Scalar > | |
void | AtA_cached (const Eigen::SparseMatrix< Scalar > &A, const AtA_cached_data &data, Eigen::SparseMatrix< Scalar > &AtA) |
Computes At * W * A, where A is sparse and W is diagonal precomputed into data. | |
template<typename DerivedF , typename DerivedE , typename DerivedoE , typename DeriveduE , typename DeriveduV > | |
void | average_from_edges_onto_vertices (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedoE > &oE, const Eigen::MatrixBase< DeriveduE > &uE, Eigen::PlainObjectBase< DeriveduV > &uV) |
Move a scalar field defined on edges to vertices by averaging. | |
template<typename DerivedF , typename DerivedS , typename DerivedSF > | |
void | average_onto_faces (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedSF > &SF) |
Move a scalar field defined on vertices to faces by averaging. | |
template<typename DerivedV , typename DerivedF , typename DerivedS , typename DerivedSV > | |
void | average_onto_vertices (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedSV > &SV) |
Move a scalar field defined on faces to vertices by averaging. | |
template<typename DerivedV , typename DerivedF > | |
double | avg_edge_length (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F) |
Compute the average edge length for the given triangle mesh. | |
template<typename Q_type > | |
void | axis_angle_to_quat (const Q_type *axis, const Q_type angle, Q_type *out) |
Convert axis angle representation of a rotation to a quaternion. | |
template<typename DerivedV , typename DerivedF , typename DerivedBC > | |
void | barycenter (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedBC > &BC) |
Computes the barycenter of every simplex. | |
template<typename DerivedP , typename DerivedA , typename DerivedB , typename DerivedC , typename DerivedD , typename DerivedL > | |
void | barycentric_coordinates (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedD > &D, Eigen::PlainObjectBase< DerivedL > &L) |
Compute barycentric coordinates of each point in a corresponding tetrahedron. | |
template<typename DerivedP , typename DerivedA , typename DerivedB , typename DerivedC , typename DerivedL > | |
void | barycentric_coordinates (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedL > &L) |
Compute barycentric coordinates in a triangle. | |
template<typename DerivedD , typename DerivedF , typename DerivedB , typename DerivedI , typename DerivedX > | |
void | barycentric_interpolation (const Eigen::MatrixBase< DerivedD > &D, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedX > &X) |
Interpolate data on a triangle mesh using barycentric coordinates. | |
std::string | basename (const std::string &path) |
Extract basename of file path (like PHP's basename). | |
template<typename DerivedV , typename DerivedEle , typename Derivedb , typename Derivedbc , typename DerivedW > | |
bool | bbw (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedEle > &Ele, const Eigen::PlainObjectBase< Derivedb > &b, const Eigen::PlainObjectBase< Derivedbc > &bc, BBWData &data, Eigen::PlainObjectBase< DerivedW > &W) |
Compute Bounded Biharmonic Weights on a given domain (V,Ele) with a given set of boundary conditions. | |
template<typename DerivedV , typename DerivedP > | |
void | bezier (const Eigen::MatrixBase< DerivedV > &V, const typename DerivedV::Scalar t, Eigen::PlainObjectBase< DerivedP > &P) |
Evaluate a polynomial Bezier Curve at single parameter value. | |
template<typename DerivedV , typename DerivedT , typename DerivedP > | |
void | bezier (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedP > &P) |
Evaluate a polynomial Bezier Curve at many parameter values. | |
template<typename VMat , typename DerivedT , typename DerivedP > | |
void | bezier (const std::vector< VMat > &spline, const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedP > &P) |
Evaluate a polynomial Bezier spline with a fixed parameter set for each sub-curve. | |
template<typename AType , typename DerivedD , typename DerivedP > | |
void | bfs (const AType &A, const size_t s, Eigen::PlainObjectBase< DerivedD > &D, Eigen::PlainObjectBase< DerivedP > &P) |
Traverse a directed graph represented by an adjacency list using. | |
template<typename AType , typename DType , typename PType > | |
void | bfs (const std::vector< std::vector< AType > > &A, const size_t s, std::vector< DType > &D, std::vector< PType > &P) |
Traverse a directed graph represented by an adjacency list using. | |
template<typename AType , typename DType , typename PType > | |
void | bfs (const Eigen::SparseCompressedBase< AType > &A, const size_t s, std::vector< DType > &D, std::vector< PType > &P) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedFF , typename DerivedC > | |
void | bfs_orient (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedC > &C) |
Consistently orient faces in orientable patches using BFS. | |
template<typename DerivedV , typename DerivedT , typename SType , typename DerivedW > | |
bool | biharmonic_coordinates (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, const std::vector< std::vector< SType > > &S, Eigen::PlainObjectBase< DerivedW > &W) |
Compute "discrete biharmonic generalized barycentric coordinates" as described in "Linear Subspace Design for Real-Time Shape Deformation" [Wang et al. | |
template<typename DerivedV , typename DerivedT , typename SType , typename DerivedW > | |
bool | biharmonic_coordinates (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, const std::vector< std::vector< SType > > &S, const int k, Eigen::PlainObjectBase< DerivedW > &W) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename Derivedb , typename Derivedbc , typename DerivedU > | |
bool | bijective_composite_harmonic_mapping (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedb > &b, const Eigen::MatrixBase< Derivedbc > &bc, Eigen::PlainObjectBase< DerivedU > &U) |
Compute a injective planar mapping of a triangulated polygon (V,F) subjected to boundary conditions (b,bc). | |
template<typename DerivedV , typename DerivedF , typename Derivedb , typename Derivedbc , typename DerivedU > | |
bool | bijective_composite_harmonic_mapping (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedb > &b, const Eigen::MatrixBase< Derivedbc > &bc, const int min_steps, const int max_steps, const int num_inner_iters, const bool test_for_flips, Eigen::PlainObjectBase< DerivedU > &U) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar > | |
void | blkdiag (const std::vector< Eigen::SparseMatrix< Scalar > > &L, Eigen::SparseMatrix< Scalar > &Y) |
Given a list of matrices place them along the diagonal as blocks of the output matrix. | |
template<typename DerivedY > | |
void | blkdiag (const std::vector< DerivedY > &L, Eigen::PlainObjectBase< DerivedY > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedB , typename DerivedFI , typename DerivedP , typename URBG = DEFAULT_URBG> | |
void | blue_noise (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const typename DerivedV::Scalar r, Eigen::PlainObjectBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedFI > &FI, Eigen::PlainObjectBase< DerivedP > &P, URBG &&urbg=igl::generate_default_urbg()) |
"Fast Poisson Disk Sampling in Arbitrary Dimensions" [Bridson 2007]. | |
template<typename DerivedBE , typename DerivedP > | |
void | bone_parents (const Eigen::MatrixBase< DerivedBE > &BE, Eigen::PlainObjectBase< DerivedP > &P) |
Recover "parent" bones from directed graph representation. | |
bool | boundary_conditions (const Eigen::MatrixXd &V, const Eigen::MatrixXi &Ele, const Eigen::MatrixXd &C, const Eigen::VectorXi &P, const Eigen::MatrixXi &BE, const Eigen::MatrixXi &CE, const Eigen::MatrixXi &CF, Eigen::VectorXi &b, Eigen::MatrixXd &bc) |
Compute boundary conditions for automatic weights computation. | |
template<typename DerivedT , typename DerivedF , typename DerivedJ , typename DerivedK > | |
void | boundary_facets (const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedK > &K) |
Determine boundary faces (edges) of tetrahedra (triangles) stored in T (analogous to qptoolbox's outline and boundary_faces ). | |
template<typename DerivedT , typename DerivedF > | |
void | boundary_facets (const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedF > &F) |
Determine boundary faces (edges) of tetrahedra (triangles) stored in T. | |
template<typename DerivedT , typename Ret > | |
Ret | boundary_facets (const Eigen::MatrixBase< DerivedT > &T) |
Determine boundary faces (edges) of tetrahedra (triangles) stored in T. | |
template<typename IntegerT , typename IntegerF > | |
void | boundary_facets (const std::vector< std::vector< IntegerT > > &T, std::vector< std::vector< IntegerF > > &F) |
Determine boundary faces (edges) of tetrahedra (triangles) stored in T; inputs and outputs lists. | |
template<typename DerivedF , typename Index > | |
void | boundary_loop (const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< Index > > &L) |
Compute list of ordered boundary loops for a manifold mesh. | |
template<typename DerivedF , typename Index > | |
void | boundary_loop (const Eigen::MatrixBase< DerivedF > &F, std::vector< Index > &L) |
Compute ordered boundary loops for a manifold mesh and return the longest loop in terms of vertices. | |
template<typename DerivedF , typename DerivedL > | |
void | boundary_loop (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedL > &L) |
Compute ordered boundary loops for a manifold mesh and return the longest loop in terms of vertices. | |
template<typename DerivedV , typename DerivedBV , typename DerivedBF > | |
void | bounding_box (const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedBV > &BV, Eigen::PlainObjectBase< DerivedBF > &BF) |
Build a triangle mesh of the bounding box of a given list of vertices. | |
template<typename DerivedV , typename DerivedBV , typename DerivedBF > | |
void | bounding_box (const Eigen::MatrixBase< DerivedV > &V, const typename DerivedV::Scalar pad, Eigen::PlainObjectBase< DerivedBV > &BV, Eigen::PlainObjectBase< DerivedBF > &BF) |
double | bounding_box_diagonal (const Eigen::MatrixXd &V) |
Compute the length of the diagonal of a given meshes axis-aligned bounding box. | |
template<typename Q_type > | |
Q_type | CANONICAL_VIEW_QUAT (int i, int j) |
template<> | |
float | CANONICAL_VIEW_QUAT< float > (int i, int j) |
template<> | |
double | CANONICAL_VIEW_QUAT< double > (int i, int j) |
template<typename Scalar > | |
void | cat (const int dim, const Eigen::SparseMatrix< Scalar > &A, const Eigen::SparseMatrix< Scalar > &B, Eigen::SparseMatrix< Scalar > &C) |
Perform concatenation of a two sparse matrices along a single dimension If dim == 1, then C = [A;B]; If dim == 2 then C = [A B]. | |
template<typename Derived , class MatC > | |
void | cat (const int dim, const Eigen::MatrixBase< Derived > &A, const Eigen::MatrixBase< Derived > &B, MatC &C) |
Perform concatenation of a two dense matrices along a single dimension If dim == 1, then C = [A;B]; If dim == 2 then C = [A B]. | |
template<class Mat > | |
Mat | cat (const int dim, const Mat &A, const Mat &B) |
Perform concatenation of a two dense matrices along a single dimension If dim == 1, then C = [A;B]; If dim == 2 then C = [A B]. | |
template<class Mat > | |
void | cat (const std::vector< std::vector< Mat > > &A, Mat &C) |
Concatenate a "matrix" of sub-blocks C = [A0;A1;A2;...;An] where Ai = [A[i][0] A[i][1] ... A[i][m]];. | |
template<typename T , typename DerivedC > | |
void | cat (const int dim, const std::vector< T > &A, Eigen::PlainObjectBase< DerivedC > &C) |
Concatenate a std::vector of matrices along the specified dimension. | |
template<typename DerivedX , typename DerivedY > | |
void | ceil (const Eigen::PlainObjectBase< DerivedX > &X, Eigen::PlainObjectBase< DerivedY > &Y) |
Ceil a given matrix to nearest integers. | |
template<typename DerivedV , typename DerivedF , typename Derivedc , typename Derivedvol > | |
void | centroid (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< Derivedc > &c, Derivedvol &vol) |
Computes the centroid and enclosed volume of a closed mesh using a surface integral. | |
template<typename DerivedV , typename DerivedF , typename Derivedc > | |
void | centroid (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< Derivedc > &c) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
std::vector< int > | circulation (const int e, const bool ccw, const Eigen::VectorXi &EMAP, const Eigen::MatrixXi &EF, const Eigen::MatrixXi &EI) |
Return list of faces around the end point of an edge. | |
void | circulation (const int e, const bool ccw, const Eigen::VectorXi &EMAP, const Eigen::MatrixXi &EF, const Eigen::MatrixXi &EI, Eigen::VectorXi &vN) |
Return list of faces around the end point of an edge. | |
void | circulation (const int e, const bool ccw, const Eigen::MatrixXi &F, const Eigen::VectorXi &EMAP, const Eigen::MatrixXi &EF, const Eigen::MatrixXi &EI, std::vector< int > &Nv, std::vector< int > &Nf) |
Return list of faces around the end point of an edge. | |
template<typename DerivedV , typename DerivedF , typename DerivedR > | |
void | circumradius (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedR > &R) |
Compute the circumradius of each triangle in a mesh (V,F) | |
bool | collapse_edge (const int e, const Eigen::RowVectorXd &p, Eigen::MatrixXd &V, Eigen::MatrixXi &F, Eigen::MatrixXi &E, Eigen::VectorXi &EMAP, Eigen::MatrixXi &EF, Eigen::MatrixXi &EI, int &e1, int &e2, int &f1, int &f2) |
Attempt to collapse a given edge of a mesh. | |
bool | collapse_edge (const int e, const Eigen::RowVectorXd &p, std::vector< int > &Nsv, const std::vector< int > &Nsf, std::vector< int > &Ndv, const std::vector< int > &Ndf, Eigen::MatrixXd &V, Eigen::MatrixXi &F, Eigen::MatrixXi &E, Eigen::VectorXi &EMAP, Eigen::MatrixXi &EF, Eigen::MatrixXi &EI, int &e1, int &e2, int &f1, int &f2) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | collapse_edge (const int e, const Eigen::RowVectorXd &p, Eigen::MatrixXd &V, Eigen::MatrixXi &F, Eigen::MatrixXi &E, Eigen::VectorXi &EMAP, Eigen::MatrixXi &EF, Eigen::MatrixXi &EI) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | collapse_edge (const decimate_cost_and_placement_callback &cost_and_placement, const decimate_pre_collapse_callback &pre_collapse, const decimate_post_collapse_callback &post_collapse, Eigen::MatrixXd &V, Eigen::MatrixXi &F, Eigen::MatrixXi &E, Eigen::VectorXi &EMAP, Eigen::MatrixXi &EF, Eigen::MatrixXi &EI, igl::min_heap< std::tuple< double, int, int > > &Q, Eigen::VectorXi &EQ, Eigen::MatrixXd &C, int &e, int &e1, int &e2, int &f1, int &f2) |
Collapse least-cost edge from a priority queue and update queue. | |
bool | collapse_edge (const decimate_cost_and_placement_callback &cost_and_placement, Eigen::MatrixXd &V, Eigen::MatrixXi &F, Eigen::MatrixXi &E, Eigen::VectorXi &EMAP, Eigen::MatrixXi &EF, Eigen::MatrixXi &EI, igl::min_heap< std::tuple< double, int, int > > &Q, Eigen::VectorXi &EQ, Eigen::MatrixXd &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | collapse_edge (const decimate_cost_and_placement_callback &cost_and_placement, const decimate_pre_collapse_callback &pre_collapse, const decimate_post_collapse_callback &post_collapse, Eigen::MatrixXd &V, Eigen::MatrixXi &F, Eigen::MatrixXi &E, Eigen::VectorXi &EMAP, Eigen::MatrixXi &EF, Eigen::MatrixXi &EI, igl::min_heap< std::tuple< double, int, int > > &Q, Eigen::VectorXi &EQ, Eigen::MatrixXd &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | collapse_small_triangles (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const double eps, Eigen::MatrixXi &FF) |
Given a triangle mesh (V,F) compute a new mesh (VV,FF) which contains the original faces and vertices of (V,F) except any small triangles have been removed via collapse. | |
template<typename L , typename S , typename H , typename T > | |
void | colon (const L low, const S step, const H hi, Eigen::Matrix< T, Eigen::Dynamic, 1 > &I) |
Colon operator like matlab's colon operator. | |
template<typename L , typename H , typename T > | |
void | colon (const L low, const H hi, Eigen::Matrix< T, Eigen::Dynamic, 1 > &I) |
Colon operator like matlab's colon operator. | |
template<typename T > | |
void | colormap (const ColorMapType cm, const T f, T *rgb) |
Compute [r,g,b] values of the selected colormap for a given factor f between 0 and 1. | |
template<typename T > | |
void | colormap (const ColorMapType cm, const T f, T &r, T &g, T &b) |
Compute [r,g,b] values of the selected colormap for a given factor f between 0 and 1. | |
template<typename T > | |
void | colormap (const double palette[256][3], const T x_in, T &r, T &g, T &b) |
Compute [r,g,b] values of the colormap palette for a given factor f between 0 and 1. | |
template<typename DerivedZ , typename DerivedC > | |
void | colormap (const ColorMapType cm, const Eigen::MatrixBase< DerivedZ > &Z, const bool normalize, Eigen::PlainObjectBase< DerivedC > &C) |
Compute [r,g,b] values of the colormap palette for a given factors between 0 and 1. | |
template<typename DerivedZ , typename DerivedC > | |
void | colormap (const ColorMapType cm, const Eigen::MatrixBase< DerivedZ > &Z, const double min_Z, const double max_Z, Eigen::PlainObjectBase< DerivedC > &C) |
Compute [r,g,b] values of the colormap palette for a given factors between min_Z and max_Z | |
bool | column_to_quats (const Eigen::VectorXd &Q, std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &vQ) |
de-"Columnize" a list of quaternions (q1x,q1y,q1z,q1w,q2x,q2y,q2z,q2w,...) | |
template<typename DerivedA , typename DerivedB > | |
void | columnize (const Eigen::PlainObjectBase< DerivedA > &A, const int k, const int dim, Eigen::PlainObjectBase< DerivedB > &B) |
"Columnize" a stack of block matrices. | |
template<typename DerivedV , typename DerivedF > | |
void | comb_cross_field (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedV > &PD1in, const Eigen::MatrixBase< DerivedV > &PD2in, Eigen::PlainObjectBase< DerivedV > &PD1out, Eigen::PlainObjectBase< DerivedV > &PD2out) |
Computes principal matchings of the vectors of a cross field across face edges, and generates a combed cross field defined on the mesh faces. | |
template<typename DerivedV , typename DerivedF , typename DerivedP > | |
void | comb_frame_field (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedP > &PD1, const Eigen::MatrixBase< DerivedP > &PD2, const Eigen::MatrixBase< DerivedP > &BIS1_combed, const Eigen::MatrixBase< DerivedP > &BIS2_combed, Eigen::PlainObjectBase< DerivedP > &PD1_combed, Eigen::PlainObjectBase< DerivedP > &PD2_combed) |
Computes principal matchings of the vectors of a frame field across face edges, and generates a combed frame field defined on the mesh faces. | |
template<typename DerivedV , typename DerivedF > | |
void | comb_line_field (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedV > &PD1in, Eigen::PlainObjectBase< DerivedV > &PD1out) |
Computes principal matchings of the vectors of a cross field across face edges, and generates a combed cross field defined on the mesh faces. | |
template<typename DerivedVV , typename DerivedFF , typename DerivedV , typename DerivedF , typename DerivedVsizes , typename DerivedFsizes > | |
void | combine (const std::vector< DerivedVV > &VV, const std::vector< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedVsizes > &Vsizes, Eigen::PlainObjectBase< DerivedFsizes > &Fsizes) |
Concatenate k meshes into a single >=k connected component mesh with a single vertex list and face list. | |
template<typename DerivedVV , typename DerivedFF , typename DerivedV , typename DerivedF > | |
void | combine (const std::vector< DerivedVV > &VV, const std::vector< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
void | compute_frame_field_bisectors (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedV > &B1, const Eigen::MatrixBase< DerivedV > &B2, const Eigen::MatrixBase< DerivedV > &PD1, const Eigen::MatrixBase< DerivedV > &PD2, Eigen::PlainObjectBase< DerivedV > &BIS1, Eigen::PlainObjectBase< DerivedV > &BIS2) |
Compute bisectors of a frame field defined on mesh faces. | |
template<typename DerivedV , typename DerivedF > | |
void | compute_frame_field_bisectors (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedV > &PD1, const Eigen::MatrixBase< DerivedV > &PD2, Eigen::PlainObjectBase< DerivedV > &BIS1, Eigen::PlainObjectBase< DerivedV > &BIS2) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedFO > | |
void | connect_boundary_to_infinity (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedFO > &FO) |
Connect all boundary edges to a fictitious point at infinity. | |
template<typename DerivedF , typename DerivedFO > | |
void | connect_boundary_to_infinity (const Eigen::MatrixBase< DerivedF > &F, const typename DerivedF::Scalar inf_index, Eigen::PlainObjectBase< DerivedFO > &FO) |
Connect all boundary edges to a fictitious point at infinity. | |
template<typename DerivedV , typename DerivedF , typename DerivedVO , typename DerivedFO > | |
void | connect_boundary_to_infinity (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedVO > &VO, Eigen::PlainObjectBase< DerivedFO > &FO) |
Connect all boundary edges to a fictitious point at infinity. | |
template<typename Atype , typename DerivedC , typename DerivedK > | |
int | connected_components (const Eigen::SparseMatrix< Atype > &A, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedK > &K) |
Determine the connected components of a graph described by the input adjacency matrix (similar to MATLAB's graphconncomp or gptoolbox's conncomp, but A is transposed for unsymmetric graphs). | |
template<typename DerivedV , typename DerivedF , typename Scalar > | |
void | cotmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Scalar > &L) |
Constructs the cotangent stiffness matrix (discrete laplacian) for a given mesh (V,F). | |
template<typename DerivedV , typename DerivedI , typename DerivedC , typename Scalar > | |
void | cotmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedC > &C, Eigen::SparseMatrix< Scalar > &L, Eigen::SparseMatrix< Scalar > &M, Eigen::SparseMatrix< Scalar > &P) |
Cotangent Laplacian (and mass matrix) for polygon meshes according to "Polygon Laplacian Made Simple" [Bunge et al. 2020]. | |
template<typename DerivedV , typename DerivedF , typename DerivedC > | |
void | cotmatrix_entries (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedC > &C) |
Compute the cotmatrix contributions (cotangents) of each angle in mesh (V,F) | |
template<typename Derivedl , typename DerivedC > | |
void | cotmatrix_entries (const Eigen::MatrixBase< Derivedl > &l, Eigen::PlainObjectBase< DerivedC > &C) |
Compute the cotmatrix contributions (cotangents) of each angle in mesh with edge lengths (l) | |
template<typename Derivedl , typename DerivedF , typename Scalar > | |
void | cotmatrix_intrinsic (const Eigen::MatrixBase< Derivedl > &l, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Scalar > &L) |
Constructs the cotangent stiffness matrix (discrete laplacian) for a given mesh with faces F and edge lengths l. | |
template<typename XType , typename SType > | |
void | count (const Eigen::SparseMatrix< XType > &X, const int dim, Eigen::SparseVector< SType > &S) |
Count the number of non-zeros in the columns or rows of a sparse matrix. | |
template<typename XType , typename DerivedS > | |
void | count (const Eigen::SparseMatrix< XType > &X, const int dim, Eigen::PlainObjectBase< DerivedS > &S) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | covariance_scatter_matrix (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const ARAPEnergyType energy, Eigen::SparseMatrix< double > &CSM) |
Construct the covariance scatter matrix for a given arap energy. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedOE , typename ScalarK > | |
void | cr_vector_curvature_correction (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarK > &K) |
Computes the vector Crouzeix-Raviart curvature correction term of Oded Stein, Alec Jacobson, Max Wardetzky, Eitan Grinspun, 2020. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedOE , typename ScalarK > | |
void | cr_vector_curvature_correction (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarK > &K) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedL_sq , typename Derivedtheta , typename Derivedkappa , typename DerivedE , typename DerivedOE , typename ScalarK > | |
void | cr_vector_curvature_correction_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< Derivedtheta > &theta, const Eigen::MatrixBase< Derivedkappa > &kappa, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarK > &K) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedL_sq , typename DerivedE , typename DerivedOE , typename ScalarK > | |
void | cr_vector_curvature_correction_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarK > &K) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. include/igl/cr_vector_curvature_correction.h. | |
template<typename DerivedF , typename DerivedL_sq , typename Derivedtheta , typename DerivedE , typename DerivedOE , typename ScalarK > | |
void | cr_vector_curvature_correction_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< Derivedtheta > &theta, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarK > &K) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. include/igl/cr_vector_curvature_correction.h. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedOE , typename ScalarL > | |
void | cr_vector_laplacian (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarL > &L) |
Computes the CR vector Laplacian matrix. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedOE , typename ScalarL > | |
void | cr_vector_laplacian (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarL > &L) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedL_sq , typename DeriveddA , typename DerivedE , typename DerivedOE , typename ScalarL > | |
void | cr_vector_laplacian_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< DeriveddA > &dA, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarL > &L) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedL_sq , typename DerivedE , typename DerivedOE , typename ScalarL > | |
void | cr_vector_laplacian_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarL > &L) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. include/igl/cr_vector_laplacian.h. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename ScalarM > | |
void | cr_vector_mass (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, Eigen::SparseMatrix< ScalarM > &M) |
Computes the CR vector mass matrix, using an arrangement of all parallel degrees of freedom first, and all perpendicular degrees of freedom next. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename ScalarM > | |
void | cr_vector_mass (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::SparseMatrix< ScalarM > &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DeriveddA , typename DerivedE , typename ScalarM > | |
void | cr_vector_mass_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DeriveddA > &dA, const Eigen::MatrixBase< DerivedE > &E, Eigen::SparseMatrix< ScalarM > &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | cross (const double *a, const double *b, double *out) |
Cross product; out = cross(a,b) | |
template<typename DerivedA , typename DerivedB , typename DerivedC > | |
void | cross (const Eigen::PlainObjectBase< DerivedA > &A, const Eigen::PlainObjectBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedC > &C) |
Computes rowwise cross product C = cross(A,B,2);. | |
template<typename DerivedV , typename DerivedF , typename DerivedM > | |
void | cross_field_mismatch (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedV > &PD1, const Eigen::MatrixBase< DerivedV > &PD2, const bool isCombed, Eigen::PlainObjectBase< DerivedM > &mismatch) |
Calculates the mismatch (integer), at each face edge, of a cross field defined on the mesh faces. | |
template<typename DerivedV , typename DerivedF , typename LT , typename DerivedE , typename DerivedEMAP > | |
void | crouzeix_raviart_cotmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< LT > &L, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedEMAP > &EMAP) |
Compute the Crouzeix-Raviart cotangent stiffness matrix. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedEMAP , typename LT > | |
void | crouzeix_raviart_cotmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedEMAP > &EMAP, Eigen::SparseMatrix< LT > &L) |
Compute the Crouzeix-Raviart cotangent stiffness matrix. | |
template<typename MT , typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedEMAP > | |
void | crouzeix_raviart_massmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< MT > &M, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedEMAP > &EMAP) |
CROUZEIX_RAVIART_MASSMATRIX Compute the Crouzeix-Raviart mass matrix where M(e,e) is just the sum of the areas of the triangles on either side of an edge e. | |
template<typename MT , typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedEMAP > | |
void | crouzeix_raviart_massmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedEMAP > &EMAP, Eigen::SparseMatrix< MT > &M) |
CROUZEIX_RAVIART_MASSMATRIX Compute the Crouzeix-Raviart mass matrix where M(e,e) is just the sum of the areas of the triangles on either side of an edge e. | |
template<typename DerivedX , typename DerivedY > | |
void | cumprod (const Eigen::MatrixBase< DerivedX > &X, const int dim, Eigen::PlainObjectBase< DerivedY > &Y) |
Computes a cumulative product of the columns of X, like matlab's cumprod . | |
template<typename DerivedX , typename DerivedY > | |
void | cumsum (const Eigen::MatrixBase< DerivedX > &X, const int dim, Eigen::PlainObjectBase< DerivedY > &Y) |
Computes a cumulative sum of the columns of X, like matlab's cumsum . | |
template<typename DerivedX , typename DerivedY > | |
void | cumsum (const Eigen::MatrixBase< DerivedX > &X, const int dim, const bool zero_prefix, Eigen::PlainObjectBase< DerivedY > &Y) |
Computes a cumulative sum of the columns of [0;X]. | |
template<typename DerivedV , typename DerivedF , typename ScalarQ > | |
void | curved_hessian_energy (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< ScalarQ > &Q) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedOE , typename ScalarQ > | |
void | curved_hessian_energy (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarQ > &Q) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedOE , typename ScalarQ > | |
void | curved_hessian_energy (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarQ > &Q) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization. | |
template<typename DerivedF , typename DerivedL_sq , typename DerivedE , typename DerivedOE , typename ScalarQ > | |
void | curved_hessian_energy_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarQ > &Q) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization. | |
template<typename DerivedF , typename DerivedL_sq , typename DeriveddA , typename DerivedE , typename DerivedOE , typename ScalarQ > | |
void | curved_hessian_energy_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< DeriveddA > &dA, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarQ > &Q) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization. | |
template<typename DerivedV , typename DerivedF , typename DerivedC , typename DerivedI > | |
void | cut_mesh (Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, const Eigen::MatrixBase< DerivedC > &cuts, Eigen::PlainObjectBase< DerivedI > &I) |
Given a mesh and a list of edges that are to be cut, the function generates a new disk-topology mesh that has the cuts at its boundary. | |
template<typename DerivedV , typename DerivedF , typename DerivedFF , typename DerivedFFi , typename DerivedC , typename DerivedI > | |
void | cut_mesh (Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::MatrixBase< DerivedFF > &FF, Eigen::MatrixBase< DerivedFFi > &FFi, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedI > &I) |
Given a mesh and a list of edges that are to be cut, the function generates a new disk-topology mesh that has the cuts at its boundary. | |
template<typename DerivedV , typename DerivedF , typename DerivedC > | |
void | cut_mesh (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedC > &cuts, Eigen::PlainObjectBase< DerivedV > &Vn, Eigen::PlainObjectBase< DerivedF > &Fn) |
Given a mesh and a list of edges that are to be cut, the function generates a new disk-topology mesh that has the cuts at its boundary. | |
template<typename DerivedV , typename DerivedF , typename DerivedC , typename DerivedI > | |
void | cut_mesh (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedC > &cuts, Eigen::PlainObjectBase< DerivedV > &Vn, Eigen::PlainObjectBase< DerivedF > &Fn, Eigen::PlainObjectBase< DerivedI > &I) |
Given a mesh and a list of edges that are to be cut, the function generates a new disk-topology mesh that has the cuts at its boundary. | |
template<typename DerivedV , typename DerivedF , typename DerivedM , typename DerivedO > | |
void | cut_mesh_from_singularities (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedM > &MMatch, Eigen::PlainObjectBase< DerivedO > &seams) |
Given a mesh (V,F) and the integer mismatch of a cross field per edge (mismatch), finds the cut_graph connecting the singularities (seams) and the degree of the singularities singularity_index. | |
template<typename DerivedF , typename Index > | |
void | cut_to_disk (const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< Index > > &cuts) |
Given a triangle mesh, computes a set of edge cuts sufficient to carve the mesh into a topological disk, without disconnecting any connected components. | |
template<typename DerivedV , typename DerivedF > | |
void | cylinder (const int axis_devisions, const int height_devisions, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
Construct a triangle mesh of a cylinder (without caps) | |
bool | dated_copy (const std::string &src_path, const std::string &dir) |
Copy the given file to a new file with the same basename in dir directory with the current date and time as a suffix. | |
bool | dated_copy (const std::string &src_path) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | decimate (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const size_t max_m, Eigen::MatrixXd &U, Eigen::MatrixXi &G, Eigen::VectorXi &J, Eigen::VectorXi &I) |
Assumes (V,F) is a manifold mesh (possibly with boundary) collapses edges until desired number of faces is achieved. | |
bool | decimate (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const size_t max_m, Eigen::MatrixXd &U, Eigen::MatrixXi &G, Eigen::VectorXi &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | decimate (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const decimate_cost_and_placement_callback &cost_and_placement, const decimate_stopping_condition_callback &stopping_condition, const decimate_pre_collapse_callback &pre_collapse, const decimate_post_collapse_callback &post_collapse, const Eigen::MatrixXi &E, const Eigen::VectorXi &EMAP, const Eigen::MatrixXi &EF, const Eigen::MatrixXi &EI, Eigen::MatrixXd &U, Eigen::MatrixXi &G, Eigen::VectorXi &J, Eigen::VectorXi &I) |
Collapses edges of a closed manifold mesh (V,F) using user defined callbacks in a priority queue. | |
bool | decimate (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const decimate_cost_and_placement_callback &cost_and_placement, const decimate_stopping_condition_callback &stopping_condition, const decimate_pre_collapse_callback &pre_collapse, const decimate_post_collapse_callback &post_collapse, Eigen::MatrixXd &U, Eigen::MatrixXi &G, Eigen::VectorXi &J, Eigen::VectorXi &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | decimate (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const decimate_cost_and_placement_callback &cost_and_placement, const decimate_stopping_condition_callback &stopping_condition, Eigen::MatrixXd &U, Eigen::MatrixXi &G, Eigen::VectorXi &J, Eigen::VectorXi &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | decimate_trivial_callbacks (decimate_pre_collapse_callback &always_try, decimate_post_collapse_callback &never_care) |
Function to build trivial pre and post collapse actions. | |
unsigned int | default_num_threads (unsigned int force_num_threads=0) |
Returns the default number of threads used in libigl. | |
void | deform_skeleton (const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const std::vector< Eigen::Affine3d, Eigen::aligned_allocator< Eigen::Affine3d > > &vA, Eigen::MatrixXd &CT, Eigen::MatrixXi &BET) |
Deform a skeleton. | |
void | deform_skeleton (const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::MatrixXd &T, Eigen::MatrixXd &CT, Eigen::MatrixXi &BET) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename Orient2D , typename InCircle , typename DerivedF > | |
void | delaunay_triangulation (const Eigen::MatrixBase< DerivedV > &V, Orient2D orient2D, InCircle incircle, Eigen::PlainObjectBase< DerivedF > &F) |
Given a set of points in 2D, return a Delaunay triangulation of these points. | |
template<typename AType , typename DerivedD , typename DerivedP , typename DerivedC > | |
void | dfs (const std::vector< std::vector< AType > > &A, const size_t s, Eigen::PlainObjectBase< DerivedD > &D, Eigen::PlainObjectBase< DerivedP > &P, Eigen::PlainObjectBase< DerivedC > &C) |
Traverse a directed graph represented by an adjacency list using depth first search. | |
template<typename AType , typename DType , typename PType , typename CType > | |
void | dfs (const std::vector< std::vector< AType > > &A, const size_t s, std::vector< DType > &D, std::vector< PType > &P, std::vector< CType > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedT , typename Derivedtheta , typename Derivedcos_theta > | |
void | dihedral_angles (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< Derivedtheta > &theta, Eigen::PlainObjectBase< Derivedcos_theta > &cos_theta) |
Compute dihedral angles for all tets of a given tet mesh (V,T). | |
template<typename DerivedL , typename DerivedA , typename Derivedtheta , typename Derivedcos_theta > | |
void | dihedral_angles_intrinsic (const Eigen::MatrixBase< DerivedL > &L, const Eigen::MatrixBase< DerivedA > &A, Eigen::PlainObjectBase< Derivedtheta > &theta, Eigen::PlainObjectBase< Derivedcos_theta > &cos_theta) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename IndexType , typename DerivedD , typename DerivedP > | |
int | dijkstra (const IndexType &source, const std::set< IndexType > &targets, const std::vector< std::vector< IndexType > > &VV, const std::vector< double > &weights, Eigen::PlainObjectBase< DerivedD > &min_distance, Eigen::PlainObjectBase< DerivedP > &previous) |
Dijkstra's algorithm for vertex-weighted shortest paths, with multiple targets. | |
template<typename IndexType , typename DerivedV , typename DerivedD , typename DerivedP > | |
int | dijkstra (const Eigen::MatrixBase< DerivedV > &V, const std::vector< std::vector< IndexType > > &VV, const IndexType &source, const std::set< IndexType > &targets, Eigen::PlainObjectBase< DerivedD > &min_distance, Eigen::PlainObjectBase< DerivedP > &previous) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename IndexType , typename DerivedD , typename DerivedP > | |
int | dijkstra (const IndexType &source, const std::set< IndexType > &targets, const std::vector< std::vector< IndexType > > &VV, Eigen::PlainObjectBase< DerivedD > &min_distance, Eigen::PlainObjectBase< DerivedP > &previous) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename IndexType , typename DerivedP > | |
void | dijkstra (const IndexType &vertex, const Eigen::MatrixBase< DerivedP > &previous, std::vector< IndexType > &path) |
Backtracking after Dijkstra's algorithm, to find shortest path. | |
template<typename DerivedV , typename DerivedOmega , typename DerivedU > | |
void | direct_delta_mush (const Eigen::MatrixBase< DerivedV > &V, const std::vector< Eigen::Affine3d, Eigen::aligned_allocator< Eigen::Affine3d > > &T, const Eigen::MatrixBase< DerivedOmega > &Omega, Eigen::PlainObjectBase< DerivedU > &U) |
Computes Direct Delta Mush Skinning (Variant 0) from "Direct Delta Mush
Skinning and Variants". | |
template<typename DerivedV , typename DerivedF , typename DerivedW , typename DerivedOmega > | |
void | direct_delta_mush_precomputation (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedW > &W, const int p, const typename DerivedV::Scalar lambda, const typename DerivedV::Scalar kappa, const typename DerivedV::Scalar alpha, Eigen::PlainObjectBase< DerivedOmega > &Omega) |
Precomputation for Direct Delta Mush Skinning. | |
template<typename DerivedC , typename DerivedE > | |
void | directed_edge_orientations (const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedE > &E, std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &Q) |
Determine rotations that take each edge from the x-axis to its given rest orientation. | |
template<typename DerivedE , typename DerivedP > | |
void | directed_edge_parents (const Eigen::MatrixBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedP > &P) |
Recover "parents" (preceding edges) in a tree given just directed edges. | |
std::string | dirname (const std::string &path) |
Function like PHP's dirname: /etc/passwd --> /etc,. | |
double | dot (const double *a, const double *b) |
Computes out = dot(a,b) | |
template<typename DerivedV > | |
DerivedV | dot_row (const Eigen::PlainObjectBase< DerivedV > &A, const Eigen::PlainObjectBase< DerivedV > &B) |
Compute the dot product between each row of A and B. | |
template<typename DerivedV , typename DerivedF , typename DeriveddblA > | |
void | doublearea (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DeriveddblA > &dblA) |
Computes twice the area for each input triangle or quad. | |
template<typename DerivedA , typename DerivedB , typename DerivedC , typename DerivedD > | |
void | doublearea (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedD > &D) |
Compute the twice the signed area of a each triangle. | |
template<typename DerivedA , typename DerivedB , typename DerivedC > | |
DerivedA::Scalar | doublearea_single (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedC > &C) |
Compute the twice the signed area of a single triangle. | |
template<typename Derivedl , typename DeriveddblA > | |
void | doublearea (const Eigen::MatrixBase< Derivedl > &l, const typename Derivedl::Scalar nan_replacement, Eigen::PlainObjectBase< DeriveddblA > &dblA) |
Compute twice the area of each intrinsic triangle in a mesh. | |
template<typename Derivedl , typename DeriveddblA > | |
void | doublearea (const Eigen::MatrixBase< Derivedl > &l, Eigen::PlainObjectBase< DeriveddblA > &dblA) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DeriveddblA > | |
void | doublearea_quad (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DeriveddblA > &dblA) |
Computes twice the area for each input quadrilateral. | |
template<typename DerivedV , typename DerivedW , typename Q , typename QAlloc , typename T , typename DerivedU > | |
void | dqs (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedW > &W, const std::vector< Q, QAlloc > &vQ, const std::vector< T > &vT, Eigen::PlainObjectBase< DerivedU > &U) |
Dual quaternion skinning. | |
template<typename DerivedV , typename DerivedQ > | |
void | dual_contouring (const std::function< typename DerivedV::Scalar(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> &f, const std::function< Eigen::Matrix< typename DerivedV::Scalar, 1, 3 >(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> &f_grad, const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &min_corner, const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &max_corner, const int nx, const int ny, const int nz, const bool constrained, const bool triangles, const bool root_finding, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedQ > &Q) |
Dual contouring to extract a pure quad mesh from differentiable implicit function using a dense grid. | |
template<typename DerivedGf , typename DerivedGV , typename DerivedV , typename DerivedQ > | |
void | dual_contouring (const std::function< typename DerivedV::Scalar(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> &f, const std::function< Eigen::Matrix< typename DerivedV::Scalar, 1, 3 >(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> &f_grad, const Eigen::MatrixBase< DerivedGf > &Gf, const Eigen::MatrixBase< DerivedGV > &GV, const int nx, const int ny, const int nz, const bool constrained, const bool triangles, const bool root_finding, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedQ > &Q) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedGf , typename DerivedGV , typename DerivedGI , typename DerivedV , typename DerivedQ > | |
void | dual_contouring (const std::function< typename DerivedV::Scalar(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> &f, const std::function< Eigen::Matrix< typename DerivedV::Scalar, 1, 3 >(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> &f_grad, const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &step, const Eigen::MatrixBase< DerivedGf > &Gf, const Eigen::MatrixBase< DerivedGV > &GV, const Eigen::MatrixBase< DerivedGI > &GI, const bool constrained, const bool triangles, const bool root_finding, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedQ > &Q) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename Derivedear , typename Derivedear_opp > | |
void | ears (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< Derivedear > &ear, Eigen::PlainObjectBase< Derivedear_opp > &ear_opp) |
Find all ears (faces with two boundary edges) in a given mesh. | |
bool | edge_collapse_is_valid (const int e, const Eigen::MatrixXi &F, const Eigen::MatrixXi &E, const Eigen::VectorXi &EMAP, const Eigen::MatrixXi &EF, const Eigen::MatrixXi &EI) |
Tests whether collapsing exactly two faces and exactly 3 edges from E (e and one side of each face gets collapsed to the other) will result in a mesh with the same topology. | |
bool | edge_collapse_is_valid (std::vector< int > &Nsv, std::vector< int > &Ndv) |
Tests whether collapsing exactly two faces and exactly 3 edges from E (e and one side of each face gets collapsed to the other) will result in a mesh with the same topology. | |
template<typename DeriveduE , typename DerivedS , typename DerivedT > | |
void | edge_crossings (const Eigen::MatrixBase< DeriveduE > &uE, const Eigen::MatrixBase< DerivedS > &S, const typename DerivedS::Scalar val, std::unordered_map< int, int > &uE2I, Eigen::PlainObjectBase< DerivedT > &T) |
Compute the each point that a scalar field crosses a specified value along an edge of a mesh. | |
template<typename DeriveduE , typename DerivedEMAP , typename uE2EType , typename Index > | |
bool | edge_exists_near (const Eigen::MatrixBase< DeriveduE > &uE, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const std::vector< std::vector< uE2EType > > &uE2E, const Index &a, const Index &b, const Index &uei) |
Does edge (a,b) exist in the edges of all faces incident on existing unique edge uei. | |
void | edge_flaps (const Eigen::MatrixXi &F, const Eigen::MatrixXi &uE, const Eigen::VectorXi &EMAP, Eigen::MatrixXi &EF, Eigen::MatrixXi &EI) |
Determine "edge flaps": two faces on either side of a unique edge (assumes edge-manifold mesh) | |
void | edge_flaps (const Eigen::MatrixXi &F, Eigen::MatrixXi &uE, Eigen::VectorXi &EMAP, Eigen::MatrixXi &EF, Eigen::MatrixXi &EI) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedL > | |
void | edge_lengths (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedL > &L) |
Constructs a list of lengths of edges opposite each index in a face (triangle/tet) list. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedoE , typename Derivedmps > | |
void | edge_midpoints (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedoE > &oE, Eigen::PlainObjectBase< Derivedmps > &mps) |
Computes the midpoints of edges in a triangle mesh. | |
template<typename DerivedV , typename DerivedF , typename DerivedE > | |
void | edge_topology (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &EV, Eigen::PlainObjectBase< DerivedE > &FE, Eigen::PlainObjectBase< DerivedE > &EF) |
Initialize Edges and their topological relations (assumes an edge-manifold mesh). | |
template<bool computePerpendicular = true, typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedoE , typename DerivedvecParallel , typename DerivedvecPerpendicular > | |
void | edge_vectors (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedoE > &oE, Eigen::PlainObjectBase< DerivedvecParallel > &vecParallel, Eigen::PlainObjectBase< DerivedvecPerpendicular > &vecPerpendicular) |
Computes the normalized edge vectors for edges in a triangle mesh. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedoE , typename Derivedvec > | |
void | edge_vectors (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedoE > &oE, Eigen::PlainObjectBase< Derivedvec > &vec) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedE > | |
void | edges (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E) |
Constructs a list of unique edges represented in a given mesh (V,F) | |
template<typename DerivedI , typename DerivedC , typename DerivedE > | |
void | edges (const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedE > &E) |
Constructs a list of unique edges represented in a given polygon mesh. | |
template<typename T , typename DerivedE > | |
void | edges (const Eigen::SparseMatrix< T > &A, Eigen::PlainObjectBase< DerivedE > &E) |
Constructs a list of unique edges represented in a given adjacency matrix. | |
template<typename DerivedE , typename DerivedI , typename DerivedJ , typename DerivedK > | |
void | edges_to_path (const Eigen::MatrixBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedK > &K) |
Given a set of undirected, unique edges such that all form a single connected compoent with exactly 0 or 2 nodes with valence =1, determine the/a path visiting all nodes. | |
template<typename Atype , typename Btype , typename DerivedU , typename DerivedS > | |
bool | eigs (const Eigen::SparseMatrix< Atype > &A, const Eigen::SparseMatrix< Btype > &B, const size_t k, const EigsType type, Eigen::PlainObjectBase< DerivedU > &sU, Eigen::PlainObjectBase< DerivedS > &sS) |
Compute the first/last k eigen pairs of the generalized eigen value problem: | |
template<typename S_type > | |
S_type | EPS () |
Function returning EPS for corresponding type. | |
template<typename S_type > | |
S_type | EPS_SQ () |
Function returning EPS_SQ for corresponding type. | |
template<> | |
float | EPS< float > () |
template<> | |
double | EPS< double > () |
template<> | |
float | EPS_SQ< float > () |
template<> | |
double | EPS_SQ< double > () |
template<typename DerivedF > | |
int | euler_characteristic (const Eigen::MatrixBase< DerivedF > &F) |
Computes the Euler characteristic of a given mesh (V,F) | |
template<typename DerivedV , typename DerivedF , typename DerivedVS , typename DerivedFS , typename DerivedVT , typename DerivedFT , typename DerivedD > | |
void | exact_geodesic (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedVS > &VS, const Eigen::MatrixBase< DerivedFS > &FS, const Eigen::MatrixBase< DerivedVT > &VT, const Eigen::MatrixBase< DerivedFT > &FT, Eigen::PlainObjectBase< DerivedD > &D) |
Exact geodesic algorithm for triangular mesh with the implementation from https://code.google.com/archive/p/geodesic/, and the algorithm first described by Mitchell, Mount and Papadimitriou in 1987. | |
template<typename Printable > | |
bool | example_fun (const Printable &input) |
This is an example of a function, it takes a templated parameter and shovels it into cout. | |
template<typename DerivedV , typename DerivedT , typename DerivedEV , typename DerivedEF , typename DerivedI , typename DerivedJ > | |
void | exploded_view (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, const typename DerivedV::Scalar s, const typename DerivedV::Scalar t, Eigen::PlainObjectBase< DerivedEV > &EV, Eigen::PlainObjectBase< DerivedEF > &EF, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedJ > &J) |
Given a tet-mesh, create a trivial surface mesh (4 triangles per tet) with each tet scaled individually and translated outward from the mesh's centroid, creating an exploded-view visualization. | |
std::string | extension (const std::string &path) |
Extract file extension from path. | |
void | exterior_edges (const Eigen::MatrixXi &F, Eigen::MatrixXi &E) |
Determines boundary "edges" and also edges with an odd number of occurrences where seeing edge (i,j) counts as +1 and seeing the opposite edge (j,i) counts as -1. | |
Eigen::MatrixXi | exterior_edges (const Eigen::MatrixXi &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename DerivedP > | |
size_t | extract_manifold_patches (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const Eigen::MatrixBase< DeriveduEC > &uEC, const Eigen::MatrixBase< DeriveduEE > &uEE, Eigen::PlainObjectBase< DerivedP > &P) |
Extract a set of maximal patches from a given mesh. | |
template<typename DerivedF , typename DerivedEMAP , typename uE2EType , typename DerivedP > | |
size_t | extract_manifold_patches (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const std::vector< std::vector< uE2EType > > &uE2E, Eigen::PlainObjectBase< DerivedP > &P) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedP > | |
size_t | extract_manifold_patches (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedP > &P) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedEMAP , typename uE2EType > | |
void | extract_non_manifold_edge_curves (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const std::vector< std::vector< uE2EType > > &uE2E, std::vector< std::vector< size_t > > &curves) |
Extract non-manifold curves from a given mesh. | |
template<typename DerivedV , typename DerivedT , typename DerivedA > | |
void | face_areas (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedA > &A) |
Constructs a list of face areas of faces opposite each index in a tet list. | |
template<typename DerivedL , typename DerivedA > | |
void | face_areas (const Eigen::MatrixBase< DerivedL > &L, Eigen::PlainObjectBase< DerivedA > &A) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedL , typename DerivedA > | |
void | face_areas (const Eigen::MatrixBase< DerivedL > &L, const typename DerivedL::Scalar doublearea_nan_replacement, Eigen::PlainObjectBase< DerivedA > &A) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename IntegerF , typename IntegerC > | |
void | face_occurrences (const std::vector< std::vector< IntegerF > > &F, std::vector< IntegerC > &C) |
Count the occurances of each face (row) in a list of face indices (irrespecitive of order) | |
template<typename DerivedF , typename DerivedC > | |
void | face_occurrences (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename MatV , typename MatF , typename VecI > | |
void | faces_first (const MatV &V, const MatF &F, MatV &RV, MatF &RF, VecI &IM) |
Reorder vertices so that vertices in face list come before vertices that don't appear in the face list. | |
template<typename MatV , typename MatF , typename VecI > | |
void | faces_first (MatV &V, MatF &F, VecI &IM) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename Atype > | |
void | facet_adjacency_matrix (const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Atype > &A) |
Construct a #F×#F adjacency matrix with A(i,j)>0 indicating that faces i and j share an edge. | |
template<typename DerivedF , typename DerivedC > | |
int | facet_components (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedC > &C) |
Compute connected components of facets based on edge-edge adjacency. | |
template<typename TTIndex , typename DerivedC , typename Derivedcounts > | |
void | facet_components (const std::vector< std::vector< std::vector< TTIndex > > > &TT, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< Derivedcounts > &counts) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
void | false_barycentric_subdivision (const Eigen::PlainObjectBase< Scalar > &V, const Eigen::PlainObjectBase< Index > &F, Eigen::PlainObjectBase< Scalar > &VD, Eigen::PlainObjectBase< Index > &FD) |
Refine the mesh by adding the barycenter of each face. | |
template<typename DerivedV1 , typename DerivedF1 , typename DerivedV2 , typename DerivedF2 , typename DerivedI , typename DerivedE > | |
void | fast_find_intersections (const Eigen::MatrixBase< DerivedV1 > &V1, const Eigen::MatrixBase< DerivedF1 > &F1, const Eigen::MatrixBase< DerivedV2 > &V2, const Eigen::MatrixBase< DerivedF2 > &F2, Eigen::PlainObjectBase< DerivedI > &intersect_pairs, Eigen::PlainObjectBase< DerivedE > &edges) |
Identify triangles where two meshes interesect using AABBTree and tri_tri_intersection_test_3d. | |
template<typename DerivedV1 , typename DerivedF1 , typename DerivedV2 , typename DerivedF2 , typename DerivedI , typename DerivedE > | |
void | fast_find_intersections (const AABB< DerivedV1, 3 > &tree, const Eigen::MatrixBase< DerivedV1 > &V1, const Eigen::MatrixBase< DerivedF1 > &F1, const Eigen::MatrixBase< DerivedV2 > &V2, const Eigen::MatrixBase< DerivedF2 > &F2, Eigen::PlainObjectBase< DerivedI > &intersect_pairs, Eigen::PlainObjectBase< DerivedE > &edges) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename DerivedE > | |
bool | fast_find_self_intersections (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedI > &intersect, Eigen::PlainObjectBase< DerivedE > &edges) |
Identify triangles where mesh intersects itself using AABBTree and tri_tri_intersection_test_3d. | |
template<typename DerivedV , typename DerivedF , typename DerivedI > | |
bool | fast_find_self_intersections (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedI > &intersect) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedP , typename DerivedA , typename DerivedN , typename Index , typename DerivedCH , typename DerivedCM , typename DerivedR , typename DerivedEC > | |
void | fast_winding_number (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedA > &A, const std::vector< std::vector< Index > > &point_indices, const Eigen::MatrixBase< DerivedCH > &CH, const int expansion_order, Eigen::PlainObjectBase< DerivedCM > &CM, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedEC > &EC) |
Generate the precomputation for the fast winding number for point data [Barill et. | |
template<typename DerivedP , typename DerivedA , typename DerivedN , typename Index , typename DerivedCH , typename DerivedCM , typename DerivedR , typename DerivedEC , typename DerivedQ , typename BetaType , typename DerivedWN > | |
void | fast_winding_number (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedA > &A, const std::vector< std::vector< Index > > &point_indices, const Eigen::MatrixBase< DerivedCH > &CH, const Eigen::MatrixBase< DerivedCM > &CM, const Eigen::MatrixBase< DerivedR > &R, const Eigen::MatrixBase< DerivedEC > &EC, const Eigen::MatrixBase< DerivedQ > &Q, const BetaType beta, Eigen::PlainObjectBase< DerivedWN > &WN) |
Evaluate the fast winding number for point data, having already done the the precomputation. | |
template<typename DerivedP , typename DerivedA , typename DerivedN , typename DerivedQ , typename BetaType , typename DerivedWN > | |
void | fast_winding_number (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedQ > &Q, const int expansion_order, const BetaType beta, Eigen::PlainObjectBase< DerivedWN > &WN) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedP , typename DerivedA , typename DerivedN , typename DerivedQ , typename DerivedWN > | |
void | fast_winding_number (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedQ > &Q, Eigen::PlainObjectBase< DerivedWN > &WN) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedQ , typename DerivedW > | |
void | fast_winding_number (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedQ > &Q, Eigen::PlainObjectBase< DerivedW > &W) |
Compute approximate winding number of a triangle soup mesh according to "Fast Winding Numbers for Soups and Clouds" [Barill et al. | |
template<typename DerivedV , typename DerivedF > | |
void | fast_winding_number (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const int order, FastWindingNumberBVH &fwn_bvh) |
Precomputation for computing approximate winding numbers of a triangle soup. | |
template<typename DerivedQ , typename DerivedW > | |
void | fast_winding_number (const FastWindingNumberBVH &fwn_bvh, const float accuracy_scale, const Eigen::MatrixBase< DerivedQ > &Q, Eigen::PlainObjectBase< DerivedW > &W) |
After precomputation, compute winding number at a each of many points in a list. | |
template<typename Derivedp > | |
Derivedp::Scalar | fast_winding_number (const FastWindingNumberBVH &fwn_bvh, const float accuracy_scale, const Eigen::MatrixBase< Derivedp > &p) |
After precomputation, compute winding number at a single point. | |
bool | file_contents_as_string (const std::string file_name, std::string &content) |
Read a files contents as plain text into a given string. | |
std::string | file_contents_as_string (const std::string file_name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
std::string | file_dialog_open () |
Open a file dialog to select a file. | |
std::string | file_dialog_save () |
Open a file dialog to select a file. | |
bool | file_exists (const std::string filename) |
Check if a file or directory exists like PHP's file_exists function: | |
template<typename T , typename DerivedI , typename DerivedJ , typename DerivedV > | |
void | find (const Eigen::SparseMatrix< T > &X, Eigen::DenseBase< DerivedI > &I, Eigen::DenseBase< DerivedJ > &J, Eigen::DenseBase< DerivedV > &V) |
Find the non-zero entries and there respective indices in a sparse matrix. | |
template<typename T > | |
std::vector< Eigen::Triplet< T > > | find (const Eigen::SparseMatrix< T > &X) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedI , typename DerivedJ , typename DerivedV > | |
void | find (const Eigen::DenseBase< DerivedX > &X, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedV > &V) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedI > | |
void | find (const Eigen::DenseBase< DerivedX > &X, Eigen::PlainObjectBase< DerivedI > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | find (const Eigen::SparseVector< T > &X, Eigen::Matrix< int, Eigen::Dynamic, 1 > &I, Eigen::Matrix< T, Eigen::Dynamic, 1 > &V) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<int RowsAtCompileTime, int MaxRowsAtCompileTime> | |
std::vector< int > | find (const Eigen::Array< bool, RowsAtCompileTime, 1, 0, MaxRowsAtCompileTime, 1 > &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedM , typename DerivedO > | |
void | find_cross_field_singularities (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedM > &mismatch, Eigen::PlainObjectBase< DerivedO > &isSingularity, Eigen::PlainObjectBase< DerivedO > &singularityIndex) |
Computes singularities of a cross field, assumed combed. | |
template<typename DerivedV , typename DerivedF , typename DerivedO > | |
void | find_cross_field_singularities (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedV > &PD1, const Eigen::MatrixBase< DerivedV > &PD2, Eigen::PlainObjectBase< DerivedO > &isSingularity, Eigen::PlainObjectBase< DerivedO > &singularityIndex, bool isCombed=false) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename AType , typename DerivedI > | |
void | find_zero (const Eigen::SparseMatrix< AType > &A, const int dim, Eigen::PlainObjectBase< DerivedI > &I) |
Find the first zero (whether implicit or explicitly stored) in the rows/columns of a matrix. | |
void | fit_cubic_bezier (const Eigen::MatrixXd &d, const double error, std::vector< Eigen::MatrixXd > &cubics) |
Fit a cubic bezier spline (G1 continuous) to an ordered list of input points in any dimension, according to "An algorithm for automatically
fitting digitized curves" [Schneider 1990]. | |
void | fit_cubic_bezier_substring (const Eigen::MatrixXd &d, const int first, const int last, const Eigen::RowVectorXd &tHat1, const Eigen::RowVectorXd &tHat2, const double error, const bool force_split, std::vector< Eigen::MatrixXd > &cubics) |
Recursive helper function for fit_cubic_bezier. | |
void | fit_plane (const Eigen::MatrixXd &V, Eigen::RowVector3d &N, Eigen::RowVector3d &C) |
Fit a plane to a point cloud. | |
template<typename DerivedS , typename DerivedD > | |
void | fit_rotations (const Eigen::PlainObjectBase< DerivedS > &S, const bool single_precision, Eigen::PlainObjectBase< DerivedD > &R) |
Given an input mesh and new positions find rotations for every covariance matrix in a stack of covariance matrices. | |
template<typename DerivedS , typename DerivedD > | |
void | fit_rotations_planar (const Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedD > &R) |
Given an input mesh and new positions find 2D rotations for every vertex that best maps its one ring to the new one ring. | |
double | flip_avoiding_line_search (const Eigen::MatrixXi &F, Eigen::MatrixXd &cur_v, const Eigen::MatrixXd &dst_v, std::function< double(Eigen::MatrixXd &)> &energy, double cur_energy=-1) |
A bisection line search for a mesh based energy that avoids triangle flips as suggested in "Bijective Parameterization with Free Boundaries" (Smith J. | |
template<typename DerivedF , typename DerivedE , typename DeriveduE , typename DerivedEMAP , typename uE2EType > | |
void | flip_edge (Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DeriveduE > &uE, Eigen::PlainObjectBase< DerivedEMAP > &EMAP, std::vector< std::vector< uE2EType > > &uE2E, const size_t uei) |
Flip an edge in a triangle mesh. | |
template<typename DerivedV , typename DerivedF , typename DerivedX > | |
void | flipped_triangles (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedX > &X) |
Finds the ids of the flipped triangles of the mesh V,F in the UV mapping uv. | |
template<typename Scalar , typename Index > | |
Eigen::VectorXi | flipped_triangles (const Eigen::MatrixBase< Scalar > &V, const Eigen::MatrixBase< Index > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedres , typename DerivedS > | |
void | flood_fill (const Eigen::MatrixBase< Derivedres > &res, Eigen::PlainObjectBase< DerivedS > &S) |
Given a 3D array with sparse non-nan (number?) data fill in the NaNs via flood fill. | |
template<typename DerivedX , typename DerivedY > | |
void | floor (const Eigen::PlainObjectBase< DerivedX > &X, Eigen::PlainObjectBase< DerivedY > &Y) |
Floor a given matrix to nearest integers. | |
template<typename AType , typename Func > | |
void | for_each (const Eigen::SparseMatrix< AType > &A, const Func &func) |
FOR_EACH Call a given function for each non-zero (i.e., explicit value might actually be ==0) in a Sparse Matrix A in order (of storage). | |
template<typename DerivedA , typename Func > | |
void | for_each (const Eigen::DenseBase< DerivedA > &A, const Func &func) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | forward_kinematics (const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::VectorXi &P, const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &dQ, const std::vector< Eigen::Vector3d > &dT, std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &vQ, std::vector< Eigen::Vector3d > &vT) |
Given a skeleton and a set of relative bone rotations compute absolute rigid transformations for each bone. | |
void | forward_kinematics (const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::VectorXi &P, const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &dQ, std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &vQ, std::vector< Eigen::Vector3d > &vT) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | forward_kinematics (const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::VectorXi &P, const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &dQ, const std::vector< Eigen::Vector3d > &dT, Eigen::MatrixXd &T) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | forward_kinematics (const Eigen::MatrixXd &C, const Eigen::MatrixXi &BE, const Eigen::VectorXi &P, const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > &dQ, Eigen::MatrixXd &T) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | frame_field_deformer (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::MatrixXd &FF1, const Eigen::MatrixXd &FF2, Eigen::MatrixXd &V_d, Eigen::MatrixXd &FF1_d, Eigen::MatrixXd &FF2_d, const int iterations=50, const double lambda=0.1, const bool perturb_initial_guess=true) |
Deform a mesh to transform the given per-face frame field to be as close as possible to a cross field, in the least square sense. | |
void | frame_to_cross_field (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::MatrixXd &FF1, const Eigen::MatrixXd &FF2, Eigen::MatrixXd &X) |
Convert a frame field into its closest cross field. | |
template<typename DerivedP > | |
void | frustum (const typename DerivedP::Scalar left, const typename DerivedP::Scalar right, const typename DerivedP::Scalar bottom, const typename DerivedP::Scalar top, const typename DerivedP::Scalar nearVal, const typename DerivedP::Scalar farVal, Eigen::PlainObjectBase< DerivedP > &P) |
Implementation of the deprecated glFrustum function. | |
template<typename DerivedV , typename DerivedF , typename DerivedK > | |
void | gaussian_curvature (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedK > &K) |
Compute the 2π minus the sum of interior angles at each vertex. | |
DEFAULT_URBG | generate_default_urbg () |
double | get_seconds () |
Current time in seconds. | |
template<typename DerivedV , typename DerivedF > | |
void | grad (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< typename DerivedV::Scalar > &G, bool uniform=false) |
Gradient operator on a triangle mesh. | |
template<typename Derivedl , typename DerivedF , typename Gtype > | |
void | grad_intrinsic (const Eigen::MatrixBase< Derivedl > &l, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Gtype > &G) |
Construct an intrinsic gradient operator. | |
template<typename Derivedres , typename DerivedGV > | |
void | grid (const Eigen::MatrixBase< Derivedres > &res, Eigen::PlainObjectBase< DerivedGV > &GV) |
Construct vertices of a regular grid, suitable for input to igl::marching_cubes | |
template<typename Scalar , typename DerivedX , typename DerivedLB , typename DerivedUB , typename DerivedI > | |
Scalar | grid_search (const std::function< Scalar(DerivedX &) > f, const Eigen::MatrixBase< DerivedLB > &LB, const Eigen::MatrixBase< DerivedUB > &UB, const Eigen::MatrixBase< DerivedI > &I, DerivedX &X) |
Global optimization via grid search. | |
template<typename T > | |
void | group_sum_matrix (const Eigen::Matrix< int, Eigen::Dynamic, 1 > &G, const int k, Eigen::SparseMatrix< T > &A) |
Builds a matrix A such that A*V computes the sum of vertices in each group specified by G. | |
template<typename T > | |
void | group_sum_matrix (const Eigen::Matrix< int, Eigen::Dynamic, 1 > &G, Eigen::SparseMatrix< T > &A) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | guess_extension (FILE *fp, std::string &guess) |
Given a file pointer at the beginning of a "mesh" file, try to guess the extension of the file format it comes from. | |
std::string | guess_extension (FILE *fp) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename Derivedb , typename Derivedbc , typename DerivedW > | |
bool | harmonic (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedb > &b, const Eigen::MatrixBase< Derivedbc > &bc, const int k, Eigen::PlainObjectBase< DerivedW > &W) |
Compute k-harmonic weight functions "coordinates". | |
template<typename DerivedF , typename Derivedb , typename Derivedbc , typename DerivedW > | |
bool | harmonic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedb > &b, const Eigen::MatrixBase< Derivedbc > &bc, const int k, Eigen::PlainObjectBase< DerivedW > &W) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedL , typename DerivedM , typename Derivedb , typename Derivedbc , typename DerivedW > | |
bool | harmonic (const Eigen::SparseCompressedBase< DerivedL > &L, const Eigen::SparseCompressedBase< DerivedM > &M, const Eigen::MatrixBase< Derivedb > &b, const Eigen::MatrixBase< Derivedbc > &bc, const int k, Eigen::PlainObjectBase< DerivedW > &W) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Compute a harmonic map using a given Laplacian and mass matrix. | |
template<typename DerivedL , typename DerivedM , typename DerivedQ > | |
void | harmonic (const Eigen::SparseCompressedBase< DerivedL > &L, const Eigen::SparseCompressedBase< DerivedM > &M, const int k, DerivedQ &Q) |
Build the discrete k-harmonic operator (computing integrated quantities). | |
template<typename DerivedV , typename DerivedF , typename DerivedQ > | |
void | harmonic (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const int k, DerivedQ &Q) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
void | harwell_boeing (const Eigen::SparseMatrix< Scalar > &A, int &num_rows, std::vector< Scalar > &V, std::vector< Index > &R, std::vector< Index > &C) |
Convert the matrix to Compressed sparse column (CSC or CCS) format, also known as Harwell Boeing format. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename Scalar > | |
void | hausdorff (const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::MatrixBase< DerivedVB > &VB, const Eigen::MatrixBase< DerivedFB > &FB, Scalar &d) |
Compute the Hausdorff distance between mesh (VA,FA) and mesh (VB,FB). | |
template<typename DerivedV , typename Scalar > | |
void | hausdorff (const Eigen::MatrixBase< DerivedV > &V, const std::function< Scalar(const Scalar &, const Scalar &, const Scalar &)> &dist_to_B, Scalar &l, Scalar &u) |
Compute lower and upper bounds (l,u) on the Hausdorff distance between a triangle (V) and a pointset (e.g., mesh, triangle soup) given by a distance function handle (dist_to_B). | |
template<typename DerivedV , typename DerivedF , typename Scalar > | |
bool | heat_geodesics_precompute (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, HeatGeodesicsData< Scalar > &data) |
Precompute factorized solvers for computing a fast approximation of geodesic distances on a mesh (V,F). | |
template<typename DerivedV , typename DerivedF , typename Scalar > | |
bool | heat_geodesics_precompute (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Scalar t, HeatGeodesicsData< Scalar > &data) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Derivedgamma , typename DerivedD > | |
void | heat_geodesics_solve (const HeatGeodesicsData< Scalar > &data, const Eigen::MatrixBase< Derivedgamma > &gamma, Eigen::PlainObjectBase< DerivedD > &D) |
Compute fast approximate geodesic distances using precomputed data from a set of selected source vertices (gamma). | |
template<typename DerivedV , typename DerivedF , typename Scalar > | |
void | hessian (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Scalar > &H) |
Constructs the finite element Hessian matrix as described in https://arxiv.org/abs/1707.04348, Natural Boundary Conditions for Smoothing in Geometry Processing (Oded Stein, Eitan Grinspun, Max Wardetzky, Alec Jacobson) The interior vertices are NOT set to zero yet. | |
template<typename DerivedV , typename DerivedF , typename Scalar > | |
void | hessian_energy (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Scalar > &Q) |
Constructs the Hessian energy matrix using mixed FEM as described in https://arxiv.org/abs/1707.04348 Natural Boundary Conditions for Smoothing in Geometry Processing (Oded Stein, Eitan Grinspun, Max Wardetzky, Alec Jacobson) | |
template<typename DerivedX , typename DerivedE , typename DerivedN , typename DerivedB > | |
void | histc (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedB > &B) |
Count occurrences of values in X between consecutive entries in E. | |
template<typename DerivedX , typename DerivedE , typename DerivedB > | |
void | histc (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedB > &B) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedE > | |
void | histc (const typename DerivedE::Scalar &x, const Eigen::MatrixBase< DerivedE > &E, typename DerivedE::Index &b) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | hsv_to_rgb (const T *hsv, T *rgb) |
Convert RGB to HSV. | |
template<typename T > | |
void | hsv_to_rgb (const T &h, const T &s, const T &v, T &r, T &g, T &b) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedH , typename DerivedR > | |
void | hsv_to_rgb (const Eigen::PlainObjectBase< DerivedH > &H, Eigen::PlainObjectBase< DerivedR > &R) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
void | icosahedron (Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
template<typename DerivedV , typename DerivedQ , int DIM> | |
void | in_element (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixXi &Ele, const Eigen::MatrixBase< DerivedQ > &Q, const AABB< DerivedV, DIM > &aabb, Eigen::VectorXi &I) |
Determine whether each point in a list of points is in the elements of a mesh. | |
template<typename DerivedV , typename DerivedQ , int DIM, typename Scalar > | |
void | in_element (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixXi &Ele, const Eigen::MatrixBase< DerivedQ > &Q, const AABB< DerivedV, DIM > &aabb, Eigen::SparseMatrix< Scalar > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derived > | |
void | increment_ulp (Eigen::MatrixBase< Derived > &inout, int it) |
Increment Unit in Last Place of a matrix. | |
void | infinite_cost_stopping_condition (const decimate_cost_and_placement_callback &cost_and_placement, decimate_stopping_condition_callback &stopping_condition) |
Stopping condition function compatible with igl::decimate. | |
decimate_stopping_condition_callback | infinite_cost_stopping_condition (const decimate_cost_and_placement_callback &cost_and_placement) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedR > | |
void | inradius (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedR > &R) |
Compute the inradius of each triangle in a mesh (V,F) | |
template<typename DerivedV , typename DerivedF , typename DerivedK > | |
void | internal_angles (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedK > &K) |
Compute internal angles for a triangle mesh. | |
template<typename DerivedL , typename DerivedK > | |
void | internal_angles_intrinsic (const Eigen::MatrixBase< DerivedL > &L_sq, Eigen::PlainObjectBase< DerivedK > &K) |
Compute internal angles for a triangle mesh. | |
template<class M > | |
void | intersect (const M &A, const M &B, M &C) |
Determine the intersect between two sets of coefficients using ==. | |
template<class M > | |
M | intersect (const M &A, const M &B) |
overload | |
template<typename DerivedV , typename DerivedF , typename Scalar , typename Derivedl_intrinsic , typename DerivedF_intrinsic > | |
void | intrinsic_delaunay_cotmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Scalar > &L, Eigen::PlainObjectBase< Derivedl_intrinsic > &l_intrinsic, Eigen::PlainObjectBase< DerivedF_intrinsic > &F_intrinsic) |
Computes the discrete cotangent Laplacian of a mesh after converting it into its intrinsic Delaunay triangulation (see, e.g., [Fisher et al. | |
template<typename DerivedV , typename DerivedF , typename Scalar > | |
void | intrinsic_delaunay_cotmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Scalar > &L) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedl_in , typename DerivedF_in , typename Derivedl , typename DerivedF > | |
void | intrinsic_delaunay_triangulation (const Eigen::MatrixBase< Derivedl_in > &l_in, const Eigen::MatrixBase< DerivedF_in > &F_in, Eigen::PlainObjectBase< Derivedl > &l, Eigen::PlainObjectBase< DerivedF > &F) |
INTRINSIC_DELAUNAY_TRIANGULATION Flip edges intrinsically until all are "intrinsic Delaunay". | |
template<typename Derivedl_in , typename DerivedF_in , typename Derivedl , typename DerivedF , typename DerivedE , typename DeriveduE , typename DerivedEMAP , typename uE2EType > | |
void | intrinsic_delaunay_triangulation (const Eigen::MatrixBase< Derivedl_in > &l_in, const Eigen::MatrixBase< DerivedF_in > &F_in, Eigen::PlainObjectBase< Derivedl > &l, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DeriveduE > &uE, Eigen::PlainObjectBase< DerivedEMAP > &EMAP, std::vector< std::vector< uE2EType > > &uE2E) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename MatY > | |
void | invert_diag (const Eigen::SparseCompressedBase< DerivedX > &X, MatY &Y) |
Invert the diagonal entries of a matrix (if the matrix is a diagonal matrix then this amounts to inverting the matrix) | |
template<typename DerivedF > | |
std::vector< bool > | is_border_vertex (const Eigen::MatrixBase< DerivedF > &F) |
Determine vertices on open boundary of a (manifold) mesh with triangle faces F. | |
template<typename DerivedF , typename DerivedE , typename DerivedB > | |
void | is_boundary_edge (const Eigen::PlainObjectBase< DerivedE > &E, const Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedB > &B) |
Determine for each edge E if it is a "boundary edge" in F. | |
template<typename DerivedF , typename DerivedE , typename DerivedB , typename DerivedEMAP > | |
void | is_boundary_edge (const Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedEMAP > &EMAP) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedD > | |
void | is_delaunay (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedD > &D) |
IDetermine if each edge in the mesh (V,F) is Delaunay. | |
template<typename DerivedV , typename DerivedF , typename uE2EType , typename InCircle , typename ueiType > | |
bool | is_delaunay (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const std::vector< std::vector< uE2EType > > &uE2E, const InCircle incircle, const ueiType uei) |
Determine whether a single edge is Delaunay using a provided (extrinsic) incirle test. | |
bool | is_dir (const char *filename) |
Tells whether the given filename is a directory. | |
template<typename DerivedF > | |
bool | is_edge_manifold (const Eigen::MatrixBase< DerivedF > &F) |
Check if the mesh is edge-manifold (every edge is incident one one face (boundary) or two oppositely oriented faces). | |
template<typename DerivedF , typename DerivedBF , typename DerivedE , typename DerivedEMAP , typename DerivedBE > | |
bool | is_edge_manifold (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedBF > &BF, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedEMAP > &EMAP, Eigen::PlainObjectBase< DerivedBE > &BE) |
Checks if mesh is edge-manifold and outputs per-edge info. | |
template<typename DerivedF , typename DerivedEMAP , typename DerivedBF , typename DerivedBE > | |
bool | is_edge_manifold (const Eigen::MatrixBase< DerivedF > &F, const typename DerivedF::Index ne, const Eigen::MatrixBase< DerivedEMAP > &EMAP, Eigen::PlainObjectBase< DerivedBF > &BF, Eigen::PlainObjectBase< DerivedBE > &BE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | is_file (const char *filename) |
Tells whether the given filename is a regular file. | |
template<typename Derivedl , typename DerivedF , typename DerivedD > | |
void | is_intrinsic_delaunay (const Eigen::MatrixBase< Derivedl > &l, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedD > &D) |
Determine if each edge in the mesh (V,F) is Delaunay. | |
template<typename Derivedl , typename DerivedF , typename uE2EType , typename DerivedD > | |
void | is_intrinsic_delaunay (const Eigen::MatrixBase< Derivedl > &l, const Eigen::MatrixBase< DerivedF > &F, const std::vector< std::vector< uE2EType > > &uE2E, Eigen::PlainObjectBase< DerivedD > &D) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedl , typename uE2EType , typename Index > | |
bool | is_intrinsic_delaunay (const Eigen::MatrixBase< Derivedl > &l, const std::vector< std::vector< uE2EType > > &uE2E, const Index num_faces, const Index uei) |
Determine whether a single edge is Delaunay using a provided (extrinsic) incirle test. | |
template<typename DerivedF > | |
std::vector< bool > | is_irregular_vertex (const Eigen::MatrixBase< DerivedF > &F) |
Determine if a vertex is irregular, i.e. | |
bool | is_planar (const Eigen::MatrixXd &V) |
Determine if a set of points lies on the XY plane. | |
bool | is_readable (const char *filename) |
Check if a file is reabable like PHP's is_readable function: http://www.php.net/manual/en/function.is-readable.php. | |
template<typename T > | |
bool | is_sparse (const Eigen::SparseMatrix< T > &A) |
Determine if a matrix A is sparse. | |
template<typename DerivedA > | |
bool | is_sparse (const Eigen::PlainObjectBase< DerivedA > &A) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | is_stl (FILE *stl_file, bool &is_ascii) |
Given a file pointer, determine if it contains an .stl file and then rewind it. | |
bool | is_stl (FILE *stl_file) |
template<typename AT > | |
bool | is_symmetric (const Eigen::SparseMatrix< AT > &A) |
Returns true if the given matrix is symmetric. | |
template<typename AT , typename epsilonT > | |
bool | is_symmetric (const Eigen::SparseMatrix< AT > &A, const epsilonT epsilon) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA > | |
bool | is_symmetric (const Eigen::PlainObjectBase< DerivedA > &A) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedB > | |
bool | is_vertex_manifold (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedB > &B) |
Check if a mesh is vertex-manifold. | |
template<typename DerivedF > | |
bool | is_vertex_manifold (const Eigen::MatrixBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | is_writable (const char *filename) |
Check if a file exists and is writable like PHP's is_writable function: http://www.php.net/manual/en/function.is-writable.php. | |
template<typename Derived > | |
bool | isdiag (const Eigen::SparseCompressedBase< Derived > &A) |
Determine if a given matrix is diagonal: all non-zeros lie on the main diagonal. | |
template<typename DerivedA , typename DerivedB , typename DerivedIA , typename DerivedLOCB > | |
void | ismember (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedIA > &IA, Eigen::PlainObjectBase< DerivedLOCB > &LOCB) |
Determine if elements of A exist in elements of B. | |
template<typename DerivedA , typename DerivedB , typename DerivedIA , typename DerivedLOCB > | |
void | ismember_rows (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedIA > &IA, Eigen::PlainObjectBase< DerivedLOCB > &LOCB) |
Determine if row of A exist in rows of B. | |
template<typename DerivedV , typename DerivedF , typename DerivedS , typename Derivedvals , typename DerivediV , typename DerivediE , typename DerivedI > | |
void | isolines (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< Derivedvals > &vals, Eigen::PlainObjectBase< DerivediV > &iV, Eigen::PlainObjectBase< DerivediE > &iE, Eigen::PlainObjectBase< DerivedI > &I) |
Compute isolines of a scalar field on a triangle mesh. | |
template<typename DerivedF , typename DerivedS , typename Derivedvals , typename DerivediB , typename DerivediFI , typename DerivediE , typename DerivedI > | |
void | isolines_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< Derivedvals > &vals, Eigen::PlainObjectBase< DerivediB > &iB, Eigen::PlainObjectBase< DerivediFI > &iFI, Eigen::PlainObjectBase< DerivediE > &iE, Eigen::PlainObjectBase< DerivedI > &I) |
Compute isolines of a scalar field on a triangle mesh intrinsically. | |
template<typename DerivedF , typename DerivedS , typename DeriveduE , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename DerivediB , typename DerivediFI , typename DerivediE > | |
void | isolines_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< DeriveduE > &uE, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const Eigen::MatrixBase< DeriveduEC > &uEC, const Eigen::MatrixBase< DeriveduEE > &uEE, const typename DerivedS::Scalar val, Eigen::PlainObjectBase< DerivediB > &iB, Eigen::PlainObjectBase< DerivediFI > &iFI, Eigen::PlainObjectBase< DerivediE > &iE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedCM , typename Derivediso_color , typename DerivedICM > | |
void | isolines_map (const Eigen::MatrixBase< DerivedCM > &CM, const Eigen::MatrixBase< Derivediso_color > &iso_color, const int interval_thickness, const int iso_thickness, Eigen::PlainObjectBase< DerivedICM > &ICM) |
Inject a given colormap with evenly spaced isolines. | |
template<typename DerivedCM , typename DerivedICM > | |
void | isolines_map (const Eigen::MatrixBase< DerivedCM > &CM, Eigen::PlainObjectBase< DerivedICM > &ICM) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedVX , typename DerivedFX , typename DerivedVY , typename DerivedFY , typename DerivedR , typename Derivedt > | |
void | iterative_closest_point (const Eigen::MatrixBase< DerivedVX > &VX, const Eigen::MatrixBase< DerivedFX > &FX, const Eigen::MatrixBase< DerivedVY > &VY, const Eigen::MatrixBase< DerivedFY > &FY, const int num_samples, const int max_iters, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< Derivedt > &t) |
Solve for the rigid transformation that places mesh X onto mesh Y using the iterative closest point method. | |
template<typename DerivedVX , typename DerivedFX , typename DerivedVY , typename DerivedFY , typename DerivedNY , typename DerivedR , typename Derivedt > | |
void | iterative_closest_point (const Eigen::MatrixBase< DerivedVX > &VX, const Eigen::MatrixBase< DerivedFX > &FX, const Eigen::MatrixBase< DerivedVY > &VY, const Eigen::MatrixBase< DerivedFY > &FY, const igl::AABB< DerivedVY, 3 > &Ytree, const Eigen::MatrixBase< DerivedNY > &NY, const int num_samples, const int max_iters, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< Derivedt > &t) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | jet (const T f, T *rgb) |
Jet colormap like MATLAB's jet. | |
template<typename T > | |
void | jet (const T f, T &r, T &g, T &b) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedZ , typename DerivedC > | |
void | jet (const Eigen::MatrixBase< DerivedZ > &Z, const bool normalize, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedZ , typename DerivedC > | |
void | jet (const Eigen::MatrixBase< DerivedZ > &Z, const double min_Z, const double max_Z, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename Derivedx0 , typename Derivedf , typename DerivedF , typename DerivedU > | |
void | kelvinlets (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< Derivedx0 > &x0, const Eigen::MatrixBase< Derivedf > &f, const Eigen::MatrixBase< DerivedF > &F, const KelvinletParams< typename DerivedV::Scalar > ¶ms, Eigen::PlainObjectBase< DerivedU > &U) |
Implements Pixar's Regularized Kelvinlets (Pixar Technical Memo #17-03): Sculpting Brushes based on Fundamental Solutions of Elasticity, a technique for real-time physically based volume sculpting of virtual elastic materials. | |
template<typename T > | |
void | kkt_inverse (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &A, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &Aeq, const bool use_lu_decomposition, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &S) |
Constructs the inverse of the KKT matrix of a convex, linear equality constrained quadratic minimization problem. | |
template<typename DerivedP , typename IndexType , typename DerivedCH , typename DerivedCN , typename DerivedW , typename DerivedI > | |
void | knn (const Eigen::MatrixBase< DerivedP > &P, size_t k, const std::vector< std::vector< IndexType > > &point_indices, const Eigen::MatrixBase< DerivedCH > &CH, const Eigen::MatrixBase< DerivedCN > &CN, const Eigen::MatrixBase< DerivedW > &W, Eigen::PlainObjectBase< DerivedI > &I) |
Given a 3D set of points P, an whole number k, and an octree find the indicies of the k nearest neighbors for each point in P. | |
template<typename DerivedP , typename DerivedV , typename IndexType , typename DerivedCH , typename DerivedCN , typename DerivedW , typename DerivedI > | |
void | knn (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedV > &V, size_t k, const std::vector< std::vector< IndexType > > &point_indices, const Eigen::MatrixBase< DerivedCH > &CH, const Eigen::MatrixBase< DerivedCN > &CN, const Eigen::MatrixBase< DerivedW > &W, Eigen::PlainObjectBase< DerivedI > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedT , typename DerivedF > | |
int | launch_medit (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedT > &T, const Eigen::PlainObjectBase< DerivedF > &F, const bool wait) |
Writes the tetmesh in (V,T,F) to a temporary file, opens it with medit (forking with a system call) and returns. | |
void | lbs_matrix (const Eigen::MatrixXd &V, const Eigen::MatrixXd &W, Eigen::MatrixXd &M) |
Linear blend skinning can be expressed by V' = M * T where V' is a #V by dim matrix of deformed vertex positions (one vertex per row), M is a #V by (dim+1)*#T (composed of weights and rest positions) and T is a #T*(dim+1) by dim matrix of #T stacked transposed transformation matrices. | |
void | lbs_matrix_column (const Eigen::MatrixXd &V, const Eigen::MatrixXd &W, Eigen::SparseMatrix< double > &M) |
Construct a matrix that when multiplied against a column of affine transformation entries computes new coordinates of the vertices. | |
void | lbs_matrix_column (const Eigen::MatrixXd &V, const Eigen::MatrixXd &W, Eigen::MatrixXd &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | lbs_matrix_column (const Eigen::MatrixXd &V, const Eigen::MatrixXd &W, const Eigen::MatrixXi &WI, Eigen::SparseMatrix< double > &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | lbs_matrix_column (const Eigen::MatrixXd &V, const Eigen::MatrixXd &W, const Eigen::MatrixXi &WI, Eigen::MatrixXd &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedP , typename Orient2D , typename DerivedF > | |
void | lexicographic_triangulation (const Eigen::MatrixBase< DerivedP > &P, Orient2D orient2D, Eigen::PlainObjectBase< DerivedF > &F) |
Given a set of points in 2D, return a lexicographic triangulation of these points. | |
template<typename MatF , typename VecL > | |
void | limit_faces (const MatF &F, const VecL &L, const bool exclusive, MatF &LF) |
Limit given faces F to those which contain (only) indices found in L. | |
template<typename DerivedV , typename DerivedF , typename DerivedO > | |
void | line_field_mismatch (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedV > &PD1, const bool isCombed, Eigen::PlainObjectBase< DerivedO > &mismatch) |
Calculates the mismatch (integer), at each face edge, of a cross field defined on the mesh faces. | |
double | line_search (Eigen::MatrixXd &x, const Eigen::MatrixXd &d, double i_step_size, std::function< double(Eigen::MatrixXd &)> energy, double cur_energy=-1) |
Implement a bisection linesearch to minimize a mesh-based energy on vertices given at 'x' at a search direction 'd', with initial step size. | |
bool | line_segment_in_rectangle (const Eigen::Vector2d &s, const Eigen::Vector2d &d, const Eigen::Vector2d &A, const Eigen::Vector2d &B) |
Determine whether a line segment overlaps with a rectangle. | |
bool | linprog (const Eigen::VectorXd &c, const Eigen::MatrixXd &A, const Eigen::VectorXd &b, const int k, Eigen::VectorXd &x) |
Solve a linear program given in "standard form". | |
bool | linprog (const Eigen::VectorXd &f, const Eigen::MatrixXd &A, const Eigen::VectorXd &b, const Eigen::MatrixXd &B, const Eigen::VectorXd &c, Eigen::VectorXd &x) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derived > | |
Derived | LinSpaced (typename Derived::Index size, const typename Derived::Scalar &low, const typename Derived::Scalar &high) |
Replacement for Eigen::DenseBase::LinSpaced. | |
template<typename T , typename Derived > | |
bool | list_to_matrix (const std::vector< std::vector< T > > &V, Eigen::PlainObjectBase< Derived > &M) |
Convert a list (std::vector) of row vectors of the same length to a matrix. | |
template<typename T , size_t N, typename Derived > | |
bool | list_to_matrix (const std::vector< std::array< T, N > > &V, Eigen::PlainObjectBase< Derived > &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T , typename Derived > | |
bool | list_to_matrix (const std::vector< T > &V, Eigen::PlainObjectBase< Derived > &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T , typename Derived > | |
bool | list_to_matrix (const std::vector< std::vector< T > > &V, const int n, const T &padding, Eigen::PlainObjectBase< Derived > &M) |
Convert a list of row vectors of n or less to a matrix and pad on the right with padding . | |
template<typename DerivedV , typename DerivedF > | |
void | local_basis (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedV > &B1, Eigen::PlainObjectBase< DerivedV > &B2, Eigen::PlainObjectBase< DerivedV > &B3) |
Compute a local orthogonal reference system for each triangle in the given mesh. | |
template<typename Derivedeye , typename Derivedcenter , typename Derivedup , typename DerivedR > | |
void | look_at (const Eigen::PlainObjectBase< Derivedeye > &eye, const Eigen::PlainObjectBase< Derivedcenter > ¢er, const Eigen::PlainObjectBase< Derivedup > &up, Eigen::PlainObjectBase< DerivedR > &R) |
Implementation of the deprecated gluLookAt function. | |
template<typename DerivedF , typename SType , typename DerivedNF > | |
void | loop (const int n_verts, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< SType > &S, Eigen::PlainObjectBase< DerivedNF > &NF) |
Given the triangle mesh [V, F], where n_verts = V.rows(), computes newV and a sparse matrix S s.t. | |
template<typename DerivedV , typename DerivedF , typename DerivedNV , typename DerivedNF > | |
void | loop (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedNV > &NV, Eigen::PlainObjectBase< DerivedNF > &NF, const int number_of_subdivs=1) |
Given the triangle mesh [V, F], computes number_of_subdivs steps of loop subdivision and outputs the new mesh [newV, newF]. | |
template<typename DerivedV , typename DerivedF , typename Derivedb , typename Derivedbc , typename DerivedV_uv , typename QScalar > | |
bool | lscm (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedb > &b, const Eigen::MatrixBase< Derivedbc > &bc, Eigen::PlainObjectBase< DerivedV_uv > &V_uv, Eigen::SparseMatrix< QScalar > &Q) |
Compute a Least-squares conformal map parametrization (equivalently derived in "Intrinsic Parameterizations of Surface Meshes" [Desbrun et al. | |
template<typename DerivedV , typename DerivedF , typename Derivedb , typename Derivedbc , typename DerivedV_uv > | |
bool | lscm (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedb > &b, const Eigen::MatrixBase< Derivedbc > &bc, Eigen::PlainObjectBase< DerivedV_uv > &V_uv) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedV_uv > | |
bool | lscm (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedV_uv > &V_uv) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename QScalar > | |
void | lscm_hessian (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< QScalar > &Q) |
Compute a Least-squares conformal map parametrization (equivalently derived in "Intrinsic Parameterizations of Surface Meshes" [Desbrun et al. | |
void | map_vertices_to_circle (const Eigen::MatrixXd &V, const Eigen::VectorXi &bnd, Eigen::MatrixXd &UV) |
Map the vertices whose indices are in a given boundary loop (bnd) on the unit circle with spacing proportional to the original boundary edge lengths. | |
double | mapping_energy_with_jacobians (const Eigen::MatrixXd &Ji, const Eigen::VectorXd &areas, igl::MappingEnergyType slim_energy, double exp_factor) |
Compute the rotation-invariant energy of a mapping (represented in Jacobians and areas) | |
template<typename DerivedGV , typename Scalar , typename Index , typename DerivedV , typename DerivedF > | |
void | march_cube (const DerivedGV &GV, const Eigen::Matrix< Scalar, 8, 1 > &cS, const Eigen::Matrix< Index, 8, 1 > &cI, const Scalar &isovalue, Eigen::PlainObjectBase< DerivedV > &V, Index &n, Eigen::PlainObjectBase< DerivedF > &F, Index &m, std::unordered_map< int64_t, int > &E2V) |
Process a single cube of a marching cubes grid. | |
template<typename DerivedS , typename DerivedGV , typename DerivedV , typename DerivedF > | |
void | marching_cubes (const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< DerivedGV > &GV, const unsigned nx, const unsigned ny, const unsigned nz, const typename DerivedS::Scalar isovalue, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
Performs marching cubes reconstruction on a grid defined by values, and points, and generates a mesh defined by vertices and faces. | |
template<typename DerivedS , typename DerivedGV , typename DerivedGI , typename DerivedV , typename DerivedF > | |
void | marching_cubes (const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< DerivedGV > &GV, const Eigen::MatrixBase< DerivedGI > &GI, const typename DerivedS::Scalar isovalue, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedTV , typename DerivedTT , typename DerivedS , typename DerivedSV , typename DerivedSF , typename DerivedJ , typename BCType > | |
void | marching_tets (const Eigen::MatrixBase< DerivedTV > &TV, const Eigen::MatrixBase< DerivedTT > &TT, const Eigen::MatrixBase< DerivedS > &S, const typename DerivedS::Scalar isovalue, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSF > &SF, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::SparseMatrix< BCType > &BC) |
Performs the marching tetrahedra algorithm on a tet mesh defined by TV and TT with scalar values defined at each vertex in TV. | |
template<typename DerivedTV , typename DerivedTT , typename DerivedS , typename DerivedSV , typename DerivedSF , typename DerivedJ , typename BCType > | |
void | marching_tets (const Eigen::MatrixBase< DerivedTV > &TV, const Eigen::MatrixBase< DerivedTT > &TT, const Eigen::MatrixBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSF > &SF, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::SparseMatrix< BCType > &BC) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedTV , typename DerivedTT , typename DerivedS , typename DerivedSV , typename DerivedSF , typename DerivedJ > | |
void | marching_tets (const Eigen::MatrixBase< DerivedTV > &TV, const Eigen::MatrixBase< DerivedTT > &TT, const Eigen::MatrixBase< DerivedS > &S, const typename DerivedS::Scalar isovalue, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSF > &SF, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedTV , typename DerivedTT , typename DerivedS , typename DerivedSV , typename DerivedSF , typename BCType > | |
void | marching_tets (const Eigen::MatrixBase< DerivedTV > &TV, const Eigen::MatrixBase< DerivedTT > &TT, const Eigen::MatrixBase< DerivedS > &S, const typename DerivedS::Scalar isovalue, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSF > &SF, Eigen::SparseMatrix< BCType > &BC) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedTV , typename DerivedTT , typename DerivedS , typename DerivedSV , typename DerivedSF > | |
void | marching_tets (const Eigen::MatrixBase< DerivedTV > &TV, const Eigen::MatrixBase< DerivedTT > &TT, const Eigen::MatrixBase< DerivedS > &S, const typename DerivedS::Scalar isovalue, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSF > &SF) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename Scalar > | |
void | massmatrix (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const MassMatrixType type, Eigen::SparseMatrix< Scalar > &M) |
Constructs the mass (area) matrix for a given mesh (V,F). | |
template<typename Derivedl , typename DerivedF , typename Scalar > | |
void | massmatrix_intrinsic (const Eigen::MatrixBase< Derivedl > &l, const Eigen::MatrixBase< DerivedF > &F, const MassMatrixType type, Eigen::SparseMatrix< Scalar > &M) |
Constructs the mass (area) matrix for a given mesh (V,F). | |
template<typename Derivedl , typename DerivedF , typename Scalar > | |
void | massmatrix_intrinsic (const Eigen::MatrixBase< Derivedl > &l, const Eigen::MatrixBase< DerivedF > &F, const MassMatrixType type, const int n, Eigen::SparseMatrix< Scalar > &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Q_type > | |
void | mat4_to_quat (const Q_type *m, Q_type *q) |
Convert a OpenGL (rotation) matrix to a quaternion. | |
template<typename Q_type > | |
void | mat3_to_quat (const Q_type *m, Q_type *q) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const Eigen::Vector4f | MAYA_GREEN (128./255., 242./255., 0./255., 1.) |
const Eigen::Vector4f | MAYA_YELLOW (255./255., 247./255., 50./255., 1.) |
const Eigen::Vector4f | MAYA_RED (234./255., 63./255., 52./255., 1.) |
const Eigen::Vector4f | MAYA_BLUE (0./255., 73./255., 252./255., 1.) |
const Eigen::Vector4f | MAYA_PURPLE (180./255., 73./255., 200./255., 1.) |
const Eigen::Vector4f | MAYA_VIOLET (31./255., 15./255., 66./255., 1.) |
const Eigen::Vector4f | MAYA_GREY (0.5, 0.5, 0.5, 1.0) |
const Eigen::Vector4f | MAYA_CYAN (131./255., 219./255., 252./255., 1.) |
const Eigen::Vector4f | MAYA_SEA_GREEN (70./255., 252./255., 167./255., 1.) |
template<typename DerivedM > | |
const Eigen::WithFormat< DerivedM > | matlab_format (const Eigen::DenseBase< DerivedM > &M, const std::string name="") |
This is a routine to print a matrix using format suitable for pasting into the matlab IDE. | |
template<typename DerivedM > | |
std::string | matlab_format_index (const Eigen::MatrixBase< DerivedM > &M, const std::string name="") |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedS > | |
const std::string | matlab_format (const Eigen::SparseMatrix< DerivedS > &S, const std::string name="") |
Same but for sparse matrices. | |
const std::string | matlab_format (const double v, const std::string name="") |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const std::string | matlab_format (const float v, const std::string name="") |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Eigen::IOFormat | matlab_format () |
Just build and return the format. | |
template<typename DerivedM > | |
void | matrix_to_list (const Eigen::MatrixBase< DerivedM > &M, std::vector< std::vector< typename DerivedM::Scalar > > &V) |
Convert a matrix to a list (std::vector) of row vectors of the same size. | |
template<typename DerivedM > | |
void | matrix_to_list (const Eigen::MatrixBase< DerivedM > &M, std::vector< typename DerivedM::Scalar > &V) |
Convert a matrix to a list (std::vector) of elements in column-major ordering. | |
template<typename DerivedM > | |
std::vector< typename DerivedM::Scalar > | matrix_to_list (const Eigen::MatrixBase< DerivedM > &M) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename AType , typename DerivedB , typename DerivedI > | |
void | max (const Eigen::SparseMatrix< AType > &A, const int dim, Eigen::PlainObjectBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedI > &I) |
Compute the maximum along dimension dim of a matrix X. | |
template<typename DerivedX , typename DerivedY , typename DerivedI > | |
void | max (const Eigen::DenseBase< DerivedX > &X, const int dim, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedI > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | max_faces_stopping_condition (int &m, const int orig_m, const int max_m, decimate_stopping_condition_callback &stopping_condition) |
Stopping condition function compatible with igl::decimate. | |
decimate_stopping_condition_callback | max_faces_stopping_condition (int &m, const int orign_m, const int max_m) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
int | max_size (const std::vector< T > &V) |
Determine max size of lists in a vector. | |
template<typename DerivedV , typename mType > | |
bool | median (const Eigen::MatrixBase< DerivedV > &V, mType &m) |
Compute the median of an eigen vector. | |
template<typename AType , typename DerivedB , typename DerivedI > | |
void | min (const Eigen::SparseMatrix< AType > &A, const int dim, Eigen::PlainObjectBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedI > &I) |
Compute the minimum along dimension dim of a matrix X. | |
template<typename DerivedX , typename DerivedY , typename DerivedI > | |
void | min (const Eigen::DenseBase< DerivedX > &X, const int dim, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedI > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T , typename Derivedknown > | |
bool | min_quad_with_fixed_precompute (const Eigen::SparseMatrix< T > &A, const Eigen::MatrixBase< Derivedknown > &known, const Eigen::SparseMatrix< T > &Aeq, const bool pd, min_quad_with_fixed_data< T > &data) |
Minimize a convex quadratic energy subject to fixed value and linear equality constraints. | |
template<typename T , typename DerivedB , typename DerivedY , typename DerivedBeq , typename DerivedZ , typename Derivedsol > | |
bool | min_quad_with_fixed_solve (const min_quad_with_fixed_data< T > &data, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedY > &Y, const Eigen::MatrixBase< DerivedBeq > &Beq, Eigen::PlainObjectBase< DerivedZ > &Z, Eigen::PlainObjectBase< Derivedsol > &sol) |
Solves a system previously factored using min_quad_with_fixed_precompute. | |
template<typename T , typename DerivedB , typename DerivedY , typename DerivedBeq , typename DerivedZ > | |
bool | min_quad_with_fixed_solve (const min_quad_with_fixed_data< T > &data, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedY > &Y, const Eigen::MatrixBase< DerivedBeq > &Beq, Eigen::PlainObjectBase< DerivedZ > &Z) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T , typename Derivedknown , typename DerivedB , typename DerivedY , typename DerivedBeq , typename DerivedZ > | |
bool | min_quad_with_fixed (const Eigen::SparseMatrix< T > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< Derivedknown > &known, const Eigen::MatrixBase< DerivedY > &Y, const Eigen::SparseMatrix< T > &Aeq, const Eigen::MatrixBase< DerivedBeq > &Beq, const bool pd, Eigen::PlainObjectBase< DerivedZ > &Z) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , int n, int m, bool Hpd = true> | |
Eigen::Matrix< Scalar, n, 1 > | min_quad_with_fixed (const Eigen::Matrix< Scalar, n, n > &H, const Eigen::Matrix< Scalar, n, 1 > &f, const Eigen::Array< bool, n, 1 > &k, const Eigen::Matrix< Scalar, n, 1 > &bc, const Eigen::Matrix< Scalar, m, n > &A, const Eigen::Matrix< Scalar, m, 1 > &b) |
Dense version optimized for very small, known at compile time sizes. | |
template<typename Scalar , int n, bool Hpd = true> | |
Eigen::Matrix< Scalar, n, 1 > | min_quad_with_fixed (const Eigen::Matrix< Scalar, n, n > &H, const Eigen::Matrix< Scalar, n, 1 > &f, const Eigen::Array< bool, n, 1 > &k, const Eigen::Matrix< Scalar, n, 1 > &bc) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , int n, int kcount, bool Hpd> | |
Eigen::Matrix< Scalar, n, 1 > | min_quad_with_fixed (const Eigen::Matrix< Scalar, n, n > &H, const Eigen::Matrix< Scalar, n, 1 > &f, const Eigen::Array< bool, n, 1 > &k, const Eigen::Matrix< Scalar, n, 1 > &bc) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
int | min_size (const std::vector< T > &V) |
Determine min size of lists in a vector. | |
template<typename DerivedA , typename DerivedB > | |
void | mod (const Eigen::PlainObjectBase< DerivedA > &A, const int base, Eigen::PlainObjectBase< DerivedB > &B) |
Compute elementwise mod: B = A % base. | |
template<typename DerivedA > | |
DerivedA | mod (const Eigen::PlainObjectBase< DerivedA > &A, const int base) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | mode (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &X, const int d, Eigen::Matrix< T, Eigen::Dynamic, 1 > &M) |
Takes mode of coefficients in a matrix along a given dimension. | |
template<typename DerivedV , typename DerivedF , typename Derivedm0 , typename Derivedm1 , typename Derivedm2 > | |
void | moments (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Derivedm0 &m0, Eigen::PlainObjectBase< Derivedm1 > &m1, Eigen::PlainObjectBase< Derivedm2 > &m2) |
Computes the moments of mass for a solid object bound by a triangle mesh. | |
void | mvc (const Eigen::MatrixXd &V, const Eigen::MatrixXd &C, Eigen::MatrixXd &W) |
Mean value coordinates for a polygon. | |
double | nchoosek (const int n, const int k) |
Binomial coefficient. | |
template<typename DerivedV , typename DerivedU > | |
void | nchoosek (const Eigen::MatrixBase< DerivedV > &V, const int k, Eigen::PlainObjectBase< DerivedU > &U) |
All combinations . | |
bool | next_filename (const std::string &prefix, const int zeros, const std::string &suffix, std::string &next) |
Find the file with the first filename of the form "prefix%0[zeros]dsuffix". | |
template<typename DerivedV , typename DerivedEle , typename Scalar > | |
void | normal_derivative (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedEle > &Ele, Eigen::SparseMatrix< Scalar > &DD) |
Computes the directional derivative normal to all (half-)edges of a triangle mesh (not just boundary edges). | |
template<typename Q_type > | |
bool | normalize_quat (const Q_type *q, Q_type *out) |
Normalize a quaternion A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w. | |
template<typename DerivedA , typename DerivedN > | |
void | null (const Eigen::PlainObjectBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedN > &N) |
Compute a basis for the null space for the given matrix A: the columns of the output N form a basis for the space orthogonal to that spanned by the rows of A. | |
template<typename DerivedP , typename IndexType , typename DerivedCH , typename DerivedCN , typename DerivedW > | |
void | octree (const Eigen::MatrixBase< DerivedP > &P, std::vector< std::vector< IndexType > > &point_indices, Eigen::PlainObjectBase< DerivedCH > &CH, Eigen::PlainObjectBase< DerivedCN > &CN, Eigen::PlainObjectBase< DerivedW > &W) |
Given a set of 3D points P, generate data structures for a pointerless octree. | |
template<typename DerivedV , typename DerivedF , typename isolevelType , typename DerivedSV , typename DerivedSF , typename DerivedGV , typename Derivedside , typename DerivedS > | |
void | offset_surface (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const isolevelType isolevel, const typename Derivedside::Scalar s, const SignedDistanceType &signed_distance_type, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSF > &SF, Eigen::PlainObjectBase< DerivedGV > &GV, Eigen::PlainObjectBase< Derivedside > &side, Eigen::PlainObjectBase< DerivedS > &S) |
Compute a triangulated offset surface using matching cubes on a grid of signed distance values from the input triangle mesh. | |
template<typename IntegerT > | |
void | on_boundary (const std::vector< std::vector< IntegerT > > &T, std::vector< bool > &I, std::vector< std::vector< bool > > &C) |
Determine boundary facets of mesh elements stored in T. | |
template<typename DerivedT , typename DerivedI , typename DerivedC > | |
void | on_boundary (const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedE , typename DerivedOE > | |
void | orient_halfedges (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedOE > &oE) |
Orients halfedges for a triangle mesh, assigning them to a unique edge. | |
template<typename DerivedV , typename DerivedF , typename DerivedC , typename DerivedFF , typename DerivedI > | |
void | orient_outward (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedI > &I) |
Orient each component (identified by C) of a mesh (V,F) so the normals on average point away from the patch's centroid. | |
template<typename DerivedF , typename DerivedC , typename AScalar > | |
void | orientable_patches (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedC > &C, Eigen::SparseMatrix< AScalar > &A) |
Compute connected components of facets connected by manifold edges. | |
template<typename DerivedF , typename DerivedC > | |
void | orientable_patches (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedE > | |
void | oriented_facets (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E) |
Determines all "directed
[facets](https://en.wikipedia.org/wiki/Simplex#Elements)" of a given set of simplicial elements. | |
void | orth (const Eigen::MatrixXd &A, Eigen::MatrixXd &Q) |
Orthogonalization of a matrix. | |
template<typename DerivedP > | |
void | ortho (const typename DerivedP::Scalar left, const typename DerivedP::Scalar right, const typename DerivedP::Scalar bottom, const typename DerivedP::Scalar top, const typename DerivedP::Scalar nearVal, const typename DerivedP::Scalar farVal, Eigen::PlainObjectBase< DerivedP > &P) |
Implementation of the deprecated glOrtho function. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename IndexType , typename DerivedA > | |
void | outer_vertex (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedI > &I, IndexType &v_index, Eigen::PlainObjectBase< DerivedA > &A) |
Find a vertex that is reachable from infinite without crossing any faces. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename IndexType , typename DerivedA > | |
void | outer_edge (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedI > &I, IndexType &v1, IndexType &v2, Eigen::PlainObjectBase< DerivedA > &A) |
Find an edge that is reachable from infinity without crossing any faces. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DerivedI , typename IndexType > | |
void | outer_facet (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedI > &I, IndexType &f, bool &flipped) |
Find a facet that is reachable from infinity without crossing any faces. | |
template<typename Index , typename FunctionType > | |
bool | parallel_for (const Index loop_size, const FunctionType &func, const size_t min_parallel=0) |
Functional implementation of a basic, open-mp style, parallel for loop. | |
template<typename Index , typename PrepFunctionType , typename FunctionType , typename AccumFunctionType > | |
bool | parallel_for (const Index loop_size, const PrepFunctionType &prep_func, const FunctionType &func, const AccumFunctionType &accum_func, const size_t min_parallel=0) |
Functional implementation of an open-mp style, parallel for loop with accumulation. | |
template<typename DerivedV , typename DerivedF , typename DerivedK > | |
void | parallel_transport_angles (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedV > &FN, const Eigen::MatrixXi &E2F, const Eigen::MatrixXi &F2E, Eigen::PlainObjectBase< DerivedK > &K) |
Given the per-face local bases computed via igl::local_basis, this function computes the angle between the two reference frames across each edge. | |
void | partition (const Eigen::MatrixXd &W, const int k, Eigen::Matrix< int, Eigen::Dynamic, 1 > &G, Eigen::Matrix< int, Eigen::Dynamic, 1 > &S, Eigen::Matrix< double, Eigen::Dynamic, 1 > &D) |
Partition vertices into groups based on each vertex's vector: vertices with similar coordinates (close in space) will be put in the same group. | |
template<typename T > | |
void | parula (const T f, T *rgb) |
Parula colormap like MATLAB's parula. | |
template<typename T > | |
void | parula (const T f, T &r, T &g, T &b) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedZ , typename DerivedC > | |
void | parula (const Eigen::MatrixBase< DerivedZ > &Z, const bool normalize, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedZ , typename DerivedC > | |
void | parula (const Eigen::MatrixBase< DerivedZ > &Z, const double min_Z, const double max_Z, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedI , typename DerivedE > | |
void | path_to_edges (const Eigen::MatrixBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedE > &E, bool make_loop=false) |
Given a path as an ordered list of N>=2 vertex indices I[0], I[1], ..., I[N-1] construct a list of edges [[I[0],I[1]], [I[1],I[2]], ..., [I[N-2], I[N-1]]] connecting each sequential pair of vertices. | |
template<typename Index , typename DerivedE > | |
void | path_to_edges (const std::vector< Index > &I, Eigen::PlainObjectBase< DerivedE > &E, bool make_loop=false) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
std::string | path_to_executable () |
Path to current executable. | |
void | pathinfo (const std::string &path, std::string &dirname, std::string &basename, std::string &extension, std::string &filename) |
Function like PHP's pathinfo to return information about path. | |
template<typename DerivedV , typename DerivedF , typename DerivedCN > | |
void | per_corner_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const typename DerivedV::Scalar corner_threshold_degrees, Eigen::PlainObjectBase< DerivedCN > &CN) |
Compute per corner normals for a triangle mesh by computing the area-weighted average of normals at incident faces whose normals deviate less than the provided threshold. | |
template<typename DerivedV , typename DerivedF , typename DerivedVF , typename DerivedNI , typename DerivedCN > | |
void | per_corner_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const typename DerivedV::Scalar corner_threshold_degrees, const Eigen::MatrixBase< DerivedVF > &VF, const Eigen::MatrixBase< DerivedNI > &NI, Eigen::PlainObjectBase< DerivedCN > &CN) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedCI , typename DerivedCC , typename DerivedCN > | |
void | per_corner_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedCI > &CI, const Eigen::MatrixBase< DerivedCC > &CC, Eigen::PlainObjectBase< DerivedCN > &CN) |
template<typename DerivedNV , typename DerivedNF , typename DerivedCN > | |
void | per_corner_normals (const Eigen::MatrixBase< DerivedNV > &NV, const Eigen::MatrixBase< DerivedNF > &NF, Eigen::PlainObjectBase< DerivedCN > &CN) |
Given indexed normals (e.g., read from a .obj file), explode into per-corner normals (e.g., as expected by igl::opengl::ViewerData) | |
template<typename DerivedV , typename DerivedI , typename DerivedC , typename DerivedN , typename DerivedVV , typename DerivedFF , typename DerivedJ , typename DerivedNN > | |
void | per_corner_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedC > &C, const typename DerivedV::Scalar corner_threshold_degrees, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedVV > &VV, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedNN > &NN) |
Per-corner normals for a polygon mesh. | |
template<typename DerivedV , typename DerivedF , typename DerivedFN , typename DerivedN , typename DerivedE , typename DerivedEMAP > | |
void | per_edge_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const PerEdgeNormalsWeightingType weight, const Eigen::MatrixBase< DerivedFN > &FN, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedEMAP > &EMAP) |
Compute face normals via vertex position list, face list. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DerivedE , typename DerivedEMAP > | |
void | per_edge_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const PerEdgeNormalsWeightingType weight, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedEMAP > &EMAP) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DerivedE , typename DerivedEMAP > | |
void | per_edge_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedEMAP > &EMAP) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedZ , typename DerivedN > | |
void | per_face_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedZ > &Z, Eigen::PlainObjectBase< DerivedN > &N) |
Compute face normals via vertex position list, face list. | |
template<typename DerivedV , typename DerivedF , typename DerivedN > | |
void | per_face_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedN > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN > | |
void | per_face_normals_stable (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedN > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedI , typename DerivedC , typename DerivedN , typename DerivedVV , typename DerivedFF , typename DerivedJ > | |
void | per_face_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedVV > &VV, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedJ > &J) |
Per face normals for a general polygon mesh. | |
template<typename DerivedV , typename DerivedF > | |
void | per_vertex_attribute_smoothing (const Eigen::MatrixBase< DerivedV > &Ain, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedV > &Aout) |
Smooth vertex attributes using uniform Laplacian. | |
template<typename DerivedV , typename DerivedF , typename DerivedN > | |
void | per_vertex_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const igl::PerVertexNormalsWeightingType weighting, Eigen::PlainObjectBase< DerivedN > &N) |
Compute vertex normals via vertex position list, face list. | |
template<typename DerivedV , typename DerivedF , typename DerivedN > | |
void | per_vertex_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedN > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedFN , typename DerivedN > | |
void | per_vertex_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const PerVertexNormalsWeightingType weighting, const Eigen::MatrixBase< DerivedFN > &FN, Eigen::PlainObjectBase< DerivedN > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedFN , typename DerivedN > | |
void | per_vertex_normals (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedFN > &FN, Eigen::PlainObjectBase< DerivedN > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | per_vertex_point_to_plane_quadrics (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::MatrixXi &EMAP, const Eigen::MatrixXi &EF, const Eigen::MatrixXi &EI, std::vector< std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double > > &quadrics) |
Compute quadrics per vertex of a "closed" triangle mesh (V,F). | |
template<typename DerivedF , typename DeriveduE , typename DeriveduEC , typename DeriveduEE > | |
bool | piecewise_constant_winding_number (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DeriveduE > &uE, const Eigen::MatrixBase< DeriveduEC > &uEC, const Eigen::MatrixBase< DeriveduEE > &uEE) |
Determine if a given mesh induces a piecewise constant winding number field: Is this mesh valid input to solid set operations. | |
template<typename DerivedF > | |
bool | piecewise_constant_winding_number (const Eigen::MatrixBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedX > | |
void | pinv (const Eigen::MatrixBase< DerivedA > &A, typename DerivedA::Scalar tol, Eigen::PlainObjectBase< DerivedX > &X) |
Compute the Moore-Penrose pseudoinverse. | |
template<typename DerivedA , typename DerivedX > | |
void | pinv (const Eigen::MatrixBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedX > &X) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
void | planarize_quad_mesh (const Eigen::MatrixBase< DerivedV > &Vin, const Eigen::MatrixBase< DerivedF > &F, const int maxIter, const double &threshold, Eigen::PlainObjectBase< DerivedV > &Vout) |
Planarizes a given quad mesh using the algorithm described in the paper "Shape-Up: Shaping Discrete Geometry with Projections" by S. | |
bool | point_in_circle (const double qx, const double qy, const double cx, const double cy, const double r) |
Determine if 2d point is in a circle. | |
template<typename DerivedP , typename DerivedV , typename DerivedEle , typename DerivedsqrD , typename DerivedI , typename DerivedC > | |
void | point_mesh_squared_distance (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedEle > &Ele, Eigen::PlainObjectBase< DerivedsqrD > &sqrD, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C) |
Compute distances from a set of points P to a triangle mesh (V,F) | |
template<int DIM, typename Derivedp , typename DerivedV , typename DerivedEle , typename Derivedsqr_d , typename Derivedc > | |
void | point_simplex_squared_distance (const Eigen::MatrixBase< Derivedp > &p, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedEle > &Ele, const typename DerivedEle::Index i, Derivedsqr_d &sqr_d, Eigen::PlainObjectBase< Derivedc > &c) |
Determine squared distance from a point to linear simplex. | |
template<int DIM, typename Derivedp , typename DerivedV , typename DerivedEle , typename Derivedsqr_d , typename Derivedc , typename Derivedb > | |
void | point_simplex_squared_distance (const Eigen::MatrixBase< Derivedp > &p, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedEle > &Ele, const typename DerivedEle::Index i, Derivedsqr_d &sqr_d, Eigen::PlainObjectBase< Derivedc > &c, Eigen::PlainObjectBase< Derivedb > &b) |
Determine squared distance from a point to linear simplex. | |
template<typename DerivedA , typename DerivedR , typename DerivedT , typename DerivedU , typename DerivedS , typename DerivedV > | |
void | polar_dec (const Eigen::PlainObjectBase< DerivedA > &A, bool includeReflections, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedU > &U, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedV > &V) |
Computes the polar decomposition (R,T) of a matrix A. | |
template<typename DerivedA , typename DerivedR , typename DerivedT > | |
void | polar_dec (const Eigen::PlainObjectBase< DerivedA > &A, const bool includeReflections, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &T) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedR , typename DerivedT , typename DerivedU , typename DerivedS , typename DerivedV > | |
void | polar_dec (const Eigen::PlainObjectBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedU > &U, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedV > &V) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedR , typename DerivedT > | |
void | polar_dec (const Eigen::PlainObjectBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &T) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedR , typename DerivedT , typename DerivedU , typename DerivedS , typename DerivedV > | |
void | polar_svd (const Eigen::MatrixBase< DerivedA > &A, bool includeReflections, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedU > &U, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedV > &V) |
Computes the polar decomposition (R,T) of a matrix A using SVD singular value decomposition. | |
template<typename DerivedA , typename DerivedR , typename DerivedT > | |
void | polar_svd (const Eigen::MatrixBase< DerivedA > &A, const bool includeReflections, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &T) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedR , typename DerivedT , typename DerivedU , typename DerivedS , typename DerivedV > | |
void | polar_svd (const Eigen::MatrixBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedU > &U, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedV > &V) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedR , typename DerivedT > | |
void | polar_svd (const Eigen::MatrixBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &T) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Mat > | |
void | polar_svd3x3 (const Mat &A, Mat &R) |
Computes the closest rotation to input matrix A using specialized 3x3 SVD singular value decomposition (WunderSVD3x3) | |
template<typename PType , typename DerivedI , typename DerivedC > | |
void | polygon_corners (const std::vector< std::vector< PType > > &P, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C) |
Convert a list-of-lists polygon mesh faces representation to list of polygon corners and sizes. | |
template<typename DerivedQ , typename DerivedI , typename DerivedC > | |
void | polygon_corners (const Eigen::MatrixBase< DerivedQ > &Q, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedI , typename DerivedC , typename DerivedF , typename DerivedJ > | |
void | polygons_to_triangles (const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedJ > &J) |
Given a polygon mesh, trivially triangulate each polygon with a fan. | |
template<typename DerivedV , typename DerivedF , typename DerivedPD1 , typename DerivedPD2 , typename DerivedPV1 , typename DerivedPV2 > | |
void | principal_curvature (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedPD1 > &PD1, Eigen::PlainObjectBase< DerivedPD2 > &PD2, Eigen::PlainObjectBase< DerivedPV1 > &PV1, Eigen::PlainObjectBase< DerivedPV2 > &PV2, unsigned radius=5, bool useKring=true) |
Compute the principal curvature directions and magnitude of the given triangle mesh DerivedV derived from vertex positions matrix type: i.e. | |
template<typename DerivedV , typename DerivedF , typename DerivedPD1 , typename DerivedPD2 , typename DerivedPV1 , typename DerivedPV2 , typename Index > | |
void | principal_curvature (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedPD1 > &PD1, Eigen::PlainObjectBase< DerivedPD2 > &PD2, Eigen::PlainObjectBase< DerivedPV1 > &PV1, Eigen::PlainObjectBase< DerivedPV2 > &PV2, std::vector< Index > &bad_vertices, unsigned radius=5, bool useKring=true) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | print_ijv (const Eigen::SparseMatrix< T > &X, const int offset=0) |
Prints a 3 column matrix representing [I,J,V] = find(X). | |
template<typename T > | |
void | print_vector (std::vector< std::vector< T > > &v) |
template<typename T > | |
void | print_vector (std::vector< std::vector< std::vector< T > > > &v) |
template<typename DerivedX , typename DerivedY , typename Scalar , typename DerivedR , typename DerivedT > | |
void | procrustes (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedY > &Y, const bool includeScaling, const bool includeReflections, Scalar &scale, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &t) |
Solve Procrustes problem in d dimensions. | |
template<typename DerivedX , typename DerivedY , typename Scalar , int DIM, int TType> | |
void | procrustes (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedY > &Y, const bool includeScaling, const bool includeReflections, Eigen::Transform< Scalar, DIM, TType > &T) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename DerivedR , typename DerivedT > | |
void | procrustes (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedY > &Y, const bool includeScaling, const bool includeReflections, Eigen::PlainObjectBase< DerivedR > &S, Eigen::PlainObjectBase< DerivedT > &t) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename DerivedR , typename DerivedT > | |
void | procrustes (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedT > &t) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename Scalar , typename DerivedT > | |
void | procrustes (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedY > &Y, Eigen::Rotation2D< Scalar > &R, Eigen::PlainObjectBase< DerivedT > &t) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar > | |
Eigen::Matrix< Scalar, 3, 1 > | project (const Eigen::Matrix< Scalar, 3, 1 > &obj, const Eigen::Matrix< Scalar, 4, 4 > &model, const Eigen::Matrix< Scalar, 4, 4 > &proj, const Eigen::Matrix< Scalar, 4, 1 > &viewport) |
Eigen reimplementation of gluProject. | |
template<typename DerivedV , typename DerivedM , typename DerivedN , typename DerivedO , typename DerivedP > | |
void | project (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedM > &model, const Eigen::MatrixBase< DerivedN > &proj, const Eigen::MatrixBase< DerivedO > &viewport, Eigen::PlainObjectBase< DerivedP > &P) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedU , typename DerivedUF , typename Scalar > | |
void | project_isometrically_to_plane (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedU > &U, Eigen::PlainObjectBase< DerivedUF > &UF, Eigen::SparseMatrix< Scalar > &I) |
Project each triangle to the plane. | |
template<typename DerivedP , typename DerivedS , typename DerivedD , typename Derivedt , typename DerivedsqrD > | |
void | project_to_line (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< DerivedD > &D, Eigen::PlainObjectBase< Derivedt > &t, Eigen::PlainObjectBase< DerivedsqrD > &sqrD) |
Project points onto vectors, that is find the parameter t for a point p such that proj_p = (y-x). | |
template<typename Scalar > | |
void | project_to_line (const Scalar px, const Scalar py, const Scalar pz, const Scalar sx, const Scalar sy, const Scalar sz, const Scalar dx, const Scalar dy, const Scalar dz, Scalar &projpx, Scalar &projpy, Scalar &projpz, Scalar &t, Scalar &sqrd) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar > | |
void | project_to_line (const Scalar px, const Scalar py, const Scalar pz, const Scalar sx, const Scalar sy, const Scalar sz, const Scalar dx, const Scalar dy, const Scalar dz, Scalar &t, Scalar &sqrd) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedP , typename DerivedS , typename DerivedD , typename Derivedt , typename DerivedsqrD > | |
void | project_to_line_segment (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< DerivedD > &D, Eigen::PlainObjectBase< Derivedt > &t, Eigen::PlainObjectBase< DerivedsqrD > &sqrD) |
Project points onto vectors, that is find the parameter t for a point p such that proj_p = (y-x). | |
template<typename DerivedUV , typename DerivedM , typename DerivedVP , typename DerivedA , typename DerivedB > | |
void | projection_constraint (const Eigen::MatrixBase< DerivedUV > &UV, const Eigen::MatrixBase< DerivedM > &M, const Eigen::MatrixBase< DerivedVP > &VP, Eigen::PlainObjectBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedB > &B) |
Construct two constraint equations for projecting a point to the screen. | |
template<typename DerivedV , typename DerivedF , typename DerivedFN , typename DerivedVN , typename DerivedEN , typename DerivedEMAP , typename Derivedq , typename Derivedc , typename Scalar , typename Derivedn > | |
void | pseudonormal_test (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedFN > &FN, const Eigen::MatrixBase< DerivedVN > &VN, const Eigen::MatrixBase< DerivedEN > &EN, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const Eigen::MatrixBase< Derivedq > &q, const int f, Eigen::PlainObjectBase< Derivedc > &c, Scalar &s, Eigen::PlainObjectBase< Derivedn > &n) |
Given a mesh (V,F), a query point q, and a point on (V,F) c, determine whether q is inside (V,F) --> s=-1 or outside (V,F) s=1, based on the sign of the dot product between (q-c) and n, where n is the normal at c, carefully chosen according to [Bærentzen & Aanæs 2005]. | |
template<typename DerivedV , typename DerivedF , typename DerivedEN , typename DerivedVN , typename Derivedq , typename Derivedc , typename Scalar , typename Derivedn > | |
void | pseudonormal_test (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &E, const Eigen::MatrixBase< DerivedEN > &EN, const Eigen::MatrixBase< DerivedVN > &VN, const Eigen::MatrixBase< Derivedq > &q, const int e, Eigen::PlainObjectBase< Derivedc > &c, Scalar &s, Eigen::PlainObjectBase< Derivedn > &n) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename DerivedX , typename DerivedLB , typename DerivedUB > | |
Scalar | pso (const std::function< Scalar(DerivedX &) > f, const Eigen::MatrixBase< DerivedLB > &LB, const Eigen::MatrixBase< DerivedUB > &UB, const int max_iters, const int population, DerivedX &X) |
Global optimization with the particle swarm algorithm. | |
template<typename Scalar , typename DerivedX , typename DerivedLB , typename DerivedUB , typename DerivedP > | |
Scalar | pso (const std::function< Scalar(DerivedX &) > f, const Eigen::MatrixBase< DerivedLB > &LB, const Eigen::MatrixBase< DerivedUB > &UB, const Eigen::DenseBase< DerivedP > &P, const int max_iters, const int population, DerivedX &X) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | qslim (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const size_t max_m, Eigen::MatrixXd &U, Eigen::MatrixXi &G, Eigen::VectorXi &J, Eigen::VectorXi &I) |
Decimate (simplify) a triangle mesh in nD according to the paper "Simplifying Surfaces with Color and Texture using Quadric Error Metrics" by [Garland and Heckbert, 1987] (technically a followup to qslim). | |
template<typename DerivedV , typename DerivedQ , typename DerivedE > | |
void | quad_grid (const int nx, const int ny, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedQ > &Q, Eigen::PlainObjectBase< DerivedE > &E) |
template<typename DerivedQ , typename DerivedE > | |
void | quad_grid (const int nx, const int ny, Eigen::PlainObjectBase< DerivedQ > &Q, Eigen::PlainObjectBase< DerivedE > &E) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedP > | |
void | quad_planarity (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedP > &P) |
Compute planarity of the faces of a quad mesh. | |
template<typename Scalar , int n, int ni> | |
Eigen::Matrix< Scalar, n, 1 > | quadprog (const Eigen::Matrix< Scalar, n, n > &H, const Eigen::Matrix< Scalar, n, 1 > &f, const Eigen::Matrix< Scalar, ni, n > &Ai, const Eigen::Matrix< Scalar, ni, 1 > &lbi, const Eigen::Matrix< Scalar, ni, 1 > &ubi, const Eigen::Matrix< Scalar, n, 1 > &lb, const Eigen::Matrix< Scalar, n, 1 > &ub) |
Solve a convex quadratic program. | |
template<typename Scalar , int n, int m> | |
Eigen::Matrix< Scalar, n, 1 > | quadprog (const Eigen::Matrix< Scalar, n, n > &H, const Eigen::Matrix< Scalar, n, 1 > &f, const Eigen::Matrix< Scalar, m, n > &A, const Eigen::Matrix< Scalar, m, 1 > &b, const Eigen::Matrix< Scalar, n, 1 > &lb, const Eigen::Matrix< Scalar, n, 1 > &ub) |
Solve a convex quadratic program. | |
template<typename Scalar , int n> | |
Eigen::Matrix< Scalar, n, 1 > | quadprog (const Eigen::Matrix< Scalar, n, n > &H, const Eigen::Matrix< Scalar, n, 1 > &f, const Eigen::Matrix< Scalar, n, 1 > &lb, const Eigen::Matrix< Scalar, n, 1 > &ub) |
Solve a convex quadratic program. | |
std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double > | operator+ (const std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double > &a, const std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double > &b) |
A binary addition operator for Quadric tuples compatible with qslim, computing c = a+b. | |
template<typename Q_type > | |
void | quat_conjugate (const Q_type *q1, Q_type *out) |
Compute conjugate of given quaternion http://en.wikipedia.org/wiki/Quaternion#Conjugation.2C_the_norm.2C_and_reciprocal A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w. | |
template<typename Q_type > | |
void | quat_mult (const Q_type *q1, const Q_type *q2, Q_type *out) |
Computes out = q1 * q2 with quaternion multiplication A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w. | |
template<typename Q_type > | |
void | quat_to_axis_angle (const Q_type *q, Q_type *axis, Q_type &angle) |
Convert quat representation of a rotation to axis angle A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w. | |
template<typename Q_type > | |
void | quat_to_axis_angle_deg (const Q_type *q, Q_type *axis, Q_type &angle) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.include/igl/quat_to_axis_angle.h. | |
template<typename Q_type > | |
void | quat_to_mat (const Q_type *quat, Q_type *mat) |
Convert a quaternion to a 4x4 matrix A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w. | |
void | quats_to_column (const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > vQ, Eigen::VectorXd &Q) |
"Columnize" a list of quaternions (q1x,q1y,q1z,q1w,q2x,q2y,q2z,q2w,...) | |
Eigen::VectorXd | quats_to_column (const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > vQ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedP , typename DerivedS , typename DerivedJ > | |
void | ramer_douglas_peucker (const Eigen::MatrixBase< DerivedP > &P, const typename DerivedP::Scalar tol, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedJ > &J) |
Ramer-Douglas-Peucker piecewise-linear curve simplification. | |
template<typename DerivedP , typename DerivedS , typename DerivedJ , typename DerivedQ > | |
void | ramer_douglas_peucker (const Eigen::MatrixBase< DerivedP > &P, const typename DerivedP::Scalar tol, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedQ > &Q) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Eigen::Vector3d | random_dir () |
Generate a uniformly random unit direction in 3D, return as vector. | |
Eigen::MatrixXd | random_dir_stratified (const int n) |
Generate n stratified uniformly random unit directions in 3d, return as rows of an n by 3 matrix. | |
template<typename DerivedV , typename DerivedF , typename DerivedB , typename DerivedFI , typename DerivedX , typename URBG = DEFAULT_URBG> | |
void | random_points_on_mesh (const int n, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedFI > &FI, Eigen::PlainObjectBase< DerivedX > &X, URBG &&urbg=igl::generate_default_urbg()) |
Randomly sample a mesh (V,F) n times. | |
template<typename DeriveddblA , typename DerivedB , typename DerivedFI , typename URBG = DEFAULT_URBG> | |
void | random_points_on_mesh_intrinsic (const int n, const Eigen::MatrixBase< DeriveddblA > &dblA, Eigen::PlainObjectBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedFI > &FI, URBG &&urbg=igl::generate_default_urbg()) |
Randomly sample a mesh (V,F) n times. | |
template<typename DeriveddblA , typename DerivedF , typename ScalarB , typename DerivedFI , typename URBG > | |
void | random_points_on_mesh_intrinsic (const int n, const Eigen::MatrixBase< DeriveddblA > &dblA, const int num_vertices, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< ScalarB > &B, Eigen::PlainObjectBase< DerivedFI > &FI, URBG &&urbg) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar > | |
Eigen::Quaternion< Scalar > | random_quaternion () |
Generate a random quaternion via uniform sampling of the 4-sphere. | |
template<typename Scalar , typename DerivedX , typename DerivedLB , typename DerivedUB > | |
Scalar | random_search (const std::function< Scalar(DerivedX &) > f, const Eigen::MatrixBase< DerivedLB > &LB, const Eigen::MatrixBase< DerivedUB > &UB, const int iters, DerivedX &X) |
Global optimization via random search. | |
template<typename DerivedI , typename URBG = DEFAULT_URBG> | |
void | randperm (const int n, Eigen::PlainObjectBase< DerivedI > &I, URBG &&urbg=igl::generate_default_urbg()) |
Like matlab's randperm(n) but minus 1. | |
template<typename Derivedsource , typename Deriveddir , typename Scalar > | |
bool | ray_box_intersect (const Eigen::MatrixBase< Derivedsource > &source, const Eigen::MatrixBase< Deriveddir > &dir, const Eigen::AlignedBox< Scalar, 3 > &box, const Scalar &t0, const Scalar &t1, Scalar &tmin, Scalar &tmax) |
Determine whether a ray origin+t*dir and box intersect within the ray's parameterized range (t0,t1) | |
template<typename Derivedsource , typename Deriveddir , typename Scalar > | |
bool | ray_box_intersect (const Eigen::MatrixBase< Derivedsource > &source, const Eigen::MatrixBase< Deriveddir > &inv_dir, const Eigen::MatrixBase< Deriveddir > &inv_dir_pad, const Eigen::AlignedBox< Scalar, 3 > &box, const Scalar &t0, const Scalar &t1, Scalar &tmin, Scalar &tmax) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedsource , typename Deriveddir , typename DerivedV , typename DerivedF > | |
bool | ray_mesh_intersect (const Eigen::MatrixBase< Derivedsource > &source, const Eigen::MatrixBase< Deriveddir > &dir, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, std::vector< igl::Hit > &hits) |
Shoot a ray against a mesh (V,F) and collect all hits. | |
template<typename Derivedsource , typename Deriveddir , typename DerivedV , typename DerivedF > | |
bool | ray_mesh_intersect (const Eigen::MatrixBase< Derivedsource > &source, const Eigen::MatrixBase< Deriveddir > &dir, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, igl::Hit &hit) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedsource , typename Deriveddir , typename DerivedV , typename DerivedF > | |
bool | ray_triangle_intersect (const Eigen::MatrixBase< Derivedsource > &source, const Eigen::MatrixBase< Deriveddir > &dir, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const int f, igl::Hit &hit) |
template<typename Derivedo , typename Derivedd , typename Derivedc , typename r_type , typename t_type > | |
int | ray_sphere_intersect (const Eigen::PlainObjectBase< Derivedo > &o, const Eigen::PlainObjectBase< Derivedd > &d, const Eigen::PlainObjectBase< Derivedc > &c, r_type r, t_type &t0, t_type &t1) |
Compute the intersection between a ray from O in direction D and a sphere centered at C with radius r. | |
void | read_file_binary (FILE *fp, std::vector< uint8_t > &fileBufferBytes) |
Read contents of file into a buffer of uint8_t bytes. | |
template<typename DerivedV , typename DerivedF > | |
bool | read_triangle_mesh (const std::string str, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
Read mesh from an ascii file with automatic detection of file format among: mesh, msh obj, off, ply, stl, wrl. | |
template<typename Scalar , typename Index > | |
bool | read_triangle_mesh (const std::string str, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | read_triangle_mesh (const std::string str, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, std::string &dir, std::string &base, std::string &ext, std::string &name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | read_triangle_mesh (const std::string &ext, FILE *fp, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedWI , typename DerivedP , typename DerivedO > | |
bool | readBF (const std::string &filename, Eigen::PlainObjectBase< DerivedWI > &WI, Eigen::PlainObjectBase< DerivedP > &P, Eigen::PlainObjectBase< DerivedO > &O) |
Read a bones forest from a file, returns a list of bone roots. | |
template<typename DerivedWI , typename DerivedbfP , typename DerivedO , typename DerivedC , typename DerivedBE , typename DerivedP > | |
bool | readBF (const std::string &filename, Eigen::PlainObjectBase< DerivedWI > &WI, Eigen::PlainObjectBase< DerivedbfP > &bfP, Eigen::PlainObjectBase< DerivedO > &O, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedBE > &BE, Eigen::PlainObjectBase< DerivedP > &P) |
Read bone forest into pure bone-skeleton format, expects only bones (no point handles), and that a root in the .bf <—> no weight attachment. | |
template<typename Scalar > | |
bool | readCSV (const std::string str, Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > &M) |
read a matrix from a csv file into a Eigen matrix | |
template<typename DerivedW > | |
bool | readDMAT (const std::string file_name, Eigen::PlainObjectBase< DerivedW > &W) |
Read a matrix from an .dmat file. | |
template<typename Scalar > | |
bool | readDMAT (const std::string file_name, std::vector< std::vector< Scalar > > &W) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedT > | |
bool | readMESH (const std::string mesh_file_name, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedF > &F) |
Load a tetrahedral volume mesh from a .mesh file. | |
template<typename Scalar , typename Index > | |
bool | readMESH (const std::string mesh_file_name, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &T, std::vector< std::vector< Index > > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedT > | |
bool | readMESH (FILE *mesh_file, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
bool | readMESH (FILE *mesh_file, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &T, std::vector< std::vector< Index > > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<int EigenMatrixOptions> | |
bool | readMSH (const std::string &msh, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &X, Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &Tri, Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &Tet, Eigen::VectorXi &TriTag, Eigen::VectorXi &TetTag, std::vector< std::string > &XFields, std::vector< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > > &XF, std::vector< std::string > &EFields, std::vector< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > > &TriF, std::vector< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > > &TetF) |
read triangle surface mesh and tetrahedral volume mesh from .msh file | |
template<int EigenMatrixOptions> | |
bool | readMSH (const std::string &msh, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &X, Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &Tri, Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &Tet, Eigen::VectorXi &TriTag, Eigen::VectorXi &TetTag) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<int EigenMatrixOptions> | |
bool | readMSH (const std::string &msh, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &X, Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &Tri, Eigen::VectorXi &TriTag) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<int EigenMatrixOptions> | |
bool | readMSH (const std::string &msh, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &X, Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > &Tri) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedI > | |
bool | readNODE (const std::string node_file_name, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedI > &I) |
load a list of points from a .node file | |
template<typename Scalar , typename Index > | |
bool | readNODE (const std::string node_file_name, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
bool | readOBJ (const std::string obj_file_name, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Scalar > > &TC, std::vector< std::vector< Scalar > > &N, std::vector< std::vector< Index > > &F, std::vector< std::vector< Index > > &FTC, std::vector< std::vector< Index > > &FN, std::vector< std::tuple< std::string, Index, Index > > &FM) |
Read a mesh from an ascii obj file, filling in vertex positions, normals and texture coordinates. | |
template<typename Scalar , typename Index > | |
bool | readOBJ (const std::string obj_file_name, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Scalar > > &TC, std::vector< std::vector< Scalar > > &N, std::vector< std::vector< Index > > &F, std::vector< std::vector< Index > > &FTC, std::vector< std::vector< Index > > &FN) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
bool | readOBJ (FILE *obj_file, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Scalar > > &TC, std::vector< std::vector< Scalar > > &N, std::vector< std::vector< Index > > &F, std::vector< std::vector< Index > > &FTC, std::vector< std::vector< Index > > &FN, std::vector< std::tuple< std::string, Index, Index > > &FM) |
template<typename Scalar , typename Index > | |
bool | readOBJ (const std::string obj_file_name, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedTC , typename DerivedCN , typename DerivedF , typename DerivedFTC , typename DerivedFN > | |
bool | readOBJ (const std::string str, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedTC > &TC, Eigen::PlainObjectBase< DerivedCN > &CN, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedFTC > &FTC, Eigen::PlainObjectBase< DerivedFN > &FN) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | readOBJ (const std::string str, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedI , typename DerivedC > | |
bool | readOBJ (const std::string str, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
bool | readOFF (const std::string off_file_name, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &F, std::vector< std::vector< Scalar > > &N, std::vector< std::vector< Scalar > > &C) |
Read a mesh from an ascii OFF file, filling in vertex positions, normals and texture coordinates. | |
template<typename DerivedV , typename DerivedF > | |
bool | readOFF (const std::string str, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | readOFF (const std::string str, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedV > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
bool | readOFF (FILE *off_file, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &F, std::vector< std::vector< Scalar > > &N, std::vector< std::vector< Scalar > > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedN , typename DerivedUV , typename DerivedVD , typename DerivedFD , typename DerivedED > | |
bool | readPLY (std::istream &ply_stream, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedF > &E, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedUV > &UV, Eigen::PlainObjectBase< DerivedVD > &VD, std::vector< std::string > &Vheader, Eigen::PlainObjectBase< DerivedFD > &FD, std::vector< std::string > &Fheader, Eigen::PlainObjectBase< DerivedED > &ED, std::vector< std::string > &Eheader, std::vector< std::string > &comments) |
Read triangular mesh from ply file, filling in vertex positions, normals and texture coordinates, if available also read additional properties associated with vertex,faces and edges and file comments. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedN , typename DerivedUV , typename DerivedVD , typename DerivedFD , typename DerivedED > | |
bool | readPLY (const std::string &ply_file, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedUV > &UV, Eigen::PlainObjectBase< DerivedVD > &VD, std::vector< std::string > &VDheader, Eigen::PlainObjectBase< DerivedFD > &FD, std::vector< std::string > &FDheader, Eigen::PlainObjectBase< DerivedED > &ED, std::vector< std::string > &EDheader, std::vector< std::string > &comments) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DerivedUV , typename DerivedVD > | |
bool | readPLY (const std::string &filename, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedUV > &UV, Eigen::PlainObjectBase< DerivedVD > &VD, std::vector< std::string > &Vheader) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedN , typename DerivedUV > | |
bool | readPLY (const std::string &filename, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedUV > &UV) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | readPLY (const std::string &filename, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedE > | |
bool | readPLY (const std::string &filename, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | readPLY (FILE *fp, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN > | |
bool | readSTL (std::istream &input, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedN > &N) |
Read a mesh from an ascii/binary stl file. | |
template<typename TypeV , typename TypeF , typename TypeN > | |
bool | readSTL (std::istream &input, std::vector< std::array< TypeV, 3 > > &V, std::vector< std::array< TypeF, 3 > > &F, std::vector< std::array< TypeN, 3 > > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN > | |
bool | readSTL (FILE *fp, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedN > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | readTGF (const std::string tgf_filename, std::vector< std::vector< double > > &C, std::vector< std::vector< int > > &E, std::vector< int > &P, std::vector< std::vector< int > > &BE, std::vector< std::vector< int > > &CE, std::vector< std::vector< int > > &PE) |
Read a graph from a .tgf file. | |
bool | readTGF (const std::string tgf_filename, Eigen::MatrixXd &C, Eigen::MatrixXi &E, Eigen::VectorXi &P, Eigen::MatrixXi &BE, Eigen::MatrixXi &CE, Eigen::MatrixXi &PE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | readTGF (const std::string tgf_filename, Eigen::MatrixXd &C, Eigen::MatrixXi &E) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
bool | readWRL (const std::string wrl_file_name, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &F) |
Read a mesh from an ascii wrl file, filling in vertex positions and face indices of the first model. | |
template<typename Scalar , typename Index > | |
bool | readWRL (FILE *wrl_file, std::vector< std::vector< Scalar > > &V, std::vector< std::vector< Index > > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename AType , typename Func , typename DerivedB > | |
void | redux (const Eigen::SparseMatrix< AType > &A, const int dim, const Func &func, Eigen::PlainObjectBase< DerivedB > &B) |
Perform reductions on the rows or columns of a SparseMatrix. | |
template<typename DerivedV , typename DerivedF , typename DerivedS , typename DerivedU , typename DerivedG , typename DerivedJ , typename BCtype , typename DerivedSU , typename DerivedL > | |
void | remesh_along_isoline (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedS > &S, const typename DerivedS::Scalar val, Eigen::PlainObjectBase< DerivedU > &U, Eigen::PlainObjectBase< DerivedG > &G, Eigen::PlainObjectBase< DerivedSU > &SU, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::SparseMatrix< BCtype > &BC, Eigen::PlainObjectBase< DerivedL > &L) |
Given a triangle mesh and a scalar field, remesh so that a given isovalue of the scalar field follows (new) edges of the output mesh. | |
template<typename DerivedF , typename DerivedS , typename DerivedG , typename DerivedJ , typename BCtype , typename DerivedSU , typename DerivedL > | |
void | remesh_along_isoline (const int n, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedS > &S, const typename DerivedS::Scalar val, Eigen::PlainObjectBase< DerivedG > &G, Eigen::PlainObjectBase< DerivedSU > &SU, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::SparseMatrix< BCtype > &BC, Eigen::PlainObjectBase< DerivedL > &L) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedSV , typename DerivedSVI , typename DerivedSVJ > | |
void | remove_duplicate_vertices (const Eigen::MatrixBase< DerivedV > &V, const double epsilon, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSVI > &SVI, Eigen::PlainObjectBase< DerivedSVJ > &SVJ) |
Remove duplicate vertices upto a uniqueness tolerance (epsilon) | |
template<typename DerivedV , typename DerivedF , typename DerivedSV , typename DerivedSVI , typename DerivedSVJ , typename DerivedSF > | |
void | remove_duplicate_vertices (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const double epsilon, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSVI > &SVI, Eigen::PlainObjectBase< DerivedSVJ > &SVJ, Eigen::PlainObjectBase< DerivedSF > &SF) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedNV , typename DerivedNF , typename DerivedI , typename DerivedJ > | |
void | remove_unreferenced (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedNV > &NV, Eigen::PlainObjectBase< DerivedNF > &NF, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedJ > &J) |
Remove unreferenced vertices from V, updating F accordingly. | |
template<typename DerivedV , typename DerivedF , typename DerivedNV , typename DerivedNF , typename DerivedI > | |
void | remove_unreferenced (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedNV > &NV, Eigen::PlainObjectBase< DerivedNF > &NF, Eigen::PlainObjectBase< DerivedI > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedI , typename DerivedJ > | |
void | remove_unreferenced (const size_t n, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | repdiag (const Eigen::SparseMatrix< T > &A, const int d, Eigen::SparseMatrix< T > &B) |
Repeat a matrix along the diagonal a certain number of times, so that if A is a m by n matrix and we want to repeat along the diagonal d times, we get a m*d by n*d matrix B such that: B( (k*m+1):(k*m+1+m-1), (k*n+1):(k*n+1+n-1)) = A for k from 0 to d-1. | |
template<typename T > | |
void | repdiag (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &A, const int d, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &B) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<class Mat > | |
Mat | repdiag (const Mat &A, const int d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedB > | |
void | repmat (const Eigen::MatrixBase< DerivedA > &A, const int r, const int c, Eigen::PlainObjectBase< DerivedB > &B) |
Replicate and tile a matrix. | |
template<typename T , int majorType> | |
void | repmat (const Eigen::SparseMatrix< T, majorType > &A, const int r, const int c, Eigen::SparseMatrix< T, majorType > &B) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF1 , typename DerivedF2 , typename DerivedJ > | |
void | resolve_duplicated_faces (const Eigen::MatrixBase< DerivedF1 > &F1, Eigen::PlainObjectBase< DerivedF2 > &F2, Eigen::PlainObjectBase< DerivedJ > &J) |
Resolve duplicated faces according to the following rules per unique face: | |
template<typename R , typename H > | |
void | rgb_to_hsv (const R *rgb, H *hsv) |
Convert RGB to HSV. | |
template<typename DerivedR , typename DerivedH > | |
void | rgb_to_hsv (const Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedH > &H) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedP , typename DerivedN , typename DerivedR , typename Derivedt > | |
void | rigid_alignment (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< Derivedt > &t) |
Find the rigid transformation that best aligns the 3D points X to their corresponding points P with associated normals N. | |
template<typename Q_type > | |
void | rotate_by_quat (const Q_type *v, const Q_type *q, Q_type *out) |
Compute rotation of a given vector/point by a quaternion A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w. | |
Eigen::MatrixXd | rotate_vectors (const Eigen::MatrixXd &V, const Eigen::VectorXd &A, const Eigen::MatrixXd &B1, const Eigen::MatrixXd &B2) |
Rotate the vectors V by A radians on the tangent plane spanned by B1 and B2. | |
template<typename Scalar > | |
Eigen::Matrix< Scalar, 3, 3 > | rotation_matrix_from_directions (const Eigen::Matrix< Scalar, 3, 1 > v0, const Eigen::Matrix< Scalar, 3, 1 > v1) |
Given 2 vectors centered on origin calculate the rotation matrix from first to the second. | |
template<typename DerivedX > | |
DerivedX | round (const DerivedX r) |
Round a scalar value. | |
template<typename DerivedX , typename DerivedY > | |
void | round (const Eigen::PlainObjectBase< DerivedX > &X, Eigen::PlainObjectBase< DerivedY > &Y) |
Round a given matrix to nearest integers. | |
template<class Row , class Mat > | |
bool | rows_to_matrix (const std::vector< Row > &V, Mat &M) |
Convert a list (std::vector) of row vectors of the same length to a matrix. | |
void | sample_edges (const Eigen::MatrixXd &V, const Eigen::MatrixXi &E, const int k, Eigen::MatrixXd &S) |
Compute k extra points along each edge in E defined over vertices of V. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedOE , typename ScalarG > | |
void | scalar_to_cr_vector_gradient (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarG > &G) |
Computes the gradient matrix with hat functions on the right, and vector CR functions on the left. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedOE , typename ScalarG > | |
void | scalar_to_cr_vector_gradient (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarG > &G) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedL_sq , typename DeriveddA , typename DerivedE , typename DerivedOE , typename ScalarG > | |
void | scalar_to_cr_vector_gradient_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< DeriveddA > &dA, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarG > &G) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedL_sq , typename DerivedE , typename DerivedOE , typename ScalarG > | |
void | scalar_to_cr_vector_gradient_intrinsic (const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedL_sq > &l_sq, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedOE > &oE, Eigen::SparseMatrix< ScalarG > &G) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. include/igl/scalar_to_cr_vector_gradient.h. | |
template<typename DerivedV , typename DerivedF , typename DerivedM , typename DerivedN , typename DerivedO , typename Ltype , typename DerivedW , typename Deriveda > | |
void | screen_space_selection (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const igl::AABB< DerivedV, 3 > &tree, const Eigen::MatrixBase< DerivedM > &model, const Eigen::MatrixBase< DerivedN > &proj, const Eigen::MatrixBase< DerivedO > &viewport, const std::vector< Eigen::Matrix< Ltype, 1, 2 > > &L, Eigen::PlainObjectBase< DerivedW > &W, Eigen::PlainObjectBase< Deriveda > &and_visible) |
Given a mesh, a camera determine which points are inside of a given 2D screen space polygon culling points based on self-occlusion. | |
template<typename DerivedV , typename DerivedM , typename DerivedN , typename DerivedO , typename Ltype , typename DerivedW > | |
void | screen_space_selection (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedM > &model, const Eigen::MatrixBase< DerivedN > &proj, const Eigen::MatrixBase< DerivedO > &viewport, const std::vector< Eigen::Matrix< Ltype, 1, 2 > > &L, Eigen::PlainObjectBase< DerivedW > &W) |
Given a mesh, a camera determine which points are inside of a given 2D screen space polygon. | |
template<typename DerivedV , typename DerivedM , typename DerivedN , typename DerivedO , typename DerivedP , typename DerivedE , typename DerivedW > | |
void | screen_space_selection (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedM > &model, const Eigen::MatrixBase< DerivedN > &proj, const Eigen::MatrixBase< DerivedO > &viewport, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedW > &W) |
Given a mesh, a camera determine which points are inside of a given 2D screen space polygon. | |
template<typename DerivedV , typename DerivedTC , typename DerivedF , typename DerivedFTC , typename Derivedseams , typename Derivedboundaries , typename Derivedfoldovers > | |
void | seam_edges (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedTC > &TC, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedFTC > &FTC, Eigen::PlainObjectBase< Derivedseams > &seams, Eigen::PlainObjectBase< Derivedboundaries > &boundaries, Eigen::PlainObjectBase< Derivedfoldovers > &foldovers) |
Finds all UV-space boundaries of a mesh. | |
template<typename DerivedSource , typename DerivedDir > | |
bool | segment_segment_intersect (const Eigen::MatrixBase< DerivedSource > &p, const Eigen::MatrixBase< DerivedDir > &r, const Eigen::MatrixBase< DerivedSource > &q, const Eigen::MatrixBase< DerivedDir > &s, double &t, double &u, double eps=1e-6) |
Determine whether two line segments A,B intersect. | |
template<typename T > | |
bool | serialize (const T &obj, const std::string &filename) |
template<typename T > | |
bool | serialize (const T &obj, const std::string &objectName, const std::string &filename, bool overwrite=false) |
template<typename T > | |
bool | serialize (const T &obj, const std::string &objectName, std::vector< char > &buffer) |
template<typename T > | |
bool | deserialize (T &obj, const std::string &filename) |
template<typename T > | |
bool | deserialize (T &obj, const std::string &objectName, const std::string &filename) |
template<typename T > | |
bool | deserialize (T &obj, const std::string &objectName, const std::vector< char > &buffer) |
template<typename T > | |
bool | serializer (bool serialize, T &obj, const std::string &filename) |
template<typename T > | |
bool | serializer (bool serialize, T &obj, const std::string &objectName, const std::string &filename, bool overwrite=false) |
template<typename T > | |
bool | serializer (bool serialize, T &obj, const std::string &objectName, std::vector< char > &buffer) |
template<typename DerivedA , typename DerivedB , typename DerivedC , typename DerivedIA > | |
void | setdiff (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedIA > &IA) |
Set difference of elements of matrices. | |
template<typename DerivedA , typename DerivedB , typename DerivedC , typename DerivedIA , typename DerivedIB > | |
void | setunion (const Eigen::DenseBase< DerivedA > &A, const Eigen::DenseBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedIA > &IA, Eigen::PlainObjectBase< DerivedIB > &IB) |
Union of elements of matrices (like matlab's union ) | |
template<typename DerivedA , typename DerivedB , typename DerivedC , typename DerivedIA , typename DerivedIB > | |
void | setxor (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedIA > &IA, Eigen::PlainObjectBase< DerivedIB > &IB) |
Set xor of elements of matrices. | |
template<typename DerivedP , typename DerivedN , typename DerivedS > | |
void | shape_diameter_function (const std::function< double(const Eigen::Vector3f &, const Eigen::Vector3f &) > &shoot_ray, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const int num_samples, Eigen::PlainObjectBase< DerivedS > &S) |
Compute shape diamater function per given point. | |
template<typename DerivedV , int DIM, typename DerivedF , typename DerivedP , typename DerivedN , typename DerivedS > | |
void | shape_diameter_function (const igl::AABB< DerivedV, DIM > &aabb, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const int num_samples, Eigen::PlainObjectBase< DerivedS > &S) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedP , typename DerivedN , typename DerivedS > | |
void | shape_diameter_function (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const int num_samples, Eigen::PlainObjectBase< DerivedS > &S) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedS > | |
void | shape_diameter_function (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const bool per_face, const int num_samples, Eigen::PlainObjectBase< DerivedS > &S) |
bool | shapeup_identity_projection (const Eigen::PlainObjectBase< Eigen::MatrixXd > &P, const Eigen::PlainObjectBase< Eigen::VectorXi > &SC, const Eigen::PlainObjectBase< Eigen::MatrixXi > &S, Eigen::PlainObjectBase< Eigen::MatrixXd > &projP) |
This projection does nothing but render points into projP. | |
bool | shapeup_regular_face_projection (const Eigen::PlainObjectBase< Eigen::MatrixXd > &P, const Eigen::PlainObjectBase< Eigen::VectorXi > &SC, const Eigen::PlainObjectBase< Eigen::MatrixXi > &S, Eigen::PlainObjectBase< Eigen::MatrixXd > &projP) |
the projection assumes that the sets are vertices of polygons in cyclic order | |
template<typename DerivedP , typename DerivedSC , typename DerivedS , typename Derivedw > | |
bool | shapeup_precomputation (const Eigen::PlainObjectBase< DerivedP > &P, const Eigen::PlainObjectBase< DerivedSC > &SC, const Eigen::PlainObjectBase< DerivedS > &S, const Eigen::PlainObjectBase< DerivedS > &E, const Eigen::PlainObjectBase< DerivedSC > &b, const Eigen::PlainObjectBase< Derivedw > &wShape, const Eigen::PlainObjectBase< Derivedw > &wSmooth, ShapeupData &sudata) |
This function precomputation the necessary matrices for the ShapeUp process, and prefactorizes them. | |
template<typename DerivedP , typename DerivedSC , typename DerivedS > | |
bool | shapeup_solve (const Eigen::PlainObjectBase< DerivedP > &bc, const std::function< bool(const Eigen::PlainObjectBase< DerivedP > &, const Eigen::PlainObjectBase< DerivedSC > &, const Eigen::PlainObjectBase< DerivedS > &, Eigen::PlainObjectBase< DerivedP > &)> &local_projection, const Eigen::PlainObjectBase< DerivedP > &P0, const ShapeupData &sudata, const bool quietIterations, Eigen::PlainObjectBase< DerivedP > &P) |
This function solve the shapeup project optimization. | |
template<typename DerivedV , typename DerivedF , typename DerivedSE , typename DerivedE , typename DeriveduE , typename DerivedEMAP , typename uE2Etype , typename sharptype > | |
void | sharp_edges (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const typename DerivedV::Scalar angle, Eigen::PlainObjectBase< DerivedSE > &SE, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DeriveduE > &uE, Eigen::PlainObjectBase< DerivedEMAP > &EMAP, std::vector< std::vector< uE2Etype > > &uE2E, std::vector< sharptype > &sharp) |
Given a mesh, compute sharp edges. | |
template<typename DerivedV , typename DerivedF , typename DerivedSE > | |
void | sharp_edges (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const typename DerivedV::Scalar angle, Eigen::PlainObjectBase< DerivedSE > &SE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | shortest_edge_and_midpoint (const int e, const Eigen::MatrixXd &V, const Eigen::MatrixXi &, const Eigen::MatrixXi &E, const Eigen::VectorXi &, const Eigen::MatrixXi &, const Eigen::MatrixXi &, double &cost, Eigen::RowVectorXd &p) |
Cost and placement function compatible with igl::decimate. | |
template<typename DerivedA , typename DerivedB , typename DerivedP > | |
DerivedA::Scalar | signed_angle (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedP > &P) |
Compute the signed angle subtended by the oriented 3d triangle (A,B,C) at some point P. | |
template<typename DerivedP , typename DerivedV , typename DerivedF , typename DerivedS , typename DerivedI , typename DerivedC , typename DerivedN > | |
void | signed_distance (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const SignedDistanceType sign_type, const typename DerivedV::Scalar lower_bound, const typename DerivedV::Scalar upper_bound, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedN > &N) |
Computes signed distance to a mesh. | |
template<typename DerivedP , typename DerivedV , typename DerivedF , typename DerivedS , typename DerivedI , typename DerivedC , typename DerivedN > | |
void | signed_distance (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const SignedDistanceType sign_type, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedN > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedFN , typename DerivedVN , typename DerivedEN , typename DerivedEMAP , typename Derivedq > | |
DerivedV::Scalar | signed_distance_pseudonormal (const AABB< DerivedV, 3 > &tree, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedFN > &FN, const Eigen::MatrixBase< DerivedVN > &VN, const Eigen::MatrixBase< DerivedEN > &EN, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const Eigen::MatrixBase< Derivedq > &q) |
Computes signed distance to mesh using pseudonormal with precomputed AABB tree and edge/vertice normals. | |
template<typename DerivedP , typename DerivedV , typename DerivedF , typename DerivedFN , typename DerivedVN , typename DerivedEN , typename DerivedEMAP , typename DerivedS , typename DerivedI , typename DerivedC , typename DerivedN > | |
void | signed_distance_pseudonormal (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const AABB< DerivedV, 3 > &tree, const Eigen::MatrixBase< DerivedFN > &FN, const Eigen::MatrixBase< DerivedVN > &VN, const Eigen::MatrixBase< DerivedEN > &EN, const Eigen::MatrixBase< DerivedEMAP > &EMAP, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedN > &N) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.include/igl/signed_distance.h. | |
template<typename DerivedV , typename DerivedF , typename DerivedFN , typename DerivedVN , typename DerivedEN , typename DerivedEMAP , typename Derivedq , typename Scalar , typename Derivedc , typename Derivedn > | |
void | signed_distance_pseudonormal (const AABB< DerivedV, 3 > &tree, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedFN > &FN, const Eigen::MatrixBase< DerivedVN > &VN, const Eigen::MatrixBase< DerivedEN > &EN, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const Eigen::MatrixBase< Derivedq > &q, Scalar &s, Scalar &sqrd, int &i, Eigen::PlainObjectBase< Derivedc > &c, Eigen::PlainObjectBase< Derivedn > &n) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedE , typename DerivedEN , typename DerivedVN , typename Derivedq , typename Scalar , typename Derivedc , typename Derivedn > | |
void | signed_distance_pseudonormal (const AABB< DerivedV, 2 > &tree, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedEN > &EN, const Eigen::MatrixBase< DerivedVN > &VN, const Eigen::MatrixBase< Derivedq > &q, Scalar &s, Scalar &sqrd, int &i, Eigen::PlainObjectBase< Derivedc > &c, Eigen::PlainObjectBase< Derivedn > &n) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename Derivedq > | |
DerivedV::Scalar | signed_distance_winding_number (const AABB< DerivedV, 3 > &tree, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const igl::WindingNumberAABB< Derivedq, DerivedV, DerivedF > &hier, const Eigen::MatrixBase< Derivedq > &q) |
Computes signed distance to mesh using winding number with precomputed AABB. | |
template<typename DerivedV , typename DerivedF , typename Derivedq , typename Scalar , typename Derivedc > | |
void | signed_distance_winding_number (const AABB< DerivedV, 3 > &tree, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const igl::WindingNumberAABB< Derivedq, DerivedV, DerivedF > &hier, const Eigen::MatrixBase< Derivedq > &q, Scalar &s, Scalar &sqrd, int &i, Eigen::PlainObjectBase< Derivedc > &c) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename Derivedq , typename Scalar , typename Derivedc > | |
void | signed_distance_winding_number (const AABB< DerivedV, 2 > &tree, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedq > &q, Scalar &s, Scalar &sqrd, int &i, Eigen::PlainObjectBase< Derivedc > &c) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedP , typename DerivedV , typename DerivedF , typename DerivedS > | |
void | signed_distance_fast_winding_number (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const AABB< DerivedV, 3 > &tree, const igl::FastWindingNumberBVH &fwn_bvh, Eigen::PlainObjectBase< DerivedS > &S) |
Calculates signed distance at query points P, using fast winding number for sign. | |
template<typename Derivedq , typename DerivedV , typename DerivedF > | |
DerivedV::Scalar | signed_distance_fast_winding_number (const Eigen::MatrixBase< Derivedq > &q, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const AABB< DerivedV, 3 > &tree, const igl::FastWindingNumberBVH &fwn_bvh) |
Calculates signed distance at query point q, using fast winding number for sign. | |
void | simplify_polyhedron (const Eigen::MatrixXd &OV, const Eigen::MatrixXi &OF, Eigen::MatrixXd &V, Eigen::MatrixXi &F, Eigen::VectorXi &J) |
Simplify a polyhedron represented as a triangle mesh (OV,OF) by collapsing any edge that doesn't contribute to defining surface's pointset. | |
template<typename TX , typename TY , typename DerivedR , typename DerivedC > | |
void | slice (const Eigen::SparseMatrix< TX > &X, const Eigen::DenseBase< DerivedR > &R, const Eigen::DenseBase< DerivedC > &C, Eigen::SparseMatrix< TY > &Y) |
Act like the matlab X(row_indices,col_indices) operator, where row_indices, col_indices are non-negative integer indices. | |
template<typename MatX , typename DerivedR , typename MatY > | |
void | slice (const MatX &X, const Eigen::DenseBase< DerivedR > &R, const int dim, MatY &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<class T > | |
void | slice (const std::vector< T > &X, std::vector< size_t > const &R, std::vector< T > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename DerivedR > | |
void | slice (const Eigen::DenseBase< DerivedX > &X, const Eigen::DenseBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedY > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedR , typename DerivedC , typename DerivedY > | |
void | slice (const Eigen::DenseBase< DerivedX > &X, const Eigen::DenseBase< DerivedR > &R, const Eigen::DenseBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedY > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedR > | |
DerivedX | slice (const Eigen::DenseBase< DerivedX > &X, const Eigen::DenseBase< DerivedR > &R) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedR > | |
DerivedX | slice (const Eigen::DenseBase< DerivedX > &X, const Eigen::DenseBase< DerivedR > &R, const int dim) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename TX , typename TY , typename DerivedI > | |
void | slice_cached_precompute (const Eigen::SparseMatrix< TX > &X, const Eigen::Matrix< int, Eigen::Dynamic, 1 > &R, const Eigen::Matrix< int, Eigen::Dynamic, 1 > &C, Eigen::MatrixBase< DerivedI > &data, Eigen::SparseMatrix< TY > &Y) |
Act like the matlab X(row_indices,col_indices) operator, where row_indices, col_indices are non-negative integer indices. | |
template<typename TX , typename TY , typename DerivedI > | |
void | slice_cached (const Eigen::SparseMatrix< TX > &X, const Eigen::MatrixBase< DerivedI > &data, Eigen::SparseMatrix< TY > &Y) |
Slice X by cached C,R indices into Y. | |
template<typename T , typename DerivedR , typename DerivedC > | |
void | slice_into (const Eigen::SparseMatrix< T > &X, const Eigen::MatrixBase< DerivedR > &R, const Eigen::MatrixBase< DerivedC > &C, Eigen::SparseMatrix< T > &Y) |
Act like the matlab Y(row_indices,col_indices) = X. | |
template<typename MatX , typename MatY , typename DerivedR > | |
void | slice_into (const MatX &X, const Eigen::MatrixBase< DerivedR > &R, const int dim, MatY &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename DerivedR , typename DerivedC > | |
void | slice_into (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedR > &R, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedY > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedR , typename DerivedY > | |
void | slice_into (const Eigen::MatrixBase< DerivedX > &X, const Eigen::MatrixBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedY > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename XType , typename YType > | |
void | slice_mask (const Eigen::SparseMatrix< XType > &X, const Eigen::Array< bool, Eigen::Dynamic, 1 > &R, const Eigen::Array< bool, Eigen::Dynamic, 1 > &C, Eigen::SparseMatrix< YType > &Y) |
Act like the matlab X(row_mask,col_mask) operator, where row_mask, col_mask are non-negative integer indices. | |
template<typename XType , typename YType > | |
void | slice_mask (const Eigen::SparseMatrix< XType > &X, const Eigen::Array< bool, Eigen::Dynamic, 1 > &R, const int dim, Eigen::SparseMatrix< YType > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY > | |
void | slice_mask (const Eigen::DenseBase< DerivedX > &X, const Eigen::Array< bool, Eigen::Dynamic, 1 > &R, const Eigen::Array< bool, Eigen::Dynamic, 1 > &C, Eigen::PlainObjectBase< DerivedY > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY > | |
void | slice_mask (const Eigen::DenseBase< DerivedX > &X, const Eigen::Array< bool, Eigen::Dynamic, 1 > &R, const int dim, Eigen::PlainObjectBase< DerivedY > &Y) |
template<typename DerivedX > | |
DerivedX | slice_mask (const Eigen::DenseBase< DerivedX > &X, const Eigen::Array< bool, Eigen::Dynamic, 1 > &R, const Eigen::Array< bool, Eigen::Dynamic, 1 > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX > | |
DerivedX | slice_mask (const Eigen::DenseBase< DerivedX > &X, const Eigen::Array< bool, Eigen::Dynamic, 1 > &R, const int dim) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename TX , typename TY , typename DerivedR , typename DerivedC > | |
void | slice_sorted (const Eigen::SparseMatrix< TX > &X, const Eigen::DenseBase< DerivedR > &R, const Eigen::DenseBase< DerivedC > &C, Eigen::SparseMatrix< TY > &Y) |
Act like the matlab X(row_indices,col_indices) operator, where row_indices, col_indices are non-negative integer indices. | |
void | slim_precompute (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::MatrixXd &V_init, SLIMData &data, MappingEnergyType slim_energy, const Eigen::VectorXi &b, const Eigen::MatrixXd &bc, double soft_p) |
Compute necessary information to start using SLIM. | |
Eigen::MatrixXd | slim_solve (SLIMData &data, int iter_num) |
Run iter_num iterations of SLIM. | |
void | slim_update_weights_and_closest_rotations_with_jacobians (const Eigen::MatrixXd &Ji, igl::MappingEnergyType slim_energy, double exp_factor, Eigen::MatrixXd &W, Eigen::MatrixXd &Ri) |
Internal Routine. | |
void | slim_buildA (const Eigen::SparseMatrix< double > &Dx, const Eigen::SparseMatrix< double > &Dy, const Eigen::SparseMatrix< double > &Dz, const Eigen::MatrixXd &W, std::vector< Eigen::Triplet< double > > &IJV) |
Undocumented function related to SLIM optimization. | |
void | smooth_corner_adjacency (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const double corner_threshold_radians, Eigen::VectorXi &CI, Eigen::VectorXi &CC) |
Determine the corner-to-face adjacency relationship that can be used for computing crease-aware per-corner normals. | |
void | smooth_corner_adjacency (const Eigen::MatrixXi &FV, const Eigen::MatrixXi &FN, Eigen::VectorXi &CI, Eigen::VectorXi &CC) |
Determine the effective corner-to-face adjacency relationship implied by a set of indexed vertex positions (FV) and normals (FV) (e.g., those read in from a .obj file). | |
template<typename DerivedC , typename DerivedV , typename DerivedI , typename DerivedminD , typename DerivedVI > | |
void | snap_points (const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedminD > &minD, Eigen::PlainObjectBase< DerivedVI > &VI) |
Snap list of points C to closest of another list of points V. | |
template<typename DerivedC , typename DerivedV , typename DerivedI , typename DerivedminD > | |
void | snap_points (const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedminD > &minD) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedC , typename DerivedV , typename DerivedI > | |
void | snap_points (const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedI > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalarq , typename Scalars > | |
bool | snap_to_canonical_view_quat (const Eigen::Quaternion< Scalarq > &q, const double threshold, Eigen::Quaternion< Scalars > &s) |
Snap the quaternion q to the nearest canonical view quaternion. | |
template<typename Q_type > | |
bool | snap_to_canonical_view_quat (const Q_type *q, const Q_type threshold, Q_type *s) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Qtype > | |
void | snap_to_fixed_up (const Eigen::Quaternion< Qtype > &q, Eigen::Quaternion< Qtype > &s) |
Snap an arbitrary rotation to a rotation resulting from a rotation about the y-axis then the x-axis (maintaining fixed up like two_axis_valuator_fixed_up.) | |
template<typename DerivedA , typename DerivedB , typename DerivedC , typename DerivedP > | |
DerivedA::Scalar | solid_angle (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedP > &P) |
Compute the signed solid angle subtended by the oriented 3d triangle (A,B,C) at some point P. | |
template<typename DerivedX , typename DerivedY , typename DerivedIX > | |
void | sort (const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedIX > &IX) |
Sort the elements of a matrix X along a given dimension like matlabs sort function. | |
template<typename DerivedX , typename DerivedY > | |
void | sort (const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename DerivedIX > | |
void | sort_new (const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedIX > &IX) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename DerivedIX > | |
void | sort2 (const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedIX > &IX) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename DerivedIX > | |
void | sort3 (const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedIX > &IX) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<class T > | |
void | sort (const std::vector< T > &unsorted, const bool ascending, std::vector< T > &sorted, std::vector< size_t > &index_map) |
Act like matlab's [Y,I] = SORT(X) for std library vectors. | |
template<typename DerivedM , typename DerivedR > | |
void | sort_angles (const Eigen::MatrixBase< DerivedM > &M, Eigen::PlainObjectBase< DerivedR > &R) |
Sort angles in ascending order in a numerically robust way. | |
template<typename DerivedV , typename DerivedF , typename DerivedMV , typename DerivedP , typename DerivedFF , typename DerivedI > | |
void | sort_triangles (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedMV > &MV, const Eigen::MatrixBase< DerivedP > &P, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedI > &I) |
Sort triangles by depth (from back to front) using a painter's algorithm. | |
template<typename DerivedS , typename DerivedI > | |
void | sort_vectors_ccw (const Eigen::PlainObjectBase< DerivedS > &P, const Eigen::PlainObjectBase< DerivedS > &N, Eigen::PlainObjectBase< DerivedI > &order, Eigen::PlainObjectBase< DerivedS > &sorted, Eigen::PlainObjectBase< DerivedI > &inv_order) |
Sorts a set of N coplanar vectors in a ccw order, and returns their order. | |
template<typename DerivedS , typename DerivedI > | |
void | sort_vectors_ccw (const Eigen::PlainObjectBase< DerivedS > &P, const Eigen::PlainObjectBase< DerivedS > &N, Eigen::PlainObjectBase< DerivedI > &order, Eigen::PlainObjectBase< DerivedS > &sorted) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedS , typename DerivedI > | |
void | sort_vectors_ccw (const Eigen::PlainObjectBase< DerivedS > &P, const Eigen::PlainObjectBase< DerivedS > &N, Eigen::PlainObjectBase< DerivedI > &order, Eigen::PlainObjectBase< DerivedI > &inv_order) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedS , typename DerivedI > | |
void | sort_vectors_ccw (const Eigen::PlainObjectBase< DerivedS > &P, const Eigen::PlainObjectBase< DerivedS > &N, Eigen::PlainObjectBase< DerivedI > &order) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedX , typename DerivedY , typename DerivedI > | |
void | sortrows (const Eigen::DenseBase< DerivedX > &X, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedI > &I) |
Act like matlab's [Y,I] = sortrows(X) | |
template<typename DerivedX , typename DerivedY > | |
void | sortrows (const Eigen::DenseBase< DerivedX > &X, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<class IndexVectorI , class IndexVectorJ , class ValueVector , typename T > | |
void | sparse (const IndexVectorI &I, const IndexVectorJ &J, const ValueVector &V, const size_t m, const size_t n, Eigen::SparseMatrix< T > &X) |
Build a sparse matrix from list of indices and values (I,J,V), functions like the sparse function in matlab. | |
template<class IndexVector , class ValueVector , typename T > | |
void | sparse (const IndexVector &I, const IndexVector &J, const ValueVector &V, Eigen::SparseMatrix< T > &X) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedD , typename T > | |
void | sparse (const Eigen::PlainObjectBase< DerivedD > &D, Eigen::SparseMatrix< T > &X) |
Convert a full, dense matrix to a sparse one. | |
template<typename DerivedD > | |
Eigen::SparseMatrix< typename DerivedD::Scalar > | sparse (const Eigen::PlainObjectBase< DerivedD > &D) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedI , typename Scalar > | |
void | sparse_cached_precompute (const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedI > &J, Eigen::VectorXi &data, Eigen::SparseMatrix< Scalar > &X) |
Build a sparse matrix from list of indices and values (I,J,V), similarly to the sparse function in matlab. | |
template<typename Scalar > | |
void | sparse_cached_precompute (const std::vector< Eigen::Triplet< Scalar > > &triplets, Eigen::VectorXi &data, Eigen::SparseMatrix< Scalar > &X) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar > | |
void | sparse_cached (const std::vector< Eigen::Triplet< Scalar > > &triplets, const Eigen::VectorXi &data, Eigen::SparseMatrix< Scalar > &X) |
Build a sparse matrix from cached list of data and values. | |
template<typename DerivedV , typename Scalar > | |
void | sparse_cached (const Eigen::MatrixBase< DerivedV > &V, const Eigen::VectorXi &data, Eigen::SparseMatrix< Scalar > &X) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedP0 , typename Func , typename DerivedS , typename DerivedV , typename DerivedI > | |
void | sparse_voxel_grid (const Eigen::MatrixBase< DerivedP0 > &p0, const Func &scalarFunc, const double eps, const int expected_number_of_cubes, Eigen::PlainObjectBase< DerivedS > &CS, Eigen::PlainObjectBase< DerivedV > &CV, Eigen::PlainObjectBase< DerivedI > &CI) |
Given a point, p0, on an isosurface, construct a shell of epsilon sized cubes surrounding the surface. | |
template<typename T > | |
void | speye (const int n, const int m, Eigen::SparseMatrix< T > &I) |
Builds an m by n sparse identity matrix like matlab's speye function. | |
template<typename T > | |
void | speye (const int n, Eigen::SparseMatrix< T > &I) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedSF , typename DerivedSVI > | |
void | split_nonmanifold (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedSF > &SF, Eigen::PlainObjectBase< DerivedSVI > &SVI) |
Split a non-manifold (or non-orientable) mesh into a orientable manifold mesh possibly with more connected components and geometrically duplicate vertices. | |
template<typename DerivedV , typename DerivedF , typename DerivedSV , typename DerivedSF , typename DerivedSVI > | |
void | split_nonmanifold (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSF > &SF, Eigen::PlainObjectBase< DerivedSVI > &SVI) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedL > | |
void | squared_edge_lengths (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedL > &L) |
Constructs a list of squared lengths of edges opposite each index in a face (triangle/tet) list. | |
bool | stdin_to_temp (FILE **temp_file) |
Write stdin/piped input to a temporary file which can than be preprocessed as it is (a normal file). | |
template<typename DerivedV , typename DerivedF , typename DerivedVT , typename DerivedFT , typename Scalar , typename DerivedUE , typename DerivedUT , typename DerivedOT > | |
void | straighten_seams (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedVT > &VT, const Eigen::MatrixBase< DerivedFT > &FT, const Scalar tol, Eigen::PlainObjectBase< DerivedUE > &UE, Eigen::PlainObjectBase< DerivedUT > &UT, Eigen::PlainObjectBase< DerivedOT > &OT) |
Given a obj-style mesh with (V,F) defining the geometric surface of the mesh and (VT,FT) defining the parameterization/texture-mapping of the mesh in the uv-domain, find all seams and boundaries in the texture-mapping and "straighten" them, remapping vertices along the boundary and in the interior. | |
bool | starts_with (const std::string &str, const std::string &prefix) |
Check if a string starts with a given prefix. | |
bool | starts_with (const char *str, const char *prefix) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.include/igl/string_utils.h. | |
template<typename T > | |
void | sum (const Eigen::SparseMatrix< T > &X, const int dim, Eigen::SparseVector< T > &S) |
Sum the columns or rows of a sparse matrix. | |
template<typename AType , typename DerivedB > | |
void | sum (const Eigen::SparseMatrix< AType > &A, const int dim, Eigen::PlainObjectBase< DerivedB > &B) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | svd3x3 (const Eigen::Matrix< T, 3, 3 > &A, Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 1 > &S, Eigen::Matrix< T, 3, 3 > &V) |
Super fast 3x3 SVD according to http://pages.cs.wisc.edu/~sifakis/project_pages/svd.html The resulting decomposition is A = U * diag(S[0], S[1], S[2]) * V'. | |
template<typename T > | |
void | svd3x3_avx (const Eigen::Matrix< T, 3 *8, 3 > &A, Eigen::Matrix< T, 3 *8, 3 > &U, Eigen::Matrix< T, 3 *8, 1 > &S, Eigen::Matrix< T, 3 *8, 3 > &V) |
Super fast 3x3 SVD according to http://pages.cs.wisc.edu/~sifakis/project_pages/svd.html This is AVX version of svd3x3 (see svd3x3.h) which works on 8 matrices at a time These eight matrices are simply stacked in columns, the rest is the same as for svd3x3. | |
template<typename T > | |
void | svd3x3_sse (const Eigen::Matrix< T, 3 *4, 3 > &A, Eigen::Matrix< T, 3 *4, 3 > &U, Eigen::Matrix< T, 3 *4, 1 > &S, Eigen::Matrix< T, 3 *4, 3 > &V) |
void | swept_volume (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const std::function< Eigen::Affine3d(const double t)> &transform, const size_t steps, const size_t grid_res, const size_t isolevel, Eigen::MatrixXd &SV, Eigen::MatrixXi &SF) |
Compute the surface of the swept volume of a solid object with surface (V,F) mesh under going rigid motion. | |
void | swept_volume_bounding_box (const size_t &n, const std::function< Eigen::RowVector3d(const size_t vi, const double t)> &V, const size_t &steps, Eigen::AlignedBox3d &box) |
Construct an axis-aligned bounding box containing a shape undergoing a motion sampled at steps discrete momements. | |
void | swept_volume_signed_distance (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const std::function< Eigen::Affine3d(const double t)> &transform, const size_t &steps, const Eigen::MatrixXd &GV, const Eigen::RowVector3i &res, const double h, const double isolevel, const Eigen::VectorXd &S0, Eigen::VectorXd &S) |
Compute the signed distance to a sweep surface of a mesh under-going an arbitrary motion V(t) discretely sampled at steps -many moments in time at a grid. | |
void | swept_volume_signed_distance (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const std::function< Eigen::Affine3d(const double t)> &transform, const size_t &steps, const Eigen::MatrixXd &GV, const Eigen::RowVector3i &res, const double h, const double isolevel, Eigen::VectorXd &S) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar > | |
Scalar | tan_half_angle (const Scalar &a, const Scalar &b, const Scalar &c) |
Compute the tangent of half of the angle opposite the side with length a, in a triangle with side lengths (a,b,c). | |
template<typename DerivedT , typename DerivedTT , typename DerivedTTi > | |
void | tet_tet_adjacency (const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedTT > &TT, Eigen::PlainObjectBase< DerivedTTi > &TTi) |
Constructs the tet_tet adjacency matrix for a given tet mesh with tets T. | |
template<typename DerivedT , typename DerivedTT > | |
void | tet_tet_adjacency (const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< DerivedTT > &TT) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedGV , typename DerivedGT > | |
void | tetrahedralized_grid (const int nx, const int ny, const int nz, const TetrahedralizedGripType type, Eigen::PlainObjectBase< DerivedGV > &GV, Eigen::PlainObjectBase< DerivedGT > >) |
Construct vertices of a regular grid, suitable for input to igl::marching_tets | |
template<typename Derivedside , typename DerivedGT > | |
void | tetrahedralized_grid (const Eigen::MatrixBase< Derivedside > &side, const TetrahedralizedGripType type, Eigen::PlainObjectBase< DerivedGT > >) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename VectorIndex , typename DerivedF_filled > | |
void | topological_hole_fill (const Eigen::MatrixBase< DerivedF > &F, const std::vector< VectorIndex > &holes, Eigen::PlainObjectBase< DerivedF_filled > &F_filled) |
Topological fill hole on a mesh, with one additional vertex each hole Index of new abstract vertices will be F.maxCoeff() + (index of hole) | |
template<typename Q_type > | |
void | trackball (const double w, const double h, const Q_type speed_factor, const double down_mouse_x, const double down_mouse_y, const double mouse_x, const double mouse_y, Q_type *quat) |
Applies a trackball drag to identity. | |
template<typename Q_type > | |
void | trackball (const double w, const double h, const Q_type speed_factor, const Q_type *down_quat, const double down_mouse_x, const double down_mouse_y, const double mouse_x, const double mouse_y, Q_type *quat) |
Applies a trackball drag to a given rotation. | |
template<typename Scalardown_quat , typename Scalarquat > | |
void | trackball (const double w, const double h, const double speed_factor, const Eigen::Quaternion< Scalardown_quat > &down_quat, const double down_mouse_x, const double down_mouse_y, const double mouse_x, const double mouse_y, Eigen::Quaternion< Scalarquat > &quat) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | transpose_blocks (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &A, const size_t k, const size_t dim, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &B) |
Transpose blocks of a matrix. | |
template<typename DerivedP1 , typename DerivedQ1 , typename DerivedR1 , typename DerivedP2 , typename DerivedQ2 , typename DerivedR2 > | |
bool | tri_tri_overlap_test_3d (const Eigen::MatrixBase< DerivedP1 > &p1, const Eigen::MatrixBase< DerivedQ1 > &q1, const Eigen::MatrixBase< DerivedR1 > &r1, const Eigen::MatrixBase< DerivedP2 > &p2, const Eigen::MatrixBase< DerivedQ2 > &q2, const Eigen::MatrixBase< DerivedR2 > &r2) |
template<typename DerivedP1 , typename DerivedQ1 , typename DerivedR1 , typename DerivedP2 , typename DerivedQ2 , typename DerivedR2 , typename DerivedS , typename DerivedT > | |
bool | tri_tri_intersection_test_3d (const Eigen::MatrixBase< DerivedP1 > &p1, const Eigen::MatrixBase< DerivedQ1 > &q1, const Eigen::MatrixBase< DerivedR1 > &r1, const Eigen::MatrixBase< DerivedP2 > &p2, const Eigen::MatrixBase< DerivedQ2 > &q2, const Eigen::MatrixBase< DerivedR2 > &r2, bool &coplanar, Eigen::MatrixBase< DerivedS > &source, Eigen::MatrixBase< DerivedT > &target) |
template<typename DerivedP1 , typename DerivedQ1 , typename DerivedR1 , typename DerivedP2 , typename DerivedQ2 , typename DerivedR2 > | |
bool | tri_tri_overlap_test_2d (const Eigen::MatrixBase< DerivedP1 > &p1, const Eigen::MatrixBase< DerivedQ1 > &q1, const Eigen::MatrixBase< DerivedR1 > &r1, const Eigen::MatrixBase< DerivedP2 > &p2, const Eigen::MatrixBase< DerivedQ2 > &q2, const Eigen::MatrixBase< DerivedR2 > &r2) |
template<typename DerivedE , typename Derivedcap > | |
void | triangle_fan (const Eigen::MatrixBase< DerivedE > &E, Eigen::PlainObjectBase< Derivedcap > &cap) |
Given a list of faces tessellate all of the "exterior" edges forming another list of. | |
Eigen::MatrixXi | triangle_fan (const Eigen::MatrixXi &E) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedTT , typename DerivedTTi > | |
void | triangle_triangle_adjacency (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedTT > &TT, Eigen::PlainObjectBase< DerivedTTi > &TTi) |
Constructs the triangle-triangle adjacency matrix for a given mesh (V,F). | |
template<typename DerivedF , typename DerivedTT > | |
void | triangle_triangle_adjacency (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedTT > &TT) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename TTT_type > | |
void | triangle_triangle_adjacency_preprocess (const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< TTT_type > > &TTT) |
Preprocessing for triangle_triangle_adjacency. | |
template<typename DerivedF , typename TTT_type , typename DerivedTT > | |
void | triangle_triangle_adjacency_extractTT (const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< TTT_type > > &TTT, Eigen::PlainObjectBase< DerivedTT > &TT) |
Extract the face adjacencies for triangle_triangle_adjacency. | |
template<typename DerivedF , typename TTT_type , typename DerivedTTi > | |
void | triangle_triangle_adjacency_extractTTi (const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< TTT_type > > &TTT, Eigen::PlainObjectBase< DerivedTTi > &TTi) |
Extract the face adjacencies indices for triangle_triangle_adjacency. | |
template<typename DerivedF , typename TTIndex , typename TTiIndex > | |
void | triangle_triangle_adjacency (const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< std::vector< TTIndex > > > &TT, std::vector< std::vector< std::vector< TTiIndex > > > &TTi) |
Adjacency list version, which works with non-manifold meshes. | |
template<typename DerivedF , typename TTIndex > | |
void | triangle_triangle_adjacency (const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< std::vector< TTIndex > > > &TT) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename TTIndex , typename TTiIndex > | |
void | triangle_triangle_adjacency (const Eigen::MatrixBase< DerivedF > &F, const bool construct_TTi, std::vector< std::vector< std::vector< TTIndex > > > &TT, std::vector< std::vector< std::vector< TTiIndex > > > &TTi) |
template<typename DerivedE , typename DerivedEMAP , typename uE2EType , typename TTIndex , typename TTiIndex > | |
void | triangle_triangle_adjacency (const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedEMAP > &EMAP, const std::vector< std::vector< uE2EType > > &uE2E, const bool construct_TTi, std::vector< std::vector< std::vector< TTIndex > > > &TT, std::vector< std::vector< std::vector< TTiIndex > > > &TTi) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename TTIndex , typename TTiIndex > | |
void | triangle_triangle_adjacency (const Eigen::MatrixBase< DerivedEMAP > &EMAP, const Eigen::MatrixBase< DeriveduEC > &uEC, const Eigen::MatrixBase< DeriveduEE > &uEE, const bool construct_TTi, std::vector< std::vector< std::vector< TTIndex > > > &TT, std::vector< std::vector< std::vector< TTiIndex > > > &TTi) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedS , typename DerivedF > | |
void | triangles_from_strip (const Eigen::MatrixBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedF > &F) |
Create a list of triangles from a stream of indices along a strip. | |
template<typename XType , typename YType , typename DerivedGV , typename DerivedGF > | |
void | triangulated_grid (const XType &nx, const YType &ny, Eigen::PlainObjectBase< DerivedGV > &GV, Eigen::PlainObjectBase< DerivedGF > &GF) |
Create a regular grid of elements (only 2D supported, currently) Vertex position order is compatible with igl::grid | |
template<typename XType , typename YType , typename DerivedGF > | |
void | triangulated_grid (const XType &nx, const YType &ny, Eigen::PlainObjectBase< DerivedGF > &GF) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV > | |
DerivedV::Scalar | turning_number (const Eigen::MatrixBase< DerivedV > &V) |
Compute the turning number of a closed curve in the plane. | |
template<typename Scalardown_quat , typename Scalarquat > | |
void | two_axis_valuator_fixed_up (const int w, const int h, const double speed, const Eigen::Quaternion< Scalardown_quat > &down_quat, const int down_x, const int down_y, const int mouse_x, const int mouse_y, Eigen::Quaternion< Scalarquat > &quat) |
Applies a two-axis valuator drag rotation (as seen in Maya/Studio max) to a given rotation. | |
void | uniformly_sample_two_manifold (const Eigen::MatrixXd &W, const Eigen::MatrixXi &F, const int k, const double push, Eigen::MatrixXd &WS) |
Attempt to sample a mesh uniformly with k-points by furthest point relaxation as described in "Fast Automatic Skinning Transformations" [Jacobson et al. | |
void | uniformly_sample_two_manifold_at_vertices (const Eigen::MatrixXd &W, const int k, const double push, Eigen::VectorXi &S) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.include/igl/uniformly_sample_two_manifold.h. | |
template<typename T > | |
void | unique (const std::vector< T > &A, std::vector< T > &C, std::vector< size_t > &IA, std::vector< size_t > &IC) |
Act like matlab's [C,IA,IC] = unique(X) | |
template<typename T > | |
void | unique (const std::vector< T > &A, std::vector< T > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedC , typename DerivedIA , typename DerivedIC > | |
void | unique (const Eigen::MatrixBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedIA > &IA, Eigen::PlainObjectBase< DerivedIC > &IC) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedC > | |
void | unique (const Eigen::MatrixBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedE , typename DeriveduE , typename DerivedEMAP , typename uE2EType > | |
void | unique_edge_map (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DeriveduE > &uE, Eigen::PlainObjectBase< DerivedEMAP > &EMAP, std::vector< std::vector< uE2EType > > &uE2E) |
Construct relationships between facet "half"-(or rather "viewed")-edges E to unique edges of the mesh seen as a graph. | |
template<typename DerivedF , typename DerivedE , typename DeriveduE , typename DerivedEMAP > | |
void | unique_edge_map (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DeriveduE > &uE, Eigen::PlainObjectBase< DerivedEMAP > &EMAP) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedE , typename DeriveduE , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE > | |
void | unique_edge_map (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DeriveduE > &uE, Eigen::PlainObjectBase< DerivedEMAP > &EMAP, Eigen::PlainObjectBase< DeriveduEC > &uEC, Eigen::PlainObjectBase< DeriveduEE > &uEE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedA , typename DerivedC , typename DerivedIA , typename DerivedIC > | |
void | unique_rows (const Eigen::DenseBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedIA > &IA, Eigen::PlainObjectBase< DerivedIC > &IC) |
Act like matlab's [C,IA,IC] = unique(X,'rows') | |
template<typename DerivedF , typename DerivedFF , typename DerivedIA , typename DerivedIC > | |
void | unique_simplices (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedIA > &IA, Eigen::PlainObjectBase< DerivedIC > &IC) |
Find combinatorially unique simplices in F. | |
template<typename DerivedF , typename DerivedFF > | |
void | unique_simplices (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedFF > &FF) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedwin , typename Derivedmodel , typename Derivedproj , typename Derivedviewport , typename Derivedscene > | |
void | unproject (const Eigen::MatrixBase< Derivedwin > &win, const Eigen::MatrixBase< Derivedmodel > &model, const Eigen::MatrixBase< Derivedproj > &proj, const Eigen::MatrixBase< Derivedviewport > &viewport, Eigen::PlainObjectBase< Derivedscene > &scene) |
Eigen reimplementation of gluUnproject. | |
template<typename Scalar > | |
Eigen::Matrix< Scalar, 3, 1 > | unproject (const Eigen::Matrix< Scalar, 3, 1 > &win, const Eigen::Matrix< Scalar, 4, 4 > &model, const Eigen::Matrix< Scalar, 4, 4 > &proj, const Eigen::Matrix< Scalar, 4, 1 > &viewport) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename Derivedobj > | |
int | unproject_in_mesh (const Eigen::Vector2f &pos, const Eigen::Matrix4f &model, const Eigen::Matrix4f &proj, const Eigen::Vector4f &viewport, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< Derivedobj > &obj, std::vector< igl::Hit > &hits) |
Unproject a screen location (using current opengl viewport, projection, and model view) to a 3D position inside a given mesh. | |
template<typename DerivedV , typename DerivedF , typename Derivedobj > | |
int | unproject_in_mesh (const Eigen::Vector2f &pos, const Eigen::Matrix4f &model, const Eigen::Matrix4f &proj, const Eigen::Vector4f &viewport, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< Derivedobj > &obj) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedobj > | |
int | unproject_in_mesh (const Eigen::Vector2f &pos, const Eigen::Matrix4f &model, const Eigen::Matrix4f &proj, const Eigen::Vector4f &viewport, const std::function< void(const Eigen::Vector3f &, const Eigen::Vector3f &, std::vector< igl::Hit > &) > &shoot_ray, Eigen::PlainObjectBase< Derivedobj > &obj, std::vector< igl::Hit > &hits) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedUV , typename DerivedM , typename DerivedVP , typename Derivedorigin , typename Deriveddir > | |
void | unproject_on_line (const Eigen::MatrixBase< DerivedUV > &UV, const Eigen::MatrixBase< DerivedM > &M, const Eigen::MatrixBase< DerivedVP > &VP, const Eigen::MatrixBase< Derivedorigin > &origin, const Eigen::MatrixBase< Deriveddir > &dir, typename DerivedUV::Scalar &t) |
Given a screen space point (u,v) and the current projection matrix (e.g. | |
template<typename DerivedUV , typename DerivedM , typename DerivedVP , typename Derivedorigin , typename Deriveddir , typename DerivedZ > | |
void | unproject_on_line (const Eigen::MatrixBase< DerivedUV > &UV, const Eigen::MatrixBase< DerivedM > &M, const Eigen::MatrixBase< DerivedVP > &VP, const Eigen::MatrixBase< Derivedorigin > &origin, const Eigen::MatrixBase< Deriveddir > &dir, Eigen::PlainObjectBase< DerivedZ > &Z) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedUV , typename DerivedM , typename DerivedVP , typename DerivedP , typename DerivedZ > | |
void | unproject_on_plane (const Eigen::MatrixBase< DerivedUV > &UV, const Eigen::MatrixBase< DerivedM > &M, const Eigen::MatrixBase< DerivedVP > &VP, const Eigen::MatrixBase< DerivedP > &P, Eigen::PlainObjectBase< DerivedZ > &Z) |
Given a screen space point (u,v) and the current projection matrix (e.g. | |
template<typename DerivedV , typename DerivedF , typename Derivedbc > | |
bool | unproject_onto_mesh (const Eigen::Vector2f &pos, const Eigen::Matrix4f &model, const Eigen::Matrix4f &proj, const Eigen::Vector4f &viewport, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, int &fid, Eigen::PlainObjectBase< Derivedbc > &bc) |
Unproject a screen location (using current opengl viewport, projection, and model view) to a 3D position onto a given mesh, if the ray through the given screen location (x,y) hits the mesh. | |
template<typename Derivedbc > | |
bool | unproject_onto_mesh (const Eigen::Vector2f &pos, const Eigen::Matrix4f &model, const Eigen::Matrix4f &proj, const Eigen::Vector4f &viewport, const std::function< bool(const Eigen::Vector3f &, const Eigen::Vector3f &, igl::Hit &) > &shoot_ray, int &fid, Eigen::PlainObjectBase< Derivedbc > &bc) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedpos , typename Derivedmodel , typename Derivedproj , typename Derivedviewport , typename Deriveds , typename Deriveddir > | |
void | unproject_ray (const Eigen::MatrixBase< Derivedpos > &pos, const Eigen::MatrixBase< Derivedmodel > &model, const Eigen::MatrixBase< Derivedproj > &proj, const Eigen::MatrixBase< Derivedviewport > &viewport, Eigen::PlainObjectBase< Deriveds > &s, Eigen::PlainObjectBase< Deriveddir > &dir) |
Construct a ray (source point + direction vector) given a screen space positions (e.g. | |
template<typename DerivedA , typename DerivedU , typename DerivedG , typename DerivedJ > | |
void | unzip_corners (const std::vector< std::reference_wrapper< DerivedA > > &A, Eigen::PlainObjectBase< DerivedU > &U, Eigen::PlainObjectBase< DerivedG > &G, Eigen::PlainObjectBase< DerivedJ > &J) |
Given a triangle mesh where corners of each triangle index different matrices of attributes (e.g. | |
template<typename DerivedF , typename SType , typename DerivedNF > | |
void | upsample (const int n_verts, const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< SType > &S, Eigen::PlainObjectBase< DerivedNF > &NF) |
Subdivide without moving vertices: Given the triangle mesh [V, F], where n_verts = V.rows(), computes newV and a sparse matrix S s.t. | |
template<typename DerivedV , typename DerivedF , typename DerivedNV , typename DerivedNF > | |
void | upsample (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedNV > &NV, Eigen::PlainObjectBase< DerivedNF > &NF, const int number_of_subdivs=1) |
Subdivide a mesh without moving vertices: loop subdivision but odd vertices stay put and even vertices are just edge midpoints. | |
template<typename MatV , typename MatF > | |
void | upsample (MatV &V, MatF &F, const int number_of_subdivs=1) |
template<typename DerivedF , typename Scalar > | |
void | vector_area_matrix (const Eigen::MatrixBase< DerivedF > &F, Eigen::SparseMatrix< Scalar > &A) |
Constructs the symmetric area matrix A, s.t. | |
int | verbose (const char *msg,...) |
Provide a wrapper for printf, called verbose that functions exactly like printf if VERBOSE is defined and does exactly nothing if VERBOSE is undefined. | |
template<typename DerivedA , typename DerivedC , typename Derivedcounts > | |
void | vertex_components (const Eigen::SparseCompressedBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< Derivedcounts > &counts) |
Compute connected components of a graph represented by an adjacency matrix. | |
template<typename DerivedA , typename DerivedC > | |
void | vertex_components (const Eigen::SparseCompressedBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedC > | |
void | vertex_components (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedC > &C) |
Compute the connected components for a mesh given its faces. | |
template<typename DerivedF , typename VFType , typename VFiType > | |
void | vertex_triangle_adjacency (const typename DerivedF::Scalar n, const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< VFType > > &VF, std::vector< std::vector< VFiType > > &VFi) |
vertex_face_adjacency constructs the vertex-face topology of a given mesh (V,F) | |
template<typename DerivedV , typename DerivedF , typename IndexType > | |
void | vertex_triangle_adjacency (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, std::vector< std::vector< IndexType > > &VF, std::vector< std::vector< IndexType > > &VFi) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedF , typename DerivedVF , typename DerivedNI > | |
void | vertex_triangle_adjacency (const Eigen::MatrixBase< DerivedF > &F, const int n, Eigen::PlainObjectBase< DerivedVF > &VF, Eigen::PlainObjectBase< DerivedNI > &NI) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedT , typename Derivedvol > | |
void | volume (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< Derivedvol > &vol) |
Compute volume for all tets of a given tet mesh (V,T) | |
template<typename DerivedA , typename DerivedB , typename DerivedC , typename DerivedD , typename Derivedvol > | |
void | volume (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedD > &D, Eigen::PlainObjectBase< Derivedvol > &vol) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename VecA , typename VecB , typename VecC , typename VecD > | |
VecA::Scalar | volume_single (const VecA &a, const VecB &b, const VecC &c, const VecD &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedL , typename Derivedvol > | |
void | volume (const Eigen::MatrixBase< DerivedL > &L, Eigen::PlainObjectBase< Derivedvol > &vol) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename DerivedGV , typename Derivedside > | |
void | voxel_grid (const Eigen::AlignedBox< Scalar, 3 > &box, const int s, const int pad_count, Eigen::PlainObjectBase< DerivedGV > &GV, Eigen::PlainObjectBase< Derivedside > &side) |
Construct the cell center positions of a regular voxel grid (lattice) made of perfectly square voxels. | |
template<typename DerivedV , typename DerivedGV , typename Derivedside > | |
void | voxel_grid (const Eigen::MatrixBase< DerivedV > &V, const typename DerivedV::Scalar offset, const int s, const int pad_count, Eigen::PlainObjectBase< DerivedGV > &GV, Eigen::PlainObjectBase< Derivedside > &side) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedO , typename DerivedW > | |
void | winding_number (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedO > &O, Eigen::PlainObjectBase< DerivedW > &W) |
Computes the generalized winding number at each dim-dimensional query point in O with respect to the oriented one-codimensional mesh (V,F). | |
template<typename DerivedV , typename DerivedF , typename Derivedp > | |
DerivedV::Scalar | winding_number (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedp > &p) |
Compute winding number of a single point. | |
template<typename DerivedV , typename DerivedF > | |
bool | write_triangle_mesh (const std::string str, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, FileEncoding encoding=FileEncoding::Ascii) |
write mesh to a file with automatic detection of file format. | |
template<typename DerivedWI , typename DerivedP , typename DerivedO > | |
bool | writeBF (const std::string &filename, const Eigen::PlainObjectBase< DerivedWI > &WI, const Eigen::PlainObjectBase< DerivedP > &P, const Eigen::PlainObjectBase< DerivedO > &O) |
Write a bones forest to a file. | |
template<typename DerivedW > | |
bool | writeDMAT (const std::string file_name, const Eigen::MatrixBase< DerivedW > &W, const bool ascii=true) |
Write a matrix using ascii dmat file type. | |
template<typename Scalar > | |
bool | writeDMAT (const std::string file_name, const std::vector< std::vector< Scalar > > &W, const bool ascii=true) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar > | |
bool | writeDMAT (const std::string file_name, const std::vector< Scalar > &W, const bool ascii=true) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar , typename Index > | |
bool | writeMESH (const std::string mesh_file_name, const std::vector< std::vector< Scalar > > &V, const std::vector< std::vector< Index > > &T, const std::vector< std::vector< Index > > &F) |
save a tetrahedral volume mesh to a .mesh file | |
template<typename DerivedV , typename DerivedT , typename DerivedF > | |
bool | writeMESH (const std::string str, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, const Eigen::MatrixBase< DerivedF > &F) |
save a tetrahedral volume mesh to a .mesh file | |
bool | writeMSH (const std::string &msh, const Eigen::MatrixXd &X, const Eigen::MatrixXi &Tri, const Eigen::MatrixXi &Tet, const Eigen::MatrixXi &TriTag, const Eigen::MatrixXi &TetTag, const std::vector< std::string > &XFields, const std::vector< Eigen::MatrixXd > &XF, const std::vector< std::string > &EFields, const std::vector< Eigen::MatrixXd > &TriF, const std::vector< Eigen::MatrixXd > &TetF) |
write triangle surface mesh and tetrahedral volume mesh to .msh file | |
template<typename DerivedV , typename DerivedF , typename DerivedCN , typename DerivedFN , typename DerivedTC , typename DerivedFTC > | |
bool | writeOBJ (const std::string str, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedCN > &CN, const Eigen::MatrixBase< DerivedFN > &FN, const Eigen::MatrixBase< DerivedTC > &TC, const Eigen::MatrixBase< DerivedFTC > &FTC) |
Write a mesh in an ascii obj file. | |
template<typename DerivedV , typename DerivedF > | |
bool | writeOBJ (const std::string str, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename T > | |
bool | writeOBJ (const std::string &str, const Eigen::MatrixBase< DerivedV > &V, const std::vector< std::vector< T > > &F) |
Write a mesh of mixed tris and quads to an ascii obj file. | |
template<typename DerivedV , typename DerivedF , typename DerivedC > | |
bool | writeOFF (const std::string str, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedC > &C) |
Export geometry and colors-by-vertex to an ascii OFF file. | |
template<typename DerivedV , typename DerivedF > | |
bool | writeOFF (const std::string str, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedN , typename DerivedUV , typename DerivedVD , typename DerivedFD , typename DerivedED > | |
bool | writePLY (std::ostream &ply_stream, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedUV > &UV, const Eigen::MatrixBase< DerivedVD > &VD, const std::vector< std::string > &VDheader, const Eigen::MatrixBase< DerivedFD > &FD, const std::vector< std::string > &FDheader, const Eigen::MatrixBase< DerivedED > &ED, const std::vector< std::string > &EDheader, const std::vector< std::string > &comments, FileEncoding encoding) |
write triangular mesh to ply file | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedN , typename DerivedUV , typename DerivedVD , typename DerivedFD , typename DerivedED > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedUV > &UV, const Eigen::MatrixBase< DerivedVD > &VD, const std::vector< std::string > &VDheader, const Eigen::MatrixBase< DerivedFD > &FD, const std::vector< std::string > &FDheader, const Eigen::MatrixBase< DerivedED > &ED, const std::vector< std::string > &EDheader, const std::vector< std::string > &comments, FileEncoding encoding) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedE > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedF > &E) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DerivedUV > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedUV > &UV) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedN , typename DerivedUV > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedUV > &UV) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, FileEncoding encoding) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedE > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, FileEncoding encoding) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DerivedUV , typename DerivedVD > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedUV > &UV, const Eigen::MatrixBase< DerivedVD > &VD=Eigen::MatrixXd(0, 0), const std::vector< std::string > &VDheader={}, const std::vector< std::string > &comments={}) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedE , typename DerivedN , typename DerivedUV , typename DerivedVD > | |
bool | writePLY (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedUV > &UV, const Eigen::MatrixBase< DerivedVD > &VD=Eigen::MatrixXd(0, 0), const std::vector< std::string > &VDheader={}, const std::vector< std::string > &comments={}) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN > | |
bool | writeSTL (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedN > &N, FileEncoding encoding=FileEncoding::Ascii) |
Write a mesh to an stl file. | |
template<typename DerivedV , typename DerivedF > | |
bool | writeSTL (const std::string &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, FileEncoding encoding=FileEncoding::Ascii) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | writeTGF (const std::string tgf_filename, const std::vector< std::vector< double > > &C, const std::vector< std::vector< int > > &E) |
Write a graph to a .tgf file. | |
bool | writeTGF (const std::string tgf_filename, const Eigen::MatrixXd &C, const Eigen::MatrixXi &E) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF > | |
bool | writeWRL (const std::string &str, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F) |
Write mesh to a .wrl file. | |
template<typename DerivedV , typename DerivedF , typename DerivedC > | |
bool | writeWRL (const std::string &str, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Variables | |
const float | IDENTITY_QUAT_F [4] = {0,0,0,1} |
const float | XY_PLANE_QUAT_F [4] = {0,0,0,1} |
const float | XZ_PLANE_QUAT_F [4] = {-SQRT_2_OVER_2,0,0,SQRT_2_OVER_2} |
const float | YZ_PLANE_QUAT_F [4] = {-0.5,-0.5,-0.5,0.5} |
const float | CANONICAL_VIEW_QUAT_F [][4] |
const double | IDENTITY_QUAT_D [4] = {0,0,0,1} |
const double | XY_PLANE_QUAT_D [4] = {0,0,0,1} |
const double | XZ_PLANE_QUAT_D [4] = {-SQRT_2_OVER_2,0,0,SQRT_2_OVER_2} |
const double | YZ_PLANE_QUAT_D [4] = {-0.5,-0.5,-0.5,0.5} |
const double | CANONICAL_VIEW_QUAT_D [][4] |
const double | DOUBLE_EPS = 1.0e-14 |
Standard value for double epsilon. | |
const double | DOUBLE_EPS_SQ = 1.0e-28 |
Standard value for double epsilon² | |
const float | FLOAT_EPS = 1.0e-7f |
Standard value for single epsilon. | |
const float | FLOAT_EPS_SQ = 1.0e-14f |
Standard value for single epsilon² | |
const float | GOLD_AMBIENT [4] = { 51.0/255.0, 43.0/255.0,33.3/255.0,1.0f } |
const float | GOLD_DIFFUSE [4] = { 255.0/255.0,228.0/255.0,58.0/255.0,1.0f } |
const float | GOLD_SPECULAR [4] = { 255.0/255.0,235.0/255.0,80.0/255.0,1.0f } |
const float | SILVER_AMBIENT [4] = { 0.2f, 0.2f, 0.2f, 1.0f } |
const float | SILVER_DIFFUSE [4] = { 1.0f, 1.0f, 1.0f, 1.0f } |
const float | SILVER_SPECULAR [4] = { 1.0f, 1.0f, 1.0f, 1.0f } |
const float | CYAN_AMBIENT [4] = { 59.0/255.0, 68.0/255.0,255.0/255.0,1.0f } |
const float | CYAN_DIFFUSE [4] = { 94.0/255.0,185.0/255.0,238.0/255.0,1.0f } |
const float | CYAN_SPECULAR [4] = { 163.0/255.0,221.0/255.0,255.0/255.0,1.0f } |
const float | DENIS_PURPLE_DIFFUSE [4] = { 80.0/255.0,64.0/255.0,255.0/255.0,1.0f } |
const float | LADISLAV_ORANGE_DIFFUSE [4] = {1.0f, 125.0f / 255.0f, 19.0f / 255.0f, 0.0f} |
const float | FAST_GREEN_DIFFUSE [4] = { 113.0f/255.0f, 239.0f/255.0f, 46.0f/255.0f, 1.0f} |
const float | FAST_RED_DIFFUSE [4] = { 255.0f/255.0f, 65.0f/255.0f, 46.0f/255.0f, 1.0f} |
const float | FAST_BLUE_DIFFUSE [4] = { 106.0f/255.0f, 106.0f/255.0f, 255.0f/255.0f, 1.0f} |
const float | FAST_GRAY_DIFFUSE [4] = { 150.0f/255.0f, 150.0f/255.0f, 150.0f/255.0f, 1.0f} |
const float | WHITE [4] = { 255.0/255.0,255.0/255.0,255.0/255.0,1.0f } |
const float | BLACK [4] = { 0.0/255.0,0.0/255.0,0.0/255.0,1.0f } |
const float | WHITE_AMBIENT [4] = { 255.0/255.0,255.0/255.0,255.0/255.0,1.0f } |
const float | WHITE_DIFFUSE [4] = { 255.0/255.0,255.0/255.0,255.0/255.0,1.0f } |
const float | WHITE_SPECULAR [4] = { 255.0/255.0,255.0/255.0,255.0/255.0,1.0f } |
const float | BBW_POINT_COLOR [4] = {239./255.,213./255.,46./255.,255.0/255.0} |
const float | BBW_LINE_COLOR [4] = {106./255.,106./255.,255./255.,255./255.} |
const float | MIDNIGHT_BLUE_DIFFUSE [4] = { 21.0f/255.0f, 27.0f/255.0f, 84.0f/255.0f, 1.0f} |
const float | EASTER_RED_DIFFUSE [4] = {0.603922,0.494118f,0.603922f,1.0f} |
const float | WN_OPEN_BOUNDARY_COLOR [4] = {154./255.,0./255.,0./255.,1.0f} |
const float | WN_NON_MANIFOLD_EDGE_COLOR [4] = {201./255., 51./255.,255./255.,1.0f} |
const char | CHAR_ONE = 1 |
Often one needs a reference to a dummy variable containing one as its value, for example when using AntTweakBar's TwSetParam( "3D View", "opened", TW_PARAM_INT32, 1, &INT_ONE);. | |
const int | INT_ONE = 1 |
const unsigned int | UNSIGNED_INT_ONE = 1 |
const double | DOUBLE_ONE = 1 |
const float | FLOAT_ONE = 1 |
constexpr double | PI = 3.1415926535897932384626433832795 |
π | |
const char | CHAR_ZERO = 0 |
const int | INT_ZERO = 0 |
const unsigned int | UNSIGNED_INT_ZERO = 0 |
const double | DOUBLE_ZERO = 0 |
const float | FLOAT_ZERO = 0 |
using igl::decimate_cost_and_placement_callback = typedef std::function<void( const int , const Eigen::MatrixXd & , const Eigen::MatrixXi & , const Eigen::MatrixXi & , const Eigen::VectorXi & , const Eigen::MatrixXi & , const Eigen::MatrixXi & , double & , Eigen::RowVectorXd & )> |
Function handle used to control the cost of each edge collapse in igl::decimate.
See decimate.h for more details.
[in] | e | index into E of edge to be collapsed |
[in] | V | #V by dim list of vertex positions, lesser index of E(e,:) will be set to midpoint of edge. |
[in] | F | #F by 3 list of face indices into V. |
[in] | E | #E by 2 list of edge indices into V. |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) |
[in] | EI | #E by 2 list of edge flap corners (see above). |
[out] | cost | cost of collapsing edge e |
[out] | p | placement of merged vertex resulting from collapse |
using igl::decimate_stopping_condition_callback = typedef std::function<bool( const Eigen::MatrixXd & , const Eigen::MatrixXi & , const Eigen::MatrixXi & , const Eigen::VectorXi & , const Eigen::MatrixXi & , const Eigen::MatrixXi & , const igl::min_heap< std::tuple<double,int,int> > & , const Eigen::VectorXi & , const Eigen::MatrixXd & , const int , const int , const int , const int , const int )> |
Function handle used to control whether the queue processing in igl::decimate should stop.
See decimate.h for more details.
[in] | V | #V by dim list of vertex positions, lesser index of E(e,:) will be set to midpoint of edge. |
[in] | F | #F by 3 list of face indices into V. |
[in] | E | #E by 2 list of edge indices into V. |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) @param [in] EI #E by 2 list of edge flap corners (see above). @param [in] Q queue containing pairs of costs and edge indices and insertion "time" @param [in] EQ #E list of "time" of last time pushed into Q |
[in] | C | #E by dim list of stored placements |
[in] | e | index into E of attempted collapsed edge. Set to -1 if Q is empty or contains only infinite cost edges. |
[in] | e1 | index into E of edge collpased on left. |
[in] | e2 | index into E of edge collpased on right. |
[in] | f1 | index into F of face collpased on left. |
[in] | f2 | index into F of face collpased on right. |
using igl::decimate_pre_collapse_callback = typedef std::function<bool( const Eigen::MatrixXd & , const Eigen::MatrixXi & , const Eigen::MatrixXi & , const Eigen::VectorXi & , const Eigen::MatrixXi & , const Eigen::MatrixXi & , const igl::min_heap< std::tuple<double,int,int> > & , const Eigen::VectorXi & , const Eigen::MatrixXd & , const int )> |
Function handle called just before collapse_edge
is attempted.
If this function returns false then the collapse is aborted.
See decimate.h for more details.
[in] | V | #V by dim list of vertex positions, lesser index of E(e,:) will be set to midpoint of edge. |
[in] | F | #F by 3 list of face indices into V. |
[in] | E | #E by 2 list of edge indices into V. |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) e=(j->i) |
[in] | EI | #E by 2 list of edge flap corners (see above). |
[in] | Q | queue containing pairs of costs and edge indices and insertion "time" |
[in] | EQ | #E list of "time" of last time pushed into Q |
[in] | C | #E by dim list of stored placements |
[in] | e | index into E of attempted collapsed edge. Set to -1 if Q is empty or contains only infinite cost edges. |
using igl::decimate_post_collapse_callback = typedef std::function<void( const Eigen::MatrixXd & , const Eigen::MatrixXi & , const Eigen::MatrixXi & , const Eigen::VectorXi & , const Eigen::MatrixXi & , const Eigen::MatrixXi & , const igl::min_heap< std::tuple<double,int,int> > & , const Eigen::VectorXi & , const Eigen::MatrixXd & , const int , const int , const int , const int , const int , const bool )> |
Function handle called just after collapse_edge
is attempted.
See decimate.h for more details.
[in] | V | #V by dim list of vertex positions, lesser index of E(e,:) will be set to midpoint of edge. |
[in] | F | #F by 3 list of face indices into V. |
[in] | E | #E by 2 list of edge indices into V. |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) e=(j->i) |
[in] | EI | #E by 2 list of edge flap corners (see above). |
[in] | Q | queue containing pairs of costs and edge indices and insertion "time" |
[in] | EQ | #E list of "time" of last time pushed into Q |
[in] | C | #E by dim list of stored placements |
[in] | e | index into E of attempted collapsed edge. Set to -1 if Q is empty or contains only infinite cost edges. |
[in] | e1 | index into E of edge collpased on left. |
[in] | e2 | index into E of edge collpased on right. |
[in] | f1 | index into F of face collpased on left. |
[in] | f2 | index into F of face collpased on right. |
[in] | collapsed | whether collapse actual took place |
using igl::DEFAULT_URBG = typedef std::mt19937 |
using igl::min_heap = typedef std::priority_queue< T, std::vector<T >, std::greater<T > > |
Templated min heap (reverses sort order of std::priority_queue)
T | type of elements in heap |
using igl::shapeup_projection_function = typedef std::function< bool( const Eigen::PlainObjectBase<Eigen::MatrixXd>&, const Eigen::PlainObjectBase<Eigen::VectorXi>&, const Eigen::PlainObjectBase<Eigen::MatrixXi>&, Eigen::PlainObjectBase<Eigen::MatrixXd>&)> |
Every function here defines a local projection for ShapeUp, and must have the following structure to qualify:
[in] | P | #P by 3 set of points, either the initial solution, or from previous iteration. |
[in] | SC | #Set by 1 cardinalities of sets in S |
[in] | S | #Sets by max(SC) independent sets where the local projection applies. Values beyond column SC(i)-1 in row S(i,:) are "don't care" |
[out] | projP | #S by 3*max(SC) in format xyzxyzxyz, where the projected points correspond to each set in S in the same order. |
enum igl::ARAPEnergyType |
Enum for choosing ARAP energy type.
enum igl::ColorMapType |
enum igl::EigsType |
|
strong |
|
strong |
enum igl::MassMatrixType |
Type of mass matrix.
enum igl::MeshBooleanType |
Boolean operation types.
enum igl::NormalType |
Weighting schemes for per edge normals.
Weighting schemes for computing per-vertex normals.
Types of signing a distance field.
enum igl::SolverStatus |
void igl::accumarray | ( | const Eigen::MatrixBase< DerivedS > & | S, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
Accumulate values in V using subscripts in S.
Like Matlab's accumarray.
[in] | S | #S list of subscripts |
[in] | V | #V list of values |
[out] | A | max(subs)+1 list of accumulated values |
void igl::accumarray | ( | const Eigen::MatrixBase< DerivedS > & | S, |
const typename DerivedA::Scalar | V, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
Accumulate constant value V
using subscripts in S.
Like Matlab's accumarray.
[in] | S | #S list of subscripts |
[in] | V | single value used for all |
[out] | A | max(subs)+1 list of accumulated values |
igl::SolverStatus igl::active_set | ( | const Eigen::SparseMatrix< AT > & | A, |
const Eigen::PlainObjectBase< DerivedB > & | B, | ||
const Eigen::PlainObjectBase< Derivedknown > & | known, | ||
const Eigen::PlainObjectBase< DerivedY > & | Y, | ||
const Eigen::SparseMatrix< AeqT > & | Aeq, | ||
const Eigen::PlainObjectBase< DerivedBeq > & | Beq, | ||
const Eigen::SparseMatrix< AieqT > & | Aieq, | ||
const Eigen::PlainObjectBase< DerivedBieq > & | Bieq, | ||
const Eigen::PlainObjectBase< Derivedlx > & | lx, | ||
const Eigen::PlainObjectBase< Derivedux > & | ux, | ||
const igl::active_set_params & | params, | ||
Eigen::PlainObjectBase< DerivedZ > & | Z | ||
) |
Minimize convex quadratic energy subject to linear inequality constraints.
min ½ Zᵀ A Z + Zᵀ B + constant Z subject to Aeq Z = Beq Aieq Z <= Bieq lx <= Z <= ux Z(known) = Y
that Z(known) = Y, optionally also subject to the constraints Aeq*Z = Beq, and further optionally subject to the linear inequality constraints that Aieq*Z <= Bieq and constant inequality constraints lx <= x <= ux
[in] | A | n by n matrix of quadratic coefficients |
[in] | B | n by 1 column of linear coefficients |
[in] | known | list of indices to known rows in Z |
[in] | Y | list of fixed values corresponding to known rows in Z |
[in] | Aeq | meq by n list of linear equality constraint coefficients |
[in] | Beq | meq by 1 list of linear equality constraint constant values |
[in] | Aieq | mieq by n list of linear inequality constraint coefficients |
[in] | Bieq | mieq by 1 list of linear inequality constraint constant values |
[in] | lx | n by 1 list of lower bounds [] implies -Inf |
[in] | ux | n by 1 list of upper bounds [] implies Inf |
[in] | params | struct of additional parameters (see below) |
[in,out] | Z | if not empty, is taken to be an n by 1 list of initial guess values. Set to solution on output. |
void igl::adjacency_list | ( | const Eigen::MatrixBase< Index > & | F, |
std::vector< std::vector< IndexVector > > & | A, | ||
bool | sorted = false |
||
) |
Constructs the graph adjacency list of a given mesh (V,F)
T | should be a eigen sparse matrix primitive type like int or double |
[in] | F | #F by dim list of mesh faces (must be triangles) |
[out] | A | vector<vector<T> > containing at row i the adjacent vertices of vertex i |
[in] | sorted | flag that indicates if the list should be sorted counter-clockwise. Input assumed to be manifold. |
Example:
void igl::adjacency_list | ( | const std::vector< std::vector< Index > > & | F, |
std::vector< std::vector< Index > > & | A | ||
) |
Constructs the graph adjacency list of a given polygon mesh (V,F)
T | should be a eigen sparse matrix primitive type like int or double |
[in] | F | #F list of polygon face index lists |
[out] | A | vector<vector<T> > containing at row i the adjacent vertices of vertex i |
void igl::adjacency_matrix | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::SparseMatrix< T > & | A | ||
) |
Constructs the graph adjacency matrix of a given mesh (V,F)
T | should be a eigen sparse matrix primitive type like int or double |
[in] | F | #F by dim list of mesh simplices |
[out] | A | max(F)+1 by max(F)+1 adjacency matrix, each row i corresponding to V(i,:) |
void igl::adjacency_matrix | ( | const Eigen::MatrixBase< DerivedI > & | I, |
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::SparseMatrix< T > & | A | ||
) |
Constructs an vertex adjacency for a polygon mesh.
[in] | I | #I vectorized list of polygon corner indices into rows of some matrix V |
[in] | C | #polygons+1 list of cumulative polygon sizes so that C(i+1)-C(i) = size of the ith polygon, and so I(C(i)) through I(C(i+1)-1) are the indices of the ith polygon |
[out] | A | max(I)+1 by max(I)+1 adjacency matrix, each row i corresponding to V(i,:) |
void igl::all | ( | const Eigen::SparseMatrix< AType > & | A, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
void igl::all_pairs_distances | ( | const Mat & | V, |
const Mat & | U, | ||
const bool | squared, | ||
Mat & | D | ||
) |
Compute distances between each point i in V and point j in U.
D = all_pairs_distances(V,U)
matrix | class like MatrixXd |
[in] | V | #V by dim list of points |
[in] | U | #U by dim list of points |
[in] | squared | whether to return squared distances |
[out] | D | #V by #U matrix of distances, where D(i,j) gives the distance or squareed distance between V(i,:) and U(j,:) |
void igl::ambient_occlusion | ( | const std::function< bool(const Eigen::Vector3f &, const Eigen::Vector3f &) > & | shoot_ray, |
const Eigen::MatrixBase< DerivedP > & | P, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const int | num_samples, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
Compute ambient occlusion per given point using ray-mesh intersection function handle.
[in] | shoot_ray | function handle that outputs hits of a given ray against a mesh (embedded in function handles as captured variable/data) |
[in] | P | #P by 3 list of origin points |
[in] | N | #P by 3 list of origin normals |
[in] | num_samples | number of samples to use (e.g., 1000) |
[out] | S | #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded) |
void igl::ambient_occlusion | ( | const igl::AABB< DerivedV, DIM > & | aabb, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedP > & | P, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const int | num_samples, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
Compute ambient occlusion per given point for mesh (V,F) with precomputed AABB tree.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into V |
[in] | P | #P by 3 list of origin points |
[in] | N | #P by 3 list of origin normals |
[in] | num_samples | number of samples to use (e.g., 1000) |
[out] | S | #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded) |
void igl::ambient_occlusion | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedP > & | P, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const int | num_samples, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
Compute ambient occlusion per given point for mesh (V,F)
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into V |
[in] | P | #P by 3 list of origin points |
[in] | N | #P by 3 list of origin normals |
[in] | num_samples | number of samples to use (e.g., 1000) |
[out] | S | #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded) |
double igl::angular_distance | ( | const Eigen::Quaterniond & | A, |
const Eigen::Quaterniond & | B | ||
) |
The "angular distance" between two unit quaternions is the angle of the smallest rotation (treated as an Axis and Angle) that takes A to B.
[in] | A | unit quaternion |
[in] | B | unit quaternion |
void igl::any | ( | const Eigen::SparseMatrix< AType > & | A, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
bool igl::arap_precomputation | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const int | dim, | ||
const Eigen::MatrixBase< Derivedb > & | b, | ||
ARAPData & | data | ||
) |
Compute necessary information to start using an ARAP deformation using local-global solver as described in "As-rigid-as-possible surface modeling" [Sorkine and Alexa 2007].
[in] | V | #V by dim list of mesh positions |
[in] | F | #F by simplex-size list of triangle|tet indices into V |
[in] | dim | dimension being used at solve time. For deformation usually dim = V.cols(), for surface parameterization V.cols() = 3 and dim = 2 |
[in] | b | #b list of "boundary" fixed vertex indices into V |
[out] | data | struct containing necessary precomputation |
bool igl::arap_solve | ( | const Eigen::MatrixBase< Derivedbc > & | bc, |
ARAPData & | data, | ||
Eigen::MatrixBase< DerivedU > & | U | ||
) |
Conduct arap solve.
[in] | bc | #b by dim list of boundary conditions |
[in] | data | struct containing necessary precomputation and parameters |
[in,out] | U | #V by dim initial guess |
bool igl::arap_dof_precomputation | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const LbsMatrixType & | M, | ||
const Eigen::Matrix< int, Eigen::Dynamic, 1 > & | G, | ||
ArapDOFData< LbsMatrixType, SSCALAR > & | data | ||
) |
Precomputes the system to optimize for "Fast Automatic Skinning Transformations" [Jacobson et al. 2012] skinning degrees of freedom optimization using as-rigid-as-possible energy.
This consists of building constructor matrices (to compute covariance matrices from transformations and to build the poisson solve right hand side from rotation matrix entries) and also prefactoring the poisson system.
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by {3|4} list of face indices |
[in] | M | #V * dim by #handles * dim * (dim+1) matrix such that new_V(:) = LBS(V,W,A) = reshape(M * A,size(V)), where A is a column vectors formed by the entries in each handle's dim by dim+1 transformation matrix. Specifcally, A = reshape(permute(Astack,[3 1 2]),n*dim*(dim+1),1) or A = [Lxx;Lyx;Lxy;Lyy;tx;ty], and likewise for other dim if Astack(:,:,i) is the dim by (dim+1) transformation at handle i handles are ordered according to P then BE (point handles before bone handles) |
[in] | G | #V list of group indices (1 to k) for each vertex, such that vertex i is assigned to group G(i) |
[out] | data | structure containing all necessary precomputation for calling arap_dof_update |
bool igl::arap_dof_recomputation | ( | const Eigen::Matrix< int, Eigen::Dynamic, 1 > & | fixed_dim, |
const Eigen::SparseMatrix< double > & | A_eq, | ||
ArapDOFData< LbsMatrixType, SSCALAR > & | data | ||
) |
Should always be called after arap_dof_precomputation, but may be called in between successive calls to arap_dof_update, recomputes precomputation given that there are only changes in free and fixed.
[in] | fixed_dim | list of transformation element indices for fixed (or partailly fixed) handles: not necessarily the complement of 'free' NOTE: the constraints for fixed transformations still need to be present in A_eq |
[in] | A_eq | dim*#constraint_points by m*dim*(dim+1) matrix of linear equality constraint coefficients. Each row corresponds to a linear constraint, so that A_eq * L = Beq says that the linear transformation entries in the column L should produce the user supplied positional constraints for each handle in Beq. The row A_eq(i*dim+d) corresponds to the constrain on coordinate d of position i |
[out] | data | structure containing all necessary precomputation for calling arap_dof_update |
bool igl::arap_dof_update | ( | const ArapDOFData< LbsMatrixType, SSCALAR > & | data, |
const Eigen::Matrix< double, Eigen::Dynamic, 1 > & | B_eq, | ||
const Eigen::MatrixXd & | L0, | ||
const int | max_iters, | ||
const double | tol, | ||
Eigen::MatrixXd & | L | ||
) |
Optimizes the transformations attached to each weight function based on precomputed system.
[in] | data | precomputation data struct output from arap_dof_precomputation |
[in] | Beq | dim*#constraint_points constraint values. |
[in] | L0 | #handles * dim * dim+1 list of initial guess transformation entries, also holds fixed transformation entries for fixed handles |
[in] | max_iters | maximum number of iterations |
[in] | tol | stopping criteria parameter. If variables (linear transformation matrix entries) change by less than 'tol' the optimization terminates, 0.75 (weak tolerance) 0.0 (extreme tolerance) |
[out] | L | #handles * dim * dim+1 list of final optimized transformation entries, allowed to be the same as L |
void igl::arap_linear_block | ( | const MatV & | V, |
const MatF & | F, | ||
const int | d, | ||
const igl::ARAPEnergyType | energy, | ||
MatK & | Kd | ||
) |
Constructs a block of the matrix which constructs the linear terms of a given arap energy.
When treating rotations as knowns (arranged in a column) then this constructs Kd of K such that the linear portion of the energy is as a column:
K * R = [Kx Z ... Ky Z ... Z Kx ... Z Ky ... ... ]
These blocks are also used to build the "covariance scatter matrices". Here we want to build a scatter matrix that multiplies against positions (treated as known) producing covariance matrices to fit each rotation. Notice that in the case of the RHS of the poisson solve the rotations are known and the positions unknown, and vice versa for rotation fitting. These linear block just relate the rotations to the positions, linearly in each.
MatV | vertex position matrix, e.g. Eigen::MatrixXd |
MatF | face index matrix, e.g. Eigen::MatrixXd |
Scalar | e.g. double |
[in] | V | #V by dim list of initial domain positions |
[in] | F | #F by #simplex size list of triangle indices into V |
[in] | d | coordinate of linear constructor to build |
[in] | energy | ARAPEnergyType enum value defining which energy is being used. See ARAPEnergyType.h for valid options and explanations. |
[out] | Kd | #V by #V/#F block of the linear constructor matrix corresponding to coordinate d |
void igl::arap_linear_block_spokes | ( | const MatV & | V, |
const MatF & | F, | ||
const int | d, | ||
MatK & | Kd | ||
) |
Constructs a block of the matrix which constructs the linear terms for spokes energy.
MatV | vertex position matrix, e.g. Eigen::MatrixXd |
MatF | face index matrix, e.g. Eigen::MatrixXd |
Scalar | e.g. double |
[in] | V | #V by dim list of initial domain positions |
[in] | F | #F by #simplex size list of triangle indices into V |
[in] | d | coordinate of linear constructor to build (0 index) See ARAPEnergyType.h for valid options and explanations. |
[out] | Kd | #V by #V block of the linear constructor matrix corresponding to coordinate d |
void igl::arap_linear_block_spokes_and_rims | ( | const MatV & | V, |
const MatF & | F, | ||
const int | d, | ||
MatK & | Kd | ||
) |
Constructs a block of the matrix which constructs the linear terms for spokes and rims energy.
MatV | vertex position matrix, e.g. Eigen::MatrixXd |
MatF | face index matrix, e.g. Eigen::MatrixXd |
Scalar | e.g. double |
[in] | V | #V by dim list of initial domain positions |
[in] | F | #F by #simplex size list of triangle indices into V |
[in] | d | coordinate of linear constructor to build (0 index) See ARAPEnergyType.h for valid options and explanations. |
[out] | Kd | #V by #V block of the linear constructor matrix corresponding to coordinate d |
void igl::arap_linear_block_elements | ( | const MatV & | V, |
const MatF & | F, | ||
const int | d, | ||
MatK & | Kd | ||
) |
Constructs a block of the matrix which constructs the linear terms for per element energy.
MatV | vertex position matrix, e.g. Eigen::MatrixXd |
MatF | face index matrix, e.g. Eigen::MatrixXd |
Scalar | e.g. double |
[in] | V | #V by dim list of initial domain positions |
[in] | F | #F by #simplex size list of triangle indices into V |
[in] | d | coordinate of linear constructor to build (0 index) See ARAPEnergyType.h for valid options and explanations. |
[out] | Kd | #V by #F block of the linear constructor matrix corresponding to coordinate d |
void igl::arap_rhs | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const int | dim, | ||
const igl::ARAPEnergyType | energy, | ||
Eigen::SparseCompressedBase< DerivedK > & | K | ||
) |
Right-hand side constructor of global poisson solve for various Arap energies.
[in] | V | #V by Vdim list of initial domain positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | dim | dimension being used at solve time. For deformation usually dim = V.cols(), for surface parameterization V.cols() = 3 and dim = 2 |
[in] | energy | igl::ARAPEnergyType enum value defining which energy is being used. See igl::ARAPEnergyType.h for valid options and explanations. |
[out] | K | #V*dim by #(F|V)*dim*dim matrix such that: b = K * reshape(permute(R,[3 1 2]),size(V|F,1)*size(V,2)*size(V,2),1); |
void igl::AtA_cached_precompute | ( | const Eigen::SparseMatrix< Scalar > & | A, |
AtA_cached_data & | data, | ||
Eigen::SparseMatrix< Scalar > & | AtA | ||
) |
Computes At * W * A, where A is sparse and W is diagonal.
Divides the construction in two phases, one for fixing the sparsity pattern, and one to populate it with values. Compared to evaluating it directly, this version is slower for the first time (since it requires a precomputation), but faster to the subsequent evaluations.
[in] | A | m x n sparse matrix |
[in,out] | data | stores the precomputed sparsity pattern, data.W contains the optional diagonal weights (stored as a dense vector). If W is not provided, it is replaced by the identity. |
[out] | AtA | m by m matrix computed as AtA * W * A |
void igl::AtA_cached | ( | const Eigen::SparseMatrix< Scalar > & | A, |
const AtA_cached_data & | data, | ||
Eigen::SparseMatrix< Scalar > & | AtA | ||
) |
Computes At * W * A, where A is sparse and W is diagonal precomputed into data.
[in] | A | m x n sparse matrix |
[in] | data | stores the precomputed sparsity pattern, data.W contains the optional diagonal weights (stored as a dense vector). If W is not provided, it is replaced by the identity. |
[out] | AtA | m by m matrix computed as AtA * W * A |
void igl::average_from_edges_onto_vertices | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedoE > & | oE, | ||
const Eigen::MatrixBase< DeriveduE > & | uE, | ||
Eigen::PlainObjectBase< DeriveduV > & | uV | ||
) |
Move a scalar field defined on edges to vertices by averaging.
[in] | F | #F by 3 triangle mesh connectivity |
[in] | E | #E by 3 mapping from each halfedge to each edge |
[in] | oE | #E by 3 orientation as generated by orient_halfedges |
[in] | uE | #E by 1 list of scalars |
[out] | uV | #V by 1 list of scalar defined on vertices |
void igl::average_onto_faces | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF | ||
) |
Move a scalar field defined on vertices to faces by averaging.
[in] | F | #F by ss list of simples/faces |
[in] | S | #V by dim list of per-vertex values |
[out] | SF | #F by dim list of per-face values |
void igl::average_onto_vertices | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV | ||
) |
Move a scalar field defined on faces to vertices by averaging.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into rows of V |
[in] | S | #F by 1 scalar field defined on faces |
[out] | SV | #V by 1 scalar field defined on vertices |
double igl::avg_edge_length | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F | ||
) |
Compute the average edge length for the given triangle mesh.
DerivedV | derived from vertex positions matrix type: i.e. MatrixXd |
DerivedF | derived from face indices matrix type: i.e. MatrixXi |
DerivedL | derived from edge lengths matrix type: i.e. MatrixXd |
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by simplex-size list of mesh faces (must be simplex) |
void igl::axis_angle_to_quat | ( | const Q_type * | axis, |
const Q_type | angle, | ||
Q_type * | out | ||
) |
Convert axis angle representation of a rotation to a quaternion.
A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w),
such that q = x*i + y*j + z*k + w
[in] | axis | 3d vector |
[in] | angle | scalar |
[out] | out | pointer to new quaternion |
void igl::barycenter | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedBC > & | BC | ||
) |
Computes the barycenter of every simplex.
[in] | V | #V x dim matrix of vertex coordinates |
[in] | F | #F x simplex_size matrix of indices of simplex corners into V |
[out] | BC | #F x dim matrix of 3d vertices |
void igl::barycentric_coordinates | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedA > & | A, | ||
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
const Eigen::MatrixBase< DerivedD > & | D, | ||
Eigen::PlainObjectBase< DerivedL > & | L | ||
) |
Compute barycentric coordinates of each point in a corresponding tetrahedron.
[in] | P | #P by 3 Query points in 3d |
[in] | A | #P by 3 Tet corners in 3d |
[in] | B | #P by 3 Tet corners in 3d |
[in] | C | #P by 3 Tet corners in 3d |
[in] | D | #P by 3 Tet corners in 3d |
[out] | L | #P by 4 list of barycentric coordinates |
void igl::barycentric_coordinates | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedA > & | A, | ||
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedL > & | L | ||
) |
Compute barycentric coordinates in a triangle.
[in] | P | #P by dim Query points |
[in] | A | #P by dim Triangle corners |
[in] | B | #P by dim Triangle corners |
[in] | C | #P by dim Triangle corners |
[out] | L | #P by 3 list of barycentric coordinates |
void igl::barycentric_interpolation | ( | const Eigen::MatrixBase< DerivedD > & | D, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedX > & | X | ||
) |
Interpolate data on a triangle mesh using barycentric coordinates.
[in] | D | #D by dim list of per-vertex data |
[in] | F | #F by 3 list of triangle indices |
[in] | B | #X by 3 list of barycentric corodinates |
[in] | I | #X list of triangle indices |
[out] | X | #X by dim list of interpolated data |
std::string igl::basename | ( | const std::string & | path | ) |
bool igl::bbw | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedEle > & | Ele, | ||
const Eigen::PlainObjectBase< Derivedb > & | b, | ||
const Eigen::PlainObjectBase< Derivedbc > & | bc, | ||
BBWData & | data, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Compute Bounded Biharmonic Weights on a given domain (V,Ele) with a given set of boundary conditions.
DerivedV | derived type of eigen matrix for V (e.g. MatrixXd) |
DerivedF | derived type of eigen matrix for F (e.g. MatrixXi) |
Derivedb | derived type of eigen matrix for b (e.g. VectorXi) |
Derivedbc | derived type of eigen matrix for bc (e.g. MatrixXd) |
DerivedW | derived type of eigen matrix for W (e.g. MatrixXd) |
[in] | V | #V by dim vertex positions |
[in] | Ele | #Elements by simplex-size list of element indices |
[in] | b | #b boundary indices into V |
[in] | bc | #b by #W list of boundary values |
[in,out] | data | object containing options, initial guess --> solution and results |
[out] | W | #V by #W list of unnormalized weights to normalize use igl::normalize_row_sums(W,W); |
void igl::bezier | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const typename DerivedV::Scalar | t, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Evaluate a polynomial Bezier Curve at single parameter value.
[in] | V | #V by dim list of Bezier control points |
[in] | t | evaluation parameter within [0,1] |
[out] | P | 1 by dim output point |
void igl::bezier | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Evaluate a polynomial Bezier Curve at many parameter values.
[in] | V | #V by dim list of Bezier control points |
[in] | T | #T evaluation parameters within [0,1] |
[out] | P | #T by dim output points |
void igl::bezier | ( | const std::vector< VMat > & | spline, |
const Eigen::MatrixBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Evaluate a polynomial Bezier spline with a fixed parameter set for each sub-curve.
VMat | type of matrix of each list of control points |
DerivedT | Derived type of evaluation parameters |
DerivedP | Derived type of output points |
[in] | spline | #curves list of lists of Bezier control points |
[in] | T | #T evaluation parameters within [0,1] to use for each spline |
[out] | P | #curves*#T by dim output points |
void igl::bfs | ( | const AType & | A, |
const size_t | s, | ||
Eigen::PlainObjectBase< DerivedD > & | D, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Traverse a directed graph represented by an adjacency list using.
breadth first search; outputs Eigen types.
[in] | A | #V list of adjacency lists or #V by #V adjacency matrix |
[in] | s | starting node (index into A) |
[out] | D | #V list of indices into rows of A in the order in which graph nodes are discovered. |
[out] | P | #V list of indices into rows of A of predecessor in resulting spanning tree {-1 indicates root/not discovered), order corresponds to V not D. |
void igl::bfs | ( | const std::vector< std::vector< AType > > & | A, |
const size_t | s, | ||
std::vector< DType > & | D, | ||
std::vector< PType > & | P | ||
) |
Traverse a directed graph represented by an adjacency list using.
breadth first search; inputs adjacency lists, outputs lists.
[in] | A | #V list of adjacency lists |
[in] | s | starting node (index into A) |
[out] | D | #V list of indices into rows of A in the order in which graph nodes are discovered. |
[out] | P | #V list of indices into rows of A of predecessor in resulting spanning tree {-1 indicates root/not discovered), order corresponds to V not D. |
void igl::bfs | ( | const Eigen::SparseCompressedBase< AType > & | A, |
const size_t | s, | ||
std::vector< DType > & | D, | ||
std::vector< PType > & | P | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::bfs_orient | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Consistently orient faces in orientable patches using BFS.
[in] | F | #F by 3 list of faces |
[out] | FF | #F by 3 list of faces (OK if same as F) |
[out] | C | #F list of component ids |
bool igl::biharmonic_coordinates | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedT > & | T, | ||
const std::vector< std::vector< SType > > & | S, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Compute "discrete biharmonic generalized barycentric coordinates" as described in "Linear Subspace Design for Real-Time Shape Deformation" [Wang et al.
2015]. Not to be confused with "Bounded Biharmonic Weights for Real-Time Deformation" [Jacobson et al. 2011] or "Biharmonic Coordinates" (2D complex barycentric coordinates) [Weber et al. 2012]. These weights minimize a discrete version of the squared Laplacian energy subject to positional interpolation constraints at selected vertices (point handles) and transformation interpolation constraints at regions (region handles).
SType | should be a simple index type e.g. int ,size_t |
[in] | V | #V by dim list of mesh vertex positions |
[in] | T | #T by dim+1 list of / triangle indices into V if dim=2 \ tetrahedron indices into V if dim=3 |
[in] | S | #point-handles+#region-handles list of lists of selected vertices for each handle. Point handles should have singleton lists and region handles should have lists of size at least dim+1 (and these points should be in general position). |
[out] | W | #V by #points-handles+(#region-handles * dim+1) matrix of weights so that columns correspond to each handles generalized barycentric coordinates (for point-handles) or animation space weights (for region handles). |
bool igl::biharmonic_coordinates | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedT > & | T, | ||
const std::vector< std::vector< SType > > & | S, | ||
const int | k, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | k | power of Laplacian (experimental) |
bool igl::bijective_composite_harmonic_mapping | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedb > & | b, | ||
const Eigen::MatrixBase< Derivedbc > & | bc, | ||
Eigen::PlainObjectBase< DerivedU > & | U | ||
) |
Compute a injective planar mapping of a triangulated polygon (V,F) subjected to boundary conditions (b,bc).
The mapping should be bijective in the sense that no triangles' areas become negative (this assumes they started positive). This mapping is computed by "composing" harmonic mappings between incremental morphs of the boundary conditions. This is a bit like a discrete version of "Bijective Composite Mean Value Mappings" [Schneider et al. 2013] but with a discrete harmonic map (cf. harmonic coordinates) instead of mean value coordinates. This is inspired by "Embedding a triangular graph within a given boundary" [Xu et al. 2011].
[in] | V | #V by 2 list of triangle mesh vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | b | #b list of boundary indices into V |
[in] | bc | #b by 2 list of boundary conditions corresponding to b |
[out] | U | #V by 2 list of output mesh vertex locations |
bool igl::bijective_composite_harmonic_mapping | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedb > & | b, | ||
const Eigen::MatrixBase< Derivedbc > & | bc, | ||
const int | min_steps, | ||
const int | max_steps, | ||
const int | num_inner_iters, | ||
const bool | test_for_flips, | ||
Eigen::PlainObjectBase< DerivedU > & | U | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | min_steps | minimum number of steps to take from V(b,:) to bc |
[in] | max_steps | minimum number of steps to take from V(b,:) to bc (if max_steps == min_steps then no further number of steps will be tried) |
[in] | num_inner_iters | number of iterations of harmonic solves to run after for each morph step (to try to push flips back in) |
[in] | test_for_flips | whether to check if flips occurred (and trigger more steps). if test_for_flips = false then this function always returns true |
void igl::blkdiag | ( | const std::vector< Eigen::SparseMatrix< Scalar > > & | L, |
Eigen::SparseMatrix< Scalar > & | Y | ||
) |
void igl::blkdiag | ( | const std::vector< DerivedY > & | L, |
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::blue_noise | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const typename DerivedV::Scalar | r, | ||
Eigen::PlainObjectBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedFI > & | FI, | ||
Eigen::PlainObjectBase< DerivedP > & | P, | ||
URBG && | urbg = igl::generate_default_urbg() |
||
) |
"Fast Poisson Disk Sampling in Arbitrary Dimensions" [Bridson 2007].
For very dense samplings this is faster than (up to 2x) cyCodeBase's implementation of "Sample Elimination for Generating Poisson Disk Sample Sets" [Yuksel 2015]. YMMV
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of mesh triangle indices into rows of V |
[in] | r | Poisson disk radius (evaluated according to Euclidean distance on V) |
[out] | B | #P by 3 list of barycentric coordinates, ith row are coordinates of ith sampled point in face FI(i) |
[out] | FI | #P list of indices into F |
[out] | P | #P by dim list of sample positions. |
[in,out] | urbg | An instance of UnformRandomBitGenerator (e.g., std::minstd_rand(0) ) |
void igl::bone_parents | ( | const Eigen::MatrixBase< DerivedBE > & | BE, |
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Recover "parent" bones from directed graph representation.
[in] | BE | #BE by 2 list of directed bone edges |
[out] | P | #BE by 1 list of parent indices into BE, -1 means root. |
bool igl::boundary_conditions | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | Ele, | ||
const Eigen::MatrixXd & | C, | ||
const Eigen::VectorXi & | P, | ||
const Eigen::MatrixXi & | BE, | ||
const Eigen::MatrixXi & | CE, | ||
const Eigen::MatrixXi & | CF, | ||
Eigen::VectorXi & | b, | ||
Eigen::MatrixXd & | bc | ||
) |
Compute boundary conditions for automatic weights computation.
This function expects that the given mesh (V,Ele) has sufficient samples (vertices) exactly at point handle locations and exactly along bone and cage edges/faces.
[in] | V | #V by dim list of domain vertices |
[in] | Ele | #Ele by simplex-size list of simplex indices |
[in] | C | #C by dim list of handle positions |
[in] | P | #P by 1 list of point handle indices into C |
[in] | BE | #BE by 2 list of bone edge indices into C |
[in] | CE | #CE by 2 list of cage edge indices into P |
[in] | CF | #CF by 3 list of (triangular) cage face indices into P |
[out] | b | #b list of boundary indices (indices into V of vertices which have known, fixed values) |
[out] | bc | #b by #weights list of known/fixed values for boundary vertices (notice the #b != #weights in general because #b will include all the intermediary samples along each bone, etc.. The ordering of the weights corresponds to [P;BE] |
void igl::boundary_facets | ( | const Eigen::MatrixBase< DerivedT > & | T, |
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedK > & | K | ||
) |
Determine boundary faces (edges) of tetrahedra (triangles) stored in T (analogous to qptoolbox's outline
and boundary_faces
).
[in] | T | tetrahedron (triangle) index list, m by 4 (3), where m is the number of tetrahedra |
[out] | F | list of boundary faces, n by 3 (2), where n is the number of boundary faces |
[out] | J | list of indices into T, n by 1 |
[out] | K | list of indices revealing across from which vertex is this facet |
void igl::boundary_facets | ( | const Eigen::MatrixBase< DerivedT > & | T, |
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Determine boundary faces (edges) of tetrahedra (triangles) stored in T.
[in] | T | tetrahedron (triangle) index list, m by 4 (3), where m is the number of tetrahedra |
[out] | F | list of boundary faces, n by 3 (2), where n is the number of boundary faces |
Ret igl::boundary_facets | ( | const Eigen::MatrixBase< DerivedT > & | T | ) |
Determine boundary faces (edges) of tetrahedra (triangles) stored in T.
[in] | T | tetrahedron (triangle) index list, m by 4 (3), where m is the number of tetrahedra |
void igl::boundary_facets | ( | const std::vector< std::vector< IntegerT > > & | T, |
std::vector< std::vector< IntegerF > > & | F | ||
) |
Determine boundary faces (edges) of tetrahedra (triangles) stored in T; inputs and outputs lists.
[in] | T | tetrahedron (triangle) index list, m by 4 (3), where m is the number of tetrahedra |
[out] | F | list of boundary faces, n by 3 (2), where n is the number of boundary faces |
void igl::boundary_loop | ( | const Eigen::MatrixBase< DerivedF > & | F, |
std::vector< std::vector< Index > > & | L | ||
) |
Compute list of ordered boundary loops for a manifold mesh.
Index | index type |
[in] | F | #F by dim list of mesh faces |
[out] | L | list of loops where L[i] = ordered list of boundary vertices in loop i |
void igl::boundary_loop | ( | const Eigen::MatrixBase< DerivedF > & | F, |
std::vector< Index > & | L | ||
) |
Compute ordered boundary loops for a manifold mesh and return the longest loop in terms of vertices.
Index | index type |
[in] | F | #F by dim list of mesh faces |
[out] | L | ordered list of boundary vertices of longest boundary loop |
void igl::boundary_loop | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedL > & | L | ||
) |
Compute ordered boundary loops for a manifold mesh and return the longest loop in terms of vertices.
Index | index type |
[in] | F | #F by dim list of mesh faces |
[out] | L | ordered list of boundary vertices of longest boundary loop |
void igl::bounding_box | ( | const Eigen::MatrixBase< DerivedV > & | V, |
Eigen::PlainObjectBase< DerivedBV > & | BV, | ||
Eigen::PlainObjectBase< DerivedBF > & | BF | ||
) |
Build a triangle mesh of the bounding box of a given list of vertices.
[in] | V | #V by dim list of rest domain positions |
[out] | BV | 2^dim by dim list of bounding box corners positions |
[out] | BF | #BF by dim list of simplex facets |
void igl::bounding_box | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const typename DerivedV::Scalar | pad, | ||
Eigen::PlainObjectBase< DerivedBV > & | BV, | ||
Eigen::PlainObjectBase< DerivedBF > & | BF | ||
) |
double igl::bounding_box_diagonal | ( | const Eigen::MatrixXd & | V | ) |
Compute the length of the diagonal of a given meshes axis-aligned bounding box.
[in] | V | #V by 3 list of vertex/point positions |
Q_type igl::CANONICAL_VIEW_QUAT | ( | int | i, |
int | j | ||
) |
float igl::CANONICAL_VIEW_QUAT< float > | ( | int | i, |
int | j | ||
) |
double igl::CANONICAL_VIEW_QUAT< double > | ( | int | i, |
int | j | ||
) |
void igl::cat | ( | const int | dim, |
const Eigen::SparseMatrix< Scalar > & | A, | ||
const Eigen::SparseMatrix< Scalar > & | B, | ||
Eigen::SparseMatrix< Scalar > & | C | ||
) |
Perform concatenation of a two sparse matrices along a single dimension If dim == 1, then C = [A;B]; If dim == 2 then C = [A B].
This is an attempt to act like matlab's cat function.
Scalar | scalar data type for sparse matrices like double or int |
Mat | matrix type for all matrices (e.g. MatrixXd, SparseMatrix) |
MatC | matrix type for output matrix (e.g. MatrixXd) needs to support resize |
[in] | dim | dimension along which to concatenate, 1 or 2 |
[in] | A | first input matrix |
[in] | B | second input matrix |
[out] | C | output matrix |
void igl::cat | ( | const int | dim, |
const Eigen::MatrixBase< Derived > & | A, | ||
const Eigen::MatrixBase< Derived > & | B, | ||
MatC & | C | ||
) |
Perform concatenation of a two dense matrices along a single dimension If dim == 1, then C = [A;B]; If dim == 2 then C = [A B].
[in] | dim | dimension along which to concatenate, 1 or 2 |
[in] | A | first input matrix |
[in] | B | second input matrix |
[out] | C | output matrix |
Mat igl::cat | ( | const int | dim, |
const Mat & | A, | ||
const Mat & | B | ||
) |
Perform concatenation of a two dense matrices along a single dimension If dim == 1, then C = [A;B]; If dim == 2 then C = [A B].
[in] | dim | dimension along which to concatenate, 1 or 2 |
[in] | A | first input matrix |
[in] | B | second input matrix |
void igl::cat | ( | const std::vector< std::vector< Mat > > & | A, |
Mat & | C | ||
) |
Concatenate a "matrix" of sub-blocks C = [A0;A1;A2;...;An] where Ai = [A[i][0] A[i][1] ... A[i][m]];.
[in] | A | a list of list of matrices (sizes must be compatibile) |
[out] | C | output matrix |
void igl::cat | ( | const int | dim, |
const std::vector< T > & | A, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Concatenate a std::vector of matrices along the specified dimension.
[in] | dim | dimension along which to concatenate, 1 or 2 |
[in] | A | std::vector of eigen matrices. Must have identical # cols if dim == 1 or rows if dim == 2 |
[out] | C | output matrix |
void igl::ceil | ( | const Eigen::PlainObjectBase< DerivedX > & | X, |
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
Ceil a given matrix to nearest integers.
[in] | X | m by n matrix of scalars |
[out] | Y | m by n matrix of ceiled integers |
void igl::centroid | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< Derivedc > & | c, | ||
Derivedvol & | vol | ||
) |
Computes the centroid and enclosed volume of a closed mesh using a surface integral.
[in] | V | #V by dim list of rest domain positions |
[in] | F | #F by 3 list of triangle indices into V |
[out] | c | dim vector of centroid coordinates |
[out] | vol | total volume of solid. |
void igl::centroid | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< Derivedc > & | c | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std::vector< int > igl::circulation | ( | const int | e, |
const bool | ccw, | ||
const Eigen::VectorXi & | EMAP, | ||
const Eigen::MatrixXi & | EF, | ||
const Eigen::MatrixXi & | EI | ||
) |
Return list of faces around the end point of an edge.
Assumes data-structures are built from an edge-manifold closed mesh.
[in] | e | index into E of edge to circulate |
[in] | ccw | whether to continue in ccw direction of edge (circulate around E(e,1)) |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) |
[in] | EI | #E by 2 list of edge flap corners (see above). |
void igl::circulation | ( | const int | e, |
const bool | ccw, | ||
const Eigen::VectorXi & | EMAP, | ||
const Eigen::MatrixXi & | EF, | ||
const Eigen::MatrixXi & | EI, | ||
Eigen::VectorXi & | vN | ||
) |
Return list of faces around the end point of an edge.
Assumes data-structures are built from an edge-manifold closed mesh.
[in] | e | index into E of edge to circulate | |
[in] | ccw | whether to continue in ccw direction of edge (circulate around E(e,1)) | |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E | |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) | |
[in] | EI | #E by 2 list of edge flap corners (see above). | |
[out] | vN | list of of faces touched by circulation (in cyclically order). |
void igl::circulation | ( | const int | e, |
const bool | ccw, | ||
const Eigen::MatrixXi & | F, | ||
const Eigen::VectorXi & | EMAP, | ||
const Eigen::MatrixXi & | EF, | ||
const Eigen::MatrixXi & | EI, | ||
std::vector< int > & | Nv, | ||
std::vector< int > & | Nf | ||
) |
Return list of faces around the end point of an edge.
Assumes data-structures are built from an edge-manifold closed mesh.
[in] | e | index into E of edge to circulate |
[in] | ccw | whether to continue in ccw direction of edge (circulate around E(e,1)) |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) @param [in] EI #E by 2 list of edge flap corners (see above). @param [out] Nv #Nv list of "next" vertex indices |
[out] | Nf | #Nf list of face indices |
void igl::circumradius | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedR > & | R | ||
) |
Compute the circumradius of each triangle in a mesh (V,F)
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[out] | R | #F list of circumradius |
bool igl::collapse_edge | ( | const int | e, |
const Eigen::RowVectorXd & | p, | ||
Eigen::MatrixXd & | V, | ||
Eigen::MatrixXi & | F, | ||
Eigen::MatrixXi & | E, | ||
Eigen::VectorXi & | EMAP, | ||
Eigen::MatrixXi & | EF, | ||
Eigen::MatrixXi & | EI, | ||
int & | e1, | ||
int & | e2, | ||
int & | f1, | ||
int & | f2 | ||
) |
Attempt to collapse a given edge of a mesh.
Assumes (V,F) is a closed manifold mesh (except for previously collapsed faces which should be set to: [IGL_COLLAPSE_EDGE_NULL IGL_COLLAPSE_EDGE_NULL IGL_COLLAPSE_EDGE_NULL]. Collapses exactly two faces and exactly 3 edges from E (e and one side of each face gets collapsed to the other). This is implemented in a way that it can be repeatedly called until satisfaction and then the garbage in F can be collected by removing NULL faces.
[in] | e | index into E of edge to try to collapse. E(e,:) = [s d] or [d s] so that s<d, then d is collapsed to s. |
[in] | p | dim list of vertex position where to place merged vertex [mesh inputs] |
[in,out] | V | #V by dim list of vertex positions, lesser index of E(e,:) will be set to midpoint of edge. |
[in,out] | F | #F by 3 list of face indices into V. |
[in,out] | E | #E by 2 list of edge indices into V. |
[in,out] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in,out] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) |
[in,out] | EI | #E by 2 list of edge flap corners (see above). [mesh inputs] |
[out] | e1 | index into E of edge collpased on left |
[out] | e2 | index into E of edge collpased on right |
[out] | f1 | index into F of face collpased on left |
[out] | f2 | index into F of face collpased on right |
bool igl::collapse_edge | ( | const int | e, |
const Eigen::RowVectorXd & | p, | ||
std::vector< int > & | Nsv, | ||
const std::vector< int > & | Nsf, | ||
std::vector< int > & | Ndv, | ||
const std::vector< int > & | Ndf, | ||
Eigen::MatrixXd & | V, | ||
Eigen::MatrixXi & | F, | ||
Eigen::MatrixXi & | E, | ||
Eigen::VectorXi & | EMAP, | ||
Eigen::MatrixXi & | EF, | ||
Eigen::MatrixXi & | EI, | ||
int & | e1, | ||
int & | e2, | ||
int & | f1, | ||
int & | f2 | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | Nsv | #Nsv vertex circulation around s (see circulation) |
[in] | Nsf | #Nsf face circulation around s |
[in] | Ndv | #Ndv vertex circulation around d |
[in] | Ndf | #Ndf face circulation around d |
bool igl::collapse_edge | ( | const int | e, |
const Eigen::RowVectorXd & | p, | ||
Eigen::MatrixXd & | V, | ||
Eigen::MatrixXi & | F, | ||
Eigen::MatrixXi & | E, | ||
Eigen::VectorXi & | EMAP, | ||
Eigen::MatrixXi & | EF, | ||
Eigen::MatrixXi & | EI | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::collapse_edge | ( | const decimate_cost_and_placement_callback & | cost_and_placement, |
const decimate_pre_collapse_callback & | pre_collapse, | ||
const decimate_post_collapse_callback & | post_collapse, | ||
Eigen::MatrixXd & | V, | ||
Eigen::MatrixXi & | F, | ||
Eigen::MatrixXi & | E, | ||
Eigen::VectorXi & | EMAP, | ||
Eigen::MatrixXi & | EF, | ||
Eigen::MatrixXi & | EI, | ||
igl::min_heap< std::tuple< double, int, int > > & | Q, | ||
Eigen::VectorXi & | EQ, | ||
Eigen::MatrixXd & | C, | ||
int & | e, | ||
int & | e1, | ||
int & | e2, | ||
int & | f1, | ||
int & | f2 | ||
) |
Collapse least-cost edge from a priority queue and update queue.
See decimate.h for more details.
[in] | cost_and_placement | function computing cost of collapsing an edge and 3d position where it should be placed: cost_and_placement(V,F,E,EMAP,EF,EI,cost,placement); If the edges is collapsed then this function will be called on all edges of all faces previously incident on the endpoints of the collapsed edge. |
[in] | pre_collapse | callback called with index of edge whose collapse is about to be attempted. This function should return whether to proceed with the collapse: returning true means "yes, try to collapse", returning false means "No, consider this edge 'uncollapsable', behave as if collapse_edge(e) returned false. @param [in] post_collapse callback called with index of edge whose collapse was just attempted and a flag revealing whether this was successful. @param [in,out] V #V by dim list of vertex positions, lesser index of E(e,:) will be set to midpoint of edge. @param [in,out] F #F by 3 list of face indices into V. @param [in,out] E #E by 2 list of edge indices into V. @param [in,out] EMAP #F*3 list of indices into E, mapping each directed edge to unique unique edge in E @param [in,out] EF #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) e=(j->i) @param [in,out] EI #E by 2 list of edge flap corners (see above). @param [in] Q queue containing pairs of costs and edge indices and insertion "time" @param [in] EQ #E list of "time" of last time pushed into Q |
[in] | C | #E by dim list of stored placements |
[out] | e | index into E of attempted collapsed edge. Set to -1 if Q is empty or contains only infinite cost edges. |
[out] | e1 | index into E of edge collpased on left. |
[out] | e2 | index into E of edge collpased on right. |
[out] | f1 | index into F of face collpased on left. |
[out] | f2 | index into F of face collpased on right. |
bool igl::collapse_edge | ( | const decimate_cost_and_placement_callback & | cost_and_placement, |
Eigen::MatrixXd & | V, | ||
Eigen::MatrixXi & | F, | ||
Eigen::MatrixXi & | E, | ||
Eigen::VectorXi & | EMAP, | ||
Eigen::MatrixXi & | EF, | ||
Eigen::MatrixXi & | EI, | ||
igl::min_heap< std::tuple< double, int, int > > & | Q, | ||
Eigen::VectorXi & | EQ, | ||
Eigen::MatrixXd & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::collapse_edge | ( | const decimate_cost_and_placement_callback & | cost_and_placement, |
const decimate_pre_collapse_callback & | pre_collapse, | ||
const decimate_post_collapse_callback & | post_collapse, | ||
Eigen::MatrixXd & | V, | ||
Eigen::MatrixXi & | F, | ||
Eigen::MatrixXi & | E, | ||
Eigen::VectorXi & | EMAP, | ||
Eigen::MatrixXi & | EF, | ||
Eigen::MatrixXi & | EI, | ||
igl::min_heap< std::tuple< double, int, int > > & | Q, | ||
Eigen::VectorXi & | EQ, | ||
Eigen::MatrixXd & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::collapse_small_triangles | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const double | eps, | ||
Eigen::MatrixXi & | FF | ||
) |
Given a triangle mesh (V,F) compute a new mesh (VV,FF) which contains the original faces and vertices of (V,F) except any small triangles have been removed via collapse.
We are not following the rules in "Mesh Optimization" [Hoppe et al] Section 4.2. But for our purposes we don't care about this criteria.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | eps | epsilon for smallest allowed area treated as fraction of squared bounding box diagonal |
[out] | FF | #FF by 3 list of triangle indices into V |
void igl::colon | ( | const L | low, |
const S | step, | ||
const H | hi, | ||
Eigen::Matrix< T, Eigen::Dynamic, 1 > & | I | ||
) |
Colon operator like matlab's colon operator.
Enumerates values between low and hi with step step.
L | should be a eigen matrix primitive type like int or double |
S | should be a eigen matrix primitive type like int or double |
H | should be a eigen matrix primitive type like int or double |
T | should be a eigen matrix primitive type like int or double |
[in] | low | starting value if step is valid then this is always the first element of I |
[in] | step | step difference between sequential elements returned in I, remember this will be cast to template T at compile time. If low<hi then step must be positive. If low>hi then step must be negative. Otherwise I will be set to empty. |
[in] | hi | ending value, if (hi-low)step is zero then this will be the last element in I. If step is positive there will be no elements greater than hi, vice versa if hi<low |
[out] | I | list of values from low to hi with step size step |
If step = 1, it's about 5 times faster to use: X = Eigen::VectorXi::LinSpaced(n,0,n-1); than X = igl::colon<int>(0,n-1);
void igl::colon | ( | const L | low, |
const H | hi, | ||
Eigen::Matrix< T, Eigen::Dynamic, 1 > & | I | ||
) |
Colon operator like matlab's colon operator.
Enumerates values between low and hi with unit step.
L | should be a eigen matrix primitive type like int or double |
H | should be a eigen matrix primitive type like int or double |
T | should be a eigen matrix primitive type like int or double |
[in] | low | starting value if step is valid then this is always the first element of I |
[in] | step | step difference between sequential elements returned in I, remember this will be cast to template T at compile time. If low<hi then step must be positive. If low>hi then step must be negative. Otherwise I will be set to empty. |
[in] | hi | ending value, if (hi-low)step is zero then this will be the last element in I. If step is positive there will be no elements greater than hi, vice versa if hi<low |
[out] | I | list of values from low to hi with step size step |
void igl::colormap | ( | const ColorMapType | cm, |
const T | f, | ||
T * | rgb | ||
) |
Compute [r,g,b] values of the selected colormap for a given factor f between 0 and 1.
[in] | c | colormap enum |
[in] | f | factor determining color value as if 0 was min and 1 was max |
[out] | rgb | red, green, blue value |
void igl::colormap | ( | const ColorMapType | cm, |
const T | f, | ||
T & | r, | ||
T & | g, | ||
T & | b | ||
) |
Compute [r,g,b] values of the selected colormap for a given factor f between 0 and 1.
[in] | c | colormap enum |
[in] | f | factor determining color value as if 0 was min and 1 was max |
[out] | r | red value |
[out] | g | green value |
[out] | b | blue value |
void igl::colormap | ( | const double | palette[256][3], |
const T | x_in, | ||
T & | r, | ||
T & | g, | ||
T & | b | ||
) |
Compute [r,g,b] values of the colormap palette for a given factor f between 0 and 1.
[in] | palette | 256 by 3 array of color values |
[in] | x_in | factor determining color value as if 0 was min and 1 was max |
[out] | r | red value |
[out] | g | green value |
[out] | b | blue value |
void igl::colormap | ( | const ColorMapType | cm, |
const Eigen::MatrixBase< DerivedZ > & | Z, | ||
const bool | normalize, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute [r,g,b] values of the colormap palette for a given factors between 0 and 1.
[in] | cm | selected colormap palette to interpolate from |
[in] | Z | #Z list of factors |
[in] | normalize | whether to normalize Z to be tightly between [0,1] |
[out] | C | #C by 3 list of rgb colors |
void igl::colormap | ( | const ColorMapType | cm, |
const Eigen::MatrixBase< DerivedZ > & | Z, | ||
const double | min_Z, | ||
const double | max_Z, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute [r,g,b] values of the colormap palette for a given factors between min_Z
and max_Z
[in] | cm | selected colormap palette to interpolate from |
[in] | Z | #Z list of factors |
[in] | min_z | value at "0" |
[in] | max_z | value at "1" |
[out] | C | #C by 3 list of rgb colors |
bool igl::column_to_quats | ( | const Eigen::VectorXd & | Q, |
std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > & | vQ | ||
) |
de-"Columnize" a list of quaternions (q1x,q1y,q1z,q1w,q2x,q2y,q2z,q2w,...)
[in] | Q | n*4-long list of coefficients |
[out] | vQ | n-long list of quaternions |
void igl::columnize | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
const int | k, | ||
const int | dim, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
"Columnize" a stack of block matrices.
If A = [A1,A2,A3,...,Ak] with each A* an m by n block then this produces the column vector whose entries are B(j*m*k+i*k+b) = A(i,b*n+j); or if A = [A1;A2;...;Ak] then B(j*m*k+i*k+b) = A(i+b*m,j);
T | should be a eigen matrix primitive type like int or double |
[in] | A | m*k by n (dim: 1) or m by n*k (dim: 2) eigen Matrix of type T values |
[in] | k | number of blocks |
[in] | dim | dimension in which blocks are stacked |
[out] | B | m*n*k eigen vector of type T values, |
void igl::comb_cross_field | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedV > & | PD1in, | ||
const Eigen::MatrixBase< DerivedV > & | PD2in, | ||
Eigen::PlainObjectBase< DerivedV > & | PD1out, | ||
Eigen::PlainObjectBase< DerivedV > & | PD2out | ||
) |
Computes principal matchings of the vectors of a cross field across face edges, and generates a combed cross field defined on the mesh faces.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 4 eigen Matrix of face (quad) indices |
[in] | PD1in | #F by 3 eigen Matrix of the first per face cross field vector |
[in] | PD2in | #F by 3 eigen Matrix of the second per face cross field vector |
[out] | PD1out | #F by 3 eigen Matrix of the first combed cross field vector |
[out] | PD2out | #F by 3 eigen Matrix of the second combed cross field vector |
void igl::comb_frame_field | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedP > & | PD1, | ||
const Eigen::MatrixBase< DerivedP > & | PD2, | ||
const Eigen::MatrixBase< DerivedP > & | BIS1_combed, | ||
const Eigen::MatrixBase< DerivedP > & | BIS2_combed, | ||
Eigen::PlainObjectBase< DerivedP > & | PD1_combed, | ||
Eigen::PlainObjectBase< DerivedP > & | PD2_combed | ||
) |
Computes principal matchings of the vectors of a frame field across face edges, and generates a combed frame field defined on the mesh faces.
This makes use of a combed cross field generated by combing the field created by the bisectors of the frame field.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 4 eigen Matrix of face (quad) indices |
[in] | PD1 | #F by 3 eigen Matrix of the first per face cross field vector |
[in] | PD2 | #F by 3 eigen Matrix of the second per face cross field vector |
[in] | BIS1_combed | #F by 3 eigen Matrix of the first combed bisector field vector |
[in] | BIS2_combed | #F by 3 eigen Matrix of the second combed bisector field vector |
[out] | PD1_combed | #F by 3 eigen Matrix of the first combed cross field vector |
[out] | PD2_combed | #F by 3 eigen Matrix of the second combed cross field vector |
void igl::comb_line_field | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedV > & | PD1in, | ||
Eigen::PlainObjectBase< DerivedV > & | PD1out | ||
) |
Computes principal matchings of the vectors of a cross field across face edges, and generates a combed cross field defined on the mesh faces.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 4 eigen Matrix of face (quad) indices |
[in] | PD1in | #F by 3 eigen Matrix of the first per face cross field vector |
[out] | PD1out | #F by 3 eigen Matrix of the first combed cross field vector |
void igl::combine | ( | const std::vector< DerivedVV > & | VV, |
const std::vector< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedVsizes > & | Vsizes, | ||
Eigen::PlainObjectBase< DerivedFsizes > & | Fsizes | ||
) |
Concatenate k meshes into a single >=k connected component mesh with a single vertex list and face list.
Similar to Maya's Combine operation.
[in] | VV | k-long list of lists of mesh vertex positions |
[in] | FF | k-long list of lists of mesh face indices so that FF[i] indexes VV[i] |
[out] | V | VV[0].rows()+...+VV[k-1].rows() by VV[0].cols() list of mesh vertex positions |
[out] | F | FF[0].rows()+...+FF[k-1].rows() by FF[0].cols() list of mesh faces indices into V |
[out] | Vsizes | k list so that Vsizes(i) is the #vertices in the ith input |
[out] | Fsizes | k list so that Fsizes(i) is the #faces in the ith input |
void igl::combine | ( | const std::vector< DerivedVV > & | VV, |
const std::vector< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::compute_frame_field_bisectors | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedV > & | B1, | ||
const Eigen::MatrixBase< DerivedV > & | B2, | ||
const Eigen::MatrixBase< DerivedV > & | PD1, | ||
const Eigen::MatrixBase< DerivedV > & | PD2, | ||
Eigen::PlainObjectBase< DerivedV > & | BIS1, | ||
Eigen::PlainObjectBase< DerivedV > & | BIS2 | ||
) |
Compute bisectors of a frame field defined on mesh faces.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 3 eigen Matrix of face (triangle) indices |
[in] | B1 | #F by 3 eigen Matrix of face (triangle) base vector 1 |
[in] | B2 | #F by 3 eigen Matrix of face (triangle) base vector 2 |
[in] | PD1 | #F by 3 eigen Matrix of the first per face frame field vector |
[in] | PD2 | #F by 3 eigen Matrix of the second per face frame field vector |
[out] | BIS1 | #F by 3 eigen Matrix of the first per face frame field bisector |
[out] | BIS2 | #F by 3 eigen Matrix of the second per face frame field bisector |
void igl::compute_frame_field_bisectors | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedV > & | PD1, | ||
const Eigen::MatrixBase< DerivedV > & | PD2, | ||
Eigen::PlainObjectBase< DerivedV > & | BIS1, | ||
Eigen::PlainObjectBase< DerivedV > & | BIS2 | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::connect_boundary_to_infinity | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedFO > & | FO | ||
) |
Connect all boundary edges to a fictitious point at infinity.
[in] | F | #F by 3 list of face indices into some V |
[out] | FO | #F+#O by 3 list of face indices into [V;inf inf inf], original F are guaranteed to come first. If (V,F) was a manifold mesh, now it is closed with a possibly non-manifold vertex at infinity (but it will be edge-manifold). |
void igl::connect_boundary_to_infinity | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const typename DerivedF::Scalar | inf_index, | ||
Eigen::PlainObjectBase< DerivedFO > & | FO | ||
) |
Connect all boundary edges to a fictitious point at infinity.
[in] | F | #F by 3 list of face indices into some V |
[in] | inf_index | index of point at infinity (usually V.rows() or F.maxCoeff()) |
[out] | FO | #F+#O by 3 list of face indices into [V;inf inf inf], original F are guaranteed to come first. If (V,F) was a manifold mesh, now it is closed with a possibly non-manifold vertex at infinity (but it will be edge-manifold). |
void igl::connect_boundary_to_infinity | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedVO > & | VO, | ||
Eigen::PlainObjectBase< DerivedFO > & | FO | ||
) |
Connect all boundary edges to a fictitious point at infinity.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of face indices into some V |
[out] | VO | #V+1 by 3 list of vertex positions, original V are guaranteed to come first. Last point is inf, inf, inf |
[out] | FO | #F+#O by 3 list of face indices into VO |
int igl::connected_components | ( | const Eigen::SparseMatrix< Atype > & | A, |
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedK > & | K | ||
) |
Determine the connected components of a graph described by the input adjacency matrix (similar to MATLAB's graphconncomp or gptoolbox's conncomp, but A is transposed for unsymmetric graphs).
[in] | A | #A by #A adjacency matrix (treated as describing an directed graph) |
[out] | C | #A list of component indices into [0,#K-1] |
[out] | K | #K list of sizes of each component |
void igl::cotmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< Scalar > & | L | ||
) |
Constructs the cotangent stiffness matrix (discrete laplacian) for a given mesh (V,F).
DerivedV | derived type of eigen matrix for V (e.g. derived from MatrixXd) |
DerivedF | derived type of eigen matrix for F (e.g. derived from MatrixXi) |
Scalar | scalar type for eigen sparse matrix (e.g. double) |
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by simplex_size list of mesh elements (triangles or tetrahedra) |
[out] | L | #V by #V cotangent matrix, each row i corresponding to V(i,:) |
void igl::cotmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedI > & | I, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::SparseMatrix< Scalar > & | L, | ||
Eigen::SparseMatrix< Scalar > & | M, | ||
Eigen::SparseMatrix< Scalar > & | P | ||
) |
Cotangent Laplacian (and mass matrix) for polygon meshes according to "Polygon Laplacian Made Simple" [Bunge et al. 2020].
[in] | V | #V by 3 list of mesh vertex positions |
[in] | I | #I vectorized list of polygon corner indices into rows of some matrix V |
[in] | C | #polygons+1 list of cumulative polygon sizes so that C(i+1)-C(i) = size of the ith polygon, and so I(C(i)) through I(C(i+1)-1) are the indices of the ith polygon |
[out] | L | #V by #V polygon Laplacian made simple matrix |
[out] | M | #V by #V mass matrix |
[out] | P | #V+#polygons by #V prolongation operator |
void igl::cotmatrix_entries | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute the cotmatrix contributions (cotangents) of each angle in mesh (V,F)
[in] | V | #V by dim list of rest domain positions |
[in] | F | #F by {3|4} list of {triangle|tetrahedra} indices into V |
[out] | C | #F by 3 list of 1/2*cotangents corresponding angles for triangles, columns correspond to edges [1,2],[2,0],[0,1] or C #F by 6 list of 1/6*cotangents of dihedral angles*edge lengths for tets, columns along edges [1,2],[2,0],[0,1],[3,0],[3,1],[3,2] |
void igl::cotmatrix_entries | ( | const Eigen::MatrixBase< Derivedl > & | l, |
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute the cotmatrix contributions (cotangents) of each angle in mesh with edge lengths (l)
[in] | l | #F by 3 list of triangle edge lengths (see edge_lengths) |
[out] | C | #F by 3 list of 1/2*cotangents corresponding angles for triangles, columns correspond to edges [1,2],[2,0],[0,1] |
void igl::cotmatrix_intrinsic | ( | const Eigen::MatrixBase< Derivedl > & | l, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< Scalar > & | L | ||
) |
Constructs the cotangent stiffness matrix (discrete laplacian) for a given mesh with faces F and edge lengths l.
[in] | l | #F by 3 list of (half-)edge lengths |
[in] | F | #F by 3 list of face indices into some (not necessarily determined/embedable) list of vertex positions V. It is assumed #V == F.maxCoeff()+1 |
[out] | L | #V by #V sparse Laplacian matrix |
void igl::count | ( | const Eigen::SparseMatrix< XType > & | X, |
const int | dim, | ||
Eigen::SparseVector< SType > & | S | ||
) |
Count the number of non-zeros in the columns or rows of a sparse matrix.
[in] | X | m by n sparse matrix |
[in] | dim | dimension along which to sum (1 or 2) |
[out] | S | n-long sparse vector (if dim == 1) or m-long sparse vector (if dim == 2) |
void igl::count | ( | const Eigen::SparseMatrix< XType > & | X, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Outputs a dense vector.
void igl::covariance_scatter_matrix | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const ARAPEnergyType | energy, | ||
Eigen::SparseMatrix< double > & | CSM | ||
) |
Construct the covariance scatter matrix for a given arap energy.
[in] | V | #V by Vdim list of initial domain positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | energy | ARAPEnergyType enum value defining which energy is being used. See ARAPEnergyType.h for valid options and explanations. |
[out] | CSM | dim*#V/#F by dim*#V sparse matrix containing special laplacians along the diagonal so that when multiplied by V gives covariance matrix elements, can be used to speed up covariance matrix computation |
void igl::cr_vector_curvature_correction | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarK > & | K | ||
) |
Computes the vector Crouzeix-Raviart curvature correction term of Oded Stein, Alec Jacobson, Max Wardetzky, Eitan Grinspun, 2020.
"A Smoothness Energy without Boundary Distortion for Curved Surfaces", but using the basis functions by Oded Stein, Max Wardetzky, Alec Jacobson, Eitan Grinspun, 2020. "A Simple Discretization of the Vector Dirichlet Energy"
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into rows of V |
[in] | E | #F by 4 a mapping from each halfedge to each edge |
[in] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge compared to the orientation of the actual edge, as computed with orient_halfedges. will be computed if not provided. |
[out] | K | 2*|HE| by 2*|HE| computed curvature correction matrix |
void igl::cr_vector_curvature_correction | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarK > & | K | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
E
and oE
are computed and output.
void igl::cr_vector_curvature_correction_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< Derivedtheta > & | theta, | ||
const Eigen::MatrixBase< Derivedkappa > & | kappa, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarK > & | K | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
intrinsic version.
[in] | l_sq | #F by 3 list of squared edge lengths of each halfedge |
[in] | theta | #F by 3 list of the tip angles at each halfedge |
[in] | kappa | #V by 1 list of the Gaussian curvature at each vertex |
void igl::cr_vector_curvature_correction_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarK > & | K | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. include/igl/cr_vector_curvature_correction.h.
void igl::cr_vector_curvature_correction_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< Derivedtheta > & | theta, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarK > & | K | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. include/igl/cr_vector_curvature_correction.h.
void igl::cr_vector_laplacian | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarL > & | L | ||
) |
Computes the CR vector Laplacian matrix.
See Oded Stein, Max Wardetzky, Alec Jacobson, Eitan Grinspun, 2020. "A Simple Discretization of the Vector Dirichlet Energy"
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into rows of V |
[in] | E | #F by 3 a mapping from each halfedge to each edge |
[in] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge compared to the orientation of the actual edge, as computed with orient_halfedges. will be computed if not provided. |
[out] | L | 2*|HE| by 2*|HE| computed Laplacian matrix |
void igl::cr_vector_laplacian | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarL > & | L | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
E
and oE
are computed and output.
void igl::cr_vector_laplacian_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< DeriveddA > & | dA, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarL > & | L | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
intrinsic version.
[in] | l_sq | #F by 3 list of squared edge lengths of each halfedge |
[in] | dA | #F list of double areas |
void igl::cr_vector_laplacian_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarL > & | L | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. include/igl/cr_vector_laplacian.h.
void igl::cr_vector_mass | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
Eigen::SparseMatrix< ScalarM > & | M | ||
) |
Computes the CR vector mass matrix, using an arrangement of all parallel degrees of freedom first, and all perpendicular degrees of freedom next.
See Oded Stein, Max Wardetzky, Alec Jacobson, Eitan Grinspun, 2020. "A Simple Discretization of the Vector Dirichlet Energy"
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into rows of V |
[in] | E | #F by 3 a mapping from each halfedge to each edge |
[out] | L | 2*|HE| by 2*|HE| computed Mass matrix |
void igl::cr_vector_mass | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::SparseMatrix< ScalarM > & | M | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
E
are (possibly?) computed and output.
void igl::cr_vector_mass_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DeriveddA > & | dA, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
Eigen::SparseMatrix< ScalarM > & | M | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
intrinsic version.
[in] | dA | #F list of double areas |
void igl::cross | ( | const double * | a, |
const double * | b, | ||
double * | out | ||
) |
Cross product; out = cross(a,b)
[in] | a | left 3d vector |
[in] | b | right 3d vector |
[out] | out | result 3d vector |
void igl::cross | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
const Eigen::PlainObjectBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Computes rowwise cross product C = cross(A,B,2);.
[in] | A | #A by 3 list of row-vectors |
[in] | B | #A by 3 list of row-vectors |
[out] | C | #A by 3 list of row-vectors |
void igl::cross_field_mismatch | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedV > & | PD1, | ||
const Eigen::MatrixBase< DerivedV > & | PD2, | ||
const bool | isCombed, | ||
Eigen::PlainObjectBase< DerivedM > & | mismatch | ||
) |
Calculates the mismatch (integer), at each face edge, of a cross field defined on the mesh faces.
The integer mismatch is a multiple of pi/2 that transforms the cross on one side of the edge to the cross on the other side. It represents the deviation from a Lie connection across the edge.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 3 eigen Matrix of face (quad) indices |
[in] | PD1 | #F by 3 eigen Matrix of the first per face cross field vector |
[in] | PD2 | #F by 3 eigen Matrix of the second per face cross field vector |
[in] | isCombed | boolean, specifying whether the field is combed (i.e. matching has been precomputed. If not, the field is combed first. |
[out] | mismatch | #F by 3 eigen Matrix containing the integer mismatch of the cross field across all face edges |
void igl::crouzeix_raviart_cotmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< LT > & | L, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP | ||
) |
Compute the Crouzeix-Raviart cotangent stiffness matrix.
See for example "Discrete Quadratic Curvature Energies" [Wardetzky, Bergou, Harmon, Zorin, Grinspun 2007]
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3/4 list of triangle/tetrahedron indices |
[out] | L | #E by #E edge/face-based diagonal cotangent matrix |
[out] | E | #E by 2/3 list of edges/faces |
[out] | EMAP | #F*3/4 list of indices mapping allE to E |
void igl::crouzeix_raviart_cotmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
Eigen::SparseMatrix< LT > & | L | ||
) |
Compute the Crouzeix-Raviart cotangent stiffness matrix.
See for example "Discrete Quadratic Curvature Energies" [Wardetzky, Bergou, Harmon, Zorin, Grinspun 2007]
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3/4 list of triangle/tetrahedron indices |
[in] | E | #E by 2/3 list of edges/faces |
[in] | EMAP | #F*3/4 list of indices mapping allE to E |
[out] | L | #E by #E edge/face-based diagonal cotangent matrix |
void igl::crouzeix_raviart_massmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< MT > & | M, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP | ||
) |
CROUZEIX_RAVIART_MASSMATRIX Compute the Crouzeix-Raviart mass matrix where M(e,e) is just the sum of the areas of the triangles on either side of an edge e.
See for example "Discrete Quadratic Curvature Energies" [Wardetzky, Bergou, Harmon, Zorin, Grinspun 2007]
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3/4 list of triangle/tetrahedron indices |
[out] | M | #E by #E edge/face-based diagonal mass matrix |
[out] | E | #E by 2/3 list of edges/faces |
[out] | EMAP | #F*3/4 list of indices mapping allE to E |
void igl::crouzeix_raviart_massmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
Eigen::SparseMatrix< MT > & | M | ||
) |
CROUZEIX_RAVIART_MASSMATRIX Compute the Crouzeix-Raviart mass matrix where M(e,e) is just the sum of the areas of the triangles on either side of an edge e.
See for example "Discrete Quadratic Curvature Energies" [Wardetzky, Bergou, Harmon, Zorin, Grinspun 2007]
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3/4 list of triangle/tetrahedron indices |
[in] | E | #E by 2/3 list of edges/faces |
[in] | EMAP | #F*3/4 list of indices mapping allE to E |
[out] | M | #E by #E edge/face-based diagonal mass matrix |
void igl::cumprod | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
Computes a cumulative product of the columns of X, like matlab's cumprod
.
DerivedX | Type of matrix X |
DerivedY | Type of matrix Y |
[in] | X | m by n Matrix to be cumulatively multiplied. |
[in] | dim | dimension to take cumulative product (1 or 2) |
[out] | Y | m by n Matrix containing cumulative product. |
void igl::cumsum | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
Computes a cumulative sum of the columns of X, like matlab's cumsum
.
DerivedX | Type of matrix X |
DerivedY | Type of matrix Y |
[in] | X | m by n Matrix to be cumulatively summed. |
[in] | dim | dimension to take cumulative sum (1 or 2) |
[out] | Y | m by n Matrix containing cumulative sum. |
void igl::cumsum | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const int | dim, | ||
const bool | zero_prefix, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
Computes a cumulative sum of the columns of [0;X].
[in] | X | m by n Matrix to be cumulatively summed. |
[in] | dim | dimension to take cumulative sum (1 or 2) |
[in] | zero_prefix | whether to use zero prefix |
[out] | Y | if zero_prefix == false m by n Matrix containing cumulative sum else m+1 by n Matrix containing cumulative sum if dim=1 or m by n+1 Matrix containing cumulative sum if dim=2 |
void igl::curved_hessian_energy | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< ScalarQ > & | Q | ||
) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization.
See Oded Stein, Alec Jacobson, Max Wardetzky, Eitan Grinspun, 2020. "A Smoothness Energy without Boundary Distortion for Curved Surfaces"
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | Q | #V by #V Hessian energy matrix |
void igl::curved_hessian_energy | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarQ > & | Q | ||
) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization.
See Oded Stein, Alec Jacobson, Max Wardetzky, Eitan Grinspun, 2020. "A Smoothness Energy without Boundary Distortion for Curved Surfaces"
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[in] | E | #F by 3 a mapping from each halfedge to each edge |
[in] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge |
[out] | Q | #V by #V Hessian energy matrix |
void igl::curved_hessian_energy | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarQ > & | Q | ||
) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization.
See Oded Stein, Alec Jacobson, Max Wardetzky, Eitan Grinspun, 2020. "A Smoothness Energy without Boundary Distortion for Curved Surfaces"
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | E | #F by 3 a mapping from each halfedge to each edge |
[out] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge |
[out] | Q | #V by #V Hessian energy matrix |
void igl::curved_hessian_energy_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarQ > & | Q | ||
) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization.
See Oded Stein, Alec Jacobson, Max Wardetzky, Eitan Grinspun, 2020. "A Smoothness Energy without Boundary Distortion for Curved Surfaces"
[in] | F | #F by 3 list of mesh face indices into rows of V |
[in] | l_sq | #F by 3 list of squared edge lengths of each halfedge |
[in] | E | #F by 3 a mapping from each halfedge to each edge |
[in] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge compared to the orientation of the actual edge, as computed with orient_halfedges. will be computed if not provided. |
[out] | Q | #V by #V Hessian energy matrix |
void igl::curved_hessian_energy_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< DeriveddA > & | dA, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarQ > & | Q | ||
) |
Computes the curved Hessian energy using the Crouzeix-Raviart discretization.
See Oded Stein, Alec Jacobson, Max Wardetzky, Eitan Grinspun, 2020. "A Smoothness Energy without Boundary Distortion for Curved Surfaces"
[in] | F | #F by 3 list of mesh face indices into rows of V |
[in] | l_sq | #F by 3 list of squared edge lengths of each halfedge |
[in] | dA | #F list of double areas |
[in] | E | #F by 3 a mapping from each halfedge to each edge |
[in] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge compared to the orientation of the actual edge, as computed with orient_halfedges. will be computed if not provided. |
[out] | Q | #V by #V Hessian energy matrix |
void igl::cut_mesh | ( | Eigen::PlainObjectBase< DerivedV > & | V, |
Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedC > & | cuts, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Given a mesh and a list of edges that are to be cut, the function generates a new disk-topology mesh that has the cuts at its boundary.
[in,out] | V | #V by 3 list of the vertex positions |
[in,out] | F | #F by 3 list of the faces |
[in] | cuts | #F by 3 list of boolean flags, indicating the edges that need to be cut (has 1 at the face edges that are to be cut, 0 otherwise) |
[out] | I | #V by 1 list of the map between Vn to original V index. |
void igl::cut_mesh | ( | Eigen::PlainObjectBase< DerivedV > & | V, |
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::MatrixBase< DerivedFF > & | FF, | ||
Eigen::MatrixBase< DerivedFFi > & | FFi, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Given a mesh and a list of edges that are to be cut, the function generates a new disk-topology mesh that has the cuts at its boundary.
[in,out] | V | #V by 3 list of the vertex positions |
[in,out] | F | #F by 3 list of the faces |
[in,out] | FF | #F by #3 adjacent matrix, the element i,j is the id of the triangle adjacent to the j edge of triangle i |
[in,out] | FFi | #F by #3 adjacent matrix, the element i,j is the id of edge of the triangle TT(i,j) that is adjacent with triangle i |
[in] | C | #F by 3 list of boolean flags, indicating the edges that need to be cut (has 1 at the face edges that are to be cut, 0 otherwise) |
[out] | I | #V by 1 list of the map between Vn to original V index. |
void igl::cut_mesh | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedC > & | cuts, | ||
Eigen::PlainObjectBase< DerivedV > & | Vn, | ||
Eigen::PlainObjectBase< DerivedF > & | Fn | ||
) |
Given a mesh and a list of edges that are to be cut, the function generates a new disk-topology mesh that has the cuts at its boundary.
[in,out] | V | #V by 3 list of the vertex positions |
[in,out] | F | #F by 3 list of the faces |
[in] | cuts | #F by 3 list of boolean flags, indicating the edges that need to be cut (has 1 at the face edges that are to be cut, 0 otherwise) |
[out] | Vn | #V by 3 list of the vertex positions of the cut mesh. This matrix will be similar to the original vertices except some rows will be duplicated. |
[out] | Fn | #F by 3 list of the faces of the cut mesh(must be triangles). This matrix will be similar to the original face matrix except some indices will be redirected to point to the newly duplicated vertices. |
void igl::cut_mesh | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedC > & | cuts, | ||
Eigen::PlainObjectBase< DerivedV > & | Vn, | ||
Eigen::PlainObjectBase< DerivedF > & | Fn, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Given a mesh and a list of edges that are to be cut, the function generates a new disk-topology mesh that has the cuts at its boundary.
[in,out] | V | #V by 3 list of the vertex positions |
[in,out] | F | #F by 3 list of the faces |
[in] | cuts | #F by 3 list of boolean flags, indicating the edges that need to be cut (has 1 at the face edges that are to be cut, 0 otherwise) |
[out] | Vn | #V by 3 list of the vertex positions of the cut mesh. This matrix will be similar to the original vertices except some rows will be duplicated. |
[out] | Fn | #F by 3 list of the faces of the cut mesh(must be triangles). This matrix will be similar to the original face matrix except some indices will be redirected to point to the newly duplicated vertices. |
[out] | I | #V by 1 list of the map between Vn to original V index. |
void igl::cut_mesh_from_singularities | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedM > & | MMatch, | ||
Eigen::PlainObjectBase< DerivedO > & | seams | ||
) |
Given a mesh (V,F) and the integer mismatch of a cross field per edge (mismatch), finds the cut_graph connecting the singularities (seams) and the degree of the singularities singularity_index.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of faces |
[in] | mismatch | #F by 3 list of per corner integer mismatch |
[out] | seams | #F by 3 list of per corner booleans that denotes if an edge is a seam or not |
void igl::cut_to_disk | ( | const Eigen::MatrixBase< DerivedF > & | F, |
std::vector< std::vector< Index > > & | cuts | ||
) |
Given a triangle mesh, computes a set of edge cuts sufficient to carve the mesh into a topological disk, without disconnecting any connected components.
Nothing else about the cuts (including number, total length, or smoothness) is guaranteed to be optimal.
Simply-connected components without boundary (topological spheres) are left untouched (delete any edge if you really want a disk). All other connected components are cut into disks. Meshes with boundary are supported; boundary edges will be included as cuts.
The cut mesh itself can be materialized using cut_mesh().
Implements the triangle-deletion approach described by Gu et al's "Geometry Images."
Index | Integrable type large enough to represent the total number of faces and edges in the surface represented by F, and all entries of F. |
[in] | F | #F by 3 list of the faces (must be triangles) |
[out] | cuts | List of cuts. Each cut is a sequence of vertex indices (where pairs of consecutive vertices share a face), is simple, and is either a closed loop (in which the first and last indices are identical) or an open curve. Cuts are edge-disjoint. |
void igl::cylinder | ( | const int | axis_devisions, |
const int | height_devisions, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Construct a triangle mesh of a cylinder (without caps)
[in] | axis_devisions | number of vertices around the cylinder |
[in] | height_devisions | number of vertices up the cylinder |
[out] | V | #V by 3 list of mesh vertex positions |
[out] | F | #F by 3 list of triangle indices into V |
bool igl::dated_copy | ( | const std::string & | src_path, |
const std::string & | dir | ||
) |
Copy the given file to a new file with the same basename in dir
directory with the current date and time as a suffix.
[in] | src_path | path to source file |
[in] | dir | directory of destination file |
bool igl::dated_copy | ( | const std::string & | src_path | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Uses current working directory.
bool igl::decimate | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const size_t | max_m, | ||
Eigen::MatrixXd & | U, | ||
Eigen::MatrixXi & | G, | ||
Eigen::VectorXi & | J, | ||
Eigen::VectorXi & | I | ||
) |
Assumes (V,F) is a manifold mesh (possibly with boundary) collapses edges until desired number of faces is achieved.
This uses default edge cost and merged vertex placement functions {edge length, edge midpoint}.
See include/igl/decimate.h for more details.
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3 list of face indices into V. |
[in] | max_m | desired number of output faces |
[out] | U | #U by dim list of output vertex posistions (can be same ref as V) |
[out] | G | #G by 3 list of output face indices into U (can be same ref as G) |
[out] | J | #G list of indices into F of birth face |
[out] | I | #U list of indices into V of birth vertices |
bool igl::decimate | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const size_t | max_m, | ||
Eigen::MatrixXd & | U, | ||
Eigen::MatrixXi & | G, | ||
Eigen::VectorXi & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::decimate | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const decimate_cost_and_placement_callback & | cost_and_placement, | ||
const decimate_stopping_condition_callback & | stopping_condition, | ||
const decimate_pre_collapse_callback & | pre_collapse, | ||
const decimate_post_collapse_callback & | post_collapse, | ||
const Eigen::MatrixXi & | E, | ||
const Eigen::VectorXi & | EMAP, | ||
const Eigen::MatrixXi & | EF, | ||
const Eigen::MatrixXi & | EI, | ||
Eigen::MatrixXd & | U, | ||
Eigen::MatrixXi & | G, | ||
Eigen::VectorXi & | J, | ||
Eigen::VectorXi & | I | ||
) |
Collapses edges of a closed manifold mesh (V,F) using user defined callbacks in a priority queue.
Functions control the cost and placement of each collapse the stopping criteria for queue processing and the callbacks for pre and post collapse operations. See the first implementation in decimate.cpp for an example of how to deal with open/non-manifold meshes and how to adjust cost and placement functions accordingly.
See include/igl/decimate.h for more details.
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3 list of face indices into V. |
[in] | cost_and_placement | function computing cost of collapsing an edge and 3d position where it should be placed: cost_and_placement(V,F,E,EMAP,EF,EI,cost,placement); |
[in] | stopping_condition | function returning whether to stop collapsing edges based on current state. Guaranteed to be called after successfully collapsing edge e removing edges (e,e1,e2) and faces (f1,f2): bool should_stop = stopping_condition(V,F,E,EMAP,EF,EI,Q,Qit,C,e,e1,e2,f1,f2); |
[in] | pre_collapse | callback called with index of edge whose collapse is about to be attempted (see collapse_edge) |
[in] | post_collapse | callback called with index of edge whose collapse was just attempted and a flag revealing whether this was successful (see collapse_edge) |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) |
[in] | EI | #E by 2 list of edge flap corners (see above). |
[out] | U | #U by dim list of output vertex posistions (can be same ref as V) |
[out] | G | #G by 3 list of output face indices into U (can be same ref as G) |
[out] | J | #G list of indices into F of birth face |
[out] | I | #U list of indices into V of birth vertices |
bool igl::decimate | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const decimate_cost_and_placement_callback & | cost_and_placement, | ||
const decimate_stopping_condition_callback & | stopping_condition, | ||
const decimate_pre_collapse_callback & | pre_collapse, | ||
const decimate_post_collapse_callback & | post_collapse, | ||
Eigen::MatrixXd & | U, | ||
Eigen::MatrixXi & | G, | ||
Eigen::VectorXi & | J, | ||
Eigen::VectorXi & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::decimate | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const decimate_cost_and_placement_callback & | cost_and_placement, | ||
const decimate_stopping_condition_callback & | stopping_condition, | ||
Eigen::MatrixXd & | U, | ||
Eigen::MatrixXi & | G, | ||
Eigen::VectorXi & | J, | ||
Eigen::VectorXi & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::decimate_trivial_callbacks | ( | decimate_pre_collapse_callback & | always_try, |
decimate_post_collapse_callback & | never_care | ||
) |
Function to build trivial pre and post collapse actions.
[out] | always_try | function that always returns true (always attempt the next edge collapse) |
[out] | never_care | fuction that is always a no-op (never have a post collapse response) |
unsigned int igl::default_num_threads | ( | unsigned int | force_num_threads = 0 | ) |
Returns the default number of threads used in libigl.
The value returned by the first call to this function is cached. The following strategy is used to determine the default number of threads:
[in] | force_num_threads | User-provided default value. |
void igl::deform_skeleton | ( | const Eigen::MatrixXd & | C, |
const Eigen::MatrixXi & | BE, | ||
const std::vector< Eigen::Affine3d, Eigen::aligned_allocator< Eigen::Affine3d > > & | vA, | ||
Eigen::MatrixXd & | CT, | ||
Eigen::MatrixXi & | BET | ||
) |
Deform a skeleton.
[in] | C | #C by 3 list of joint positions |
[in] | BE | #BE by 2 list of bone edge indices |
[in] | vA | #BE list of bone transformations |
[out] | CT | #BE*2 by 3 list of deformed joint positions |
[out] | BET | #BE by 2 list of bone edge indices (maintains order) |
void igl::deform_skeleton | ( | const Eigen::MatrixXd & | C, |
const Eigen::MatrixXi & | BE, | ||
const Eigen::MatrixXd & | T, | ||
Eigen::MatrixXd & | CT, | ||
Eigen::MatrixXi & | BET | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | T | #BE*4 by 3 list of stacked transformation matrix |
void igl::delaunay_triangulation | ( | const Eigen::MatrixBase< DerivedV > & | V, |
Orient2D | orient2D, | ||
InCircle | incircle, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Given a set of points in 2D, return a Delaunay triangulation of these points.
[in] | V | #V by 2 list of vertex positions |
[in] | orient2D | A functor such that orient2D(pa, pb, pc) returns 1 if pa,pb,pc forms a conterclockwise triangle. -1 if pa,pb,pc forms a clockwise triangle. 0 if pa,pb,pc are collinear. where the argument pa,pb,pc are of type Scalar[2]. |
[in] | incircle | A functor such that incircle(pa, pb, pc, pd) returns 1 if pd is on the positive size of circumcirle of (pa,pb,pc) -1 if pd is on the positive size of circumcirle of (pa,pb,pc) 0 if pd is cocircular with pa, pb, pc. |
[out] | F | #F by 3 of faces in Delaunay triangulation. |
void igl::dfs | ( | const std::vector< std::vector< AType > > & | A, |
const size_t | s, | ||
Eigen::PlainObjectBase< DerivedD > & | D, | ||
Eigen::PlainObjectBase< DerivedP > & | P, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Traverse a directed graph represented by an adjacency list using depth first search.
[in] | A | #V list of adjacency lists |
[in] | s | starting node (index into A) |
[out] | D | #V list of indices into rows of A in the order in which graph nodes are discovered. |
[out] | P | #V list of indices into rows of A of predecessor in resulting spanning tree {-1 indicates root/not discovered), order corresponds to V not D. |
[out] | C | #V list of indices into rows of A in order that nodes are "closed" (all descendants have been discovered) |
void igl::dfs | ( | const std::vector< std::vector< AType > > & | A, |
const size_t | s, | ||
std::vector< DType > & | D, | ||
std::vector< PType > & | P, | ||
std::vector< CType > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::dihedral_angles | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< Derivedtheta > & | theta, | ||
Eigen::PlainObjectBase< Derivedcos_theta > & | cos_theta | ||
) |
Compute dihedral angles for all tets of a given tet mesh (V,T).
[in] | V | #V by dim list of vertex positions |
[in] | T | #V by 4 list of tet indices |
[out] | theta | #T by 6 list of dihedral angles (in radians) |
[out] | cos_theta | #T by 6 list of cosine of dihedral angles (in radians) |
void igl::dihedral_angles_intrinsic | ( | const Eigen::MatrixBase< DerivedL > & | L, |
const Eigen::MatrixBase< DerivedA > & | A, | ||
Eigen::PlainObjectBase< Derivedtheta > & | theta, | ||
Eigen::PlainObjectBase< Derivedcos_theta > & | cos_theta | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Intrinsic version.
[in] | L | #L by 6 list of edge lengths |
[in] | A | #A by 4 list of face areas |
int igl::dijkstra | ( | const IndexType & | source, |
const std::set< IndexType > & | targets, | ||
const std::vector< std::vector< IndexType > > & | VV, | ||
const std::vector< double > & | weights, | ||
Eigen::PlainObjectBase< DerivedD > & | min_distance, | ||
Eigen::PlainObjectBase< DerivedP > & | previous | ||
) |
Dijkstra's algorithm for vertex-weighted shortest paths, with multiple targets.
Adapted from http://rosettacode.org/wiki/Dijkstra%27s_algorithm .
[in] | source | index of source vertex |
[in] | targets | target vector set |
[in] | VV | #V list of lists of incident vertices (adjacency list), e.g. as returned by igl::adjacency_list |
[in] | weights | #V list of scalar vertex weights |
[out] | min_distance | #V by 1 list of the minimum distances from source to all vertices |
[out] | previous | #V by 1 list of the previous visited vertices (for each vertex) - used for backtracking |
int igl::dijkstra | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const std::vector< std::vector< IndexType > > & | VV, | ||
const IndexType & | source, | ||
const std::set< IndexType > & | targets, | ||
Eigen::PlainObjectBase< DerivedD > & | min_distance, | ||
Eigen::PlainObjectBase< DerivedP > & | previous | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int igl::dijkstra | ( | const IndexType & | source, |
const std::set< IndexType > & | targets, | ||
const std::vector< std::vector< IndexType > > & | VV, | ||
Eigen::PlainObjectBase< DerivedD > & | min_distance, | ||
Eigen::PlainObjectBase< DerivedP > & | previous | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::dijkstra | ( | const IndexType & | vertex, |
const Eigen::MatrixBase< DerivedP > & | previous, | ||
std::vector< IndexType > & | path | ||
) |
Backtracking after Dijkstra's algorithm, to find shortest path.
[in] | vertex | vertex to which we want the shortest path (from same source as above) |
[in] | previous | #V by 1 list of the previous visited vertices (for each vertex) - result of Dijkstra's algorithm |
[out] | path | #P by 1 list of vertex indices in the shortest path from vertex to source |
void igl::direct_delta_mush | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const std::vector< Eigen::Affine3d, Eigen::aligned_allocator< Eigen::Affine3d > > & | T, | ||
const Eigen::MatrixBase< DerivedOmega > & | Omega, | ||
Eigen::PlainObjectBase< DerivedU > & | U | ||
) |
Computes Direct Delta Mush Skinning (Variant 0) from "Direct Delta Mush Skinning and Variants".
[in] | V | #V by 3 list of rest pose vertex positions |
[in] | T | #T list of bone pose transformations |
[in] | Omega | #V by #T*10 list of precomputated matrix values |
[out] | U | #V by 3 list of output vertex positions |
void igl::direct_delta_mush_precomputation | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedW > & | W, | ||
const int | p, | ||
const typename DerivedV::Scalar | lambda, | ||
const typename DerivedV::Scalar | kappa, | ||
const typename DerivedV::Scalar | alpha, | ||
Eigen::PlainObjectBase< DerivedOmega > & | Omega | ||
) |
Precomputation for Direct Delta Mush Skinning.
[in] | V | #V by 3 list of rest pose vertex positions |
[in] | F | #F by 3 list of triangle indices into rows of V |
[in] | W | #V by #Edges list of weights |
[in] | p | number of smoothing iterations |
[in] | lambda | rotation smoothing step size |
[in] | kappa | translation smoothness step size |
[in] | alpha | translation smoothness blending weight |
[out] | Omega | #V by #T*10 list of precomputated matrix values |
void igl::directed_edge_orientations | ( | const Eigen::MatrixBase< DerivedC > & | C, |
const Eigen::MatrixBase< DerivedE > & | E, | ||
std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > & | Q | ||
) |
Determine rotations that take each edge from the x-axis to its given rest orientation.
[in] | C | #C by 3 list of edge vertex positions |
[in] | E | #E by 2 list of directed edges |
[out] | Q | #E list of quaternions |
void igl::directed_edge_parents | ( | const Eigen::MatrixBase< DerivedE > & | E, |
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Recover "parents" (preceding edges) in a tree given just directed edges.
[in] | E | #E by 2 list of directed edges |
[out] | P | #E list of parent indices into E (-1) means root |
std::string igl::dirname | ( | const std::string & | path | ) |
Function like PHP's dirname: /etc/passwd --> /etc,.
[in] | path | string containing input path |
double igl::dot | ( | const double * | a, |
const double * | b | ||
) |
Computes out = dot(a,b)
[in] | a | left 3d vector |
[in] | b | right 3d vector |
DerivedV igl::dot_row | ( | const Eigen::PlainObjectBase< DerivedV > & | A, |
const Eigen::PlainObjectBase< DerivedV > & | B | ||
) |
Compute the dot product between each row of A and B.
DerivedV | derived from vertex positions matrix type: i.e. MatrixXd |
[in] | A | eigen matrix r by c |
[in] | B | eigen matrix r by c |
[out] | d | a column vector with r entries that contains the dot product of each corresponding row of A and B |
A.rowwise().dot(B.rowwise())
so this function is a wrapper around the less obvious and less convenient (A.array() * B.array()).rowwise().sum()
. void igl::doublearea | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DeriveddblA > & | dblA | ||
) |
Computes twice the area for each input triangle or quad.
DerivedV | derived type of eigen matrix for V (e.g. derived from MatrixXd) |
DerivedF | derived type of eigen matrix for F (e.g. derived from MatrixXi) |
DeriveddblA | derived type of eigen matrix for dblA (e.g. derived from MatrixXd) |
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by simplex_size list of mesh faces (must be triangles or quads) |
[out] | dblA | #F list of triangle[quad] double areas (SIGNED only for 2D input) |
void igl::doublearea | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
Compute the twice the signed area of a each triangle.
[in] | A | #F by dim list of triangle corner positions |
[in] | B | #F by dim list of triangle corner positions |
[in] | C | #F by dim list of triangle corner positions |
[out] | D | #F list of triangle double areas |
DerivedA::Scalar igl::doublearea_single | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedC > & | C | ||
) |
Compute the twice the signed area of a single triangle.
[in] | A | triangle corner position |
[in] | B | triangle corner position |
[in] | C | triangle corner position |
void igl::doublearea | ( | const Eigen::MatrixBase< Derivedl > & | l, |
const typename Derivedl::Scalar | nan_replacement, | ||
Eigen::PlainObjectBase< DeriveddblA > & | dblA | ||
) |
Compute twice the area of each intrinsic triangle in a mesh.
[in] | l | #F by dim list of edge lengths using for triangles, columns correspond to edges 23,31,12 |
[in] | nan_replacement | what value should be used for triangles whose given edge lengths do not obey the triangle inequality. These may be very wrong (e.g., [100 1 1]) or may be nearly degenerate triangles whose floating point side length computation leads to breach of the triangle inequality. One may wish to set this parameter to 0 if side lengths l are known to come from a valid embedding (e.g., some mesh (V,F)). In that case, the only circumstance the triangle inequality is broken is when the triangle is nearly degenerate and floating point error dominates: hence replacing with zero is reasonable. |
[out] | dblA | #F list of triangle double areas |
void igl::doublearea | ( | const Eigen::MatrixBase< Derivedl > & | l, |
Eigen::PlainObjectBase< DeriveddblA > & | dblA | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
default behavior is to assert on NaNs and leave them in place
void igl::doublearea_quad | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DeriveddblA > & | dblA | ||
) |
Computes twice the area for each input quadrilateral.
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by simplex_size list of mesh faces (must be quadrilaterals) |
[out] | dblA | #F list of quadrilateral double areas |
void igl::dqs | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedW > & | W, | ||
const std::vector< Q, QAlloc > & | vQ, | ||
const std::vector< T > & | vT, | ||
Eigen::PlainObjectBase< DerivedU > & | U | ||
) |
Dual quaternion skinning.
[in] | V | #V by 3 list of rest positions |
[in] | W | #W by #C list of weights |
[in] | vQ | #C list of rotation quaternions |
[in] | vT | #C list of translation vectors |
[out] | U | #V by 3 list of new positions |
void igl::dual_contouring | ( | const std::function< typename DerivedV::Scalar(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> & | f, |
const std::function< Eigen::Matrix< typename DerivedV::Scalar, 1, 3 >(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> & | f_grad, | ||
const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > & | min_corner, | ||
const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > & | max_corner, | ||
const int | nx, | ||
const int | ny, | ||
const int | nz, | ||
const bool | constrained, | ||
const bool | triangles, | ||
const bool | root_finding, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedQ > & | Q | ||
) |
Dual contouring to extract a pure quad mesh from differentiable implicit function using a dense grid.
[in] | f | function returning >0 outside, <0 inside and =0 on the surface |
[in] | f_grad | function returning ∇f/‖∇f‖ |
[in] | min_corner | position of primal grid vertex at minimum corner |
[in] | max_corner | position of primal grid vertex at maximum corner |
[in] | nx | number of vertices on x side of primal grid |
[in] | ny | number of vertices on y side of primal grid |
[in] | nz | number of vertices on z side of primal grid |
[in] | constrained | whether to force dual vertices to lie strictly inside corresponding primal cell (prevents self-intersections at cost of surface quality; marginally slower) |
[in] | triangles | whether to output four triangles instead of one quad per crossing edge (quad mesh usually looks fine) |
[in] | root_finding | whether to use root finding to identify crossing point on each edge (improves quality a lot at cost of performance). If false, use linear interpolation. |
[out] | V | #V by 3 list of outputs vertex positions |
[out] | Q | #Q by 4 (or 3 if triangles=true) face indices into rows of V |
void igl::dual_contouring | ( | const std::function< typename DerivedV::Scalar(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> & | f, |
const std::function< Eigen::Matrix< typename DerivedV::Scalar, 1, 3 >(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> & | f_grad, | ||
const Eigen::MatrixBase< DerivedGf > & | Gf, | ||
const Eigen::MatrixBase< DerivedGV > & | GV, | ||
const int | nx, | ||
const int | ny, | ||
const int | nz, | ||
const bool | constrained, | ||
const bool | triangles, | ||
const bool | root_finding, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedQ > & | Q | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | Gf | nx*ny*nz list of function values so that Gf(k) = f(GV.row(k)) (only needs to be accurate near f=0 and correct sign elsewhere) |
[in] | GV | nx*ny*nz list of grid positions so that the x,y,z grid position is at GV.row(x+nx*(y+z*ny)) |
void igl::dual_contouring | ( | const std::function< typename DerivedV::Scalar(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> & | f, |
const std::function< Eigen::Matrix< typename DerivedV::Scalar, 1, 3 >(const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > &)> & | f_grad, | ||
const Eigen::Matrix< typename DerivedV::Scalar, 1, 3 > & | step, | ||
const Eigen::MatrixBase< DerivedGf > & | Gf, | ||
const Eigen::MatrixBase< DerivedGV > & | GV, | ||
const Eigen::MatrixBase< DerivedGI > & | GI, | ||
const bool | constrained, | ||
const bool | triangles, | ||
const bool | root_finding, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedQ > & | Q | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sparse voxel grid
[in] | Gf | #GV list of corresponding f values. If using root finding then only the sign needs to be correct. |
[in] | GV | #GV by 3 list of sparse grid positions referenced by GI |
[in] | GI | #GI by 2 list of edge indices into rows of GV |
void igl::ears | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< Derivedear > & | ear, | ||
Eigen::PlainObjectBase< Derivedear_opp > & | ear_opp | ||
) |
bool igl::edge_collapse_is_valid | ( | const int | e, |
const Eigen::MatrixXi & | F, | ||
const Eigen::MatrixXi & | E, | ||
const Eigen::VectorXi & | EMAP, | ||
const Eigen::MatrixXi & | EF, | ||
const Eigen::MatrixXi & | EI | ||
) |
Tests whether collapsing exactly two faces and exactly 3 edges from E (e and one side of each face gets collapsed to the other) will result in a mesh with the same topology.
Assumes (V,F) is a closed manifold mesh (except for previouslly collapsed faces which should be set to: [IGL_COLLAPSE_EDGE_NULL IGL_COLLAPSE_EDGE_NULL IGL_COLLAPSE_EDGE_NULL].
[in] | e | index into E of edge to try to collapse. E(e,:) = [s d] or [d s] so that s<d, then d is collapsed to s. |
[in] | F | #F by 3 list of face indices into V. |
[in] | E | #E by 2 list of edge indices into V. |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) |
[in] | EI | #E by 2 list of edge flap corners (see above). |
bool igl::edge_collapse_is_valid | ( | std::vector< int > & | Nsv, |
std::vector< int > & | Ndv | ||
) |
Tests whether collapsing exactly two faces and exactly 3 edges from E (e and one side of each face gets collapsed to the other) will result in a mesh with the same topology.
[in] | Nsv | #Nsv list of "next" vertices circulating around starting vertex of edge |
[in] | Ndv | #Ndv list of "next" vertices circulating around destination vertex of edge |
[out] | Nsv | (side-effect: sorted by value) |
[out] | Ndv | (side-effect: sorted by value) |
void igl::edge_crossings | ( | const Eigen::MatrixBase< DeriveduE > & | uE, |
const Eigen::MatrixBase< DerivedS > & | S, | ||
const typename DerivedS::Scalar | val, | ||
std::unordered_map< int, int > & | uE2I, | ||
Eigen::PlainObjectBase< DerivedT > & | T | ||
) |
Compute the each point that a scalar field crosses a specified value along an edge of a mesh.
[in] | uE | #E by 2 list of edge indices |
[in] | S | #V by 1 list of scalar field values |
[in] | val | value to check for crossings |
[out] | uE2I | #T map from edge index to index in T |
[out] | T | #T by 1 list of parametric coordinates of crossings |
bool igl::edge_exists_near | ( | const Eigen::MatrixBase< DeriveduE > & | uE, |
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
const Index & | a, | ||
const Index & | b, | ||
const Index & | uei | ||
) |
Does edge (a,b) exist in the edges of all faces incident on existing unique edge uei.
[in] | uE | #uE by 2 list of unique undirected edges |
[in] | EMAP | #F*3 list of indices into uE, mapping each directed edge to unique undirected edge |
[in] | uE2E | #uE list of lists of indices into E of coexisting edges |
[in] | E | #F*3 by 2 list of half-edges |
[in] | a | 1st end-point of query edge |
[in] | b | 2nd end-point of query edge |
[in] | uei | index into uE/uE2E of unique edge |
void igl::edge_flaps | ( | const Eigen::MatrixXi & | F, |
const Eigen::MatrixXi & | uE, | ||
const Eigen::VectorXi & | EMAP, | ||
Eigen::MatrixXi & | EF, | ||
Eigen::MatrixXi & | EI | ||
) |
Determine "edge flaps": two faces on either side of a unique edge (assumes edge-manifold mesh)
[in] | F | #F by 3 list of face indices |
[in] | uE | #uE by 2 list of edge indices into V. |
[in] | EMAP | #F*3 list of indices into uE, mapping each directed edge to unique unique edge in uE |
[out] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) |
[out] | EI | #E by 2 list of edge flap corners (see above). |
void igl::edge_flaps | ( | const Eigen::MatrixXi & | F, |
Eigen::MatrixXi & | uE, | ||
Eigen::VectorXi & | EMAP, | ||
Eigen::MatrixXi & | EF, | ||
Eigen::MatrixXi & | EI | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::edge_lengths | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedL > & | L | ||
) |
Constructs a list of lengths of edges opposite each index in a face (triangle/tet) list.
DerivedV | derived from vertex positions matrix type: i.e. MatrixXd |
DerivedF | derived from face indices matrix type: i.e. MatrixXi |
DerivedL | derived from edge lengths matrix type: i.e. MatrixXd |
[in] | V | eigen matrix #V by 3 |
[in] | F | #F by (2|3|4) list of mesh simplex indices into rows of V |
[out] | L | #F by {1|3|6} list of edge lengths for edges, column of lengths for triangles, columns correspond to edges [1,2],[2,0],[0,1] for tets, columns correspond to edges [3 0],[3 1],[3 2],[1 2],[2 0],[0 1] |
void igl::edge_midpoints | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedoE > & | oE, | ||
Eigen::PlainObjectBase< Derivedmps > & | mps | ||
) |
Computes the midpoints of edges in a triangle mesh.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
[in] | E | #F by 3 a mapping from each halfedge to each edge |
[in] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge compared to the orientation of the actual edge, as computed with orient_halfedges. will be computed if not provided. |
[out] | mps | |HE| list of edge midpoints |
void igl::edge_topology | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | EV, | ||
Eigen::PlainObjectBase< DerivedE > & | FE, | ||
Eigen::PlainObjectBase< DerivedE > & | EF | ||
) |
Initialize Edges and their topological relations (assumes an edge-manifold mesh).
[in] | V | #V by dim list of mesh vertex positions (unused) |
[in] | F | #F by 3 list of triangle indices into V |
[out] | EV | #Ex2 matrix storing the edge description as pair of indices to vertices |
[out] | FE | #Fx3 matrix storing the Triangle-Edge relation |
[out] | EF | #Ex2 matrix storing the Edge-Triangle relation |
void igl::edge_vectors | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedoE > & | oE, | ||
Eigen::PlainObjectBase< DerivedvecParallel > & | vecParallel, | ||
Eigen::PlainObjectBase< DerivedvecPerpendicular > & | vecPerpendicular | ||
) |
Computes the normalized edge vectors for edges in a triangle mesh.
whether | to compute edge perpendiculars |
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
[in] | E | #F by 3 a mapping from each halfedge to each edge |
[in] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge compared to the orientation of the actual edge, as computed with orient_halfedges. will be computed if not provided. |
[out] | vecParallel | |HE| list of edge vectors |
[out] | vecPerpendicular | |HE| list of vectors perpendicular to vec |
void igl::edge_vectors | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedoE > & | oE, | ||
Eigen::PlainObjectBase< Derivedvec > & | vec | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::edges | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedE > & | E | ||
) |
Constructs a list of unique edges represented in a given mesh (V,F)
[in] | F | #F by (3|4) list of mesh simplex indices |
[out] | E | #E by 2 list of edges in no particular order |
void igl::edges | ( | const Eigen::MatrixBase< DerivedI > & | I, |
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedE > & | E | ||
) |
Constructs a list of unique edges represented in a given polygon mesh.
[in] | I | #I vectorized list of polygon corner indices into rows of some matrix V |
[in] | C | #polygons+1 list of cumulative polygon sizes so that C(i+1)-C(i) = size of the ith polygon, and so I(C(i)) through I(C(i+1)-1) are the indices of the ith polygon |
[out] | E | #E by 2 list of edges in no particular order |
void igl::edges | ( | const Eigen::SparseMatrix< T > & | A, |
Eigen::PlainObjectBase< DerivedE > & | E | ||
) |
Constructs a list of unique edges represented in a given adjacency matrix.
[in] | A | #V by #V symmetric adjacency matrix |
[out] | E | #E by 2 list of edges in no particular order |
void igl::edges_to_path | ( | const Eigen::MatrixBase< DerivedE > & | E, |
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedK > & | K | ||
) |
Given a set of undirected, unique edges such that all form a single connected compoent with exactly 0 or 2 nodes with valence =1, determine the/a path visiting all nodes.
[in] | E | #E by 2 list of undirected edges |
[out] | I | #E+1 list of nodes in order tracing the chain (loop), if the output is a loop then I(1) == I(end) |
[out] | J | #I-1 list of indices into E of edges tracing I |
[out] | K | #I-1 list of indices into columns of E {0,1} so that K(i) means that E(i,K(i)) comes before the other (i.e., E(i,3-K(i)) ). This means that I(i) == E(J(i),K(i)) for i<#I, or I == E(sub2ind(size(E),J([1:end end]),[K;3-K(end)])))) |
bool igl::eigs | ( | const Eigen::SparseMatrix< Atype > & | A, |
const Eigen::SparseMatrix< Btype > & | B, | ||
const size_t | k, | ||
const EigsType | type, | ||
Eigen::PlainObjectBase< DerivedU > & | sU, | ||
Eigen::PlainObjectBase< DerivedS > & | sS | ||
) |
Compute the first/last k eigen pairs of the generalized eigen value problem:
A u = s B u
Solutions are approximate and sorted.
[in] | A | #A by #A symmetric matrix |
[in] | B | #A by #A symmetric positive-definite matrix |
[in] | k | number of eigen pairs to compute |
[in] | type | whether to extract from the high or low end |
[out] | sU | #A by k list of sorted eigen vectors (descending) |
[out] | sS | k list of sorted eigen values (descending) |
S_type igl::EPS | ( | ) |
Function returning EPS for corresponding type.
S_type igl::EPS_SQ | ( | ) |
Function returning EPS_SQ for corresponding type.
float igl::EPS< float > | ( | ) |
double igl::EPS< double > | ( | ) |
float igl::EPS_SQ< float > | ( | ) |
double igl::EPS_SQ< double > | ( | ) |
int igl::euler_characteristic | ( | const Eigen::MatrixBase< DerivedF > & | F | ) |
Computes the Euler characteristic of a given mesh (V,F)
χ = |V| - |E| + |F|
For example,
[in] | F | #F by dim list of mesh faces (must be triangles) |
void igl::exact_geodesic | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedVS > & | VS, | ||
const Eigen::MatrixBase< DerivedFS > & | FS, | ||
const Eigen::MatrixBase< DerivedVT > & | VT, | ||
const Eigen::MatrixBase< DerivedFT > & | FT, | ||
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
Exact geodesic algorithm for triangular mesh with the implementation from https://code.google.com/archive/p/geodesic/, and the algorithm first described by Mitchell, Mount and Papadimitriou in 1987.
[in] | V | #V by 3 list of 3D vertex positions |
[in] | F | #F by 3 list of mesh faces |
[in] | VS | #VS by 1 vector specifying indices of source vertices |
[in] | FS | #FS by 1 vector specifying indices of source faces |
[in] | VT | #VT by 1 vector specifying indices of target vertices |
[in] | FT | #FT by 1 vector specifying indices of target faces |
[out] | D | #VT+#FT by 1 vector of geodesic distances of each target w.r.t. the nearest one in the source set |
bool igl::example_fun | ( | const Printable & | input | ) |
This is an example of a function, it takes a templated parameter and shovels it into cout.
T | type that supports |
[in] | input | some input of a Printable type |
void igl::exploded_view | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedT > & | T, | ||
const typename DerivedV::Scalar | s, | ||
const typename DerivedV::Scalar | t, | ||
Eigen::PlainObjectBase< DerivedEV > & | EV, | ||
Eigen::PlainObjectBase< DerivedEF > & | EF, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Given a tet-mesh, create a trivial surface mesh (4 triangles per tet) with each tet scaled individually and translated outward from the mesh's centroid, creating an exploded-view visualization.
[in] | V | #V by 3 list of tet mesh vertex positions |
[in] | T | #T by 4 list of tet mesh indices into rows of V |
[in] | s | amount to scale each tet indvidually, typically (0,1] |
[in] | t | amount to scale away from mesh's centroid, typically >=1 |
[out] | EV | #T*4 by 3 list of output mesh vertex positions |
[out] | EF | #T*4 by 3 list of output triangle indices into rows of EV |
[out] | I | #EV list of indices into V revealing birth parent |
[out] | J | #EF list of indices into F revealing birth parent |
std::string igl::extension | ( | const std::string & | path | ) |
void igl::exterior_edges | ( | const Eigen::MatrixXi & | F, |
Eigen::MatrixXi & | E | ||
) |
Determines boundary "edges" and also edges with an odd number of occurrences where seeing edge (i,j) counts as +1 and seeing the opposite edge (j,i) counts as -1.
[in] | F | #F by simplex_size list of "faces" |
[out] | E | #E by simplex_size-1 list of exterior edges |
Eigen::MatrixXi igl::exterior_edges | ( | const Eigen::MatrixXi & | F | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
size_t igl::extract_manifold_patches | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const Eigen::MatrixBase< DeriveduEC > & | uEC, | ||
const Eigen::MatrixBase< DeriveduEE > & | uEE, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Extract a set of maximal patches from a given mesh.
A maximal patch is a subset of the input faces that are connected via manifold edges; a patch is as large as possible.
[in] | F | #F by 3 list representing triangles. |
[in] | EMAP | #F*3 list of indices of unique undirected edges. |
[in] | uEC | #uE+1 list of cumsums of directed edges sharing each unique edge |
[in] | uEE | #F*3 list of indices into E (see igl::unique_edge_map ) |
[out] | P | #F list of patch incides. |
size_t igl::extract_manifold_patches | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | uE2E | #uE list of lists of indices into E of coexisting edges. |
size_t igl::extract_manifold_patches | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::extract_non_manifold_edge_curves | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
std::vector< std::vector< size_t > > & | curves | ||
) |
Extract non-manifold curves from a given mesh.
A non-manifold curves are a set of connected non-manifold edges that does not touch other non-manifold edges except at the end points. They are also maximal in the sense that they cannot be expanded by including more edges.
Assumes the input mesh have all self-intersection resolved. See igl::cgal::remesh_self_intersection for more details.
[in] | F | #F by 3 list representing triangles. |
[in] | EMAP | #F*3 list of indices of unique undirected edges. |
[in] | uE2E | #uE list of lists of indices into E of coexisting edges. |
[out] | curves | An array of arrays of unique edge indices. |
void igl::face_areas | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
Constructs a list of face areas of faces opposite each index in a tet list.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | T | #T by 3 list of tet mesh indices into V |
[out] | A | #T by 4 list of face areas corresponding to faces opposite vertices 0,1,2,3 |
void igl::face_areas | ( | const Eigen::MatrixBase< DerivedL > & | L, |
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Compute tet-mesh face areas from edge lengths.
[in] | L | #T by 6 list of tet-mesh edge lengths corresponding to edges [3 0],[3 1],[3 2],[1 2],[2 0],[0 1] |
void igl::face_areas | ( | const Eigen::MatrixBase< DerivedL > & | L, |
const typename DerivedL::Scalar | doublearea_nan_replacement, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | doublearea_nan_replacement | See doublearea.h |
void igl::face_occurrences | ( | const std::vector< std::vector< IntegerF > > & | F, |
std::vector< IntegerC > & | C | ||
) |
Count the occurances of each face (row) in a list of face indices (irrespecitive of order)
[in] | F | #F by simplex-size |
[out] | C | #F list of counts |
void igl::face_occurrences | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::faces_first | ( | const MatV & | V, |
const MatF & | F, | ||
MatV & | RV, | ||
MatF & | RF, | ||
VecI & | IM | ||
) |
Reorder vertices so that vertices in face list come before vertices that don't appear in the face list.
This is especially useful if the face list contains only surface faces and you want surface vertices listed before internal vertices
MatV | matrix for vertex positions, e.g. MatrixXd |
MatF | matrix for face indices, e.g. MatrixXi |
VecI | vector for index map, e.g. VectorXi |
[in] | V | # vertices by 3 vertex positions |
[in] | F | # faces by 3 list of face indices |
[out] | RV | # vertices by 3 vertex positions, order such that if the jth vertex is some face in F, and the kth vertex is not then j comes before k |
[out] | RF | # faces by 3 list of face indices, reindexed to use RV |
[out] | IM | #V by 1 list of indices such that: RF = IM(F) and RT = IM(T) and RV(IM,:) = V |
void igl::faces_first | ( | MatV & | V, |
MatF & | F, | ||
VecI & | IM | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::facet_adjacency_matrix | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::SparseMatrix< Atype > & | A | ||
) |
Construct a #F×#F adjacency matrix with A(i,j)>0 indicating that faces i and j share an edge.
[in] | F | #F by 3 list of facets |
[out] | A | #F by #F adjacency matrix |
int igl::facet_components | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute connected components of facets based on edge-edge adjacency.
For connected components on vertices see igl::vertex_components
[in] | F | #F by 3 list of triangle indices |
[out] | C | #F list of connected component ids |
void igl::facet_components | ( | const std::vector< std::vector< std::vector< TTIndex > > > & | TT, |
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< Derivedcounts > & | counts | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | TT | #TT by 3 list of list of adjacency triangles (see triangle_triangle_adjacency.h) |
[out] | counts | #C list of number of facets in each components |
void igl::false_barycentric_subdivision | ( | const Eigen::PlainObjectBase< Scalar > & | V, |
const Eigen::PlainObjectBase< Index > & | F, | ||
Eigen::PlainObjectBase< Scalar > & | VD, | ||
Eigen::PlainObjectBase< Index > & | FD | ||
) |
Refine the mesh by adding the barycenter of each face.
[in] | V | #V by 3 coordinates of the vertices |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | VD | #V + #F by 3 coordinate of the vertices of the dual mesh The added vertices are added at the end of VD (should not be same references as (V,F) |
[out] | FD | #F*3 by 3 faces of the dual mesh |
void igl::fast_find_intersections | ( | const Eigen::MatrixBase< DerivedV1 > & | V1, |
const Eigen::MatrixBase< DerivedF1 > & | F1, | ||
const Eigen::MatrixBase< DerivedV2 > & | V2, | ||
const Eigen::MatrixBase< DerivedF2 > & | F2, | ||
Eigen::PlainObjectBase< DerivedI > & | intersect_pairs, | ||
Eigen::PlainObjectBase< DerivedE > & | edges | ||
) |
Identify triangles where two meshes interesect using AABBTree and tri_tri_intersection_test_3d.
[in] | V1 | #V by 3 list representing vertices on the first mesh |
[in] | F1 | #F by 3 list representing triangles on the first mesh |
[in] | V2 | #V by 3 list representing vertices on the second mesh |
[in] | F2 | #F by 3 list representing triangles on the second mesh |
[out] | intersect_pairs | correspondance list of intersecting triangles column 0 - mesh 1, column 1 - mesh2 |
[out] | edges | list of pairs of intersection edges |
void igl::fast_find_intersections | ( | const AABB< DerivedV1, 3 > & | tree, |
const Eigen::MatrixBase< DerivedV1 > & | V1, | ||
const Eigen::MatrixBase< DerivedF1 > & | F1, | ||
const Eigen::MatrixBase< DerivedV2 > & | V2, | ||
const Eigen::MatrixBase< DerivedF2 > & | F2, | ||
Eigen::PlainObjectBase< DerivedI > & | intersect_pairs, | ||
Eigen::PlainObjectBase< DerivedE > & | edges | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | tree | - AABB tree bult from the first mesh |
bool igl::fast_find_self_intersections | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedI > & | intersect, | ||
Eigen::PlainObjectBase< DerivedE > & | edges | ||
) |
Identify triangles where mesh intersects itself using AABBTree and tri_tri_intersection_test_3d.
[in] | V | #V by 3 list representing vertices |
[in] | F | #F by 3 list representing triangles. |
[out] | intersect | #F by 1 indicator that triangle intersects anothe triangle |
[out] | edges | list of pairs of intersection edges |
bool igl::fast_find_self_intersections | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedI > & | intersect | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::fast_winding_number | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedA > & | A, | ||
const std::vector< std::vector< Index > > & | point_indices, | ||
const Eigen::MatrixBase< DerivedCH > & | CH, | ||
const int | expansion_order, | ||
Eigen::PlainObjectBase< DerivedCM > & | CM, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedEC > & | EC | ||
) |
Generate the precomputation for the fast winding number for point data [Barill et.
al 2018].
Given a set of 3D points P, with normals N, areas A, along with octree data, and an expansion order, we define a taylor series expansion at each octree cell.
The octree data is designed to come from igl::octree, and the areas (if not obtained at scan time), may be calculated using igl::copyleft::cgal::point_areas.
[in] | P | #P by 3 list of point locations |
[in] | N | #P by 3 list of point normals |
[in] | A | #P by 1 list of point areas |
[in] | point_indices | a vector of vectors, where the ith entry is a vector of the indices into P that are the ith octree cell's points |
[in] | CH | #OctreeCells by 8, where the ith row is the indices of the ith octree cell's children |
[in] | expansion_order | the order of the taylor expansion. We support 0,1,2. |
[out] | CM | #OctreeCells by 3 list of each cell's center of mass |
[out] | R | #OctreeCells by 1 list of each cell's maximum distance of any point to the center of mass |
[out] | EC | #OctreeCells by #TaylorCoefficients list of expansion coefficients. (Note that #TaylorCoefficients = ∑_{i=1}^{expansion_order} 3^i) |
void igl::fast_winding_number | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedA > & | A, | ||
const std::vector< std::vector< Index > > & | point_indices, | ||
const Eigen::MatrixBase< DerivedCH > & | CH, | ||
const Eigen::MatrixBase< DerivedCM > & | CM, | ||
const Eigen::MatrixBase< DerivedR > & | R, | ||
const Eigen::MatrixBase< DerivedEC > & | EC, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
const BetaType | beta, | ||
Eigen::PlainObjectBase< DerivedWN > & | WN | ||
) |
Evaluate the fast winding number for point data, having already done the the precomputation.
[in] | P | #P by 3 list of point locations |
[in] | N | #P by 3 list of point normals |
[in] | A | #P by 1 list of point areas |
[in] | point_indices | a vector of vectors, where the ith entry is a vector of the indices into P that are the ith octree cell's points |
[in] | CH | #OctreeCells by 8, where the ith row is the indices of the ith octree cell's children |
[in] | CM | #OctreeCells by 3 list of each cell's center of mass |
[in] | R | #OctreeCells by 1 list of each cell's maximum distance of any point to the center of mass |
[in] | EC | #OctreeCells by #TaylorCoefficients list of expansion coefficients. (Note that #TaylorCoefficients = ∑_{i=1}^{expansion_order} 3^i) |
[in] | Q | #Q by 3 list of query points for the winding number |
[in] | beta | This is a Barnes-Hut style accuracy term that separates near feild from far field. The higher the beta, the more accurate and slower the evaluation. We reccommend using a beta value of 2. Note that for a beta value ≤ 0, we use the direct evaluation, rather than the fast approximation |
[out] | WN | #Q by 1 list of windinng number values at each query point |
void igl::fast_winding_number | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedA > & | A, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
const int | expansion_order, | ||
const BetaType | beta, | ||
Eigen::PlainObjectBase< DerivedWN > & | WN | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Evaluate the fast winding number for point data without caching the precomputation.
void igl::fast_winding_number | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedA > & | A, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
Eigen::PlainObjectBase< DerivedWN > & | WN | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::fast_winding_number | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Compute approximate winding number of a triangle soup mesh according to "Fast Winding Numbers for Soups and Clouds" [Barill et al.
2018].
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of triangle mesh indices into rows of V |
[in] | Q | #Q by 3 list of query positions |
[out] | W | #Q list of winding number values |
void igl::fast_winding_number | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const int | order, | ||
FastWindingNumberBVH & | fwn_bvh | ||
) |
Precomputation for computing approximate winding numbers of a triangle soup.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of triangle mesh indices into rows of V |
[in] | order | Taylor series expansion order to use (e.g., 2) |
[out] | fwn_bvh | Precomputed bounding volume hierarchy |
void igl::fast_winding_number | ( | const FastWindingNumberBVH & | fwn_bvh, |
const float | accuracy_scale, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
After precomputation, compute winding number at a each of many points in a list.
[in] | fwn_bvh | Precomputed bounding volume hierarchy |
[in] | accuracy_scale | parameter controlling accuracy (e.g., 2) |
[in] | Q | #Q by 3 list of query positions |
[out] | W | #Q list of winding number values |
Derivedp::Scalar igl::fast_winding_number | ( | const FastWindingNumberBVH & | fwn_bvh, |
const float | accuracy_scale, | ||
const Eigen::MatrixBase< Derivedp > & | p | ||
) |
After precomputation, compute winding number at a single point.
[in] | fwn_bvh | Precomputed bounding volume hierarchy |
[in] | accuracy_scale | parameter controlling accuracy (e.g., 2) |
[in] | p | single position |
bool igl::file_contents_as_string | ( | const std::string | file_name, |
std::string & | content | ||
) |
Read a files contents as plain text into a given string.
[in] | file_name | path to file to be read |
[out] | content | output string containing contents of the given file |
std::string igl::file_contents_as_string | ( | const std::string | file_name | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std::string igl::file_dialog_open | ( | ) |
Open a file dialog to select a file.
std::string igl::file_dialog_save | ( | ) |
Open a file dialog to select a file.
bool igl::file_exists | ( | const std::string | filename | ) |
Check if a file or directory exists like PHP's file_exists function:
http://php.net/manual/en/function.file-exists.php
[in] | filename | path to file |
void igl::find | ( | const Eigen::SparseMatrix< T > & | X, |
Eigen::DenseBase< DerivedI > & | I, | ||
Eigen::DenseBase< DerivedJ > & | J, | ||
Eigen::DenseBase< DerivedV > & | V | ||
) |
Find the non-zero entries and there respective indices in a sparse matrix.
Like matlab's [I,J,V] = find(X)
T | should be a eigen sparse matrix primitive type like int or double |
[in] | X | m by n matrix whose entries are to be found |
[out] | I | nnz vector of row indices of non zeros entries in X |
[out] | J | nnz vector of column indices of non zeros entries in X |
[out] | V | nnz vector of type T non-zeros entries in X |
std::vector< Eigen::Triplet< T > > igl::find | ( | const Eigen::SparseMatrix< T > & | X | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::find | ( | const Eigen::DenseBase< DerivedX > & | X, |
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedV > & | V | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::find | ( | const Eigen::DenseBase< DerivedX > & | X, |
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | I | nnz vector of indices into vectorization of X |
void igl::find | ( | const Eigen::SparseVector< T > & | X, |
Eigen::Matrix< int, Eigen::Dynamic, 1 > & | I, | ||
Eigen::Matrix< T, Eigen::Dynamic, 1 > & | V | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std::vector< int > igl::find | ( | const Eigen::Array< bool, RowsAtCompileTime, 1, 0, MaxRowsAtCompileTime, 1 > & | M | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This overload facilitates the use of bool masks for Eigen slicing
RowsAtCompileTime | number of rows in M at compile time |
void igl::find_cross_field_singularities | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedM > & | mismatch, | ||
Eigen::PlainObjectBase< DerivedO > & | isSingularity, | ||
Eigen::PlainObjectBase< DerivedO > & | singularityIndex | ||
) |
Computes singularities of a cross field, assumed combed.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 3 eigen Matrix of face (quad) indices |
[in] | mismatch | #F by 3 eigen Matrix containing the integer mismatch of the cross field across all face edges |
[out] | isSingularity | #V by 1 boolean eigen Vector indicating the presence of a singularity on a vertex |
[out] | singularityIndex | #V by 1 integer eigen Vector containing the singularity indices |
void igl::find_cross_field_singularities | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedV > & | PD1, | ||
const Eigen::MatrixBase< DerivedV > & | PD2, | ||
Eigen::PlainObjectBase< DerivedO > & | isSingularity, | ||
Eigen::PlainObjectBase< DerivedO > & | singularityIndex, | ||
bool | isCombed = false |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Wrapper that calculates the mismatch if it is not provided.
[in] | PD1 | #F by 3 eigen Matrix of the first per face cross field vector |
[in] | PD2 | #F by 3 eigen Matrix of the second per face cross field vector |
[in] | isCombed | boolean indicating whether the cross field is combed |
void igl::find_zero | ( | const Eigen::SparseMatrix< AType > & | A, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Find the first zero (whether implicit or explicitly stored) in the rows/columns of a matrix.
[in] | A | m by n sparse matrix |
[in] | dim | dimension along which to check for any (1 or 2) |
[out] | I | n-long vector (if dim == 1) {m means no zeros found} or m-long vector (if dim == 2) {n means no zeros found} |
void igl::fit_cubic_bezier | ( | const Eigen::MatrixXd & | d, |
const double | error, | ||
std::vector< Eigen::MatrixXd > & | cubics | ||
) |
Fit a cubic bezier spline (G1 continuous) to an ordered list of input points in any dimension, according to "An algorithm for automatically fitting digitized curves" [Schneider 1990].
[in] | d | #d by dim list of points along a curve to be fit with a cubic bezier spline (should probably be roughly uniformly spaced). If d(0)==d(end), then will treat as a closed curve. |
[in] | error | maximum squared distance allowed |
[out] | cubics | #cubics list of 4 by dim lists of cubic control points |
void igl::fit_cubic_bezier_substring | ( | const Eigen::MatrixXd & | d, |
const int | first, | ||
const int | last, | ||
const Eigen::RowVectorXd & | tHat1, | ||
const Eigen::RowVectorXd & | tHat2, | ||
const double | error, | ||
const bool | force_split, | ||
std::vector< Eigen::MatrixXd > & | cubics | ||
) |
Recursive helper function for fit_cubic_bezier.
include/igl/fit_cubic_bezier.h
[in] | first | index of first point in d of substring |
[in] | last | index of last point in d of substring |
[in] | tHat1 | tangent to use at beginning of spline |
[in] | tHat2 | tangent to use at end of spline |
[in] | error | see above |
[in] | force_split | whether to force a split (i.e., force a recursive call) |
[in] | cubics | running list of cubics so far |
[out] | cubics | running list of cubics so far (new cubics appended) |
void igl::fit_plane | ( | const Eigen::MatrixXd & | V, |
Eigen::RowVector3d & | N, | ||
Eigen::RowVector3d & | C | ||
) |
Fit a plane to a point cloud.
[in] | V | #Vx3 matrix. The 3D point cloud, one row for each vertex. |
[out] | N | 1x3 Vector. The normal of the fitted plane. |
[out] | C | 1x3 Vector. A point that lies in the fitted plane. |
From http://missingbytes.blogspot.com/2012/06/fitting-plane-to-point-cloud.html
void igl::fit_rotations | ( | const Eigen::PlainObjectBase< DerivedS > & | S, |
const bool | single_precision, | ||
Eigen::PlainObjectBase< DerivedD > & | R | ||
) |
Given an input mesh and new positions find rotations for every covariance matrix in a stack of covariance matrices.
[in] | S | nr*dim by dim stack of covariance matrices |
[in] | single_precision | whether to use single precision (faster) |
[out] | R | dim by dim * nr list of rotations |
void igl::fit_rotations_planar | ( | const Eigen::PlainObjectBase< DerivedS > & | S, |
Eigen::PlainObjectBase< DerivedD > & | R | ||
) |
Given an input mesh and new positions find 2D rotations for every vertex that best maps its one ring to the new one ring.
[in] | S | nr*dim by dim stack of covariance matrices, third column and every third row will be ignored |
[out] | R | dim by dim * nr list of rotations, third row and third column of each rotation will just be identity |
double igl::flip_avoiding_line_search | ( | const Eigen::MatrixXi & | F, |
Eigen::MatrixXd & | cur_v, | ||
const Eigen::MatrixXd & | dst_v, | ||
std::function< double(Eigen::MatrixXd &)> & | energy, | ||
double | cur_energy = -1 |
||
) |
A bisection line search for a mesh based energy that avoids triangle flips as suggested in "Bijective Parameterization with Free Boundaries" (Smith J.
and Schaefer S., 2015).
The user specifies an initial vertices position (that has no flips) and target one (that my have flipped triangles). This method first computes the largest step in direction of the destination vertices that does not incur flips, and then minimizes a given energy using this maximal step and a bisection linesearch (see igl::line_search).
Supports both triangle and tet meshes.
[in] | F | #F by 3/4 list of mesh faces or tets |
[in] | cur_v | #V by dim list of variables |
[in] | dst_v | #V by dim list of target vertices. This mesh may have flipped triangles |
[in] | energy | A function to compute the mesh-based energy (return an energy that is bigger than 0) |
[in] | cur_energy(OPTIONAL) | The energy at the given point. Helps save redundant computations. This is optional. If not specified, the function will compute it. |
[out] | cur_v | #V by dim list of variables at the new location |
void igl::flip_edge | ( | Eigen::PlainObjectBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
std::vector< std::vector< uE2EType > > & | uE2E, | ||
const size_t | uei | ||
) |
Flip an edge in a triangle mesh.
The edge specified by uei must have exactly two adjacent faces. Violation will result in exception. Another warning: edge flipping could convert manifold mesh into non-manifold.
[in,out] | F | #F by 3 list of triangles. |
[in,out] | E | #F*3 by 2 list of all of directed edges |
[in,out] | uE | #uE by 2 list of unique undirected edges |
[in,out] | EMAP | #F*3 list of indices into uE, mapping each directed edge to unique undirected edge |
[in,out] | uE2E | #uE list of lists of indices into E of coexisting edges |
[in] | ue | index into uE the edge to be flipped. |
void igl::flipped_triangles | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedX > & | X | ||
) |
Finds the ids of the flipped triangles of the mesh V,F in the UV mapping uv.
[in] | V | #V by 2 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | X | #flipped list of containing the indices into F of the flipped triangles |
Eigen::VectorXi igl::flipped_triangles | ( | const Eigen::MatrixBase< Scalar > & | V, |
const Eigen::MatrixBase< Index > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::flood_fill | ( | const Eigen::MatrixBase< Derivedres > & | res, |
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
Given a 3D array with sparse non-nan (number?) data fill in the NaNs via flood fill.
This should ensure that, e.g., if data near 0 always has a band (surface) of numbered and signed data, then components of nans will be correctly signed.
[in] | res | 3-long list of dimensions of grid |
[in,out] | S | res(0)*res(1)*res(2) list of scalar values (with (many) nans), flood fill data in place |
void igl::floor | ( | const Eigen::PlainObjectBase< DerivedX > & | X, |
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
Floor a given matrix to nearest integers.
[in] | X | m by n matrix of scalars |
[out] | Y | m by n matrix of floored integers |
|
inline |
FOR_EACH Call a given function for each non-zero (i.e., explicit value might actually be ==0) in a Sparse Matrix A in order (of storage).
This is useless unless func has side-effects.
[in] | A | m by n matrix |
[in] | func | function handle with prototype "compatible with" void (Index i, Index j, Scalar & v) . Return values will be ignored. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::forward_kinematics | ( | const Eigen::MatrixXd & | C, |
const Eigen::MatrixXi & | BE, | ||
const Eigen::VectorXi & | P, | ||
const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > & | dQ, | ||
const std::vector< Eigen::Vector3d > & | dT, | ||
std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > & | vQ, | ||
std::vector< Eigen::Vector3d > & | vT | ||
) |
Given a skeleton and a set of relative bone rotations compute absolute rigid transformations for each bone.
[in] | C | #C by dim list of joint positions |
[in] | BE | #BE by 2 list of bone edge indices |
[in] | P | #BE list of parent indices into BE |
[in] | dQ | #BE list of relative rotations |
[in] | dT | #BE list of relative translations |
[out] | vQ | #BE list of absolute rotations |
[out] | vT | #BE list of absolute translations |
void igl::forward_kinematics | ( | const Eigen::MatrixXd & | C, |
const Eigen::MatrixXi & | BE, | ||
const Eigen::VectorXi & | P, | ||
const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > & | dQ, | ||
std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > & | vQ, | ||
std::vector< Eigen::Vector3d > & | vT | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
assuming each dT[i] == {0,0,0}
void igl::forward_kinematics | ( | const Eigen::MatrixXd & | C, |
const Eigen::MatrixXi & | BE, | ||
const Eigen::VectorXi & | P, | ||
const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > & | dQ, | ||
const std::vector< Eigen::Vector3d > & | dT, | ||
Eigen::MatrixXd & | T | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | T | #BE*(dim+1) by dim stack of transposed transformation matrices |
void igl::forward_kinematics | ( | const Eigen::MatrixXd & | C, |
const Eigen::MatrixXi & | BE, | ||
const Eigen::VectorXi & | P, | ||
const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > & | dQ, | ||
Eigen::MatrixXd & | T | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::frame_field_deformer | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const Eigen::MatrixXd & | FF1, | ||
const Eigen::MatrixXd & | FF2, | ||
Eigen::MatrixXd & | V_d, | ||
Eigen::MatrixXd & | FF1_d, | ||
Eigen::MatrixXd & | FF2_d, | ||
const int | iterations = 50 , |
||
const double | lambda = 0.1 , |
||
const bool | perturb_initial_guess = true |
||
) |
Deform a mesh to transform the given per-face frame field to be as close as possible to a cross field, in the least square sense.
[in] | V | #V by 3 coordinates of the vertices |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[in] | FF1 | #F by 3 first representative vector of the frame field |
[in] | FF2 | #F by 3 second representative vector of the frame field |
[out] | V_d | #V? by 3 deformed, first representative vector?? |
[out] | FF1_d | #F by 3 deformed, first representative vector?? |
[out] | FF2_d | #F by 3 deformed, first representative vector?? |
[in] | iterations | number of iterations |
[in] | lambda | laplacian regularization parameter 0=no regularization 1=full regularization |
[in] | perturb_initial_guess | whether to perturb the initial guess |
void igl::frame_to_cross_field | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const Eigen::MatrixXd & | FF1, | ||
const Eigen::MatrixXd & | FF2, | ||
Eigen::MatrixXd & | X | ||
) |
Convert a frame field into its closest cross field.
[in] | V | #V by 3 coordinates of the vertices |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[in] | FF1 | #F by 3 the first representative vector of the frame field (up to permutation and sign) |
[in] | FF2 | #F by 3 the second representative vector of the frame field (up to permutation and sign) |
[out] | X | #F by 3 representative vector of the closest cross field |
void igl::frustum | ( | const typename DerivedP::Scalar | left, |
const typename DerivedP::Scalar | right, | ||
const typename DerivedP::Scalar | bottom, | ||
const typename DerivedP::Scalar | top, | ||
const typename DerivedP::Scalar | nearVal, | ||
const typename DerivedP::Scalar | farVal, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Implementation of the deprecated glFrustum function.
[in] | left | coordinate of left vertical clipping plane |
[in] | right | coordinate of right vertical clipping plane |
[in] | bottom | coordinate of bottom vertical clipping plane |
[in] | top | coordinate of top vertical clipping plane |
[in] | nearVal | distance to near plane |
[in] | farVal | distance to far plane |
[out] | P | 4x4 perspective matrix |
void igl::gaussian_curvature | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedK > & | K | ||
) |
Compute the 2π minus the sum of interior angles at each vertex.
For interior vertices of a manifold mesh this corresponds to the local integral gaussian curvature ("angle deficit", without averaging by local area). For boundary vertices, this quantity is not so meaninful. FWIW, adding π to the output for boundary vertices would produce local integral geodesic curvature along the boundary curve.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 3 eigen Matrix of face (triangle) indices |
[out] | K | #V by 1 eigen Matrix of discrete gaussian curvature values |
|
inline |
double igl::get_seconds | ( | ) |
Current time in seconds.
void igl::grad | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< typename DerivedV::Scalar > & | G, | ||
bool | uniform = false |
||
) |
Gradient operator on a triangle mesh.
Gradient of a scalar function defined on piecewise linear elements (mesh) is constant on each triangle [tetrahedron] i,j,k: grad(Xijk) = (Xj-Xi) * (Vi - Vk)^R90 / 2A + (Xk-Xi) * (Vj - Vi)^R90 / 2A where Xi is the scalar value at vertex i, Vi is the 3D position of vertex i, and A is the area of triangle (i,j,k). ^R90 represent a rotation of 90 degrees
[in] | V | #vertices by 3 list of mesh vertex positions |
[in] | F | #faces by 3 list of mesh face indices [or a #faces by 4 list of tetrahedral indices] |
[out] | G | #faces*dim by #V Gradient operator |
[in] | uniform | boolean (default false) - Use a uniform mesh instead of the vertices V |
void igl::grad_intrinsic | ( | const Eigen::MatrixBase< Derivedl > & | l, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< Gtype > & | G | ||
) |
Construct an intrinsic gradient operator.
[in] | l | #F by 3 list of edge lengths |
[in] | F | #F by 3 list of triangle indices into some vertex list V |
[out] | G | #F*2 by #V gradient matrix: G=[Gx;Gy] where x runs along the 23 edge and y runs in the counter-clockwise 90° rotation. |
void igl::grid | ( | const Eigen::MatrixBase< Derivedres > & | res, |
Eigen::PlainObjectBase< DerivedGV > & | GV | ||
) |
Construct vertices of a regular grid, suitable for input to igl::marching_cubes
[in] | res | #res list of number of vertices along each dimension filling a unit #res-cube |
[out] | GV | res.array().prod() by #res list of mesh vertex positions. |
Scalar igl::grid_search | ( | const std::function< Scalar(DerivedX &) > | f, |
const Eigen::MatrixBase< DerivedLB > & | LB, | ||
const Eigen::MatrixBase< DerivedUB > & | UB, | ||
const Eigen::MatrixBase< DerivedI > & | I, | ||
DerivedX & | X | ||
) |
Global optimization via grid search.
Solve the problem:
minimize f(x) subject to lb ≤ x ≤ ub
by exhaustive grid search.
[in] | f | function to minimize |
[in] | LB | #X vector of finite lower bounds |
[in] | UB | #X vector of finite upper bounds |
[in] | I | #X vector of number of steps for each variable |
[out] | X | #X optimal parameter vector |
void igl::group_sum_matrix | ( | const Eigen::Matrix< int, Eigen::Dynamic, 1 > & | G, |
const int | k, | ||
Eigen::SparseMatrix< T > & | A | ||
) |
Builds a matrix A such that A*V computes the sum of vertices in each group specified by G.
T | should be a eigen sparse matrix primitive type like int or double |
[in] | G | #V list of group indices (0 to k-1) for each vertex, such that vertex i is assigned to group G(i) |
[in] | k | #groups, good choice is max(G)+1 |
[out] | A | #groups by #V sparse matrix such that A*V = group_sums |
void igl::group_sum_matrix | ( | const Eigen::Matrix< int, Eigen::Dynamic, 1 > & | G, |
Eigen::SparseMatrix< T > & | A | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::guess_extension | ( | FILE * | fp, |
std::string & | guess | ||
) |
Given a file pointer at the beginning of a "mesh" file, try to guess the extension of the file format it comes from.
The file pointer is rewound on return.
[in,out] | fp | file pointer, rewound after |
[out] | guess | extension as string. One of "mesh",{"obj"},"off","ply","stl", or "wrl" |
std::string igl::guess_extension | ( | FILE * | fp | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::harmonic | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedb > & | b, | ||
const Eigen::MatrixBase< Derivedbc > & | bc, | ||
const int | k, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Compute k-harmonic weight functions "coordinates".
[in] | V | #V by dim vertex positions |
[in] | F | #F by simplex-size list of element indices |
[in] | b | #b boundary indices into V |
[in] | bc | #b by #W list of boundary values |
[in] | k | power of harmonic operation (1: harmonic, 2: biharmonic, etc) |
[out] | W | #V by #W list of weights |
bool igl::harmonic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< Derivedb > & | b, | ||
const Eigen::MatrixBase< Derivedbc > & | bc, | ||
const int | k, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Compute harmonic map using uniform laplacian operator
bool igl::harmonic | ( | const Eigen::SparseCompressedBase< DerivedL > & | L, |
const Eigen::SparseCompressedBase< DerivedM > & | M, | ||
const Eigen::MatrixBase< Derivedb > & | b, | ||
const Eigen::MatrixBase< Derivedbc > & | bc, | ||
const int | k, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Compute a harmonic map using a given Laplacian and mass matrix.
[in] | L | #V by #V discrete (integrated) Laplacian |
[in] | M | #V by #V mass matrix |
void igl::harmonic | ( | const Eigen::SparseCompressedBase< DerivedL > & | L, |
const Eigen::SparseCompressedBase< DerivedM > & | M, | ||
const int | k, | ||
DerivedQ & | Q | ||
) |
Build the discrete k-harmonic operator (computing integrated quantities).
That is, if the k-harmonic PDE is Q x = 0, then this minimizes x' Q x
[in] | L | #V by #V discrete (integrated) Laplacian |
[in] | M | #V by #V mass matrix |
[in] | k | power of harmonic operation (1: harmonic, 2: biharmonic, etc) |
[out] | Q | #V by #V discrete (integrated) k-Laplacian |
void igl::harmonic | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const int | k, | ||
DerivedQ & | Q | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | V | #V by dim vertex positions |
[in] | F | #F by simplex-size list of element indices |
void igl::harwell_boeing | ( | const Eigen::SparseMatrix< Scalar > & | A, |
int & | num_rows, | ||
std::vector< Scalar > & | V, | ||
std::vector< Index > & | R, | ||
std::vector< Index > & | C | ||
) |
Convert the matrix to Compressed sparse column (CSC or CCS) format, also known as Harwell Boeing format.
As described: http://netlib.org/linalg/html_templates/node92.html or http://en.wikipedia.org/wiki/Sparse_matrix #Compressed_sparse_column_.28CSC_or_CCS.29
Scalar | type of sparse matrix like double |
[in] | A | sparse m by n matrix |
[out] | num_rows | number of rows |
[out] | V | non-zero values, row indices running fastest, size(V) = nnz |
[out] | R | row indices corresponding to vals, size(R) = nnz |
[out] | C | index in vals of first entry in each column, size(C) = num_cols+1 |
void igl::hausdorff | ( | const Eigen::MatrixBase< DerivedVA > & | VA, |
const Eigen::MatrixBase< DerivedFA > & | FA, | ||
const Eigen::MatrixBase< DerivedVB > & | VB, | ||
const Eigen::MatrixBase< DerivedFB > & | FB, | ||
Scalar & | d | ||
) |
Compute the Hausdorff distance between mesh (VA,FA) and mesh (VB,FB).
This is the
d(A,B) = max ( max min d(a,b) , max min d(b,a) ) a∈A b∈B b∈B a∈A
[in] | VA | #VA by 3 list of vertex positions |
[in] | FA | #FA by 3 list of face indices into VA |
[in] | VB | #VB by 3 list of vertex positions |
[in] | FB | #FB by 3 list of face indices into VB |
[out] | d | hausdorff distance |
void igl::hausdorff | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const std::function< Scalar(const Scalar &, const Scalar &, const Scalar &)> & | dist_to_B, | ||
Scalar & | l, | ||
Scalar & | u | ||
) |
Compute lower and upper bounds (l,u) on the Hausdorff distance between a triangle (V) and a pointset (e.g., mesh, triangle soup) given by a distance function handle (dist_to_B).
[in] | V | #V by 3 list of corner positions so that V.row(i) is the position of the ith corner |
[in] | dist_to_B | function taking the x,y,z coordinate of a query position and outputting the closest-point distance to some point-set B |
[out] | l | lower bound on Hausdorff distance |
[out] | u | upper bound on Hausdorff distance |
bool igl::heat_geodesics_precompute | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
HeatGeodesicsData< Scalar > & | data | ||
) |
Precompute factorized solvers for computing a fast approximation of geodesic distances on a mesh (V,F).
[Crane et al. 2013]
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into V |
[out] | data | precomputation data (see heat_geodesics_solve) |
bool igl::heat_geodesics_precompute | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Scalar | t, | ||
HeatGeodesicsData< Scalar > & | data | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | t | "heat" parameter (smaller --> more accurate, less stable) |
void igl::heat_geodesics_solve | ( | const HeatGeodesicsData< Scalar > & | data, |
const Eigen::MatrixBase< Derivedgamma > & | gamma, | ||
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
Compute fast approximate geodesic distances using precomputed data from a set of selected source vertices (gamma).
[in] | data | precomputation data (see heat_geodesics_precompute) |
[in] | gamma | #gamma list of indices into V of source vertices |
[out] | D | #V list of distances to gamma |
void igl::hessian | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< Scalar > & | H | ||
) |
Constructs the finite element Hessian matrix as described in https://arxiv.org/abs/1707.04348, Natural Boundary Conditions for Smoothing in Geometry Processing (Oded Stein, Eitan Grinspun, Max Wardetzky, Alec Jacobson) The interior vertices are NOT set to zero yet.
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | H | dim²⋅::V by #V Hessian matrix, each column i corresponding to V(i,:) |
void igl::hessian_energy | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< Scalar > & | Q | ||
) |
Constructs the Hessian energy matrix using mixed FEM as described in https://arxiv.org/abs/1707.04348 Natural Boundary Conditions for Smoothing in Geometry Processing (Oded Stein, Eitan Grinspun, Max Wardetzky, Alec Jacobson)
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | Q | #V by #V Hessian energy matrix, each row/column i corresponding to V(i,:) |
void igl::histc | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
Count occurrences of values in X between consecutive entries in E.
Like matlab's histc. O(n+m*log(n))
[in] | X | m-long Vector of values |
[in] | E | n-long Monotonically increasing vector of edges |
[out] | N | n-long vector where N(k) reveals how many values in X fall between E(k) <= X < E(k+1) |
[out] | B | m-long vector of bin ids so that B(j) = k if E(k) <= X(j) < E(k+1). B(j) = -1 if X(j) is outside of E. |
void igl::histc | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Truly O(m*log(n))
void igl::histc | ( | const typename DerivedE::Scalar & | x, |
const Eigen::MatrixBase< DerivedE > & | E, | ||
typename DerivedE::Index & | b | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Scalar search wrapper
void igl::hsv_to_rgb | ( | const T * | hsv, |
T * | rgb | ||
) |
Convert RGB to HSV.
[in] | hsv | with
|
[out] | rgb | with:
|
void igl::hsv_to_rgb | ( | const T & | h, |
const T & | s, | ||
const T & | v, | ||
T & | r, | ||
T & | g, | ||
T & | b | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::hsv_to_rgb | ( | const Eigen::PlainObjectBase< DerivedH > & | H, |
Eigen::PlainObjectBase< DerivedR > & | R | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | H | #H by 3 list of hsv values |
[out] | R | #H by 3 list of rgb values |
void igl::icosahedron | ( | Eigen::PlainObjectBase< DerivedV > & | V, |
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
void igl::in_element | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixXi & | Ele, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
const AABB< DerivedV, DIM > & | aabb, | ||
Eigen::VectorXi & | I | ||
) |
Determine whether each point in a list of points is in the elements of a mesh.
DIM | dimension of vertices in V (# of columns) |
[in] | V | #V by dim list of mesh vertex positions. |
[in] | Ele | #Ele by dim+1 list of mesh indices into #V. |
[in] | Q | #Q by dim list of query point positions |
[in] | aabb | axis-aligned bounding box tree object (see AABB.h) |
[out] | I | #Q list of indices into Ele of first containing element (-1 means no containing element) |
void igl::in_element | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixXi & | Ele, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
const AABB< DerivedV, DIM > & | aabb, | ||
Eigen::SparseMatrix< Scalar > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | I | #Q by #Ele sparse matrix revealing whether each element contains each point: I(q,e) means point q is in element e |
void igl::increment_ulp | ( | Eigen::MatrixBase< Derived > & | inout, |
int | it | ||
) |
Increment Unit in Last Place of a matrix.
[in,out] | inout | input matrix |
[in] | it | number of increments |
void igl::infinite_cost_stopping_condition | ( | const decimate_cost_and_placement_callback & | cost_and_placement, |
decimate_stopping_condition_callback & | stopping_condition | ||
) |
Stopping condition function compatible with igl::decimate.
The output function handle will return true if cost of next edge is infinite.
[in] | cost_and_placement | handle being used by igl::collapse_edge |
[out] | stopping_condition |
decimate_stopping_condition_callback igl::infinite_cost_stopping_condition | ( | const decimate_cost_and_placement_callback & | cost_and_placement | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::inradius | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedR > & | R | ||
) |
Compute the inradius of each triangle in a mesh (V,F)
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[out] | R | #F list of inradii |
void igl::internal_angles | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedK > & | K | ||
) |
Compute internal angles for a triangle mesh.
[in] | V | #V by dim eigen Matrix of mesh vertex nD positions |
[in] | F | #F by poly-size eigen Matrix of face (triangle) indices |
[out] | K | #F by poly-size eigen Matrix of internal angles for triangles, columns correspond to edges [1,2],[2,0],[0,1] |
void igl::internal_angles_intrinsic | ( | const Eigen::MatrixBase< DerivedL > & | L_sq, |
Eigen::PlainObjectBase< DerivedK > & | K | ||
) |
Compute internal angles for a triangle mesh.
[in] | L_sq | #F by 3 list of squared edge lengths |
[out] | K | #F by poly-size eigen Matrix of internal angles for triangles, columns correspond to edges [1,2],[2,0],[0,1] |
void igl::intersect | ( | const M & | A, |
const M & | B, | ||
M & | C | ||
) |
Determine the intersect between two sets of coefficients using ==.
M | matrix type that implements indexing by global index M(i) |
[in] | A | matrix of coefficients |
[in] | B | matrix of coefficients |
[out] | C | matrix of elements appearing in both A and B, C is always resized to have a single column |
M igl::intersect | ( | const M & | A, |
const M & | B | ||
) |
overload
void igl::intrinsic_delaunay_cotmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< Scalar > & | L, | ||
Eigen::PlainObjectBase< Derivedl_intrinsic > & | l_intrinsic, | ||
Eigen::PlainObjectBase< DerivedF_intrinsic > & | F_intrinsic | ||
) |
Computes the discrete cotangent Laplacian of a mesh after converting it into its intrinsic Delaunay triangulation (see, e.g., [Fisher et al.
2007].
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of mesh elements (triangles or tetrahedra) |
[out] | L | #V by #V cotangent matrix, each row i corresponding to V(i,:) |
[out] | l_intrinsic | #F by 3 list of intrinsic edge-lengths used to compute L |
[out] | F_intrinsic | #F by 3 list of intrinsic face indices used to compute L |
void igl::intrinsic_delaunay_cotmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< Scalar > & | L | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::intrinsic_delaunay_triangulation | ( | const Eigen::MatrixBase< Derivedl_in > & | l_in, |
const Eigen::MatrixBase< DerivedF_in > & | F_in, | ||
Eigen::PlainObjectBase< Derivedl > & | l, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
INTRINSIC_DELAUNAY_TRIANGULATION Flip edges intrinsically until all are "intrinsic Delaunay".
See "An algorithm for the construction of intrinsic delaunay triangulations with applications to digital geometry processing" [Fisher et al. 2007].
[in] | l_in | #F_in by 3 list of edge lengths (see edge_lengths) |
[in] | F_in | #F_in by 3 list of face indices into some unspecified vertex list V |
[out] | l | #F by 3 list of edge lengths |
[out] | F | #F by 3 list of new face indices. Note: Combinatorially F may contain non-manifold edges, duplicate faces and self-loops (e.g., an edge [1,1] or a face [1,1,1]). However, the intrinsic geometry is still well-defined and correct. See [Fisher et al. 2007] Figure 3 and 2nd to last paragraph of 1st page. Since F may be "non-eddge-manifold" in the usual combinatorial sense, it may be useful to call the more verbose overload below if disentangling edges will be necessary later on. Calling unique_edge_map on this F will give a different result than those outputs. |
void igl::intrinsic_delaunay_triangulation | ( | const Eigen::MatrixBase< Derivedl_in > & | l_in, |
const Eigen::MatrixBase< DerivedF_in > & | F_in, | ||
Eigen::PlainObjectBase< Derivedl > & | l, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
std::vector< std::vector< uE2EType > > & | uE2E | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | E | #F*3 by 2 list of all directed edges, such that E.row(f+#F*c) is the |
[out] | edge | opposite F(f,c) |
[out] | uE | #uE by 2 list of unique undirected edges |
[out] | EMAP | #F*3 list of indices into uE, mapping each directed edge to unique |
[out] | undirected | edge |
[out] | uE2E | #uE list of lists of indices into E of coexisting edges |
void igl::invert_diag | ( | const Eigen::SparseCompressedBase< DerivedX > & | X, |
MatY & | Y | ||
) |
Invert the diagonal entries of a matrix (if the matrix is a diagonal matrix then this amounts to inverting the matrix)
T | should be a eigen sparse matrix primitive type like int or double |
[in] | X | an m by n sparse matrix |
[out] | Y | an m by n sparse matrix |
std::vector< bool > igl::is_border_vertex | ( | const Eigen::MatrixBase< DerivedF > & | F | ) |
Determine vertices on open boundary of a (manifold) mesh with triangle faces F.
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
void igl::is_boundary_edge | ( | const Eigen::PlainObjectBase< DerivedE > & | E, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
Determine for each edge E if it is a "boundary edge" in F.
Boundary edges are undirected edges which occur only once.
[in] | E | #E by 2 list of edges |
[in] | F | #F by 3 list of triangles |
[out] | B | #E list bools. true iff unoriented edge occurs exactly once in F (non-manifold and non-existant edges will be false) |
void igl::is_boundary_edge | ( | const Eigen::PlainObjectBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | E | #E by 2 list of edges |
[out] | EMAP | #F*3 list of indices mapping allE to E |
void igl::is_delaunay | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
IDetermine if each edge in the mesh (V,F) is Delaunay.
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3 list of triangles indices |
[out] | D | #F by 3 list of bools revealing whether edges corresponding 23 31 12 are locally Delaunay. Boundary edges are by definition Delaunay. Non-Manifold edges are by definition not Delaunay. |
bool igl::is_delaunay | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
const InCircle | incircle, | ||
const ueiType | uei | ||
) |
Determine whether a single edge is Delaunay using a provided (extrinsic) incirle test.
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3 list of triangles indices |
[in] | uE2E | #uE list of lists of indices into E of coexisting edges (see unique_edge_map) |
[in] | incircle | A functor such that incircle(pa, pb, pc, pd) returns 1 if pd is on the positive size of circumcirle of (pa,pb,pc) -1 if pd is on the positive size of circumcirle of (pa,pb,pc) 0 if pd is cocircular with pa, pb, pc. (see delaunay_triangulation) |
[in] | uei | index into uE2E of edge to check |
bool igl::is_dir | ( | const char * | filename | ) |
Tells whether the given filename is a directory.
Act like php's is_dir function http://php.net/manual/en/function.is-dir.php
[in] | filename | Path to the file. If filename is a relative filename, it will be checked relative to the current working directory. |
bool igl::is_edge_manifold | ( | const Eigen::MatrixBase< DerivedF > & | F | ) |
Check if the mesh is edge-manifold (every edge is incident one one face (boundary) or two oppositely oriented faces).
[in] | F | #F by 3 list of triangle indices |
bool igl::is_edge_manifold | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedBF > & | BF, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
Eigen::PlainObjectBase< DerivedBE > & | BE | ||
) |
Checks if mesh is edge-manifold and outputs per-edge info.
[in] | F | #F by 3 list of triangle indices |
[out] | BF | #F by 3 list of flags revealing if edge opposite corresponding vertex |
[out] | is | non-manifold. |
[out] | E | #E by 2 list of unique edges |
[out] | EMAP | 3*#F list of indices of opposite edges in "E" |
[out] | BE | #E list of flages whether edge is non-manifold |
bool igl::is_edge_manifold | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const typename DerivedF::Index | ne, | ||
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
Eigen::PlainObjectBase< DerivedBF > & | BF, | ||
Eigen::PlainObjectBase< DerivedBE > & | BE | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::is_file | ( | const char * | filename | ) |
Tells whether the given filename is a regular file.
Act like php's is_file function http://php.net/manual/en/function.is-file.php
[in] | filename | Path to the file. If filename is a relative filename, it will be checked relative to the current working directory. |
void igl::is_intrinsic_delaunay | ( | const Eigen::MatrixBase< Derivedl > & | l, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
Determine if each edge in the mesh (V,F) is Delaunay.
[in] | l | #l by dim list of edge lengths |
[in] | F | #F by 3 list of triangles indices |
[out] | D | #F by 3 list of bools revealing whether edges corresponding 23 31 12 are locally Delaunay. Boundary edges are by definition Delaunay. Non-Manifold edges are by definition not Delaunay. |
void igl::is_intrinsic_delaunay | ( | const Eigen::MatrixBase< Derivedl > & | l, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | uE2E | #uE list of lists mapping unique edges to (half-)edges |
bool igl::is_intrinsic_delaunay | ( | const Eigen::MatrixBase< Derivedl > & | l, |
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
const Index | num_faces, | ||
const Index | uei | ||
) |
Determine whether a single edge is Delaunay using a provided (extrinsic) incirle test.
[in] | l | #l by dim list of edge lengths |
[in] | uE2E | #uE list of lists of indices into E of coexisting edges (see unique_edge_map) |
[in] | num_faces | number of faces (==#F) |
[in] | uei | index into uE2E of edge to check |
std::vector< bool > igl::is_irregular_vertex | ( | const Eigen::MatrixBase< DerivedF > & | F | ) |
Determine if a vertex is irregular, i.e.
it has more than 6 (triangles) or 4 (quads) incident edges. Vertices on the boundary are ignored.
[in] | F | #F by 3[4] list of triangle[quads] indices |
bool igl::is_planar | ( | const Eigen::MatrixXd & | V | ) |
Determine if a set of points lies on the XY plane.
[in] | V | #V by dim list of vertex positions |
bool igl::is_readable | ( | const char * | filename | ) |
Check if a file is reabable like PHP's is_readable function: http://www.php.net/manual/en/function.is-readable.php.
[in] | filename | path to file |
bool igl::is_sparse | ( | const Eigen::SparseMatrix< T > & | A | ) |
Determine if a matrix A is sparse.
T,DerivedA | defines scalar type |
[in] | A | matrix in question |
bool igl::is_sparse | ( | const Eigen::PlainObjectBase< DerivedA > & | A | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::is_stl | ( | FILE * | stl_file, |
bool & | is_ascii | ||
) |
Given a file pointer, determine if it contains an .stl file and then rewind it.
[in] | stl_file | pointer to file |
[in] | is_ascii | flag whether stl is ascii |
bool igl::is_stl | ( | FILE * | stl_file | ) |
bool igl::is_symmetric | ( | const Eigen::SparseMatrix< AT > & | A | ) |
Returns true if the given matrix is symmetric.
[in] | A | m by m matrix |
bool igl::is_symmetric | ( | const Eigen::SparseMatrix< AT > & | A, |
const epsilonT | epsilon | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | epsilon | threshold on L1 difference between A and A' |
bool igl::is_symmetric | ( | const Eigen::PlainObjectBase< DerivedA > & | A | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::is_vertex_manifold | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
Check if a mesh is vertex-manifold.
This only checks whether the faces incident on each vertex form exactly one connected component. Vertices incident on non-manifold edges are not consider non-manifold by this function (see is_edge_manifold.h). Unreferenced verties are considered non-manifold (zero components).
[in] | F | #F by 3 list of triangle indices |
[out] | B | #V list indicate whether each vertex is locally manifold. |
bool igl::is_vertex_manifold | ( | const Eigen::MatrixBase< DerivedF > & | F | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::is_writable | ( | const char * | filename | ) |
Check if a file exists and is writable like PHP's is_writable function: http://www.php.net/manual/en/function.is-writable.php.
[in] | filename | path to file |
bool igl::isdiag | ( | const Eigen::SparseCompressedBase< Derived > & | A | ) |
Determine if a given matrix is diagonal: all non-zeros lie on the main diagonal.
[in] | A | m by n sparse matrix |
void igl::ismember | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedIA > & | IA, | ||
Eigen::PlainObjectBase< DerivedLOCB > & | LOCB | ||
) |
Determine if elements of A exist in elements of B.
[in] | A | ma by na matrix |
[in] | B | mb by nb matrix |
[out] | IA | ma by na matrix of flags whether corresponding element of A exists in B |
[out] | LOCB | ma by na matrix of indices in B locating matching element (-1 if not found), indices assume column major ordering |
void igl::ismember_rows | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedIA > & | IA, | ||
Eigen::PlainObjectBase< DerivedLOCB > & | LOCB | ||
) |
Determine if row of A exist in rows of B.
[in] | A | ma by na matrix |
[in] | B | mb by nb matrix |
[out] | IA | ma by 1 lest of flags whether corresponding element of A exists in B |
[out] | LOCB | ma by 1 list matrix of indices in B locating matching element (-1 if not found), indices assume column major ordering |
void igl::isolines | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
const Eigen::MatrixBase< Derivedvals > & | vals, | ||
Eigen::PlainObjectBase< DerivediV > & | iV, | ||
Eigen::PlainObjectBase< DerivediE > & | iE, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Compute isolines of a scalar field on a triangle mesh.
Isolines may cross perfectly at vertices. The output should not contain degenerate segments (so long as the input does not contain degenerate faces). The output segments are oriented so that isolines curl counter-clockwise around local maxima (i.e., for 2D scalar fields). Unless an isoline hits a boundary, it should be a closed loop. Isolines may run perfectly along boundaries. Isolines should appear just "above" constants regions.
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of mesh triangle indices into V |
[in] | S | #S by 1 list of per-vertex scalar values |
[in] | vals | #vals by 1 list of values to compute isolines for |
[out] | iV | #iV by dim list of isoline vertex positions |
[out] | iE | #iE by 2 list of edge indices into iV |
[out] | I | #iE by 1 list of indices into vals indicating which value each segment belongs to |
void igl::isolines_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedS > & | S, | ||
const Eigen::MatrixBase< Derivedvals > & | vals, | ||
Eigen::PlainObjectBase< DerivediB > & | iB, | ||
Eigen::PlainObjectBase< DerivediFI > & | iFI, | ||
Eigen::PlainObjectBase< DerivediE > & | iE, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Compute isolines of a scalar field on a triangle mesh intrinsically.
See isolines.h for details.
[in] | F | #F by 3 list of mesh triangle indices into some V |
[in] | S | #S by 1 list of per-vertex scalar values |
[in] | vals | #vals by 1 list of values to compute isolines for |
[out] | iB | #iB by 3 list of barycentric coordinates so that iV.row(i) = iB(i,0)*V.row(F(iFI(i,0)) + iB(i,1)*V.row(F(iFI(i,1)) + iB(i,2)*V.row(F(iFI(i,2)) |
[out] | iF | #iB list of triangle indices for each row of iB (all points will either lie on an edge or vertex: an arbitrary incident face will be given). |
[out] | iE | #iE by 2 list of edge indices into iB |
[out] | I | #iE by 1 list of indices into vals indicating which value each segment belongs to |
void igl::isolines_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedS > & | S, | ||
const Eigen::MatrixBase< DeriveduE > & | uE, | ||
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const Eigen::MatrixBase< DeriveduEC > & | uEC, | ||
const Eigen::MatrixBase< DeriveduEE > & | uEE, | ||
const typename DerivedS::Scalar | val, | ||
Eigen::PlainObjectBase< DerivediB > & | iB, | ||
Eigen::PlainObjectBase< DerivediFI > & | iFI, | ||
Eigen::PlainObjectBase< DerivediE > & | iE | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | val | scalar value to compute isoline at |
[in] | uE | #uE by 2 list of unique undirected edges |
[in] | EMAP | #F*3 list of indices into uE, mapping each directed edge to unique undirected edge so that uE(EMAP(f+#F*c)) is the unique edge corresponding to E.row(f+#F*c) |
[in] | uEC | #uE+1 list of cumulative counts of directed edges sharing each unique edge so the uEC(i+1)-uEC(i) is the number of directed edges sharing the ith unique edge. |
[in] | uEE | #E list of indices into E, so that the consecutive segment of indices uEE.segment(uEC(i),uEC(i+1)-uEC(i)) lists all directed edges sharing the ith unique edge. |
void igl::isolines_map | ( | const Eigen::MatrixBase< DerivedCM > & | CM, |
const Eigen::MatrixBase< Derivediso_color > & | iso_color, | ||
const int | interval_thickness, | ||
const int | iso_thickness, | ||
Eigen::PlainObjectBase< DerivedICM > & | ICM | ||
) |
Inject a given colormap with evenly spaced isolines.
[in] | CM | #CM by 3 list of colors |
[in] | ico_color | 1 by 3 isoline color |
[in] | interval_thickness | number of times to repeat intervals (original colors) |
[in] | iso_thickness | number of times to repeat isoline color (in between intervals) |
[out] | ICM | #CM*interval_thickness + (#CM-1)*iso_thickness by 3 list of outputs colors |
void igl::isolines_map | ( | const Eigen::MatrixBase< DerivedCM > & | CM, |
Eigen::PlainObjectBase< DerivedICM > & | ICM | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::iterative_closest_point | ( | const Eigen::MatrixBase< DerivedVX > & | VX, |
const Eigen::MatrixBase< DerivedFX > & | FX, | ||
const Eigen::MatrixBase< DerivedVY > & | VY, | ||
const Eigen::MatrixBase< DerivedFY > & | FY, | ||
const int | num_samples, | ||
const int | max_iters, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< Derivedt > & | t | ||
) |
Solve for the rigid transformation that places mesh X onto mesh Y using the iterative closest point method.
In particular, optimize:
min ∫_X inf ‖x*R+t - y‖² dx R∈SO(3) y∈Y t∈R³
Typically optimization strategies include using Gauss Newton ("point-to-plane" linearization) and stochastic descent (sparse random sampling each iteration).
[in] | VX | #VX by 3 list of mesh X vertices |
[in] | FX | #FX by 3 list of mesh X triangle indices into rows of VX |
[in] | VY | #VY by 3 list of mesh Y vertices |
[in] | FY | #FY by 3 list of mesh Y triangle indices into rows of VY |
[in] | num_samples | number of random samples to use (larger --> more accurate, but also more suceptible to sticking to local minimum) |
[out] | R | 3x3 rotation matrix so that (VX*R+t,FX) ~~ (VY,FY) |
[out] | t | 1x3 translation row vector |
void igl::iterative_closest_point | ( | const Eigen::MatrixBase< DerivedVX > & | VX, |
const Eigen::MatrixBase< DerivedFX > & | FX, | ||
const Eigen::MatrixBase< DerivedVY > & | VY, | ||
const Eigen::MatrixBase< DerivedFY > & | FY, | ||
const igl::AABB< DerivedVY, 3 > & | Ytree, | ||
const Eigen::MatrixBase< DerivedNY > & | NY, | ||
const int | num_samples, | ||
const int | max_iters, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< Derivedt > & | t | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | Ytree | precomputed AABB tree for accelerating closest point queries |
[in] | NY | #FY by 3 list of precomputed unit face normals |
void igl::jet | ( | const T | f, |
T * | rgb | ||
) |
Jet colormap like MATLAB's jet.
Wrapper for directly computing [r,g,b] values for a given factor f between 0 and 1
[in] | f | factor determining color value as if 0 was min and 1 was max |
[out] | rgb | resulting rgb color
|
void igl::jet | ( | const T | f, |
T & | r, | ||
T & | g, | ||
T & | b | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::jet | ( | const Eigen::MatrixBase< DerivedZ > & | Z, |
const bool | normalize, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | Z | #Z list of factors |
[in] | normalize | whether to normalize Z to be tightly between [0,1] |
[out] | C | #C by 3 list of rgb colors |
void igl::jet | ( | const Eigen::MatrixBase< DerivedZ > & | Z, |
const double | min_Z, | ||
const double | max_Z, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | min_z | value at blue |
[in] | max_z | value at red |
void igl::kelvinlets | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< Derivedx0 > & | x0, | ||
const Eigen::MatrixBase< Derivedf > & | f, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const KelvinletParams< typename DerivedV::Scalar > & | params, | ||
Eigen::PlainObjectBase< DerivedU > & | U | ||
) |
Implements Pixar's Regularized Kelvinlets (Pixar Technical Memo #17-03): Sculpting Brushes based on Fundamental Solutions of Elasticity, a technique for real-time physically based volume sculpting of virtual elastic materials.
[in] | V | #V by dim list of input points in space |
[in] | x0 | dim-vector of brush tip |
[in] | f | dim-vector of brush force (translation) |
[in] | F | dim by dim matrix of brush force matrix (linear) |
[in] | params | parameters for the kelvinlet brush like brush radius, scale etc |
[out] | X | #V by dim list of output points in space |
void igl::kkt_inverse | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | A, |
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | Aeq, | ||
const bool | use_lu_decomposition, | ||
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | S | ||
) |
Constructs the inverse of the KKT matrix of a convex, linear equality constrained quadratic minimization problem.
Systems of the form:
/ A Aeqᵀ \ / x \ = / b \ \ Aeq 0 / \ λ / \ beq / \_____.______/\__.__/ \___.___/ M z c
Arise, for example, when solve convex, linear equality constrained quadratic minimization problems:
min ½ xᵀ A x - xᵀb subject to Aeq x = beq
This function constructs a matrix S such that x = S c solves the system above. That is:
S = [In 0] M⁻¹ so that x = S c
T | should be a eigen matrix primitive type like float or double |
[in] | A | n by n matrix of quadratic coefficients |
[in] | B | n by 1 column of linear coefficients |
[in] | Aeq | m by n list of linear equality constraint coefficients |
[in] | Beq | m by 1 list of linear equality constraint constant values |
[in] | use_lu_decomposition | use lu rather than SVD |
[out] | S | n by (n + m) "solve" matrix, such that S*[B', Beq'] is a solution |
void igl::knn | ( | const Eigen::MatrixBase< DerivedP > & | P, |
size_t | k, | ||
const std::vector< std::vector< IndexType > > & | point_indices, | ||
const Eigen::MatrixBase< DerivedCH > & | CH, | ||
const Eigen::MatrixBase< DerivedCN > & | CN, | ||
const Eigen::MatrixBase< DerivedW > & | W, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Given a 3D set of points P, an whole number k, and an octree find the indicies of the k nearest neighbors for each point in P.
Note that each point is its own neighbor.
The octree data structures used in this function are intended to be the same ones output from igl::octree
[in] | P | #P by 3 list of point locations |
[in] | k | number of neighbors to find |
[in] | point_indices | a vector of vectors, where the ith entry is a vector of the indices into P that are the ith octree cell's points |
[in] | CH | #OctreeCells by 8, where the ith row is the indices of the ith octree cell's children |
[in] | CN | #OctreeCells by 3, where the ith row is a 3d row vector representing the position of the ith cell's center |
[in] | W | #OctreeCells, a vector where the ith entry is the width of the ith octree cell |
[out] | I | #P by k list of k-nearest-neighbor indices into P |
void igl::knn | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
size_t | k, | ||
const std::vector< std::vector< IndexType > > & | point_indices, | ||
const Eigen::MatrixBase< DerivedCH > & | CH, | ||
const Eigen::MatrixBase< DerivedCN > & | CN, | ||
const Eigen::MatrixBase< DerivedW > & | W, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
only neighbors found in V
[in] | V | #V by 3 list of point locations for which may be neighbors |
[out] | I | #P by k list of k-nearest-neighbor indices into V |
int igl::launch_medit | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedT > & | T, | ||
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const bool | wait | ||
) |
Writes the tetmesh in (V,T,F) to a temporary file, opens it with medit (forking with a system call) and returns.
DerivedV | real-value: i.e. from MatrixXd |
DerivedT | integer-value: i.e. from MatrixXi |
DerivedF | integer-value: i.e. from MatrixXi |
[in] | V | double matrix of vertex positions #V by 3 |
[in] | T | #T list of tet indices into vertex positions |
[in] | F | #F list of face indices into vertex positions |
[in] | wait | whether to wait for medit process to finish before returning |
void igl::lbs_matrix | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXd & | W, | ||
Eigen::MatrixXd & | M | ||
) |
Linear blend skinning can be expressed by V' = M * T where V' is a #V by dim matrix of deformed vertex positions (one vertex per row), M is a #V by (dim+1)*#T (composed of weights and rest positions) and T is a #T*(dim+1) by dim matrix of #T stacked transposed transformation matrices.
See equations (1) and (2) in "Fast Automatic Skinning Transformations" [Jacobson et al 2012]
[in] | V | #V by dim list of rest positions |
[in] | W | #V+ by #T list of weights |
[out] | M | #V by #T*(dim+1) |
In MATLAB:
kron(ones(1,size(W,2)),[V ones(size(V,1),1)]).*kron(W,ones(1,size(V,2)+1))
void igl::lbs_matrix_column | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXd & | W, | ||
Eigen::SparseMatrix< double > & | M | ||
) |
Construct a matrix that when multiplied against a column of affine transformation entries computes new coordinates of the vertices.
[in] | V | #V by dim list of vertex rest positions |
[in] | W | #V by #handles list of correspondence weights |
[out] | M | #V * dim by #handles * dim * (dim+1) matrix such that new_V(:) = LBS(V,W,A) = reshape(M * A,size(V)), where A is a column vectors formed by the entries in each handle's dim by dim+1 transformation matrix. Specifcally, A = reshape(permute(Astack,[3 1 2]),n*dim*(dim+1),1) or A = [Lxx;Lyx;Lxy;Lyy;tx;ty], and likewise for other dim if Astack(:,:,i) is the dim by (dim+1) transformation at handle i |
void igl::lbs_matrix_column | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXd & | W, | ||
Eigen::MatrixXd & | M | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::lbs_matrix_column | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXd & | W, | ||
const Eigen::MatrixXi & | WI, | ||
Eigen::SparseMatrix< double > & | M | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
W as a full matrix of weights (each vertex has #handles weights), a constant number of weights are given for each vertex.
[in] | W | #V by k list of k correspondence weights per vertex |
[in] | WI | #V by k list of k correspondence weight indices per vertex. Such that W(j,WI(i)) gives the ith most significant correspondence weight on vertex j |
void igl::lbs_matrix_column | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXd & | W, | ||
const Eigen::MatrixXi & | WI, | ||
Eigen::MatrixXd & | M | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::lexicographic_triangulation | ( | const Eigen::MatrixBase< DerivedP > & | P, |
Orient2D | orient2D, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Given a set of points in 2D, return a lexicographic triangulation of these points.
[in] | P | #P by 2 list of vertex positions |
[in] | orient2D | A functor such that orient2D(pa, pb, pc) returns 1 if pa,pb,pc forms a conterclockwise triangle. -1 if pa,pb,pc forms a clockwise triangle. 0 if pa,pb,pc are collinear. where the argument pa,pb,pc are of type Scalar[2]. |
[out] | F | #F by 3 of faces in lexicographic triangulation. |
void igl::limit_faces | ( | const MatF & | F, |
const VecL & | L, | ||
const bool | exclusive, | ||
MatF & | LF | ||
) |
Limit given faces F to those which contain (only) indices found in L.
MatF | matrix type of faces, matrixXi |
VecL | matrix type of vertex indices, VectorXi |
[in] | F | #F by 3 list of face indices |
[in] | L | #L by 1 list of allowed indices |
[in] | exclusive | flag specifying whether a face is included only if all its indices are in L, default is false |
[out] | LF | #LF by 3 list of remaining faces after limiting |
void igl::line_field_mismatch | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedV > & | PD1, | ||
const bool | isCombed, | ||
Eigen::PlainObjectBase< DerivedO > & | mismatch | ||
) |
Calculates the mismatch (integer), at each face edge, of a cross field defined on the mesh faces.
The integer mismatch is a multiple of pi/2 that transforms the cross on one side of the edge to the cross on the other side. It represents the deviation from a Lie connection across the edge.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 3 eigen Matrix of face (quad) indices |
[in] | PD1 | #F by 3 eigen Matrix of the first per face cross field vector |
[in] | PD2 | #F by 3 eigen Matrix of the second per face cross field vector |
[in] | isCombed | boolean, specifying whether the field is combed (i.e. matching has been precomputed. If not, the field is combed first. |
[out] | mismatch | #F by 3 eigen Matrix containing the integer mismatch of the cross field across all face edges |
double igl::line_search | ( | Eigen::MatrixXd & | x, |
const Eigen::MatrixXd & | d, | ||
double | i_step_size, | ||
std::function< double(Eigen::MatrixXd &)> | energy, | ||
double | cur_energy = -1 |
||
) |
Implement a bisection linesearch to minimize a mesh-based energy on vertices given at 'x' at a search direction 'd', with initial step size.
Stops when a point with lower energy is found, or after maximal iterations have been reached.
[in] | x | #X by dim list of variables |
[in] | d | #X by dim list of a given search direction |
[in] | i_step_size | initial step size |
[in] | energy | A function to compute the mesh-based energy (return an energy that is bigger than 0) |
[out] | x | #X by dim list of variables at the new location |
[in] | cur_energy(OPTIONAL) | The energy at the given point. Helps save redundant computations. This is optional. If not specified, the function will compute it. |
bool igl::line_segment_in_rectangle | ( | const Eigen::Vector2d & | s, |
const Eigen::Vector2d & | d, | ||
const Eigen::Vector2d & | A, | ||
const Eigen::Vector2d & | B | ||
) |
Determine whether a line segment overlaps with a rectangle.
[in] | s | source point of line segment |
[in] | d | dest point of line segment |
[in] | A | first corner of rectangle |
[in] | B | opposite corner of rectangle |
bool igl::linprog | ( | const Eigen::VectorXd & | c, |
const Eigen::MatrixXd & | A, | ||
const Eigen::VectorXd & | b, | ||
const int | k, | ||
Eigen::VectorXd & | x | ||
) |
Solve a linear program given in "standard form".
min c'x s.t. A( 1:k,:) x <= b(1:k) A(k+1:end,:) x = b(k+1:end) ** x >= 0 **
In contrast to other APIs the entries in b may be negative.
[in] | c | #x list of linear coefficients |
[in] | A | #A by #x matrix of linear constraint coefficients |
[in] | b | #A list of linear constraint right-hand sides |
[in] | k | number of inequality constraints as first rows of A,b |
[out] | x | #x solution vector |
true
. bool igl::linprog | ( | const Eigen::VectorXd & | f, |
const Eigen::MatrixXd & | A, | ||
const Eigen::VectorXd & | b, | ||
const Eigen::MatrixXd & | B, | ||
const Eigen::VectorXd & | c, | ||
Eigen::VectorXd & | x | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Wrapper in friendlier general form (no implicit bounds on x)
min f'x s.t. A x <= b B x = c
[in] | f | #x list of linear coefficients |
[in] | A | #A by #x matrix of linear inequality constraint coefficients |
[in] | b | #A list of linear constraint right-hand sides |
[in] | B | #B by #x matrix of linear equality constraint coefficients |
[in] | c | #B list of linear constraint right-hand sides |
[out] | x | #x solution vector |
|
inline |
Replacement for Eigen::DenseBase::LinSpaced.
[in] | size | number of elements |
[in] | low | first element |
[in] | high | last element |
bool igl::list_to_matrix | ( | const std::vector< std::vector< T > > & | V, |
Eigen::PlainObjectBase< Derived > & | M | ||
) |
Convert a list (std::vector) of row vectors of the same length to a matrix.
T | type that can be safely cast to type in Mat via '=' |
Mat | Matrix type, must implement: .resize(m,n) .row(i) = Row |
[in] | V | a m-long list of vectors of size n |
[out] | M | an m by n matrix |
bool igl::list_to_matrix | ( | const std::vector< std::array< T, N > > & | V, |
Eigen::PlainObjectBase< Derived > & | M | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::list_to_matrix | ( | const std::vector< T > & | V, |
Eigen::PlainObjectBase< Derived > & | M | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Vector version.
bool igl::list_to_matrix | ( | const std::vector< std::vector< T > > & | V, |
const int | n, | ||
const T & | padding, | ||
Eigen::PlainObjectBase< Derived > & | M | ||
) |
Convert a list of row vectors of n
or less to a matrix and pad on the right with padding
.
[in] | V | a m-long list of vectors of size <=n |
[in] | n | number of columns |
[in] | padding | value to fill in from right for short rows |
[out] | M | an m by n matrix |
void igl::local_basis | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedV > & | B1, | ||
Eigen::PlainObjectBase< DerivedV > & | B2, | ||
Eigen::PlainObjectBase< DerivedV > & | B3 | ||
) |
Compute a local orthogonal reference system for each triangle in the given mesh.
DerivedV | derived from vertex positions matrix type: i.e. MatrixXd |
DerivedF | derived from face indices matrix type: i.e. MatrixXi |
[in] | V | eigen matrix #V by 3 |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | B1 | eigen matrix #F by 3, each vector is tangent to the triangle |
[out] | B2 | eigen matrix #F by 3, each vector is tangent to the triangle and perpendicular to B1 |
[out] | B3 | eigen matrix #F by 3, normal of the triangle |
void igl::look_at | ( | const Eigen::PlainObjectBase< Derivedeye > & | eye, |
const Eigen::PlainObjectBase< Derivedcenter > & | center, | ||
const Eigen::PlainObjectBase< Derivedup > & | up, | ||
Eigen::PlainObjectBase< DerivedR > & | R | ||
) |
Implementation of the deprecated gluLookAt function.
[in] | eye | 3-vector of eye position |
[in] | center | 3-vector of center reference point |
[in] | up | 3-vector of up vector |
[out] | R | 4x4 rotation matrix |
void igl::loop | ( | const int | n_verts, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< SType > & | S, | ||
Eigen::PlainObjectBase< DerivedNF > & | NF | ||
) |
Given the triangle mesh [V, F], where n_verts = V.rows(), computes newV and a sparse matrix S s.t.
[newV, newF] is the subdivided mesh where newV = S*V.
[in] | n_verts | an integer (number of mesh vertices) |
[in] | F | an m by 3 matrix of integers of triangle faces |
[out] | S | a sparse matrix (will become the subdivision matrix) |
[out] | newF | a matrix containing the new faces |
void igl::loop | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedNV > & | NV, | ||
Eigen::PlainObjectBase< DerivedNF > & | NF, | ||
const int | number_of_subdivs = 1 |
||
) |
Given the triangle mesh [V, F], computes number_of_subdivs steps of loop subdivision and outputs the new mesh [newV, newF].
[in] | V | an n by 3 matrix of vertices |
[in] | F | an m by 3 matrix of integers of triangle faces |
[out] | NV | a matrix containing the new vertices |
[out] | NF | a matrix containing the new faces |
[in] | number_of_subdivs | an integer that specifies how many subdivision steps to do |
bool igl::lscm | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedb > & | b, | ||
const Eigen::MatrixBase< Derivedbc > & | bc, | ||
Eigen::PlainObjectBase< DerivedV_uv > & | V_uv, | ||
Eigen::SparseMatrix< QScalar > & | Q | ||
) |
Compute a Least-squares conformal map parametrization (equivalently derived in "Intrinsic Parameterizations of Surface Meshes" [Desbrun et al.
2002] and "Least Squares Conformal Maps for Automatic Texture Atlas
Generation" [Lévy et al. 2002]), though this implementation follows the derivation in: "Spectral Conformal Parameterization" [Mullen et al. 2008] (note, this does not implement the Eigen-decomposition based method in [Mullen et al. 2008], see below). Input should be a manifold mesh (also no unreferenced vertices) and "boundary" (fixed vertices) b
should contain at least two vertices per connected component.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[in] | b | #b boundary indices into V |
[in] | bc | #b by 2 list of boundary values |
[out] | UV | #V by 2 list of 2D mesh vertex positions in UV space |
[out] | Q | #Vx2 by #Vx2 symmetric positive semi-definite matrix for computing LSCM energy |
bool igl::lscm | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedb > & | b, | ||
const Eigen::MatrixBase< Derivedbc > & | bc, | ||
Eigen::PlainObjectBase< DerivedV_uv > & | V_uv | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::lscm | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedV_uv > & | V_uv | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Free boundary version. "Spectral Conformal Parameterization" using eigen decomposition; Assumes mesh is a single connected component topologically equivalent to a chunk of the plane.
void igl::lscm_hessian | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< QScalar > & | Q | ||
) |
Compute a Least-squares conformal map parametrization (equivalently derived in "Intrinsic Parameterizations of Surface Meshes" [Desbrun et al.
2002] and "Least Squares Conformal Maps for Automatic Texture Atlas
Generation" [Lévy et al. 2002]), though this implementation follows the derivation in: "Spectral Conformal Parameterization" [Mullen et al. 2008] (note, this does not implement the Eigen-decomposition based method in [Mullen et al. 2008], which is not equivalent). Input should be a manifold mesh (also no unreferenced vertices) and "boundary" (fixed vertices) b
should contain at least two vertices per connected component.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[in] | b | #b boundary indices into V |
[in] | bc | #b by 2 list of boundary values |
[out] | UV | #V by 2 list of 2D mesh vertex positions in UV space |
[out] | Q | #Vx2 by #Vx2 symmetric positive semi-definite matrix for computing LSCM energy |
void igl::map_vertices_to_circle | ( | const Eigen::MatrixXd & | V, |
const Eigen::VectorXi & | bnd, | ||
Eigen::MatrixXd & | UV | ||
) |
Map the vertices whose indices are in a given boundary loop (bnd) on the unit circle with spacing proportional to the original boundary edge lengths.
[in] | V | #V by dim list of mesh vertex positions |
[in] | b | #W list of vertex ids |
[out] | UV | #W by 2 list of 2D position on the unit circle for the vertices in b |
double igl::mapping_energy_with_jacobians | ( | const Eigen::MatrixXd & | Ji, |
const Eigen::VectorXd & | areas, | ||
igl::MappingEnergyType | slim_energy, | ||
double | exp_factor | ||
) |
Compute the rotation-invariant energy of a mapping (represented in Jacobians and areas)
[in] | Ji | #F by 4 (9 if 3D) entries of jacobians |
[in] | areas | #F by 1 face areas |
[in] | slim_energy | energy type as in igl::MappingEnergyType |
[in] | exp_factor | see igl::MappingEnergyType |
void igl::march_cube | ( | const DerivedGV & | GV, |
const Eigen::Matrix< Scalar, 8, 1 > & | cS, | ||
const Eigen::Matrix< Index, 8, 1 > & | cI, | ||
const Scalar & | isovalue, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Index & | n, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Index & | m, | ||
std::unordered_map< int64_t, int > & | E2V | ||
) |
Process a single cube of a marching cubes grid.
[in] | GV | #GV by 3 list of grid vertex positions |
[in] | cS | list of 8 scalar field values at grid corners |
[in] | cI | list of 8 indices of corners into rows of GV |
[in] | isovalue | level-set value being extracted (often 0) |
[in,out] | V | #V by 3 current list of output mesh vertex positions |
[in,out] | n | current number of mesh vertices (i.e., occupied rows in V) |
[in,out] | F | #F by 3 current list of output mesh triangle indices into rows of V |
[in,out] | m | current number of mesh triangles (i.e., occupied rows in F) |
[in,out] | E2V | current edge (GV_i,GV_j) to vertex (V_k) map |
Side-effects: V,n,F,m,E2V are updated to contain new vertices and faces of any constructed mesh elements
void igl::marching_cubes | ( | const Eigen::MatrixBase< DerivedS > & | S, |
const Eigen::MatrixBase< DerivedGV > & | GV, | ||
const unsigned | nx, | ||
const unsigned | ny, | ||
const unsigned | nz, | ||
const typename DerivedS::Scalar | isovalue, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Performs marching cubes reconstruction on a grid defined by values, and points, and generates a mesh defined by vertices and faces.
[in] | S | nx*ny*nz list of values at each grid corner i.e. S(x + y*xres + z*xres*yres) for corner (x,y,z) |
[in] | GV | nx*ny*nz by 3 array of corresponding grid corner vertex locations |
[in] | nx | resolutions of the grid in x dimension |
[in] | ny | resolutions of the grid in y dimension |
[in] | nz | resolutions of the grid in z dimension |
[in] | isovalue | the isovalue of the surface to reconstruct |
[out] | V | #V by 3 list of mesh vertex positions |
[out] | F | #F by 3 list of mesh triangle indices into rows of V |
void igl::marching_cubes | ( | const Eigen::MatrixBase< DerivedS > & | S, |
const Eigen::MatrixBase< DerivedGV > & | GV, | ||
const Eigen::MatrixBase< DerivedGI > & | GI, | ||
const typename DerivedS::Scalar | isovalue, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sparse voxel version
[in] | S | #S list of scalar field values |
[in] | GV | #S by 3 list of referenced grid vertex positions |
[in] | GI | #GI by 8 list of grid corner indices into rows of GV |
void igl::marching_tets | ( | const Eigen::MatrixBase< DerivedTV > & | TV, |
const Eigen::MatrixBase< DerivedTT > & | TT, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
const typename DerivedS::Scalar | isovalue, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::SparseMatrix< BCType > & | BC | ||
) |
Performs the marching tetrahedra algorithm on a tet mesh defined by TV and TT with scalar values defined at each vertex in TV.
The output is a triangle mesh approximating the isosurface coresponding to the value isovalue.
[in] | TV | #tet_vertices x 3 array – The vertices of the tetrahedral mesh |
[in] | TT | #tets x 4 array – The indexes of each tet in the tetrahedral mesh |
[in] | S | #tet_vertices x 1 array – The values defined on each tet vertex |
[in] | isovalue | scalar – The isovalue of the level set we want to compute |
[out] | SV | #SV x 3 array – The vertices of the output level surface mesh |
[out] | SF | #SF x 3 array – The face indexes of the output level surface mesh |
[out] | J | #SF list of indices into TT revealing which tet each face comes from |
[out] | BC | #SV x #TV list of barycentric coordinates so that SV = BC*TV |
void igl::marching_tets | ( | const Eigen::MatrixBase< DerivedTV > & | TV, |
const Eigen::MatrixBase< DerivedTT > & | TT, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::SparseMatrix< BCType > & | BC | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
assumes isovalue = 0
void igl::marching_tets | ( | const Eigen::MatrixBase< DerivedTV > & | TV, |
const Eigen::MatrixBase< DerivedTT > & | TT, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
const typename DerivedS::Scalar | isovalue, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::marching_tets | ( | const Eigen::MatrixBase< DerivedTV > & | TV, |
const Eigen::MatrixBase< DerivedTT > & | TT, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
const typename DerivedS::Scalar | isovalue, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF, | ||
Eigen::SparseMatrix< BCType > & | BC | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::marching_tets | ( | const Eigen::MatrixBase< DerivedTV > & | TV, |
const Eigen::MatrixBase< DerivedTT > & | TT, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
const typename DerivedS::Scalar | isovalue, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::massmatrix | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const MassMatrixType | type, | ||
Eigen::SparseMatrix< Scalar > & | M | ||
) |
Constructs the mass (area) matrix for a given mesh (V,F).
DerivedV | derived type of eigen matrix for V (e.g. derived from MatrixXd) |
DerivedF | derived type of eigen matrix for F (e.g. derived from MatrixXi) |
Scalar | scalar type for eigen sparse matrix (e.g. double) |
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by simplex_size list of mesh elements (triangles or tetrahedra) |
[in] | type | one of the following ints: MASSMATRIX_TYPE_BARYCENTRIC barycentric {default for tetrahedra} MASSMATRIX_TYPE_VORONOI voronoi-hybrid {default for triangles, not implemented for tetrahedra} MASSMATRIX_TYPE_FULL full |
[out] | M | #V by #V mass matrix |
void igl::massmatrix_intrinsic | ( | const Eigen::MatrixBase< Derivedl > & | l, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const MassMatrixType | type, | ||
Eigen::SparseMatrix< Scalar > & | M | ||
) |
Constructs the mass (area) matrix for a given mesh (V,F).
[in] | l | #l by simplex_size list of mesh edge lengths |
[in] | F | #F by simplex_size list of mesh elements (triangles or tetrahedra) |
[in] | type | one of the following ints: MASSMATRIX_TYPE_BARYCENTRIC barycentric MASSMATRIX_TYPE_VORONOI voronoi-hybrid {default} MASSMATRIX_TYPE_FULL full |
[out] | M | #V by #V mass matrix |
void igl::massmatrix_intrinsic | ( | const Eigen::MatrixBase< Derivedl > & | l, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const MassMatrixType | type, | ||
const int | n, | ||
Eigen::SparseMatrix< Scalar > & | M | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | n | number of vertices (>= F.maxCoeff()+1) |
void igl::mat4_to_quat | ( | const Q_type * | m, |
Q_type * | q | ||
) |
Convert a OpenGL (rotation) matrix to a quaternion.
[in] | m | 16-element opengl rotation matrix |
[out] | q | 4-element quaternion (not normalized) |
void igl::mat3_to_quat | ( | const Q_type * | m, |
Q_type * | q | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const Eigen::Vector4f igl::MAYA_GREEN | ( | 128./ | 255., |
242./ | 255., | ||
0./ | 255., | ||
1. | |||
) |
const Eigen::Vector4f igl::MAYA_YELLOW | ( | 255./ | 255., |
247./ | 255., | ||
50./ | 255., | ||
1. | |||
) |
const Eigen::Vector4f igl::MAYA_RED | ( | 234./ | 255., |
63./ | 255., | ||
52./ | 255., | ||
1. | |||
) |
const Eigen::Vector4f igl::MAYA_BLUE | ( | 0./ | 255., |
73./ | 255., | ||
252./ | 255., | ||
1. | |||
) |
const Eigen::Vector4f igl::MAYA_PURPLE | ( | 180./ | 255., |
73./ | 255., | ||
200./ | 255., | ||
1. | |||
) |
const Eigen::Vector4f igl::MAYA_VIOLET | ( | 31./ | 255., |
15./ | 255., | ||
66./ | 255., | ||
1. | |||
) |
const Eigen::Vector4f igl::MAYA_GREY | ( | 0. | 5, |
0. | 5, | ||
0. | 5, | ||
1. | 0 | ||
) |
const Eigen::Vector4f igl::MAYA_CYAN | ( | 131./ | 255., |
219./ | 255., | ||
252./ | 255., | ||
1. | |||
) |
const Eigen::Vector4f igl::MAYA_SEA_GREEN | ( | 70./ | 255., |
252./ | 255., | ||
167./ | 255., | ||
1. | |||
) |
const Eigen::WithFormat< DerivedM > igl::matlab_format | ( | const Eigen::DenseBase< DerivedM > & | M, |
const std::string | name = "" |
||
) |
This is a routine to print a matrix using format suitable for pasting into the matlab IDE.
DerivedM | e.g. derived from MatrixXd |
[in] | input | some matrix to be formatted |
[in] | name | name of matrix (optional) |
std::string igl::matlab_format_index | ( | const Eigen::MatrixBase< DerivedM > & | M, |
const std::string | name = "" |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Add +1 to every entry before formatting.
const std::string igl::matlab_format | ( | const Eigen::SparseMatrix< DerivedS > & | S, |
const std::string | name = "" |
||
) |
Same but for sparse matrices.
Print IJV format into an auxiliary variable and then print a call to sparse which will construct the sparse matrix
const std::string igl::matlab_format | ( | const double | v, |
const std::string | name = "" |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Scalars.
const std::string igl::matlab_format | ( | const float | v, |
const std::string | name = "" |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Eigen::IOFormat igl::matlab_format | ( | ) |
Just build and return the format.
void igl::matrix_to_list | ( | const Eigen::MatrixBase< DerivedM > & | M, |
std::vector< std::vector< typename DerivedM::Scalar > > & | V | ||
) |
Convert a matrix to a list (std::vector) of row vectors of the same size.
Mat | Matrix type, must implement: .resize(m,n) .row(i) = Row |
T | type that can be safely cast to type in Mat via '=' |
[in] | M | an m by n matrix |
[out] | V | a m-long list of vectors of size n |
void igl::matrix_to_list | ( | const Eigen::MatrixBase< DerivedM > & | M, |
std::vector< typename DerivedM::Scalar > & | V | ||
) |
Convert a matrix to a list (std::vector) of elements in column-major ordering.
[in] | M | an m by n matrix |
[out] | V | an m*n list of elements |
std::vector< typename DerivedM::Scalar > igl::matrix_to_list | ( | const Eigen::MatrixBase< DerivedM > & | M | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::max | ( | const Eigen::SparseMatrix< AType > & | A, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Compute the maximum along dimension dim of a matrix X.
[in] | X | m by n matrix |
[in] | dim | dimension along which to take max |
[out] | Y | n-long vector (if dim == 1) Y m-long vector (if dim == 2) |
[out] | I | vector the same size as Y containing the indices along dim of minimum entries |
void igl::max | ( | const Eigen::DenseBase< DerivedX > & | X, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedY > & | Y, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::max_faces_stopping_condition | ( | int & | m, |
const int | orig_m, | ||
const int | max_m, | ||
decimate_stopping_condition_callback & | stopping_condition | ||
) |
Stopping condition function compatible with igl::decimate.
The outpute function handle will return true if number of faces is less than max_m
[in] | m | reference to working variable initially should be set to current number of faces. |
[in] | orig_m | number (size) of original face list not including any faces added to handle phony boundary faces connecting to point at infinity. For closed meshes it's safe to set this to F.rows() |
[in] | max_m | maximum number of faces |
[out] | stopping_condition |
See decimate.h for more details
decimate_stopping_condition_callback igl::max_faces_stopping_condition | ( | int & | m, |
const int | orign_m, | ||
const int | max_m | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int igl::max_size | ( | const std::vector< T > & | V | ) |
Determine max size of lists in a vector.
T | some list type object that implements .size() |
[in] | V | vector of list types T |
bool igl::median | ( | const Eigen::MatrixBase< DerivedV > & | V, |
mType & | m | ||
) |
Compute the median of an eigen vector.
[in] | V | #V list of unsorted values |
[out] | m | median of those values |
void igl::min | ( | const Eigen::SparseMatrix< AType > & | A, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Compute the minimum along dimension dim of a matrix X.
[in] | X | m by n matrix |
[in] | dim | dimension along which to take min |
[out] | Y | n-long vector (if dim == 1) Y m-long vector (if dim == 2) |
[out] | I | vector the same size as Y containing the indices along dim of minimum entries |
void igl::min | ( | const Eigen::DenseBase< DerivedX > & | X, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedY > & | Y, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::min_quad_with_fixed_precompute | ( | const Eigen::SparseMatrix< T > & | A, |
const Eigen::MatrixBase< Derivedknown > & | known, | ||
const Eigen::SparseMatrix< T > & | Aeq, | ||
const bool | pd, | ||
min_quad_with_fixed_data< T > & | data | ||
) |
Minimize a convex quadratic energy subject to fixed value and linear equality constraints.
Problems of the form
trace( 0.5*Z'*A*Z + Z'*B + constant )
subject to
Z(known,:) = Y, and Aeq*Z = Beq
T | should be a eigen matrix primitive type like int or double |
[in] | A | n by n matrix of quadratic coefficients |
[in] | known | list of indices to known rows in Z |
[in] | Y | list of fixed values corresponding to known rows in Z |
[in] | Aeq | m by n list of linear equality constraint coefficients |
[in] | pd | flag specifying whether A(unknown,unknown) is positive definite |
[in,out] | data | factorization struct with all necessary information to solve using min_quad_with_fixed_solve |
bool igl::min_quad_with_fixed_solve | ( | const min_quad_with_fixed_data< T > & | data, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedY > & | Y, | ||
const Eigen::MatrixBase< DerivedBeq > & | Beq, | ||
Eigen::PlainObjectBase< DerivedZ > & | Z, | ||
Eigen::PlainObjectBase< Derivedsol > & | sol | ||
) |
Solves a system previously factored using min_quad_with_fixed_precompute.
T | type of sparse matrix (e.g. double) |
DerivedY | type of Y (e.g. derived from VectorXd or MatrixXd) |
DerivedZ | type of Z (e.g. derived from VectorXd or MatrixXd) |
[in] | data | factorization struct with all necessary precomputation to solve |
[in] | B | n by k column of linear coefficients |
[in] | Y | b by k list of constant fixed values |
[in] | Beq | m by k list of linear equality constraint constant values |
[out] | Z | n by k solution |
[out] | sol | #unknowns+#lagrange by k solution to linear system Returns true on success, false on error |
bool igl::min_quad_with_fixed_solve | ( | const min_quad_with_fixed_data< T > & | data, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedY > & | Y, | ||
const Eigen::MatrixBase< DerivedBeq > & | Beq, | ||
Eigen::PlainObjectBase< DerivedZ > & | Z | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::min_quad_with_fixed | ( | const Eigen::SparseMatrix< T > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< Derivedknown > & | known, | ||
const Eigen::MatrixBase< DerivedY > & | Y, | ||
const Eigen::SparseMatrix< T > & | Aeq, | ||
const Eigen::MatrixBase< DerivedBeq > & | Beq, | ||
const bool | pd, | ||
Eigen::PlainObjectBase< DerivedZ > & | Z | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Minimize convex quadratic energy subject to fixed value and linear equality constraints. Without prefactorization.
Eigen::Matrix< Scalar, n, 1 > igl::min_quad_with_fixed | ( | const Eigen::Matrix< Scalar, n, n > & | H, |
const Eigen::Matrix< Scalar, n, 1 > & | f, | ||
const Eigen::Array< bool, n, 1 > & | k, | ||
const Eigen::Matrix< Scalar, n, 1 > & | bc, | ||
const Eigen::Matrix< Scalar, m, n > & | A, | ||
const Eigen::Matrix< Scalar, m, 1 > & | b | ||
) |
Dense version optimized for very small, known at compile time sizes.
Still works for Eigen::Dynamic (and then everything needs to be Dynamic).
min_x ½ xᵀ H x + xᵀ f subject to A x = b x(i) = bc(i) iff k(i)==true
Scalar | (e.g., double) |
n | #H or Eigen::Dynamic if not known at compile time |
m | #A or Eigen::Dynamic if not known at compile time |
Hpd | whether H is positive definite (LLT used) or not (QR used) |
[in] | H | #H by #H quadratic coefficients (only lower triangle used) |
[in] | f | #H linear coefficients |
[in] | k | #H list of flags whether to fix value |
[in] | bc | #H value to fix to (if !k(i) then bc(i) is ignored) |
[in] | A | #A by #H list of linear equality constraint coefficients, must be linearly independent (with self and fixed value constraints) |
[in] | b | #A list of linear equality right-hand sides |
Eigen::Matrix< Scalar, n, 1 > igl::min_quad_with_fixed | ( | const Eigen::Matrix< Scalar, n, n > & | H, |
const Eigen::Matrix< Scalar, n, 1 > & | f, | ||
const Eigen::Array< bool, n, 1 > & | k, | ||
const Eigen::Matrix< Scalar, n, 1 > & | bc | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Eigen::Matrix< Scalar, n, 1 > igl::min_quad_with_fixed | ( | const Eigen::Matrix< Scalar, n, n > & | H, |
const Eigen::Matrix< Scalar, n, 1 > & | f, | ||
const Eigen::Array< bool, n, 1 > & | k, | ||
const Eigen::Matrix< Scalar, n, 1 > & | bc | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Special wrapper where the number of constrained values (i.e., true values in k) is exposed as a template parameter. Not intended to be called directly. The overhead of calling the overloads above is already minimal.
int igl::min_size | ( | const std::vector< T > & | V | ) |
Determine min size of lists in a vector.
T | some list type object that implements .size() |
[in] | V | vector of list types T |
void igl::mod | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
const int | base, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
Compute elementwise mod: B = A % base.
[in] | A | m by n matrix |
[in] | base | number to mod against |
[out] | B | m by n matrix |
DerivedA igl::mod | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
const int | base | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::mode | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | X, |
const int | d, | ||
Eigen::Matrix< T, Eigen::Dynamic, 1 > & | M | ||
) |
Takes mode of coefficients in a matrix along a given dimension.
T | should be a eigen matrix primitive type like int or double |
[in] | X | m by n original matrix |
[in] | d | dension along which to take mode, m or n |
[out] | M | vector containing mode along dension d, if d==1 then this will be a n-long vector if d==2 then this will be a m-long vector |
void igl::moments | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Derivedm0 & | m0, | ||
Eigen::PlainObjectBase< Derivedm1 > & | m1, | ||
Eigen::PlainObjectBase< Derivedm2 > & | m2 | ||
) |
Computes the moments of mass for a solid object bound by a triangle mesh.
[in] | V | #V by 3 list of rest domain positions |
[in] | F | #F by 3 list of triangle indices into V |
[out] | m0 | zeroth moment of mass, total signed volume of solid. |
[out] | m1 | first moment of mass, center of mass (centroid) times total mass |
[out] | m2 | second moment of mass, moment of inertia with center of mass as reference point |
void igl::mvc | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXd & | C, | ||
Eigen::MatrixXd & | W | ||
) |
Mean value coordinates for a polygon.
[in] | V | #V x dim list of vertex positions (dim = 2 or dim = 3) |
[in] | C | #C x dim list of polygon vertex positions in counter-clockwise order (dim = 2 or dim = 3) |
[out] | W | weights, #V by #C matrix of weights |
double igl::nchoosek | ( | const int | n, |
const int | k | ||
) |
Binomial coefficient.
Like matlab's nchoosek.
[in] | n | total number elements |
[in] | k | size of sub-set to consider |
void igl::nchoosek | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const int | k, | ||
Eigen::PlainObjectBase< DerivedU > & | U | ||
) |
All combinations .
Like matlab's nchoosek.
[in] | V | n-long vector of elements |
[in] | k | size of sub-set to consider |
[out] | U | nchoosek by k long matrix where each row is a unique k-size combination |
bool igl::next_filename | ( | const std::string & | prefix, |
const int | zeros, | ||
const std::string & | suffix, | ||
std::string & | next | ||
) |
Find the file with the first filename of the form "prefix%0[zeros]dsuffix".
[in] | prefix | path to containing dir and filename prefix |
[in] | zeros | number of leading zeros as if digit printed with printf |
[in] | suffix | suffix of filename and extension (should include dot) |
[out] | next | path to next file |
void igl::normal_derivative | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedEle > & | Ele, | ||
Eigen::SparseMatrix< Scalar > & | DD | ||
) |
Computes the directional derivative normal to all (half-)edges of a triangle mesh (not just boundary edges).
These are integrated along the edge: they're the per-face constant gradient dot the rotated edge vector (unit rotated edge vector for direction then magnitude for integration).
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3|4 list of triangle|tetrahedron indices into V |
[out] | DD | #F*3|4 by #V sparse matrix representing operator to compute directional derivative with respect to each facet of each element. |
bool igl::normalize_quat | ( | const Q_type * | q, |
Q_type * | out | ||
) |
Normalize a quaternion A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w.
[in] | q | input quaternion |
[out] | out | result of normalization, allowed to be same as q |
void igl::null | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
Compute a basis for the null space for the given matrix A: the columns of the output N form a basis for the space orthogonal to that spanned by the rows of A.
Like MATLAB's null
[in] | A | m by n matrix |
[out] | N | n by r matrix, where r is the row rank of A |
void igl::octree | ( | const Eigen::MatrixBase< DerivedP > & | P, |
std::vector< std::vector< IndexType > > & | point_indices, | ||
Eigen::PlainObjectBase< DerivedCH > & | CH, | ||
Eigen::PlainObjectBase< DerivedCN > & | CN, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Given a set of 3D points P, generate data structures for a pointerless octree.
Each cell stores its points, children, center location and width. Our octree is not dense. We use the following rule: if the current cell has any number of points, it will have all 8 children. A leaf cell will have -1's as its list of child indices.
We use a binary numbering of children. Treating the parent cell's center as the origin, we number the octants in the following manner: The first bit is 1 iff the octant's x coordinate is positive The second bit is 1 iff the octant's y coordinate is positive The third bit is 1 iff the octant's z coordinate is positive
For example, the octant with negative x, positive y, positive z is: 110 binary = 6 decimal
[in] | P | #P by 3 list of point locations |
[out] | point_indices | a vector of vectors, where the ith entry is a vector of the indices into P that are the ith octree cell's points |
[out] | CH | #OctreeCells by 8, where the ith row is the indices of the ith octree cell's children |
[out] | CN | #OctreeCells by 3, where the ith row is a 3d row vector representing the position of the ith cell's center |
[out] | W | #OctreeCells, a vector where the ith entry is the width of the ith octree cell |
void igl::offset_surface | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const isolevelType | isolevel, | ||
const typename Derivedside::Scalar | s, | ||
const SignedDistanceType & | signed_distance_type, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF, | ||
Eigen::PlainObjectBase< DerivedGV > & | GV, | ||
Eigen::PlainObjectBase< Derivedside > & | side, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
Compute a triangulated offset surface using matching cubes on a grid of signed distance values from the input triangle mesh.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh triangle indices into V |
[in] | isolevel | iso level to extract (signed distance: negative inside) |
[in] | s | number of grid cells along longest side (controls resolution) |
[in] | signed_distance_type | type of signing to use (see ../signed_distance.h) |
[out] | SV | #SV by 3 list of output surface mesh vertex positions |
[out] | SF | #SF by 3 list of output mesh triangle indices into SV |
[out] | GV | #GV=side(0)*side(1)*side(2) by 3 list of grid cell centers |
[out] | side | list of number of grid cells in x, y, and z directions |
[out] | S | #GV by 3 list of signed distance values near isolevel ("far" from isolevel these values are incorrect) |
void igl::on_boundary | ( | const std::vector< std::vector< IntegerT > > & | T, |
std::vector< bool > & | I, | ||
std::vector< std::vector< bool > > & | C | ||
) |
Determine boundary facets of mesh elements stored in T.
IntegerT | integer-value: i.e. int |
IntegerF | integer-value: i.e. int |
[in] | T | triangle|tetrahedron index list, m by 3|4, where m is the number of elements |
[out] | I | m long list of bools whether tet is on boundary |
[out] | C | m by 3|4 list of bools whether opposite facet is on boundary |
void igl::on_boundary | ( | const Eigen::MatrixBase< DerivedT > & | T, |
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::orient_halfedges | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedOE > & | oE | ||
) |
Orients halfedges for a triangle mesh, assigning them to a unique edge.
[in] | F | #F by 3 input mesh connectivity |
[out] | E | #E by 3 a mapping from each halfedge to each edge |
[out] | oE | #E by 3 the orientation (e.g., -1 or 1) of each halfedge compared to the orientation of the actual edge. Every edge appears positively oriented exactly once. |
void igl::orient_outward | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Orient each component (identified by C) of a mesh (V,F) so the normals on average point away from the patch's centroid.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
[in] | C | #F list of components (output of orientable_patches) |
[out] | FF | #F by 3 list of new triangle indices such that FF(~I,:) = F(~I,:) and FF(I,:) = fliplr(F(I,:)) (OK if &FF = &F) |
[out] | I | max(C)+1 list of whether face has been flipped |
void igl::orientable_patches | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::SparseMatrix< AScalar > & | A | ||
) |
Compute connected components of facets connected by manifold edges.
[in] | F | #F by simplex-size list of facets |
[out] | C | #F list of component ids |
[out] | A | #F by #F adjacency matrix |
void igl::orientable_patches | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::oriented_facets | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedE > & | E | ||
) |
Determines all "directed [facets](https://en.wikipedia.org/wiki/Simplex#Elements)" of a given set of simplicial elements.
For a manifold triangle mesh, this computes all half-edges. For a manifold tetrahedral mesh, this computes all half-faces.
[in] | F | #F by simplex_size list of simplices |
[out] | E | #E by simplex_size-1 list of facets, such that E.row(f+#F*c) is the facet opposite F(f,c) |
void igl::orth | ( | const Eigen::MatrixXd & | A, |
Eigen::MatrixXd & | Q | ||
) |
Orthogonalization of a matrix.
ORTH(A,Q) produces Q as an orthonormal basis for the range of A. That is, Q'*Q = I, the columns of Q span the same space as the columns of A, and the number of columns of Q is the rank of A.
The algorithm uses singular value decomposition, SVD, instead of orthogonal factorization, QR. This doubles the computation time, but provides more reliable and consistent rank determination. Closely follows MATLAB implementation in orth.m
[in] | A | m by n matrix |
[out] | Q | m by n matrix with orthonormal columns spanning same column space as A |
void igl::ortho | ( | const typename DerivedP::Scalar | left, |
const typename DerivedP::Scalar | right, | ||
const typename DerivedP::Scalar | bottom, | ||
const typename DerivedP::Scalar | top, | ||
const typename DerivedP::Scalar | nearVal, | ||
const typename DerivedP::Scalar | farVal, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Implementation of the deprecated glOrtho function.
[in] | left | coordinate of left vertical clipping plane |
[in] | right | coordinate of right vertical clipping plane |
[in] | bottom | coordinate of bottom vertical clipping plane |
[in] | top | coordinate of top vertical clipping plane |
[in] | nearVal | distance to near plane |
[in] | farVal | distance to far plane |
[out] | P | 4x4 perspective matrix |
void igl::outer_vertex | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedI > & | I, | ||
IndexType & | v_index, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
Find a vertex that is reachable from infinite without crossing any faces.
Such vertex is called "outer vertex."
Precondition: The input mesh must have all self-intersection resolved and no duplicated vertices. See cgal::remesh_self_intersections.h for how to obtain such input.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | I | #I list of facets to consider |
[out] | v_index | index of outer vertex |
[out] | A | #A list of facets incident to the outer vertex |
void igl::outer_edge | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedI > & | I, | ||
IndexType & | v1, | ||
IndexType & | v2, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
Find an edge that is reachable from infinity without crossing any faces.
Such edge is called "outer edge."
Precondition: The input mesh must have all self-intersection resolved and no duplicated vertices. The correctness of the output depends on the fact that there is no edge overlap. See cgal::remesh_self_intersections.h for how to obtain such input.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | I | #I list of facets to consider |
[out] | v1 | index of the first end point of outer edge |
[out] | v2 | index of the second end point of outer edge |
[out] | A | #A list of facets incident to the outer edge |
void igl::outer_facet | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedI > & | I, | ||
IndexType & | f, | ||
bool & | flipped | ||
) |
Find a facet that is reachable from infinity without crossing any faces.
Such facet is called "outer facet."
Precondition: The input mesh must have all self-intersection resolved. I.e there is no duplicated vertices, no overlapping edge and no intersecting faces (the only exception is there could be topologically duplicated faces). See cgal::remesh_self_intersections.h for how to obtain such input.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | N | #N by 3 list of face normals |
[in] | I | #I list of facets to consider |
[out] | f | Index of the outer facet. |
[out] | flipped | true iff the normal of f points inwards. |
|
inline |
Functional implementation of a basic, open-mp style, parallel for loop.
If the inner block of a for-loop can be rewritten/encapsulated in a single (anonymous/lambda) function call func
so that the serial code looks like:
then parallel_for(loop_size,func,min_parallel)
will use as many threads as available on the current hardware to parallelize this for loop so long as loop_size<min_parallel, otherwise it will just use a serial for loop.
Often if your code looks like:
Then you can make a minimal two-line change to parallelize it:
[in] | loop_size | number of iterations. I.e. for(int i = 0;i<loop_size;i++) ... |
[in] | func | function handle taking iteration index as only argument to compute inner block of for loop I.e. for(int i ...){ func(i); } |
[in] | min_parallel | min size of loop_size such that parallel (non-serial) thread pooling should be attempted {0} |
|
inline |
Functional implementation of an open-mp style, parallel for loop with accumulation.
For example, serial code separated into n chunks (each to be parallelized with a thread) might look like:
[in] | loop_size | number of iterations. I.e. for(int i = 0;i<loop_size;i++) ... |
[in] | prep_func | function handle taking n >= number of threads as only argument |
[in] | func | function handle taking iteration index i and thread id t as only arguments to compute inner block of for loop I.e. for(int i ...){ func(i,t); } |
[in] | accum_func | function handle taking thread index as only argument, to be called after all calls of func, e.g., for serial accumulation across all n (potential) threads, see n in description of prep_func. |
[in] | min_parallel | min size of loop_size such that parallel (non-serial) thread pooling should be attempted {0} |
void igl::parallel_transport_angles | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedV > & | FN, | ||
const Eigen::MatrixXi & | E2F, | ||
const Eigen::MatrixXi & | F2E, | ||
Eigen::PlainObjectBase< DerivedK > & | K | ||
) |
Given the per-face local bases computed via igl::local_basis, this function computes the angle between the two reference frames across each edge.
Any two vectors across the edge whose 2D representation only differs by this angle are considered to be parallel.
[in] | V | #V by 3 list of mesh vertex coordinates |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[in] | FN | #F by 3 list of face normals |
[in] | E2F | #E by 2 list of the edge-to-face relation (e.g. computed via igl::edge_topology) |
[in] | F2E | #F by 3 list of the face-to-edge relation (e.g. computed |
[out] | K | #E by 1 list of the parallel transport angles (zero for all boundary edges) |
void igl::partition | ( | const Eigen::MatrixXd & | W, |
const int | k, | ||
Eigen::Matrix< int, Eigen::Dynamic, 1 > & | G, | ||
Eigen::Matrix< int, Eigen::Dynamic, 1 > & | S, | ||
Eigen::Matrix< double, Eigen::Dynamic, 1 > & | D | ||
) |
Partition vertices into groups based on each vertex's vector: vertices with similar coordinates (close in space) will be put in the same group.
[in] | W | #W by dim coordinate matrix |
[in] | k | desired number of groups default is dim |
[out] | G | #W list of group indices (1 to k) for each vertex, such that vertex i is assigned to group G(i) |
[out] | S | k list of seed vertices |
[out] | D | #W list of squared distances for each vertex to it's corresponding closest seed |
void igl::parula | ( | const T | f, |
T * | rgb | ||
) |
Parula colormap like MATLAB's parula.
[in] | f | factor determining color value as if 0 was min and 1 was max |
[out] | rgb | resulting rgb color
|
void igl::parula | ( | const T | f, |
T & | r, | ||
T & | g, | ||
T & | b | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::parula | ( | const Eigen::MatrixBase< DerivedZ > & | Z, |
const bool | normalize, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | Z | #Z list of factors |
[in] | normalize | whether to normalize Z to be tightly between [0,1] |
[out] | C | #C by 3 list of rgb colors |
void igl::parula | ( | const Eigen::MatrixBase< DerivedZ > & | Z, |
const double | min_Z, | ||
const double | max_Z, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | min_z | value at blue |
[in] | max_z | value at red |
void igl::path_to_edges | ( | const Eigen::MatrixBase< DerivedI > & | I, |
Eigen::PlainObjectBase< DerivedE > & | E, | ||
bool | make_loop = false |
||
) |
Given a path as an ordered list of N>=2 vertex indices I[0], I[1], ..., I[N-1] construct a list of edges [[I[0],I[1]], [I[1],I[2]], ..., [I[N-2], I[N-1]]] connecting each sequential pair of vertices.
[in] | I | #I list of vertex indices |
[in] | make_loop | bool If true, include an edge connecting I[N-1] to I[0] |
[out] | E | #I-1 by 2 list of edges |
void igl::path_to_edges | ( | const std::vector< Index > & | I, |
Eigen::PlainObjectBase< DerivedE > & | E, | ||
bool | make_loop = false |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std::string igl::path_to_executable | ( | ) |
Path to current executable.
void igl::pathinfo | ( | const std::string & | path, |
std::string & | dirname, | ||
std::string & | basename, | ||
std::string & | extension, | ||
std::string & | filename | ||
) |
Function like PHP's pathinfo to return information about path.
[in] | path | string containing input path |
[out] | dirname | string containing dirname (see dirname.h) |
[out] | basename | string containing basename (see basename.h) |
[out] | extension | string containing extension (characters after last '.') |
[out] | filename | string containing filename (characters of basename before last '.') |
input | dirname basename ext filename "/" | "/" "" "" "" "//" | "/" "" "" "" "/foo" | "/" "foo" "" "foo" "/foo/" | "/" "foo" "" "foo" "/foo//" | "/" "foo" "" "foo" "/foo/./" | "/foo" "." "" "" "/foo/bar" | "/foo" "bar" "" "bar" "/foo/bar." | "/foo" "bar." "" "bar" "/foo/bar.txt" | "/foo" "bar.txt" "txt" "bar" "/foo/bar.txt.zip" | "/foo" "bar.txt.zip" "zip" "bar.txt" "/foo/bar.dir/" | "/foo" "bar.dir" "dir" "bar" "/foo/bar.dir/file" | "/foo/bar.dir" "file" "" "file" "/foo/bar.dir/file.txt" | "/foo/bar.dir" "file.txt" "txt" "file"
void igl::per_corner_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const typename DerivedV::Scalar | corner_threshold_degrees, | ||
Eigen::PlainObjectBase< DerivedCN > & | CN | ||
) |
Compute per corner normals for a triangle mesh by computing the area-weighted average of normals at incident faces whose normals deviate less than the provided threshold.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of mesh triangle indices into V |
[in] | corner_threshold_degrees | threshold in degrees on sharp angles |
[out] | CN | #F*3 by 3 list of mesh vertex 3D normals, where the normal for corner F(i,j) is at CN.row(i*3+j) |
void igl::per_corner_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const typename DerivedV::Scalar | corner_threshold_degrees, | ||
const Eigen::MatrixBase< DerivedVF > & | VF, | ||
const Eigen::MatrixBase< DerivedNI > & | NI, | ||
Eigen::PlainObjectBase< DerivedCN > & | CN | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | VF | 3*#F list List of faces indice on each vertex, so that VF(NI(i)+j) = f, means that face f is the jth face (in no particular order) incident on vertex i. |
[in] | NI | #V+1 list cumulative sum of vertex-triangle degrees with a preceeding zero. "How many faces" have been seen before visiting this vertex and its incident faces. |
void igl::per_corner_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedCI > & | CI, | ||
const Eigen::MatrixBase< DerivedCC > & | CC, | ||
Eigen::PlainObjectBase< DerivedCN > & | CN | ||
) |
[in] | CI | #CI list of face neighbors as indices into rows of F |
[in] | CC | 3*#F+1 list of cumulative sizes so that CC(i*3+j+1) - CC(i*3+j) is the number of faces considered smoothly incident on corner at F(i,j) |
void igl::per_corner_normals | ( | const Eigen::MatrixBase< DerivedNV > & | NV, |
const Eigen::MatrixBase< DerivedNF > & | NF, | ||
Eigen::PlainObjectBase< DerivedCN > & | CN | ||
) |
Given indexed normals (e.g., read from a .obj file), explode into per-corner normals (e.g., as expected by igl::opengl::ViewerData)
[in] | NV | #NV by 3 list of index normal vectors |
[in] | NF | #F by nc list of indices into rows of NV |
[out] | CN | #F*nc by 3 list of per-corner normals so that CN.row(i*nc+c) = NV.row(NF(i,c)) |
void igl::per_corner_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedI > & | I, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
const typename DerivedV::Scalar | corner_threshold_degrees, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedVV > & | VV, | ||
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedNN > & | NN | ||
) |
Per-corner normals for a polygon mesh.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | I | #I vectorized list of polygon corner indices into rows of some matrix V |
[in] | C | #polygons+1 list of cumulative polygon sizes so that C(i+1)-C(i) = size of the ith polygon, and so I(C(i)) through I(C(i+1)-1) are the indices of the ith polygon |
[in] | corner_threshold | threshold in degrees on sharp angles |
[out] | N | #I by 3 list of per corner normals |
[out] | VV | #I+#polygons by 3 list of auxiliary triangle mesh vertex positions |
[out] | FF | #I by 3 list of triangle indices into rows of VV |
[out] | J | #I list of indices into original polygons |
[out] | NN | #FF by 3 list of normals for each auxiliary triangle |
void igl::per_edge_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const PerEdgeNormalsWeightingType | weight, | ||
const Eigen::MatrixBase< DerivedFN > & | FN, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP | ||
) |
Compute face normals via vertex position list, face list.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 3 eigen Matrix of face (triangle) indices |
[in] | weight | weighting type |
[in] | FN | #F by 3 matrix of 3D face normals per face |
[out] | N | #2 by 3 matrix of mesh edge 3D normals per row |
[out] | E | #E by 2 matrix of edge indices per row |
[out] | EMAP | #E by 1 matrix of indices from all edges to E |
void igl::per_edge_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const PerEdgeNormalsWeightingType | weight, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::per_edge_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::per_face_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedZ > & | Z, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
Compute face normals via vertex position list, face list.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 3 eigen Matrix of face (triangle) indices |
[in] | Z | 3 vector normal given to faces with degenerate normal. |
[out] | N | #F by 3 eigen Matrix of mesh face (triangle) 3D normals |
// Give degenerate faces (1/3,1/3,1/3)^0.5 per_face_normals(V,F,Vector3d(1,1,1).normalized(),N);
void igl::per_face_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Wrapper with Z = (0,0,0). Note that this means that row norms will be zero (i.e. not 1) for degenerate normals.
void igl::per_face_normals_stable | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Special version where order of face indices is guaranteed not to effect output.
void igl::per_face_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedI > & | I, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedVV > & | VV, | ||
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Per face normals for a general polygon mesh.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | I | #I vectorized list of polygon corner indices into rows of some matrix V |
[in] | C | #polygons+1 list of cumulative polygon sizes so that C(i+1)-C(i) = size of the ith polygon, and so I(C(i)) through I(C(i+1)-1) are the indices of the ith polygon |
[in] | corner_threshold | threshold in degrees on sharp angles |
[out] | N | #polygons by 3 list of per face normals |
[out] | VV | #I+#polygons by 3 list of auxiliary triangle mesh vertex positions |
[out] | FF | #I by 3 list of triangle indices into rows of VV |
[out] | J | #I list of indices into original polygons |
void igl::per_vertex_attribute_smoothing | ( | const Eigen::MatrixBase< DerivedV > & | Ain, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedV > & | Aout | ||
) |
Smooth vertex attributes using uniform Laplacian.
[in] | Ain | #V by #A eigen Matrix of mesh vertex attributes (each vertex has #A attributes) |
[in] | F | #F by 3 eigne Matrix of face (triangle) indices |
[out] | Aout | #V by #A eigen Matrix of mesh vertex attributes |
void igl::per_vertex_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const igl::PerVertexNormalsWeightingType | weighting, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
Compute vertex normals via vertex position list, face list.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 3 eigen Matrix of face (triangle) indices |
[in] | weighting | Weighting type |
[out] | N | #V by 3 eigen Matrix of mesh vertex 3D normals |
void igl::per_vertex_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::per_vertex_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const PerVertexNormalsWeightingType | weighting, | ||
const Eigen::MatrixBase< DerivedFN > & | FN, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | FN | #F by 3 matrix of face (triangle) normals |
void igl::per_vertex_normals | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedFN > & | FN, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::per_vertex_point_to_plane_quadrics | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const Eigen::MatrixXi & | EMAP, | ||
const Eigen::MatrixXi & | EF, | ||
const Eigen::MatrixXi & | EI, | ||
std::vector< std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double > > & | quadrics | ||
) |
Compute quadrics per vertex of a "closed" triangle mesh (V,F).
Rather than follow the qslim paper, this implements the lesser-known follow up "Simplifying Surfaces with Color and Texture using Quadric Error Metrics". This allows V to be n-dimensional (where the extra coordiantes store texture UVs, color RGBs, etc.
[in] | V | #V by n list of vertex positions. Assumes that vertices with infinite coordinates are "points at infinity" being used to close up boundary edges with faces. This allows special subspace quadrice for boundary edges: There should never be more than one "point at infinity" in a single triangle. |
[in] | F | #F by 3 list of triangle indices into V |
[in] | E | #E by 2 list of edge indices into V. |
[in] | EMAP | #F*3 list of indices into E, mapping each directed edge to unique unique edge in E |
[in] | EF | #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) " e=(j->i) |
[in] | EI | #E by 2 list of edge flap corners (see above). |
[out] | quadrics | #V list of quadrics, where a quadric is a tuple {A,b,c} such that the quadratic energy of moving this vertex to position x is given by x'Ax - 2b + c |
bool igl::piecewise_constant_winding_number | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DeriveduE > & | uE, | ||
const Eigen::MatrixBase< DeriveduEC > & | uEC, | ||
const Eigen::MatrixBase< DeriveduEE > & | uEE | ||
) |
Determine if a given mesh induces a piecewise constant winding number field: Is this mesh valid input to solid set operations.
Assumes that (V,F)
contains no self-intersections (including degeneracies and co-incidences). If there are co-planar and co-incident vertex placements, a mesh could fail this combinatorial test but still induce a piecewise-constant winding number geometrically. For example, consider a hemisphere with boundary and then pinch the boundary "shut" along a line segment. The **_bullet-proof_** check is to first resolve all self-intersections in (V,F) -> (SV,SF)
(i.e. what the igl::copyleft::cgal::piecewise_constant_winding_number
overload does).
[in] | F | #F by 3 list of triangle indices into some (abstract) list of vertices V |
[in] | uE | #uE by 2 list of unique edges indices into V |
[in] | uEC | #uE+1 list of cumsums of directed edges sharing each unique edge |
[in] | uEE | #E list of indices into E (see igl::unique_edge_map ) |
bool igl::piecewise_constant_winding_number | ( | const Eigen::MatrixBase< DerivedF > & | F | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::pinv | ( | const Eigen::MatrixBase< DerivedA > & | A, |
typename DerivedA::Scalar | tol, | ||
Eigen::PlainObjectBase< DerivedX > & | X | ||
) |
Compute the Moore-Penrose pseudoinverse.
[in] | A | m by n matrix |
[in] | tol | tolerance (if negative then default is used) |
[out] | X | n by m matrix so that A*X*A = A and X*A*X = X and A*X = (A*X)' and (X*A) = (X*A)' |
void igl::pinv | ( | const Eigen::MatrixBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedX > & | X | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::planarize_quad_mesh | ( | const Eigen::MatrixBase< DerivedV > & | Vin, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const int | maxIter, | ||
const double & | threshold, | ||
Eigen::PlainObjectBase< DerivedV > & | Vout | ||
) |
Planarizes a given quad mesh using the algorithm described in the paper "Shape-Up: Shaping Discrete Geometry with Projections" by S.
Bouaziz, M. Deuss, Y. Schwartzburg, T. Weise, M. Pauly, Computer Graphics Forum, Volume 31, Issue 5, August 2012, p. 1657-1667 (http://dl.acm.org/citation.cfm?id=2346802). The algorithm iterates between projecting each quad to its closest planar counterpart and stitching those quads together via a least squares optimization. It stops whenever all quads' non-planarity is less than a given threshold (suggested value: 0.01), or a maximum number of iterations is reached.
[in] | Vin | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 4 eigen Matrix of face (quad) indices |
[in] | maxIter | maximum numbers of iterations |
[in] | threshold | minimum allowed threshold for non-planarity |
[out] | Vout | #V by 3 eigen Matrix of planar mesh vertex 3D positions |
bool igl::point_in_circle | ( | const double | qx, |
const double | qy, | ||
const double | cx, | ||
const double | cy, | ||
const double | r | ||
) |
Determine if 2d point is in a circle.
[in] | qx | x-coordinate of query point |
[in] | qy | y-coordinate of query point |
[in] | cx | x-coordinate of circle center |
[in] | cy | y-coordinate of circle center |
[in] | r | radius of circle |
void igl::point_mesh_squared_distance | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedEle > & | Ele, | ||
Eigen::PlainObjectBase< DerivedsqrD > & | sqrD, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute distances from a set of points P to a triangle mesh (V,F)
[in] | P | #P by 3 list of query point positions |
[in] | V | #V by 3 list of vertex positions |
[in] | Ele | #Ele by (3|2|1) list of (triangle|edge|point) indices |
[out] | sqrD | #P list of smallest squared distances |
[out] | I | #P list of primitive indices corresponding to smallest distances |
[out] | C | #P by 3 list of closest points |
void igl::point_simplex_squared_distance | ( | const Eigen::MatrixBase< Derivedp > & | p, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedEle > & | Ele, | ||
const typename DerivedEle::Index | i, | ||
Derivedsqr_d & | sqr_d, | ||
Eigen::PlainObjectBase< Derivedc > & | c | ||
) |
Determine squared distance from a point to linear simplex.
[in] | p | d-long query point |
[in] | V | #V by d list of vertices |
[in] | Ele | #Ele by ss<=d+1 list of simplex indices into V |
[in] | i | index into Ele of simplex |
[out] | sqr_d | squared distance of Ele(i) to p |
[out] | c | closest point on Ele(i) |
void igl::point_simplex_squared_distance | ( | const Eigen::MatrixBase< Derivedp > & | p, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedEle > & | Ele, | ||
const typename DerivedEle::Index | i, | ||
Derivedsqr_d & | sqr_d, | ||
Eigen::PlainObjectBase< Derivedc > & | c, | ||
Eigen::PlainObjectBase< Derivedb > & | b | ||
) |
Determine squared distance from a point to linear simplex.
Also return barycentric coordinate of closest point.
[in] | p | d-long query point |
[in] | V | #V by d list of vertices |
[in] | Ele | #Ele by ss<=d+1 list of simplex indices into V |
[in] | i | index into Ele of simplex |
[out] | sqr_d | squared distance of Ele(i) to p |
[out] | c | closest point on Ele(i) |
[out] | b | barycentric coordinates of closest point on Ele(i) |
void igl::polar_dec | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
bool | includeReflections, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedU > & | U, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedV > & | V | ||
) |
Computes the polar decomposition (R,T) of a matrix A.
[in] | A | 3 by 3 matrix to be decomposed |
[in] | includeReflections | Whether to force R to be a rotation, or allow it to be a reflection |
[out] | R | 3 by 3 orthonormal matrix part of decomposition |
[out] | T | 3 by 3 stretch matrix part of decomposition |
[out] | U | 3 by 3 left-singular vectors |
[out] | S | 3 by 1 singular values |
[out] | V | 3 by 3 right-singular vectors |
void igl::polar_dec | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
const bool | includeReflections, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | T | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::polar_dec | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedU > & | U, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedV > & | V | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
For backward compatibility, these set includeReflections = false.
void igl::polar_dec | ( | const Eigen::PlainObjectBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | T | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::polar_svd | ( | const Eigen::MatrixBase< DerivedA > & | A, |
bool | includeReflections, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedU > & | U, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedV > & | V | ||
) |
Computes the polar decomposition (R,T) of a matrix A using SVD singular value decomposition.
[in] | A | 3 by 3 matrix to be decomposed |
[in] | includeReflections | Whether to force R to be a rotation, or allow it to be a reflection |
[out] | R | 3 by 3 rotation matrix part of decomposition (always rotataion) |
[out] | T | 3 by 3 stretch matrix part of decomposition |
[out] | U | 3 by 3 left-singular vectors |
[out] | S | 3 by 1 singular values |
[out] | V | 3 by 3 right-singular vectors |
void igl::polar_svd | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const bool | includeReflections, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | T | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::polar_svd | ( | const Eigen::MatrixBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedU > & | U, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedV > & | V | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
For backward compatibility, these set includeReflections = false.
void igl::polar_svd | ( | const Eigen::MatrixBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | T | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::polar_svd3x3 | ( | const Mat & | A, |
Mat & | R | ||
) |
Computes the closest rotation to input matrix A using specialized 3x3 SVD singular value decomposition (WunderSVD3x3)
[in] | A | 3 by 3 matrix to be decomposed |
[out] | R | 3 by 3 closest element in SO(3) (closeness in terms of Frobenius metric) |
This means that det(R) = 1. Technically it's not polar decomposition which guarantees positive semidefinite stretch factor (at the cost of having det(R) = -1). "• The orthogonal factors U and V will be true rotation matrices..." [McAdams, Selle, Tamstorf, Teran, Sefakis 2011]
void igl::polygon_corners | ( | const std::vector< std::vector< PType > > & | P, |
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Convert a list-of-lists polygon mesh faces representation to list of polygon corners and sizes.
[in] | P | #P list of lists of vertex indices into rows of some matrix V |
[out] | I | #I vectorized list of polygon corner indices into rows of some matrix V |
[out] | C | #P+1 list of cumulative polygon sizes so that C(i+1)-C(i) = size of the ith polygon, and so I(C(i)) through I(C(i+1)-1) are the indices of the ith polygon |
void igl::polygon_corners | ( | const Eigen::MatrixBase< DerivedQ > & | Q, |
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Convert a pure k-gon list of polygon mesh indices to list of polygon corners and sizes
[in] | Q | #Q by k list of polygon indices (ith row is a k-gon, unless Q(i,j) = -1 then it's a j-gon) |
void igl::polygons_to_triangles | ( | const Eigen::MatrixBase< DerivedI > & | I, |
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Given a polygon mesh, trivially triangulate each polygon with a fan.
This purely combinatorial triangulation will work well for convex/flat polygons and degrade otherwise.
[in] | I | #I vectorized list of polygon corner indices into rows of some matrix V |
[in] | C | #polygons+1 list of cumulative polygon sizes so that C(i+1)-C(i) = size of the ith polygon, and so I(C(i)) through I(C(i+1)-1) are the indices of the ith polygon |
[out] | F | #F by 3 list of triangle indices into rows of V |
[out] | J | #F list of indices into 0:#P-1 of corresponding polygon |
void igl::principal_curvature | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedPD1 > & | PD1, | ||
Eigen::PlainObjectBase< DerivedPD2 > & | PD2, | ||
Eigen::PlainObjectBase< DerivedPV1 > & | PV1, | ||
Eigen::PlainObjectBase< DerivedPV2 > & | PV2, | ||
unsigned | radius = 5 , |
||
bool | useKring = true |
||
) |
Compute the principal curvature directions and magnitude of the given triangle mesh DerivedV derived from vertex positions matrix type: i.e.
MatrixXd DerivedF derived from face indices matrix type: i.e. MatrixXi
[in] | V | eigen matrix #V by 3 |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | PD1 | #V by 3 maximal curvature direction for each vertex. |
[out] | PD2 | #V by 3 minimal curvature direction for each vertex. |
[out] | PV1 | #V by 1 maximal curvature value for each vertex. |
[out] | PV2 | #V by 1 minimal curvature value for each vertex. |
[in] | radius | controls the size of the neighbourhood used, 1 = average edge length |
[in] | useKring | use Kring neighbourhood instead of ball neighbourhood |
This function has been developed by: Nikolas De Giorgis, Luigi Rocca and Enrico Puppo. The algorithm is based on: Efficient Multi-scale Curvature and Crease Estimation Daniele Panozzo, Enrico Puppo, Luigi Rocca GraVisMa, 2010
void igl::principal_curvature | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedPD1 > & | PD1, | ||
Eigen::PlainObjectBase< DerivedPD2 > & | PD2, | ||
Eigen::PlainObjectBase< DerivedPV1 > & | PV1, | ||
Eigen::PlainObjectBase< DerivedPV2 > & | PV2, | ||
std::vector< Index > & | bad_vertices, | ||
unsigned | radius = 5 , |
||
bool | useKring = true |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | bad_vertices | vector of indices of bad vertices if any. |
void igl::print_ijv | ( | const Eigen::SparseMatrix< T > & | X, |
const int | offset = 0 |
||
) |
Prints a 3 column matrix representing [I,J,V] = find(X).
That is, each row is the row index, column index and value for each non zero entry. Each row is printed on a new line
T | should be a eigen sparse matrix primitive type like int or double |
[in] | X | m by n matrix whose entries are to be sorted |
[in] | offset | optional offset for I and J indices {0} |
void igl::print_vector | ( | std::vector< std::vector< T > > & | v | ) |
void igl::print_vector | ( | std::vector< std::vector< std::vector< T > > > & | v | ) |
void igl::procrustes | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedY > & | Y, | ||
const bool | includeScaling, | ||
const bool | includeReflections, | ||
Scalar & | scale, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | t | ||
) |
Solve Procrustes problem in d dimensions.
Given two point sets X,Y in R^d find best scale s, orthogonal R and translation t s.t. |s*X*R + t - Y|^2 is minimized.
DerivedV | point type |
Scalar | scalar type |
DerivedR | type of R |
DerivedT | type of t |
[in] | X | #V by DIM first list of points |
[in] | Y | #V by DIM second list of points |
[in] | includeScaling | if scaling should be allowed |
[in] | includeReflections | if R is allowed to be a reflection |
[out] | scale | scaling |
[out] | R | orthogonal matrix |
[out] | t | translation |
void igl::procrustes | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedY > & | Y, | ||
const bool | includeScaling, | ||
const bool | includeReflections, | ||
Eigen::Transform< Scalar, DIM, TType > & | T | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Same as above but returns Eigen transformation object.
[out] | T | transformation that minimizes error |
void igl::procrustes | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedY > & | Y, | ||
const bool | includeScaling, | ||
const bool | includeReflections, | ||
Eigen::PlainObjectBase< DerivedR > & | S, | ||
Eigen::PlainObjectBase< DerivedT > & | t | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | S | S=scale*R, instead of scale and R separately |
void igl::procrustes | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedY > & | Y, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | t | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Convenient wrapper for rigid case (no scaling, no reflections)
void igl::procrustes | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedY > & | Y, | ||
Eigen::Rotation2D< Scalar > & | R, | ||
Eigen::PlainObjectBase< DerivedT > & | t | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Convenient wrapper for 2D case.
Eigen::Matrix< Scalar, 3, 1 > igl::project | ( | const Eigen::Matrix< Scalar, 3, 1 > & | obj, |
const Eigen::Matrix< Scalar, 4, 4 > & | model, | ||
const Eigen::Matrix< Scalar, 4, 4 > & | proj, | ||
const Eigen::Matrix< Scalar, 4, 1 > & | viewport | ||
) |
Eigen reimplementation of gluProject.
[in] | obj* | 3D objects' x, y, and z coordinates respectively |
[in] | model | model matrix |
[in] | proj | projection matrix |
[in] | viewport | viewport vector |
void igl::project | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedM > & | model, | ||
const Eigen::MatrixBase< DerivedN > & | proj, | ||
const Eigen::MatrixBase< DerivedO > & | viewport, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | V | #V by 3 list of object points |
[in] | model | model matrix |
[in] | proj | projection matrix |
[in] | viewport | viewport vector |
[out] | P | #V by 3 list of screen space points |
void igl::project_isometrically_to_plane | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedU > & | U, | ||
Eigen::PlainObjectBase< DerivedUF > & | UF, | ||
Eigen::SparseMatrix< Scalar > & | I | ||
) |
Project each triangle to the plane.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of mesh indices |
[out] | U | #F*3 by 2 list of triangle positions |
[out] | UF | #F by 3 list of mesh indices into U |
[out] | I | #V by #F*3 such that I(i,j) = 1 implies U(j,:) corresponds to V(i,:) |
void igl::project_to_line | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedS > & | S, | ||
const Eigen::MatrixBase< DerivedD > & | D, | ||
Eigen::PlainObjectBase< Derivedt > & | t, | ||
Eigen::PlainObjectBase< DerivedsqrD > & | sqrD | ||
) |
Project points onto vectors, that is find the parameter t for a point p such that proj_p = (y-x).
*t, additionally compute the squared distance from p to the line of the vector, such that |p - proj_p|² = sqr_d
[in] | P | #P by dim list of points to be projected |
[in] | S | size dim start position of line vector |
[in] | D | size dim destination position of line vector |
[out] | T | #P by 1 list of parameters |
[out] | sqrD | #P by 1 list of squared distances |
void igl::project_to_line | ( | const Scalar | px, |
const Scalar | py, | ||
const Scalar | pz, | ||
const Scalar | sx, | ||
const Scalar | sy, | ||
const Scalar | sz, | ||
const Scalar | dx, | ||
const Scalar | dy, | ||
const Scalar | dz, | ||
Scalar & | projpx, | ||
Scalar & | projpy, | ||
Scalar & | projpz, | ||
Scalar & | t, | ||
Scalar & | sqrd | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Same as above but for a single query point
void igl::project_to_line | ( | const Scalar | px, |
const Scalar | py, | ||
const Scalar | pz, | ||
const Scalar | sx, | ||
const Scalar | sy, | ||
const Scalar | sz, | ||
const Scalar | dx, | ||
const Scalar | dy, | ||
const Scalar | dz, | ||
Scalar & | t, | ||
Scalar & | sqrd | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::project_to_line_segment | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedS > & | S, | ||
const Eigen::MatrixBase< DerivedD > & | D, | ||
Eigen::PlainObjectBase< Derivedt > & | t, | ||
Eigen::PlainObjectBase< DerivedsqrD > & | sqrD | ||
) |
Project points onto vectors, that is find the parameter t for a point p such that proj_p = (y-x).
*t, additionally compute the squared distance from p to the line of the vector, such that |p - proj_p|² = sqr_d
[in] | P | #P by dim list of points to be projected |
[in] | S | size dim start position of line vector |
[in] | D | size dim destination position of line vector |
[out] | T | #P by 1 list of parameters |
[out] | sqrD | #P by 1 list of squared distances |
void igl::projection_constraint | ( | const Eigen::MatrixBase< DerivedUV > & | UV, |
const Eigen::MatrixBase< DerivedM > & | M, | ||
const Eigen::MatrixBase< DerivedVP > & | VP, | ||
Eigen::PlainObjectBase< DerivedA > & | A, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
Construct two constraint equations for projecting a point to the screen.
Of the form:
A z = B
with A 2x3 and B 2x1, where z is the 3d position of point in the scene, given the current projection matrix (e.g. gl_proj * gl_modelview), viewport (corner u/v and width/height) and screen space point x,y. Satisfying this equation means that z projects to screen space point (x,y).
[in] | UV | 2-long uv-coordinates of screen space point |
[in] | M | 4 by 4 projection matrix |
[in] | VP | 4-long viewport: (corner_u, corner_v, width, height) |
[out] | A | 2 by 3 system matrix |
[out] | B | 2 by 1 right-hand side |
void igl::pseudonormal_test | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedFN > & | FN, | ||
const Eigen::MatrixBase< DerivedVN > & | VN, | ||
const Eigen::MatrixBase< DerivedEN > & | EN, | ||
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const Eigen::MatrixBase< Derivedq > & | q, | ||
const int | f, | ||
Eigen::PlainObjectBase< Derivedc > & | c, | ||
Scalar & | s, | ||
Eigen::PlainObjectBase< Derivedn > & | n | ||
) |
Given a mesh (V,F), a query point q, and a point on (V,F) c, determine whether q is inside (V,F) --> s=-1 or outside (V,F) s=1, based on the sign of the dot product between (q-c) and n, where n is the normal at c, carefully chosen according to [Bærentzen & Aanæs 2005].
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
[in] | FN | #F by 3 list of triangle normals |
[in] | VN | #V by 3 list of vertex normals (ANGLE WEIGHTING) |
[in] | EN | #E by 3 list of edge normals (UNIFORM WEIGHTING) |
[in] | EMAP | #F*3 mapping edges in F to E |
[in] | q | Query point |
[in] | f | index into F to face to which c belongs |
[in] | c | Point on (V,F) |
[out] | s | sign |
[out] | n | normal |
void igl::pseudonormal_test | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | E, | ||
const Eigen::MatrixBase< DerivedEN > & | EN, | ||
const Eigen::MatrixBase< DerivedVN > & | VN, | ||
const Eigen::MatrixBase< Derivedq > & | q, | ||
const int | e, | ||
Eigen::PlainObjectBase< Derivedc > & | c, | ||
Scalar & | s, | ||
Eigen::PlainObjectBase< Derivedn > & | n | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
2D version.
Scalar igl::pso | ( | const std::function< Scalar(DerivedX &) > | f, |
const Eigen::MatrixBase< DerivedLB > & | LB, | ||
const Eigen::MatrixBase< DerivedUB > & | UB, | ||
const int | max_iters, | ||
const int | population, | ||
DerivedX & | X | ||
) |
Global optimization with the particle swarm algorithm.
Solve the problem:
minimize f(x) subject to lb ≤ x ≤ ub
by particle swarm optimization (PSO).
[in] | f | function that evaluates the objective for a given "particle" location |
[in] | LB | #X vector of lower bounds |
[in] | UB | #X vector of upper bounds |
[in] | max_iters | maximum number of iterations |
[in] | population | number of particles in swarm |
[out] | X | best particle seen so far |
Scalar igl::pso | ( | const std::function< Scalar(DerivedX &) > | f, |
const Eigen::MatrixBase< DerivedLB > & | LB, | ||
const Eigen::MatrixBase< DerivedUB > & | UB, | ||
const Eigen::DenseBase< DerivedP > & | P, | ||
const int | max_iters, | ||
const int | population, | ||
DerivedX & | X | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | P | whether each DOF is periodic |
bool igl::qslim | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const size_t | max_m, | ||
Eigen::MatrixXd & | U, | ||
Eigen::MatrixXi & | G, | ||
Eigen::VectorXi & | J, | ||
Eigen::VectorXi & | I | ||
) |
Decimate (simplify) a triangle mesh in nD according to the paper "Simplifying Surfaces with Color and Texture using Quadric Error Metrics" by [Garland and Heckbert, 1987] (technically a followup to qslim).
The mesh can have open boundaries but should be edge-manifold.
[in] | V | #V by dim list of vertex positions. Assumes that vertices with infinite coordinates are "points at infinity" being used to close up boundary edges with faces. This allows special subspace quadrice for boundary edges: There should never be more than one "point at infinity" in a single triangle. |
[in] | F | #F by 3 list of triangle indices into V |
[in] | max_m | desired number of output faces |
[out] | U | #U by dim list of output vertex posistions (can be same ref as V) |
[out] | G | #G by 3 list of output face indices into U (can be same ref as F) |
[out] | J | #G list of indices into F of birth face |
[out] | I | #U list of indices into V of birth vertices |
void igl::quad_grid | ( | const int | nx, |
const int | ny, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedQ > & | Q, | ||
Eigen::PlainObjectBase< DerivedE > & | E | ||
) |
void igl::quad_grid | ( | const int | nx, |
const int | ny, | ||
Eigen::PlainObjectBase< DerivedQ > & | Q, | ||
Eigen::PlainObjectBase< DerivedE > & | E | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::quad_planarity | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Compute planarity of the faces of a quad mesh.
[in] | V | #V by 3 eigen Matrix of mesh vertex 3D positions |
[in] | F | #F by 4 eigen Matrix of face (quad) indices |
[out] | P | #F by 1 eigen Matrix of mesh face (quad) planarities |
Eigen::Matrix< Scalar, n, 1 > igl::quadprog | ( | const Eigen::Matrix< Scalar, n, n > & | H, |
const Eigen::Matrix< Scalar, n, 1 > & | f, | ||
const Eigen::Matrix< Scalar, ni, n > & | Ai, | ||
const Eigen::Matrix< Scalar, ni, 1 > & | lbi, | ||
const Eigen::Matrix< Scalar, ni, 1 > & | ubi, | ||
const Eigen::Matrix< Scalar, n, 1 > & | lb, | ||
const Eigen::Matrix< Scalar, n, 1 > & | ub | ||
) |
Solve a convex quadratic program.
Optimized for small dense problems. Still works for Eigen::Dynamic (and then everything needs to be Dynamic).
min_x ½ xᵀ H x + xᵀf subject to: lbi ≤ Ai x ≤ ubi lb ≤ x ≤ u
Scalar | (e.g., double) |
n | #H or Eigen::Dynamic if not known at compile time |
ni | #Ai or Eigen::Dynamic if not known at compile time |
[in] | H | #H by #H quadratic coefficients (only lower triangle used) |
[in] | f | #H linear coefficients |
[in] | Ai | #Ai by #H list of linear equality constraint coefficients |
[in] | lbi | #Ai list of linear equality lower bounds |
[in] | ubi | #Ai list of linear equality upper bounds |
[in] | lb | #H list of lower bounds |
[in] | ub | #H list of lower bounds |
Eigen::Matrix< Scalar, n, 1 > igl::quadprog | ( | const Eigen::Matrix< Scalar, n, n > & | H, |
const Eigen::Matrix< Scalar, n, 1 > & | f, | ||
const Eigen::Matrix< Scalar, m, n > & | A, | ||
const Eigen::Matrix< Scalar, m, 1 > & | b, | ||
const Eigen::Matrix< Scalar, n, 1 > & | lb, | ||
const Eigen::Matrix< Scalar, n, 1 > & | ub | ||
) |
Solve a convex quadratic program.
Optimized for small dense problems. All inequalities must be simple bounds.
min_x ½ xᵀ H x + xᵀf subject to: A x = b lb ≤ x ≤ u
Scalar | (e.g., double) |
n | #H or Eigen::Dynamic if not known at compile time |
m | #A or Eigen::Dynamic if not known at compile time |
[in] | H | #H by #H quadratic coefficients (only lower triangle used) |
[in] | f | #H linear coefficients |
[in] | A | #A by #H list of linear equality constraint coefficients |
[in] | b | #A list of linear equality lower bounds |
[in] | lb | #H list of lower bounds |
[in] | ub | #H list of lower bounds |
Eigen::Matrix< Scalar, n, 1 > igl::quadprog | ( | const Eigen::Matrix< Scalar, n, n > & | H, |
const Eigen::Matrix< Scalar, n, 1 > & | f, | ||
const Eigen::Matrix< Scalar, n, 1 > & | lb, | ||
const Eigen::Matrix< Scalar, n, 1 > & | ub | ||
) |
Solve a convex quadratic program.
Optimized for small dense problems. All constraints must be simple bounds.
min_x ½ xᵀ H x + xᵀf subject to: lb ≤ x ≤ u
Scalar | (e.g., double) |
n | #H or Eigen::Dynamic if not known at compile time |
[in] | H | #H by #H quadratic coefficients (only lower triangle used) |
[in] | f | #H linear coefficients |
[in] | lb | #H list of lower bounds |
[in] | ub | #H list of lower bounds |
std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double > igl::operator+ | ( | const std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double > & | a, |
const std::tuple< Eigen::MatrixXd, Eigen::RowVectorXd, double > & | b | ||
) |
A binary addition operator for Quadric tuples compatible with qslim, computing c = a+b.
[in] | a | QSlim quadric |
[in] | b | QSlim quadric |
[out] | c | QSlim quadric |
void igl::quat_conjugate | ( | const Q_type * | q1, |
Q_type * | out | ||
) |
Compute conjugate of given quaternion http://en.wikipedia.org/wiki/Quaternion#Conjugation.2C_the_norm.2C_and_reciprocal A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w.
[in] | q1 | input quaternion |
[out] | out | result of conjugation, allowed to be same as input |
void igl::quat_mult | ( | const Q_type * | q1, |
const Q_type * | q2, | ||
Q_type * | out | ||
) |
Computes out = q1 * q2 with quaternion multiplication A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w.
[in] | q1 | left quaternion |
[in] | q2 | right quaternion |
[out] | out | result of multiplication |
void igl::quat_to_axis_angle | ( | const Q_type * | q, |
Q_type * | axis, | ||
Q_type & | angle | ||
) |
Convert quat representation of a rotation to axis angle A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w.
[in] | q | quaternion |
[out] | axis | 3d vector |
[out] | angle | scalar in radians |
void igl::quat_to_axis_angle_deg | ( | const Q_type * | q, |
Q_type * | axis, | ||
Q_type & | angle | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.include/igl/quat_to_axis_angle.h.
void igl::quat_to_mat | ( | const Q_type * | quat, |
Q_type * | mat | ||
) |
Convert a quaternion to a 4x4 matrix A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w.
[in] | quat | pointer to four elements of quaternion (x,y,z,w) |
[out] | mat | pointer to 16 elements of matrix |
void igl::quats_to_column | ( | const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > | vQ, |
Eigen::VectorXd & | Q | ||
) |
"Columnize" a list of quaternions (q1x,q1y,q1z,q1w,q2x,q2y,q2z,q2w,...)
[in] | vQ | n-long list of quaternions |
[out] | Q | n*4-long list of coefficients |
Eigen::VectorXd igl::quats_to_column | ( | const std::vector< Eigen::Quaterniond, Eigen::aligned_allocator< Eigen::Quaterniond > > | vQ | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::ramer_douglas_peucker | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const typename DerivedP::Scalar | tol, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Ramer-Douglas-Peucker piecewise-linear curve simplification.
[in] | P | #P by dim ordered list of vertices along the curve |
[in] | tol | tolerance (maximal euclidean distance allowed between the new line and a vertex) |
[out] | S | #S by dim ordered list of points along the curve |
[out] | J | #S list of indices into P so that S = P(J,:) |
void igl::ramer_douglas_peucker | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const typename DerivedP::Scalar | tol, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedQ > & | Q | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Run Ramer-Douglas-Peucker curve simplification but keep track of where every point on the original curve maps to on the simplified curve.
[out] | Q | #P by dim list of points mapping along simplified curve |
Eigen::Vector3d igl::random_dir | ( | ) |
Generate a uniformly random unit direction in 3D, return as vector.
Eigen::MatrixXd igl::random_dir_stratified | ( | const int | n | ) |
Generate n stratified uniformly random unit directions in 3d, return as rows of an n by 3 matrix.
[in] | n | number of directions |
void igl::random_points_on_mesh | ( | const int | n, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedFI > & | FI, | ||
Eigen::PlainObjectBase< DerivedX > & | X, | ||
URBG && | urbg = igl::generate_default_urbg() |
||
) |
Randomly sample a mesh (V,F) n times.
[in] | n | number of samples |
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of mesh triangle indices |
[out] | B | n by 3 list of barycentric coordinates, ith row are coordinates of ith sampled point in face FI(i) |
[in] | urbg | An instance of UnformRandomBitGenerator (e.g., std::minstd_rand(0) ) |
[out] | FI | n list of indices into F |
[in,out] | urbg | An instance of UnformRandomBitGenerator. |
[out] | X | n by dim list of sample positions. |
void igl::random_points_on_mesh_intrinsic | ( | const int | n, |
const Eigen::MatrixBase< DeriveddblA > & | dblA, | ||
Eigen::PlainObjectBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedFI > & | FI, | ||
URBG && | urbg = igl::generate_default_urbg() |
||
) |
Randomly sample a mesh (V,F) n times.
[in] | n | number of samples |
[in] | dblA | #F list of double areas of triangles |
[out] | B | n by 3 list of barycentric coordinates, ith row are coordinates of ith sampled point in face FI(i) |
[out] | FI | n list of indices into F |
[in,out] | urbg | An instance of UnformRandomBitGenerator. |
void igl::random_points_on_mesh_intrinsic | ( | const int | n, |
const Eigen::MatrixBase< DeriveddblA > & | dblA, | ||
const int | num_vertices, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< ScalarB > & | B, | ||
Eigen::PlainObjectBase< DerivedFI > & | FI, | ||
URBG && | urbg | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | num_vertices | number of vertices in mesh |
[in] | F | #F by 3 list of mesh triangle indices |
[out] | B | n by num_vertices sparse matrix so that B*V produces a list of sample points if dbl = doublearea(V,F) |
Eigen::Quaternion< Scalar > igl::random_quaternion | ( | ) |
Generate a random quaternion via uniform sampling of the 4-sphere.
Scalar igl::random_search | ( | const std::function< Scalar(DerivedX &) > | f, |
const Eigen::MatrixBase< DerivedLB > & | LB, | ||
const Eigen::MatrixBase< DerivedUB > & | UB, | ||
const int | iters, | ||
DerivedX & | X | ||
) |
Global optimization via random search.
Solve the problem:
minimize f(x) subject to lb ≤ x ≤ ub
by uniform random search.
[in] | f | function to minimize |
[in] | LB | #X vector of finite lower bounds |
[in] | UB | #X vector of finite upper bounds |
[in] | iters | number of iterations |
[out] | X | #X optimal parameter vector |
void igl::randperm | ( | const int | n, |
Eigen::PlainObjectBase< DerivedI > & | I, | ||
URBG && | urbg = igl::generate_default_urbg() |
||
) |
Like matlab's randperm(n) but minus 1.
When urbg is not specified, randperm will use default random bit generator std::minstd_rand initialized with random seed generated by std::rand()
[in] | n | number of elements |
[out] | I | n list of rand permutation of 0:n-1 |
[in,out] | urbg | An instance of UnformRandomBitGenerator. |
bool igl::ray_box_intersect | ( | const Eigen::MatrixBase< Derivedsource > & | source, |
const Eigen::MatrixBase< Deriveddir > & | dir, | ||
const Eigen::AlignedBox< Scalar, 3 > & | box, | ||
const Scalar & | t0, | ||
const Scalar & | t1, | ||
Scalar & | tmin, | ||
Scalar & | tmax | ||
) |
Determine whether a ray origin+t*dir and box intersect within the ray's parameterized range (t0,t1)
[in] | source | 3-vector origin of ray |
[in] | dir | 3-vector direction of ray |
[in] | box | axis aligned box |
[in] | t0 | hit only if hit.t less than t0 |
[in] | t1 | hit only if hit.t greater than t1 |
[out] | tmin | minimum of interval of overlap within [t0,t1] |
[out] | tmax | maximum of interval of overlap within [t0,t1] |
bool igl::ray_box_intersect | ( | const Eigen::MatrixBase< Derivedsource > & | source, |
const Eigen::MatrixBase< Deriveddir > & | inv_dir, | ||
const Eigen::MatrixBase< Deriveddir > & | inv_dir_pad, | ||
const Eigen::AlignedBox< Scalar, 3 > & | box, | ||
const Scalar & | t0, | ||
const Scalar & | t1, | ||
Scalar & | tmin, | ||
Scalar & | tmax | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
same with direction inverse precomputed
bool igl::ray_mesh_intersect | ( | const Eigen::MatrixBase< Derivedsource > & | source, |
const Eigen::MatrixBase< Deriveddir > & | dir, | ||
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
std::vector< igl::Hit > & | hits | ||
) |
Shoot a ray against a mesh (V,F) and collect all hits.
If you have many rays, consider using AABB.h
[in] | source | 3-vector origin of ray |
[in] | dir | 3-vector direction of ray |
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into V |
[out] | hits | sorted list of hits |
bool igl::ray_mesh_intersect | ( | const Eigen::MatrixBase< Derivedsource > & | source, |
const Eigen::MatrixBase< Deriveddir > & | dir, | ||
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
igl::Hit & | hit | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | hit | first hit, set only if it exists |
bool igl::ray_triangle_intersect | ( | const Eigen::MatrixBase< Derivedsource > & | source, |
const Eigen::MatrixBase< Deriveddir > & | dir, | ||
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const int | f, | ||
igl::Hit & | hit | ||
) |
int igl::ray_sphere_intersect | ( | const Eigen::PlainObjectBase< Derivedo > & | o, |
const Eigen::PlainObjectBase< Derivedd > & | d, | ||
const Eigen::PlainObjectBase< Derivedc > & | c, | ||
r_type | r, | ||
t_type & | t0, | ||
t_type & | t1 | ||
) |
Compute the intersection between a ray from O in direction D and a sphere centered at C with radius r.
[in] | o | origin of ray |
[in] | d | direction of ray |
[in] | c | center of sphere |
[in] | r | radius of sphere |
[out] | t0 | parameterization of first hit (set only if exists) so that hit position = o + t0*d |
[out] | t1 | parameterization of second hit (set only if exists) |
void igl::read_file_binary | ( | FILE * | fp, |
std::vector< uint8_t > & | fileBufferBytes | ||
) |
bool igl::read_triangle_mesh | ( | const std::string | str, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Read mesh from an ascii file with automatic detection of file format among: mesh, msh obj, off, ply, stl, wrl.
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
Index | type for indices (will be read as int and cast to Index) |
[in] | str | path to file |
[out] | V | eigen double matrix #V by 3 |
[out] | F | eigen int matrix #F by 3 |
bool igl::read_triangle_mesh | ( | const std::string | str, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
outputs to vectors, only .off and .obj supported.
bool igl::read_triangle_mesh | ( | const std::string | str, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
std::string & | dir, | ||
std::string & | base, | ||
std::string & | ext, | ||
std::string & | name | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | dir | directory path (see pathinfo.h) |
[out] | base | base name (see pathinfo.h) |
[out] | ext | extension (see pathinfo.h) |
[out] | name | filename (see pathinfo.h) |
bool igl::read_triangle_mesh | ( | const std::string & | ext, |
FILE * | fp, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | ext | file extension |
[in,out] | fp | pointer to already opened .ext file (will be closed) |
bool igl::readBF | ( | const std::string & | filename, |
Eigen::PlainObjectBase< DerivedWI > & | WI, | ||
Eigen::PlainObjectBase< DerivedP > & | P, | ||
Eigen::PlainObjectBase< DerivedO > & | O | ||
) |
Read a bones forest from a file, returns a list of bone roots.
[in] | file_name | path to .bf bones tree file |
[out] | WI | #B list of unique weight indices |
[out] | P | #B list of parent indices into B, -1 for roots |
[out] | O | #B by 3 list of tip offset vectors from parent (or position for roots) |
bool igl::readBF | ( | const std::string & | filename, |
Eigen::PlainObjectBase< DerivedWI > & | WI, | ||
Eigen::PlainObjectBase< DerivedbfP > & | bfP, | ||
Eigen::PlainObjectBase< DerivedO > & | O, | ||
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedBE > & | BE, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
Read bone forest into pure bone-skeleton format, expects only bones (no point handles), and that a root in the .bf <—> no weight attachment.
[in] | file_name | path to .bf bones tree file |
[out] | WI | #B list of unique weight indices |
[out] | P | #B list of parent indices into B, -1 for roots |
[out] | O | #B by 3 list of tip offset vectors from parent (or position for roots) |
[out] | C | #C by 3 list of absolute joint locations |
[out] | BE | #BE by 3 list of bone indices into C, in order of weight index |
[out] | P | #BE list of parent bone indices into BE, -1 means root bone |
bool igl::readCSV | ( | const std::string | str, |
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > & | M | ||
) |
read a matrix from a csv file into a Eigen matrix
Scalar | type for the matrix |
[in] | str | path to .csv file |
[out] | M | eigen matrix |
bool igl::readDMAT | ( | const std::string | file_name, |
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Read a matrix from an .dmat file.
[in] | file_name | path to .dmat file |
[out] | W | eigen matrix containing read-in coefficients |
bool igl::readDMAT | ( | const std::string | file_name, |
std::vector< std::vector< Scalar > > & | W | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readMESH | ( | const std::string | mesh_file_name, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Load a tetrahedral volume mesh from a .mesh file.
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
Index | type for indices (will be read as int and cast to Index) |
[in] | mesh_file_name | path of .mesh file |
[out] | V | double matrix of vertex positions #V by 3 |
[out] | T | #T list of tet indices into vertex positions |
[out] | F | #F list of face indices into vertex positions |
bool igl::readMESH | ( | const std::string | mesh_file_name, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | T, | ||
std::vector< std::vector< Index > > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readMESH | ( | FILE * | mesh_file, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | pointer | to already opened .mesh file (will be closed) |
bool igl::readMESH | ( | FILE * | mesh_file, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | T, | ||
std::vector< std::vector< Index > > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readMSH | ( | const std::string & | msh, |
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | X, | ||
Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | Tri, | ||
Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | Tet, | ||
Eigen::VectorXi & | TriTag, | ||
Eigen::VectorXi & | TetTag, | ||
std::vector< std::string > & | XFields, | ||
std::vector< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > > & | XF, | ||
std::vector< std::string > & | EFields, | ||
std::vector< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > > & | TriF, | ||
std::vector< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > > & | TetF | ||
) |
read triangle surface mesh and tetrahedral volume mesh from .msh file
EigenMatrixOptions | matrix options of output matrices (e.g., Eigen::ColMajor, Eigen::RowMajor) |
[in] | msh | - file name |
[out] | X | eigen double matrix of vertex positions #X by 3 |
[out] | Tri | #Tri eigen integer matrix of triangular faces indices into vertex positions |
[out] | Tet | #Tet eigen integer matrix of tetrahedral indices into vertex positions |
[out] | TriTag | #Tri eigen integer vector of tags associated with surface faces |
[out] | TetTag | #Tet eigen integer vector of tags associated with volume elements |
[out] | XFields | #XFields list of strings with field names associated with nodes |
[out] | XF | #XFields list of eigen double matrices, fields associated with nodes |
[out] | EFields | #EFields list of strings with field names associated with elements |
[out] | TriF | #EFields list of eigen double matrices, fields associated with surface elements |
[out] | TetF | #EFields list of eigen double matrices, fields associated with volume elements |
bool igl::readMSH | ( | const std::string & | msh, |
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | X, | ||
Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | Tri, | ||
Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | Tet, | ||
Eigen::VectorXi & | TriTag, | ||
Eigen::VectorXi & | TetTag | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readMSH | ( | const std::string & | msh, |
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | X, | ||
Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | Tri, | ||
Eigen::VectorXi & | TriTag | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readMSH | ( | const std::string & | msh, |
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | X, | ||
Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, EigenMatrixOptions > & | Tri | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readNODE | ( | const std::string | node_file_name, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
load a list of points from a .node file
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
Index | type for indices (will be read as int and cast to Index) |
[in] | node_file_name | path of .node file |
[out] | V | double matrix of vertex positions #V by dim |
[out] | I | list of indices (first tells whether 0 or 1 indexed) |
bool igl::readNODE | ( | const std::string | node_file_name, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readOBJ | ( | const std::string | obj_file_name, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Scalar > > & | TC, | ||
std::vector< std::vector< Scalar > > & | N, | ||
std::vector< std::vector< Index > > & | F, | ||
std::vector< std::vector< Index > > & | FTC, | ||
std::vector< std::vector< Index > > & | FN, | ||
std::vector< std::tuple< std::string, Index, Index > > & | FM | ||
) |
Read a mesh from an ascii obj file, filling in vertex positions, normals and texture coordinates.
Mesh may have faces of any number of degree
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
Index | type for indices (will be read as int and cast to Index) |
[in] | str | path to .obj file |
[out] | V | double matrix of vertex positions #V by 3 |
[out] | TC | double matrix of texture coordinats #TC by 2 |
[out] | N | double matrix of corner normals #N by 3 |
[out] | F | #F list of face indices into vertex positions |
[out] | FTC | #F list of face indices into vertex texture coordinates |
[out] | FN | #F list of face indices into vertex normals |
bool igl::readOBJ | ( | const std::string | obj_file_name, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Scalar > > & | TC, | ||
std::vector< std::vector< Scalar > > & | N, | ||
std::vector< std::vector< Index > > & | F, | ||
std::vector< std::vector< Index > > & | FTC, | ||
std::vector< std::vector< Index > > & | FN | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readOBJ | ( | FILE * | obj_file, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Scalar > > & | TC, | ||
std::vector< std::vector< Scalar > > & | N, | ||
std::vector< std::vector< Index > > & | F, | ||
std::vector< std::vector< Index > > & | FTC, | ||
std::vector< std::vector< Index > > & | FN, | ||
std::vector< std::tuple< std::string, Index, Index > > & | FM | ||
) |
[in,out] | obj_file | pointer to already opened .obj file (will be closed) |
bool igl::readOBJ | ( | const std::string | obj_file_name, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readOBJ | ( | const std::string | str, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedTC > & | TC, | ||
Eigen::PlainObjectBase< DerivedCN > & | CN, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedFTC > & | FTC, | ||
Eigen::PlainObjectBase< DerivedFN > & | FN | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Eigen Wrappers. These will return true only if the data is perfectly "rectangular": All faces are the same degree, all have the same number of textures/normals etc.
bool igl::readOBJ | ( | const std::string | str, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readOBJ | ( | const std::string | str, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Polygon mesh version.
[out] | I | #I vectorized list of polygon corner indices into rows of some matrix V |
[out] | C | #P+1 list of cumulative polygon sizes so that C(i+1)-C(i) = size of the ith polygon, and so I(C(i)) through I(C(i+1)-1) are the indices of the ith polygon |
bool igl::readOFF | ( | const std::string | off_file_name, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | F, | ||
std::vector< std::vector< Scalar > > & | N, | ||
std::vector< std::vector< Scalar > > & | C | ||
) |
Read a mesh from an ascii OFF file, filling in vertex positions, normals and texture coordinates.
Mesh may have faces of any number of degree
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
Index | type for indices (will be read as int and cast to Index) |
[in] | str | path to .obj file |
[out] | V | double matrix of vertex positions #V by 3 |
[out] | F | #F list of face indices into vertex positions |
[out] | N | list of vertex normals #V by 3 |
[out] | C | list of rgb color values per vertex #V by 3 |
bool igl::readOFF | ( | const std::string | str, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readOFF | ( | const std::string | str, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedV > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readOFF | ( | FILE * | off_file, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | F, | ||
std::vector< std::vector< Scalar > > & | N, | ||
std::vector< std::vector< Scalar > > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in,out] | off_file | pointer to already open .off file (will be closed) |
bool igl::readPLY | ( | std::istream & | ply_stream, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedF > & | E, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedUV > & | UV, | ||
Eigen::PlainObjectBase< DerivedVD > & | VD, | ||
std::vector< std::string > & | Vheader, | ||
Eigen::PlainObjectBase< DerivedFD > & | FD, | ||
std::vector< std::string > & | Fheader, | ||
Eigen::PlainObjectBase< DerivedED > & | ED, | ||
std::vector< std::string > & | Eheader, | ||
std::vector< std::string > & | comments | ||
) |
Read triangular mesh from ply file, filling in vertex positions, normals and texture coordinates, if available also read additional properties associated with vertex,faces and edges and file comments.
Derived* | from Eigen matrix parameters |
[in] | ply_stream | ply file input stream |
[out] | V | (#V,3) matrix of vertex positions |
[out] | F | (#F,3) list of face indices into vertex positions |
[out] | E | (#E,2) list of edge indices into vertex positions |
[out] | N | (#V,3) list of normals |
[out] | UV | (#V,2) list of texture coordinates |
[out] | VD | (#V,*) additional vertex data |
[out] | Vheader | (#V) list of vertex data headers |
[out] | FD | (#F,*) additional face data |
[out] | Fheader | (#F) list of face data headers |
[out] | ED | (#E,*) additional edge data |
[out] | Eheader | (#E) list of edge data headers |
[out] | comments | (*) file comments |
bool igl::readPLY | ( | const std::string & | ply_file, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedUV > & | UV, | ||
Eigen::PlainObjectBase< DerivedVD > & | VD, | ||
std::vector< std::string > & | VDheader, | ||
Eigen::PlainObjectBase< DerivedFD > & | FD, | ||
std::vector< std::string > & | FDheader, | ||
Eigen::PlainObjectBase< DerivedED > & | ED, | ||
std::vector< std::string > & | EDheader, | ||
std::vector< std::string > & | comments | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | ply_file | ply file name |
bool igl::readPLY | ( | const std::string & | filename, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedUV > & | UV, | ||
Eigen::PlainObjectBase< DerivedVD > & | VD, | ||
std::vector< std::string > & | Vheader | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readPLY | ( | const std::string & | filename, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedUV > & | UV | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readPLY | ( | const std::string & | filename, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readPLY | ( | const std::string & | filename, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readPLY | ( | FILE * | fp, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in,out] | fp | pointer to ply file (will be closed) |
bool igl::readSTL | ( | std::istream & | input, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
Read a mesh from an ascii/binary stl file.
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
[in] | filename | path to .stl file |
[out] | V | double matrix of vertex positions #V*3 by 3 |
[out] | F | index matrix of triangle indices #F by 3 |
[out] | N | double matrix of surface normals #F by 3 |
bool success = readSTL(filename,temp_V,F,N); remove_duplicate_vertices(temp_V,0,V,SVI,SVJ); for_each(F.data(),F.data()+F.size(),[&SVJ](int & f){f=SVJ(f);}); writeOBJ("Downloads/cat.obj",V,F);
bool igl::readSTL | ( | std::istream & | input, |
std::vector< std::array< TypeV, 3 > > & | V, | ||
std::vector< std::array< TypeF, 3 > > & | F, | ||
std::vector< std::array< TypeN, 3 > > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readSTL | ( | FILE * | fp, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in,out] | fp | pointer to ply file (will be closed) |
bool igl::readTGF | ( | const std::string | tgf_filename, |
std::vector< std::vector< double > > & | C, | ||
std::vector< std::vector< int > > & | E, | ||
std::vector< int > & | P, | ||
std::vector< std::vector< int > > & | BE, | ||
std::vector< std::vector< int > > & | CE, | ||
std::vector< std::vector< int > > & | PE | ||
) |
Read a graph from a .tgf file.
Input: filename .tgf file name Output: V # vertices by 3 list of vertex positions E # edges by 2 list of edge indices P # point-handles list of point handle indices BE # bone-edges by 2 list of bone-edge indices CE # cage-edges by 2 list of cage-edge indices PE # pseudo-edges by 2 list of pseudo-edge indices
Assumes that graph vertices are 3 dimensional
bool igl::readTGF | ( | const std::string | tgf_filename, |
Eigen::MatrixXd & | C, | ||
Eigen::MatrixXi & | E, | ||
Eigen::VectorXi & | P, | ||
Eigen::MatrixXi & | BE, | ||
Eigen::MatrixXi & | CE, | ||
Eigen::MatrixXi & | PE | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readTGF | ( | const std::string | tgf_filename, |
Eigen::MatrixXd & | C, | ||
Eigen::MatrixXi & | E | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::readWRL | ( | const std::string | wrl_file_name, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | F | ||
) |
Read a mesh from an ascii wrl file, filling in vertex positions and face indices of the first model.
Mesh may have faces of any number of degree
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
Index | type for indices (will be read as int and cast to Index) |
[in] | str | path to .wrl file |
[out] | V | double matrix of vertex positions #V by 3 |
[out] | F | #F list of face indices into vertex positions |
bool igl::readWRL | ( | FILE * | wrl_file, |
std::vector< std::vector< Scalar > > & | V, | ||
std::vector< std::vector< Index > > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in,out] | wrl_file | pointer to already opened .wrl file (will be closed) |
|
inline |
Perform reductions on the rows or columns of a SparseMatrix.
This is similar to DenseBase::redux, but different in two important ways:
[in] | A | m by n sparse matrix |
[in] | dim | dimension along which to sum (1 or 2) |
[in] | func | function handle with the prototype X(Y a, I i, J j, Z b) where a is the running value, b is A(i,j) |
[out] | S | n-long sparse vector (if dim == 1) or m-long sparse vector (if dim == 2) |
void igl::remesh_along_isoline | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
const typename DerivedS::Scalar | val, | ||
Eigen::PlainObjectBase< DerivedU > & | U, | ||
Eigen::PlainObjectBase< DerivedG > & | G, | ||
Eigen::PlainObjectBase< DerivedSU > & | SU, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::SparseMatrix< BCtype > & | BC, | ||
Eigen::PlainObjectBase< DerivedL > & | L | ||
) |
Given a triangle mesh and a scalar field, remesh so that a given isovalue of the scalar field follows (new) edges of the output mesh.
Effectively running "marching triangles" on mesh, but not in any coherent order. The output mesh should be as manifold as the input.
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by 3 list of mesh triangle indices into V |
[in] | S | #V by 1 list of scalar field |
[in] | val | value of S to remesh along |
[out] | U | #U by dim list of mesh vertex positions #U>=#V |
[out] | G | #G by 3 list of mesh triangle indices into U, #G>=#F |
[out] | SU | #U list of scalar field values over new mesh |
[out] | J | #G list of indices into F revealing birth triangles |
[out] | BC | #U by #V sparse matrix of barycentric coordinates so that U = BC*V |
[out] | L | #G list of bools whether scalar field in triangle below or above val |
void igl::remesh_along_isoline | ( | const int | n, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedS > & | S, | ||
const typename DerivedS::Scalar | val, | ||
Eigen::PlainObjectBase< DerivedG > & | G, | ||
Eigen::PlainObjectBase< DerivedSU > & | SU, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::SparseMatrix< BCtype > & | BC, | ||
Eigen::PlainObjectBase< DerivedL > & | L | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | n | number of vertices (#V) |
void igl::remove_duplicate_vertices | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const double | epsilon, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSVI > & | SVI, | ||
Eigen::PlainObjectBase< DerivedSVJ > & | SVJ | ||
) |
Remove duplicate vertices upto a uniqueness tolerance (epsilon)
[in] | V | #V by dim list of vertex positions |
[in] | epsilon | uniqueness tolerance used coordinate-wise: 1e0 --> integer match, 1e-1 --> match up to first decimal, ... , 0 --> exact match. |
[out] | SV | #SV by dim new list of vertex positions |
[out] | SVI | #SV by 1 list of indices so SV = V(SVI,:) |
[out] | SVJ | #V by 1 list of indices so V = SV(SVJ,:) |
void igl::remove_duplicate_vertices | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const double | epsilon, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSVI > & | SVI, | ||
Eigen::PlainObjectBase< DerivedSVJ > & | SVJ, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Wrapper that also remaps given faces (F) --> (SF) so that SF index SV
[out] | SF | #F by dim list of face indices into SV |
void igl::remove_unreferenced | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedNV > & | NV, | ||
Eigen::PlainObjectBase< DerivedNF > & | NF, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Remove unreferenced vertices from V, updating F accordingly.
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by ss list of simplices (Values of -1 are quitely skipped) |
[out] | NV | #NV by dim list of mesh vertex positions |
[out] | NF | #NF by ss list of simplices |
[out] | I | #V by 1 list of indices such that: NF = IM(F) and NT = IM(T) and V(find(IM<=size(NV,1)),:) = NV |
[out] | J | #NV by 1 list, such that NV = V(J,:) |
void igl::remove_unreferenced | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedNV > & | NV, | ||
Eigen::PlainObjectBase< DerivedNF > & | NF, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::remove_unreferenced | ( | const size_t | n, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | n | number of vertices (possibly greater than F.maxCoeff()+1) |
void igl::repdiag | ( | const Eigen::SparseMatrix< T > & | A, |
const int | d, | ||
Eigen::SparseMatrix< T > & | B | ||
) |
Repeat a matrix along the diagonal a certain number of times, so that if A is a m by n matrix and we want to repeat along the diagonal d times, we get a m*d by n*d matrix B such that: B( (k*m+1):(k*m+1+m-1), (k*n+1):(k*n+1+n-1)) = A for k from 0 to d-1.
[in] | A | m by n matrix we are repeating along the diagonal. |
[in] | d | number of times to repeat A along the diagonal |
[out] | B | m*d by n*d matrix with A repeated d times along the diagonal, will be dense or sparse to match A |
void igl::repdiag | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | A, |
const int | d, | ||
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | B | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Mat igl::repdiag | ( | const Mat & | A, |
const int | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::repmat | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const int | r, | ||
const int | c, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
Replicate and tile a matrix.
T | should be a eigen matrix primitive type like int or double |
[in] | A | m by n input matrix |
[in] | r | number of row-direction copies |
[in] | c | number of col-direction copies |
[out] | B | r*m by c*n output matrix |
replicate
e.g., dst = src.replicate(n,m); http://forum.kde.org/viewtopic.php?f=74&t=90876#p173517 void igl::repmat | ( | const Eigen::SparseMatrix< T, majorType > & | A, |
const int | r, | ||
const int | c, | ||
Eigen::SparseMatrix< T, majorType > & | B | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::resolve_duplicated_faces | ( | const Eigen::MatrixBase< DerivedF1 > & | F1, |
Eigen::PlainObjectBase< DerivedF2 > & | F2, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Resolve duplicated faces according to the following rules per unique face:
[in] | F1 | #F1 by 3 array of input faces. |
[out] | F2 | #F2 by 3 array of output faces without duplicated faces. |
[out] | J | #F2 list of indices into F1. |
void igl::rgb_to_hsv | ( | const R * | rgb, |
H * | hsv | ||
) |
Convert RGB to HSV.
[in] | rgb | rgb triplet in (0,1)³ |
[out] | hsv | hsv triplet in (0,360),(0,1),(0,1) |
void igl::rgb_to_hsv | ( | const Eigen::PlainObjectBase< DerivedR > & | R, |
Eigen::PlainObjectBase< DerivedH > & | H | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | R | #R by 3 list of rgb triplets in (0,1)ⁿˣ³ |
[out] | H | #R by 3 list of hsv triplets in [(0,360),(0,1),(0,1)]ⁿ |
void igl::rigid_alignment | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedP > & | P, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< Derivedt > & | t | ||
) |
Find the rigid transformation that best aligns the 3D points X to their corresponding points P with associated normals N.
min ‖(X*R+t-P)'N‖² R∈SO(3) t∈R³
[in] | X | #X by 3 list of query points |
[in] | P | #X by 3 list of corresponding (e.g., closest) points |
[in] | N | #X by 3 list of unit normals for each row in P |
[out] | R | 3 by 3 rotation matrix |
[out] | t | 1 by 3 translation vector |
void igl::rotate_by_quat | ( | const Q_type * | v, |
const Q_type * | q, | ||
Q_type * | out | ||
) |
Compute rotation of a given vector/point by a quaternion A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w), such that q = x*i + y*j + z*k + w.
[in] | v | input 3d point/vector |
[in] | q | input quaternion |
[out] | out | result of rotation, allowed to be same as v |
Eigen::MatrixXd igl::rotate_vectors | ( | const Eigen::MatrixXd & | V, |
const Eigen::VectorXd & | A, | ||
const Eigen::MatrixXd & | B1, | ||
const Eigen::MatrixXd & | B2 | ||
) |
Rotate the vectors V by A radians on the tangent plane spanned by B1 and B2.
[in] | V | #V by 3 eigen Matrix of vectors |
[in] | A | #V eigen vector of rotation angles or a single angle to be applied to all vectors |
[in] | B1 | #V by 3 eigen Matrix of base vector 1 |
[in] | B2 | #V by 3 eigen Matrix of base vector 2 |
Eigen::Matrix< Scalar, 3, 3 > igl::rotation_matrix_from_directions | ( | const Eigen::Matrix< Scalar, 3, 1 > | v0, |
const Eigen::Matrix< Scalar, 3, 1 > | v1 | ||
) |
Given 2 vectors centered on origin calculate the rotation matrix from first to the second.
[in] | v0 | 3D column vector |
[in] | v1 | 3D column vector |
[out] | 3 | by 3 rotation matrix that takes v0 to v1 |
DerivedX igl::round | ( | const DerivedX | r | ) |
Round a scalar value.
[in] | x | number |
void igl::round | ( | const Eigen::PlainObjectBase< DerivedX > & | X, |
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
Round a given matrix to nearest integers.
[in] | X | m by n matrix of scalars |
[out] | Y | m by n matrix of rounded integers |
bool igl::rows_to_matrix | ( | const std::vector< Row > & | V, |
Mat & | M | ||
) |
Convert a list (std::vector) of row vectors of the same length to a matrix.
Row | row vector type, must implement: .size() |
Mat | Matrix type, must implement: .resize(m,n) .row(i) = Row |
[in] | V | a m-long list of vectors of size n |
[out] | M | an m by n matrix |
void igl::sample_edges | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | E, | ||
const int | k, | ||
Eigen::MatrixXd & | S | ||
) |
Compute k extra points along each edge in E defined over vertices of V.
[in] | V | vertices over which edges are defined, # vertices by dim |
[in] | E | edge list, # edges by 2 |
[in] | k | number of extra samples to be computed along edge not including start and end points |
[out] | S | sampled vertices, size less than # edges * (2+k) by dim always begins with V so that E is also defined over S |
void igl::scalar_to_cr_vector_gradient | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarG > & | G | ||
) |
Computes the gradient matrix with hat functions on the right, and vector CR functions on the left.
See Oded Stein, Max Wardetzky, Alec Jacobson, Eitan Grinspun, 2020. "A Simple Discretization of the Vector Dirichlet Energy"
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3/4 list of triangle/tetrahedron indices |
[in] | E | #F by 3 a mapping from each halfedge to each edge |
[in] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge |
[out] | G | 2*|HE| by #V gradient matrix |
void igl::scalar_to_cr_vector_gradient | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarG > & | G | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | E | #F by 3 a mapping from each halfedge to each edge |
[out] | oE | #F by 3 the orientation (e.g., -1 or 1) of each halfedge |
void igl::scalar_to_cr_vector_gradient_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< DeriveddA > & | dA, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarG > & | G | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
intrinsic version.
[in] | l_sq | #F by 3 list of squared edge lengths of each halfedge |
[in] | dA | #F list of double areas |
void igl::scalar_to_cr_vector_gradient_intrinsic | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const Eigen::MatrixBase< DerivedL_sq > & | l_sq, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedOE > & | oE, | ||
Eigen::SparseMatrix< ScalarG > & | G | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. include/igl/scalar_to_cr_vector_gradient.h.
void igl::screen_space_selection | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const igl::AABB< DerivedV, 3 > & | tree, | ||
const Eigen::MatrixBase< DerivedM > & | model, | ||
const Eigen::MatrixBase< DerivedN > & | proj, | ||
const Eigen::MatrixBase< DerivedO > & | viewport, | ||
const std::vector< Eigen::Matrix< Ltype, 1, 2 > > & | L, | ||
Eigen::PlainObjectBase< DerivedW > & | W, | ||
Eigen::PlainObjectBase< Deriveda > & | and_visible | ||
) |
Given a mesh, a camera determine which points are inside of a given 2D screen space polygon culling points based on self-occlusion.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh triangle indices into rows of V |
[in] | tree | precomputed bounding volume heirarchy |
[in] | model | 4 by 4 camera model-view matrix |
[in] | proj | 4 by 4 camera projection matrix (perspective or orthoraphic) |
[in] | viewport | 4-vector containing camera viewport |
[in] | L | #L by 2 list of 2D polygon vertices (in order) |
[out] | W | #V by 1 list of winding numbers (|W|>0.5 indicates inside) |
[out] | and_visible | #V by 1 list of visibility values (only correct for vertices with |W|>0.5) |
void igl::screen_space_selection | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedM > & | model, | ||
const Eigen::MatrixBase< DerivedN > & | proj, | ||
const Eigen::MatrixBase< DerivedO > & | viewport, | ||
const std::vector< Eigen::Matrix< Ltype, 1, 2 > > & | L, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Given a mesh, a camera determine which points are inside of a given 2D screen space polygon.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | model | 4 by 4 camera model-view matrix |
[in] | proj | 4 by 4 camera projection matrix (perspective or orthoraphic) |
[in] | viewport | 4-vector containing camera viewport |
[in] | L | #L by 2 list of 2D polygon vertices (in order) |
[out] | W | #V by 1 list of winding numbers (|W|>0.5 indicates inside) |
void igl::screen_space_selection | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedM > & | model, | ||
const Eigen::MatrixBase< DerivedN > & | proj, | ||
const Eigen::MatrixBase< DerivedO > & | viewport, | ||
const Eigen::MatrixBase< DerivedP > & | P, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Given a mesh, a camera determine which points are inside of a given 2D screen space polygon.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | model | 4 by 4 camera model-view matrix |
[in] | proj | 4 by 4 camera projection matrix (perspective or orthoraphic) |
[in] | viewport | 4-vector containing camera viewport |
[in] | P | #P by 2 list of screen space polygon vertices |
[in] | E | #E by 2 list of screen space edges as indices into rows of P |
[out] | W | #V by 1 list of winding numbers (|W|>0.5 indicates inside) |
void igl::seam_edges | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedTC > & | TC, | ||
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedFTC > & | FTC, | ||
Eigen::PlainObjectBase< Derivedseams > & | seams, | ||
Eigen::PlainObjectBase< Derivedboundaries > & | boundaries, | ||
Eigen::PlainObjectBase< Derivedfoldovers > & | foldovers | ||
) |
Finds all UV-space boundaries of a mesh.
[in] | V | #V by dim list of positions of the input mesh. |
[in] | TC | #TC by 2 list of 2D texture coordinates of the input mesh |
[in] | F | #F by 3 list of triange indices into V representing a manifold-with-boundary triangle mesh |
[in] | FTC | #F by 3 list of indices into TC for each corner |
[out] | seams | Edges where the forwards and backwards directions have different texture coordinates, as a #seams-by-4 matrix of indices. Each row is organized as [ forward_face_index, forward_face_vertex_index, backwards_face_index, backwards_face_vertex_index ] such that one side of the seam is the edge: F[ seams( i, 0 ), seams( i, 1 ) ], F[ seams( i, 0 ), (seams( i, 1 ) + 1) % 3 ] and the other side is the edge: F[ seams( i, 2 ), seams( i, 3 ) ], F[ seams( i, 2 ), (seams( i, 3 ) + 1) % 3 ] |
[out] | boundaries | Edges with only one incident triangle, as a #boundaries-by-2 matrix of indices. Each row is organized as [ face_index, face_vertex_index ] such that the edge is: F[ boundaries( i, 0 ), boundaries( i, 1 ) ], F[ boundaries( i, 0 ), (boundaries( i, 1 ) + 1) % 3 ] |
[out] | foldovers | Edges where the two incident triangles fold over each other in UV-space, as a #foldovers-by-4 matrix of indices. Each row is organized as [ forward_face_index, forward_face_vertex_index, backwards_face_index, backwards_face_vertex_index ] such that one side of the foldover is the edge: F[ foldovers( i, 0 ), foldovers( i, 1 ) ], F[ foldovers( i, 0 ), (foldovers( i, 1 ) + 1) % 3 ] and the other side is the edge: F[ foldovers( i, 2 ), foldovers( i, 3 ) ], F[ foldovers( i, 2 ), (foldovers( i, 3 ) + 1) % 3 ] |
bool igl::segment_segment_intersect | ( | const Eigen::MatrixBase< DerivedSource > & | p, |
const Eigen::MatrixBase< DerivedDir > & | r, | ||
const Eigen::MatrixBase< DerivedSource > & | q, | ||
const Eigen::MatrixBase< DerivedDir > & | s, | ||
double & | t, | ||
double & | u, | ||
double | eps = 1e-6 |
||
) |
Determine whether two line segments A,B intersect.
A: p + t*r : t \in [0,1] B: q + u*s : u \in [0,1]
[in] | p | 3-vector origin of segment A |
[in] | r | 3-vector direction of segment A |
[in] | q | 3-vector origin of segment B |
[in] | s | 3-vector direction of segment B |
[out] | t | scalar point of intersection along segment A, t \in [0,1] |
[out] | u | scalar point of intersection along segment B, u \in [0,1] |
[in] | eps | precision |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void igl::setdiff | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedIA > & | IA | ||
) |
Set difference of elements of matrices.
[in] | A | m-long vector of indices |
[in] | B | n-long vector of indices |
[out] | C | (k<=m)-long vector of unique elements appearing in A but not in B |
[out] | IA | (k<=m)-long list of indices into A so that C = A(IA) |
void igl::setunion | ( | const Eigen::DenseBase< DerivedA > & | A, |
const Eigen::DenseBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedIA > & | IA, | ||
Eigen::PlainObjectBase< DerivedIB > & | IB | ||
) |
Union of elements of matrices (like matlab's union
)
[in] | A | m-long vector of indices |
[in] | B | n-long vector of indices |
[out] | C | (k>=m)-long vector of unique elements appearing in A and/or B |
[out] | IA | (<k>=m)-long list of indices into A so that C = sort([A(IA);B(IB)]) |
[out] | IB | (<k>=m)-long list of indices into B so that C = sort([A(IA);B(IB)]) |
void igl::setxor | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedIA > & | IA, | ||
Eigen::PlainObjectBase< DerivedIB > & | IB | ||
) |
Set xor of elements of matrices.
[in] | A | m-long vector of indices |
[in] | B | n-long vector of indices |
[out] | C | (k<=m)-long vector of unique elements appearing in A but not in B or B but not in A |
[out] | IA | (<k<=m)-long list of indices into A so that C = sort([A(IA);B(IB)]) |
[out] | IB | (<k<=m)-long list of indices into B so that C = sort([A(IA);B(IB)]) |
void igl::shape_diameter_function | ( | const std::function< double(const Eigen::Vector3f &, const Eigen::Vector3f &) > & | shoot_ray, |
const Eigen::MatrixBase< DerivedP > & | P, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const int | num_samples, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
Compute shape diamater function per given point.
In the parlence of the paper "Consistent Mesh Partitioning and Skeletonisation using the Shape Diameter Function" [Shapiro et al. 2008], this implementation uses a 180° cone and a uniform average (not a average weighted by inverse angles).
[in] | shoot_ray | function handle that outputs hits of a given ray against a mesh (embedded in function handles as captured variable/data) |
[in] | P | #P by 3 list of origin points |
[in] | N | #P by 3 list of origin normals |
[out] | S | #P list of shape diamater function values between bounding box |
[out] | diagonal | (perfect sphere) and 0 (perfect needle hook) |
void igl::shape_diameter_function | ( | const igl::AABB< DerivedV, DIM > & | aabb, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedP > & | P, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const int | num_samples, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | AABB | axis-aligned bounding box hierarchy around (V,F) |
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh face indices into V |
void igl::shape_diameter_function | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedP > & | P, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const int | num_samples, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::shape_diameter_function | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const bool | per_face, | ||
const int | num_samples, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
[in] | per_face | whether to compute per face (S is #F by 1) or per vertex (S is #V by 1) |
bool igl::shapeup_identity_projection | ( | const Eigen::PlainObjectBase< Eigen::MatrixXd > & | P, |
const Eigen::PlainObjectBase< Eigen::VectorXi > & | SC, | ||
const Eigen::PlainObjectBase< Eigen::MatrixXi > & | S, | ||
Eigen::PlainObjectBase< Eigen::MatrixXd > & | projP | ||
) |
This projection does nothing but render points into projP.
Mostly used for "echoing" the global step
[in] | P | #P by 3 set of points, either the initial solution, or from previous iteration. |
[in] | SC | #Set by 1 cardinalities of sets in S |
[in] | S | #Sets by max(SC) independent sets where the local projection applies. Values beyond column SC(i)-1 in row S(i,:) are "don't care" |
[out] | projP | #S by 3*max(SC) in format xyzxyzxyz, where the projected points correspond to each set in S in the same order. |
bool igl::shapeup_regular_face_projection | ( | const Eigen::PlainObjectBase< Eigen::MatrixXd > & | P, |
const Eigen::PlainObjectBase< Eigen::VectorXi > & | SC, | ||
const Eigen::PlainObjectBase< Eigen::MatrixXi > & | S, | ||
Eigen::PlainObjectBase< Eigen::MatrixXd > & | projP | ||
) |
the projection assumes that the sets are vertices of polygons in cyclic order
[in] | P | #P by 3 set of points, either the initial solution, or from previous iteration. |
[in] | SC | #Set by 1 cardinalities of sets in S |
[in] | S | #Sets by max(SC) independent sets where the local projection applies. Values beyond column SC(i)-1 in row S(i,:) are "don't care" |
[out] | projP | #S by 3*max(SC) in format xyzxyzxyz, where the projected points correspond to each set in S in the same order. |
bool igl::shapeup_precomputation | ( | const Eigen::PlainObjectBase< DerivedP > & | P, |
const Eigen::PlainObjectBase< DerivedSC > & | SC, | ||
const Eigen::PlainObjectBase< DerivedS > & | S, | ||
const Eigen::PlainObjectBase< DerivedS > & | E, | ||
const Eigen::PlainObjectBase< DerivedSC > & | b, | ||
const Eigen::PlainObjectBase< Derivedw > & | wShape, | ||
const Eigen::PlainObjectBase< Derivedw > & | wSmooth, | ||
ShapeupData & | sudata | ||
) |
This function precomputation the necessary matrices for the ShapeUp process, and prefactorizes them.
[in] | P | #P by 3 point positions |
[in] | SC | #Set by 1 cardinalities of sets in S |
[in] | S | #Sets by max(SC) independent sets where the local projection applies. Values beyond column SC(i)-1 in row S(i,:) are "don't care" |
[in] | E | #E by 2 the "edges" of the set P; used for the smoothness energy. |
[in] | b | #b by 1 boundary (fixed) vertices from P. |
[in] | wShape | #Set by 1 |
[in] | wSmooth | #b by 1 weights for constraints from S and positional constraints (used in the global step) |
[out] | sudata | struct ShapeupData the data necessary to solve the system in shapeup_solve |
bool igl::shapeup_solve | ( | const Eigen::PlainObjectBase< DerivedP > & | bc, |
const std::function< bool(const Eigen::PlainObjectBase< DerivedP > &, const Eigen::PlainObjectBase< DerivedSC > &, const Eigen::PlainObjectBase< DerivedS > &, Eigen::PlainObjectBase< DerivedP > &)> & | local_projection, | ||
const Eigen::PlainObjectBase< DerivedP > & | P0, | ||
const ShapeupData & | sudata, | ||
const bool | quietIterations, | ||
Eigen::PlainObjectBase< DerivedP > & | P | ||
) |
This function solve the shapeup project optimization.
shapeup_precompute must be called before with the same sudata, or results are unpredictable
[in] | bc | #b by 3 fixed point values corresonding to "b" in sudata |
[in] | local_projection | function pointer taking (P,SC,S,projP), where the first three parameters are as defined, and "projP" is the output, as a #S by 3*max(SC) function in format xyzxyzxyz, and where it returns the projected points corresponding to each set in S in the same order. NOTE: the input values in P0 don't need to correspond to prescribed values in bc; the iterations will project them automatically (by design). |
[in] | P0 | #P by 3 initial solution (point positions) |
[in] | sudata | the ShapeUpData structure computed in shapeup_precomputation() |
[in] | quietIterations | flagging if to output iteration information. |
[out] | P | the solution to the problem, indices corresponding to P0. |
void igl::sharp_edges | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const typename DerivedV::Scalar | angle, | ||
Eigen::PlainObjectBase< DerivedSE > & | SE, | ||
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
std::vector< std::vector< uE2Etype > > & | uE2E, | ||
std::vector< sharptype > & | sharp | ||
) |
Given a mesh, compute sharp edges.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle mesh indices into V |
[in] | angle | dihedral angle considered to sharp (e.g., igl::PI * 0.11) |
[out] | SE | #SE by 2 list of edge indices into V |
[out] | uE | #uE by 2 list of unique undirected edges |
[out] | EMAP | #F*3 list of indices into uE, mapping each directed edge to unique undirected edge so that uE(EMAP(f+#F*c)) is the unique edge corresponding to E.row(f+#F*c) |
[out] | uE2E | #uE list of lists of indices into E of coexisting edges, so that E.row(uE2E[i][j]) corresponds to uE.row(i) for all j in 0..uE2E[i].size()-1. |
[out] | sharp | #SE list of indices into uE revealing sharp undirected edges |
void igl::sharp_edges | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const typename DerivedV::Scalar | angle, | ||
Eigen::PlainObjectBase< DerivedSE > & | SE | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::shortest_edge_and_midpoint | ( | const int | e, |
const Eigen::MatrixXd & | V, | ||
const Eigen::MatrixXi & | , | ||
const Eigen::MatrixXi & | E, | ||
const Eigen::VectorXi & | , | ||
const Eigen::MatrixXi & | , | ||
const Eigen::MatrixXi & | , | ||
double & | cost, | ||
Eigen::RowVectorXd & | p | ||
) |
Cost and placement function compatible with igl::decimate.
The cost of collapsing an edge is its length (prefer to collapse short edges) and the placement strategy for the new vertex is the midpoint of the collapsed edge.
[in] | e | index into E of edge to be considered for collapse |
[in] | V | #V by dim list of vertex positions |
[in] | F | #F by 3 list of faces (ignored) |
[in] | E | #E by 2 list of edge indices into V |
[in] | EMAP | #F*3 list of half-edges indices into E (ignored) |
[in] | EF | #E by 2 list of edge-face flaps into F (ignored) |
[in] | EI | #E by 2 list of edge-face opposite corners (ignored) |
[out] | cost | set to edge length |
[out] | p | placed point set to edge midpoint |
DerivedA::Scalar igl::signed_angle | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedP > & | P | ||
) |
Compute the signed angle subtended by the oriented 3d triangle (A,B,C) at some point P.
[in] | A | 2D position of corner |
[in] | B | 2D position of corner |
[in] | P | 2D position of query point |
void igl::signed_distance | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const SignedDistanceType | sign_type, | ||
const typename DerivedV::Scalar | lower_bound, | ||
const typename DerivedV::Scalar | upper_bound, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
Computes signed distance to a mesh.
[in] | P | #P by (2|3) list of query point positions |
[in] | V | #V by (2|3) list of vertex positions |
[in] | F | #F by ss list of triangle indices, ss should be 3 unless sign_type == SIGNED_DISTANCE_TYPE_UNSIGNED | SIGNED_DISTANCE_TYPE_WINDING_NUMBER |
[in] | sign_type | method for computing distance sign S |
[in] | lower_bound | lower bound of distances needed {std::numeric_limits::min} |
[in] | upper_bound | lower bound of distances needed {std::numeric_limits::max} |
[out] | S | #P list of smallest signed distances |
[out] | I | #P list of facet indices corresponding to smallest distances |
[out] | C | #P by (2|3) list of closest points |
[out] | N | #P by (2|3) list of closest normals (only set if sign_type=SIGNED_DISTANCE_TYPE_PSEUDONORMAL) |
void igl::signed_distance | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const SignedDistanceType | sign_type, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
DerivedV::Scalar igl::signed_distance_pseudonormal | ( | const AABB< DerivedV, 3 > & | tree, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedFN > & | FN, | ||
const Eigen::MatrixBase< DerivedVN > & | VN, | ||
const Eigen::MatrixBase< DerivedEN > & | EN, | ||
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const Eigen::MatrixBase< Derivedq > & | q | ||
) |
Computes signed distance to mesh using pseudonormal with precomputed AABB tree and edge/vertice normals.
[in] | tree | AABB acceleration tree (see AABB.h) |
[in] | F | #F by 3 list of triangle indices |
[in] | FN | #F by 3 list of triangle normals |
[in] | VN | #V by 3 list of vertex normals (ANGLE WEIGHTING) |
[in] | EN | #E by 3 list of edge normals (UNIFORM WEIGHTING) |
[in] | EMAP | #F*3 mapping edges in F to E |
[in] | q | Query point |
void igl::signed_distance_pseudonormal | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const AABB< DerivedV, 3 > & | tree, | ||
const Eigen::MatrixBase< DerivedFN > & | FN, | ||
const Eigen::MatrixBase< DerivedVN > & | VN, | ||
const Eigen::MatrixBase< DerivedEN > & | EN, | ||
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
Eigen::PlainObjectBase< DerivedS > & | S, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedN > & | N | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.include/igl/signed_distance.h.
void igl::signed_distance_pseudonormal | ( | const AABB< DerivedV, 3 > & | tree, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedFN > & | FN, | ||
const Eigen::MatrixBase< DerivedVN > & | VN, | ||
const Eigen::MatrixBase< DerivedEN > & | EN, | ||
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const Eigen::MatrixBase< Derivedq > & | q, | ||
Scalar & | s, | ||
Scalar & | sqrd, | ||
int & | i, | ||
Eigen::PlainObjectBase< Derivedc > & | c, | ||
Eigen::PlainObjectBase< Derivedn > & | n | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | s | sign |
[out] | sqrd | squared distance |
[out] | i | closest primitive |
[out] | c | closest point |
[out] | n | normal |
void igl::signed_distance_pseudonormal | ( | const AABB< DerivedV, 2 > & | tree, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedEN > & | EN, | ||
const Eigen::MatrixBase< DerivedVN > & | VN, | ||
const Eigen::MatrixBase< Derivedq > & | q, | ||
Scalar & | s, | ||
Scalar & | sqrd, | ||
int & | i, | ||
Eigen::PlainObjectBase< Derivedc > & | c, | ||
Eigen::PlainObjectBase< Derivedn > & | n | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
DerivedV::Scalar igl::signed_distance_winding_number | ( | const AABB< DerivedV, 3 > & | tree, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const igl::WindingNumberAABB< Derivedq, DerivedV, DerivedF > & | hier, | ||
const Eigen::MatrixBase< Derivedq > & | q | ||
) |
Computes signed distance to mesh using winding number with precomputed AABB.
[in] | tree | AABB acceleration tree (see cgal/point_mesh_squared_distance.h) |
[in] | hier | Winding number evaluation hierarchy |
[in] | q | Query point |
void igl::signed_distance_winding_number | ( | const AABB< DerivedV, 3 > & | tree, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const igl::WindingNumberAABB< Derivedq, DerivedV, DerivedF > & | hier, | ||
const Eigen::MatrixBase< Derivedq > & | q, | ||
Scalar & | s, | ||
Scalar & | sqrd, | ||
int & | i, | ||
Eigen::PlainObjectBase< Derivedc > & | c | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | s | sign |
[out] | sqrd | squared distance |
[out] | pp | closest point and primitve include/igl/signed_distance.h |
void igl::signed_distance_winding_number | ( | const AABB< DerivedV, 2 > & | tree, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedq > & | q, | ||
Scalar & | s, | ||
Scalar & | sqrd, | ||
int & | i, | ||
Eigen::PlainObjectBase< Derivedc > & | c | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::signed_distance_fast_winding_number | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const AABB< DerivedV, 3 > & | tree, | ||
const igl::FastWindingNumberBVH & | fwn_bvh, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
Calculates signed distance at query points P, using fast winding number for sign.
VectorXd S;
VectorXd V, P; //where V is mesh vertices, P are query points VectorXi F;
igl::FastWindingNumberBVH fwn_bvh; igl::fast_winding_number(V.cast<float>(), F, 2, fwn_bvh); igl::signed_distance_fast_winding_number(P,V,F,tree,fwn_bvh,S);
DerivedV::Scalar igl::signed_distance_fast_winding_number | ( | const Eigen::MatrixBase< Derivedq > & | q, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const AABB< DerivedV, 3 > & | tree, | ||
const igl::FastWindingNumberBVH & | fwn_bvh | ||
) |
Calculates signed distance at query point q, using fast winding number for sign.
void igl::simplify_polyhedron | ( | const Eigen::MatrixXd & | OV, |
const Eigen::MatrixXi & | OF, | ||
Eigen::MatrixXd & | V, | ||
Eigen::MatrixXi & | F, | ||
Eigen::VectorXi & | J | ||
) |
Simplify a polyhedron represented as a triangle mesh (OV,OF) by collapsing any edge that doesn't contribute to defining surface's pointset.
[in] | OV | #OV by 3 list of input mesh vertex positions |
[in] | OF | #OF by 3 list of input mesh triangle indices into OV |
[out] | V | #V by 3 list of output mesh vertex positions |
[out] | F | #F by 3 list of input mesh triangle indices into V |
[out] | J | #F list of indices into OF of birth parents |
void igl::slice | ( | const Eigen::SparseMatrix< TX > & | X, |
const Eigen::DenseBase< DerivedR > & | R, | ||
const Eigen::DenseBase< DerivedC > & | C, | ||
Eigen::SparseMatrix< TY > & | Y | ||
) |
Act like the matlab X(row_indices,col_indices) operator, where row_indices, col_indices are non-negative integer indices.
[in] | X | m by n matrix |
[in] | R | list of row indices |
[in] | C | list of column indices |
[out] | Y | #R by #C matrix |
void igl::slice | ( | const MatX & | X, |
const Eigen::DenseBase< DerivedR > & | R, | ||
const int | dim, | ||
MatY & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Wrapper to only slice in one direction
[in] | dim | dimension to slice in 1 or 2, dim=1 --> X(R,:), dim=2 --> X(:,R) |
void igl::slice | ( | const std::vector< T > & | X, |
std::vector< size_t > const & | R, | ||
std::vector< T > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::slice | ( | const Eigen::DenseBase< DerivedX > & | X, |
const Eigen::DenseBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Vector version
void igl::slice | ( | const Eigen::DenseBase< DerivedX > & | X, |
const Eigen::DenseBase< DerivedR > & | R, | ||
const Eigen::DenseBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
See slice.h for more details
DerivedX igl::slice | ( | const Eigen::DenseBase< DerivedX > & | X, |
const Eigen::DenseBase< DerivedR > & | R | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
VectorXi Y = slice(X,R); This templating is bad because the return type might not have the same size as DerivedX
. This will probably only work if DerivedX has Dynamic as it's non-trivial sizes or if the number of rows in R happens to equal the number of rows in DerivedX
.
DerivedX igl::slice | ( | const Eigen::DenseBase< DerivedX > & | X, |
const Eigen::DenseBase< DerivedR > & | R, | ||
const int | dim | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::slice_cached_precompute | ( | const Eigen::SparseMatrix< TX > & | X, |
const Eigen::Matrix< int, Eigen::Dynamic, 1 > & | R, | ||
const Eigen::Matrix< int, Eigen::Dynamic, 1 > & | C, | ||
Eigen::MatrixBase< DerivedI > & | data, | ||
Eigen::SparseMatrix< TY > & | Y | ||
) |
Act like the matlab X(row_indices,col_indices) operator, where row_indices, col_indices are non-negative integer indices.
This is a fast version of igl::slice that can analyze and store the sparsity structure. It is slower at the irst evaluation (slice_cached_precompute), but faster on the subsequent ones.
[in] | X | m by n matrix |
[in] | R | list of row indices |
[in] | C | list of column indices |
[out] | data | Temporary data used by slice_cached to repeat this operation |
[out] | Y | #R by #C matrix |
// Construct and slice up Laplacian SparseMatrix<double> L,L_sliced; igl::cotmatrix(V,F,L); // Normal igl::slice call igl::slice(L,in,in,L_in_in); … // Fast version static VectorXi data; // static or saved in a global state if (data.size() == 0) igl::slice_cached_precompute(L,in,in,data,L_sliced); else igl::slice_cached(L,data,L_sliced);
void igl::slice_cached | ( | const Eigen::SparseMatrix< TX > & | X, |
const Eigen::MatrixBase< DerivedI > & | data, | ||
Eigen::SparseMatrix< TY > & | Y | ||
) |
Slice X by cached C,R indices into Y.
[in] | X | m by n matrix |
[in] | data | Temporary data used by slice_cached to repeat this operation |
[out] | Y | #R by #C matrix |
void igl::slice_into | ( | const Eigen::SparseMatrix< T > & | X, |
const Eigen::MatrixBase< DerivedR > & | R, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::SparseMatrix< T > & | Y | ||
) |
Act like the matlab Y(row_indices,col_indices) = X.
[in] | X | xm by xn rhs matrix |
[in] | R | list of row indices |
[in] | C | list of column indices |
[in] | Y | ym by yn lhs matrix |
[out] | Y | ym by yn lhs matrix, same as input but Y(R,C) = X |
void igl::slice_into | ( | const MatX & | X, |
const Eigen::MatrixBase< DerivedR > & | R, | ||
const int | dim, | ||
MatY & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Wrapper to only slice in one direction
[int] | dim dimension to slice in 1 or 2, dim=1 --> X(R,:), dim=2 --> X(:,R) |
void igl::slice_into | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedR > & | R, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
See slice.h for more details
void igl::slice_into | ( | const Eigen::MatrixBase< DerivedX > & | X, |
const Eigen::MatrixBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Vector version
void igl::slice_mask | ( | const Eigen::SparseMatrix< XType > & | X, |
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | R, | ||
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | C, | ||
Eigen::SparseMatrix< YType > & | Y | ||
) |
Act like the matlab X(row_mask,col_mask) operator, where row_mask, col_mask are non-negative integer indices.
[in] | X | m by n matrix |
[in] | R | m list of row bools |
[in] | C | n list of column bools |
[out] | Y | #trues-in-R by #trues-in-C matrix |
void igl::slice_mask | ( | const Eigen::SparseMatrix< XType > & | X, |
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | R, | ||
const int | dim, | ||
Eigen::SparseMatrix< YType > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Wrapper to only slice in one direction
[int] | dim dimension to slice in 1 or 2, dim=1 --> X(R,:), dim=2 --> X(:,R) |
void igl::slice_mask | ( | const Eigen::DenseBase< DerivedX > & | X, |
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | R, | ||
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | C, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
See slice.h for more details
void igl::slice_mask | ( | const Eigen::DenseBase< DerivedX > & | X, |
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | R, | ||
const int | dim, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
DerivedX igl::slice_mask | ( | const Eigen::DenseBase< DerivedX > & | X, |
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | R, | ||
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
DerivedX
. This will probably only work if DerivedX has Dynamic as it's non-trivial sizes or if the number of rows in R happens to equal the number of rows in DerivedX
. DerivedX igl::slice_mask | ( | const Eigen::DenseBase< DerivedX > & | X, |
const Eigen::Array< bool, Eigen::Dynamic, 1 > & | R, | ||
const int | dim | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::slice_sorted | ( | const Eigen::SparseMatrix< TX > & | X, |
const Eigen::DenseBase< DerivedR > & | R, | ||
const Eigen::DenseBase< DerivedC > & | C, | ||
Eigen::SparseMatrix< TY > & | Y | ||
) |
Act like the matlab X(row_indices,col_indices) operator, where row_indices, col_indices are non-negative integer indices.
This version is about 2x faster than igl::slice, but it assumes that the indices to slice with are already sorted.
[in] | X | m by n matrix |
[in] | R | list of row indices |
[in] | C | list of column indices |
[out] | Y | #R by #C matrix |
void igl::slim_precompute | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const Eigen::MatrixXd & | V_init, | ||
SLIMData & | data, | ||
MappingEnergyType | slim_energy, | ||
const Eigen::VectorXi & | b, | ||
const Eigen::MatrixXd & | bc, | ||
double | soft_p | ||
) |
Compute necessary information to start using SLIM.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3/3 list of mesh faces (triangles/tets) |
[in] | V_init | #V by 3 list of initial mesh vertex positions |
[in,out] | data | Precomputation data structure |
[in] | slim_energy | Energy to minimize |
[in] | b | list of boundary indices into V |
[in] | bc | #b by dim list of boundary conditions |
[in] | soft_p | Soft penalty factor (can be zero) |
Eigen::MatrixXd igl::slim_solve | ( | SLIMData & | data, |
int | iter_num | ||
) |
Run iter_num iterations of SLIM.
[in,out] | data | Precomputation data structure |
[in] | iter_num | Number of iterations to run |
void igl::slim_update_weights_and_closest_rotations_with_jacobians | ( | const Eigen::MatrixXd & | Ji, |
igl::MappingEnergyType | slim_energy, | ||
double | exp_factor, | ||
Eigen::MatrixXd & | W, | ||
Eigen::MatrixXd & | Ri | ||
) |
Internal Routine.
Exposed for Integration with SCAF
[in] | Ji | ?? by ?? list of Jacobians?? |
[in] | slim_energy | Energy to minimize |
[in] | exp_factor | ??? used for exponential energies, ignored otherwise |
[out] | W | ?? by ?? list of weights?? |
[out] | Ri | ?? by ?? list of rotations?? |
void igl::slim_buildA | ( | const Eigen::SparseMatrix< double > & | Dx, |
const Eigen::SparseMatrix< double > & | Dy, | ||
const Eigen::SparseMatrix< double > & | Dz, | ||
const Eigen::MatrixXd & | W, | ||
std::vector< Eigen::Triplet< double > > & | IJV | ||
) |
Undocumented function related to SLIM optimization.
[in] | Dx | ?? by ?? matrix to compute of x derivatives? |
[in] | Dy | ?? by ?? matrix to compute of y derivatives? |
[in] | Dz | ?? bz ?? matrix to compute of z derivatives? |
[in] | W | ?? by ?? list of weights?? |
[out] | IJV | ?? by ?? list of triplets to some A matrix?? |
void igl::smooth_corner_adjacency | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const double | corner_threshold_radians, | ||
Eigen::VectorXi & | CI, | ||
Eigen::VectorXi & | CC | ||
) |
Determine the corner-to-face adjacency relationship that can be used for computing crease-aware per-corner normals.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of triangle mesh indices into rows of V |
[in] | corner_threshold_radians | dihedral angle considered non-smooth (in radians) |
[out] | CI | #CI list of face neighbors as indices into rows of F |
[out] | CC | 3*#F+1 list of cumulative sizes so that CC(i*3+j+1) - CC(i*3+j) is the number of faces considered smoothly incident on corner at F(i,j) |
void igl::smooth_corner_adjacency | ( | const Eigen::MatrixXi & | FV, |
const Eigen::MatrixXi & | FN, | ||
Eigen::VectorXi & | CI, | ||
Eigen::VectorXi & | CC | ||
) |
Determine the effective corner-to-face adjacency relationship implied by a set of indexed vertex positions (FV) and normals (FV) (e.g., those read in from a .obj file).
[in] | FV | #F by 3 list of triangle mesh indices into rows of some V |
[in] | FN | #F by 3 list of triangle mesh indices into rows of some N |
[out] | CI | #CI list of face neighbors as indices into rows of F |
[out] | CC | 3*#F+1 list of cumulative sizes so that CC(i*3+j+1) - CC(i*3+j) is the number of faces considered smoothly incident on corner at F(i,j) |
void igl::snap_points | ( | const Eigen::MatrixBase< DerivedC > & | C, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedminD > & | minD, | ||
Eigen::PlainObjectBase< DerivedVI > & | VI | ||
) |
Snap list of points C to closest of another list of points V.
[in] | C | #C by dim list of query point positions |
[in] | V | #V by dim list of data point positions |
[out] | I | #C list of indices into V of closest points to C |
[out] | minD | #C list of squared (^p) distances to closest points |
[out] | VI | #C by dim list of new point positions, VI = V(I,:) |
void igl::snap_points | ( | const Eigen::MatrixBase< DerivedC > & | C, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedminD > & | minD | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::snap_points | ( | const Eigen::MatrixBase< DerivedC > & | C, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::snap_to_canonical_view_quat | ( | const Eigen::Quaternion< Scalarq > & | q, |
const double | threshold, | ||
Eigen::Quaternion< Scalars > & | s | ||
) |
Snap the quaternion q to the nearest canonical view quaternion.
[in] | q | quaternion to be snapped (also see Outputs) |
[in] | threshold | (optional) threshold: 1.0 --> snap any input 0.5 --> snap inputs somewhat close to canonical views 0.0 --> snap no input |
[out] | q | quaternion possibly set to nearest canonical view |
bool igl::snap_to_canonical_view_quat | ( | const Q_type * | q, |
const Q_type | threshold, | ||
Q_type * | s | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::snap_to_fixed_up | ( | const Eigen::Quaternion< Qtype > & | q, |
Eigen::Quaternion< Qtype > & | s | ||
) |
Snap an arbitrary rotation to a rotation resulting from a rotation about the y-axis then the x-axis (maintaining fixed up like two_axis_valuator_fixed_up.)
[in] | q | General rotation as quaternion |
[out] | s | the resulting rotation (as quaternion) |
DerivedA::Scalar igl::solid_angle | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
const Eigen::MatrixBase< DerivedP > & | P | ||
) |
Compute the signed solid angle subtended by the oriented 3d triangle (A,B,C) at some point P.
[in] | A | 3D position of corner |
[in] | B | 3D position of corner |
[in] | C | 3D position of corner |
[in] | P | 3D position of query point |
void igl::sort | ( | const Eigen::DenseBase< DerivedX > & | X, |
const int | dim, | ||
const bool | ascending, | ||
Eigen::PlainObjectBase< DerivedY > & | Y, | ||
Eigen::PlainObjectBase< DerivedIX > & | IX | ||
) |
Sort the elements of a matrix X along a given dimension like matlabs sort function.
DerivedX | derived scalar type, e.g. MatrixXi or MatrixXd |
DerivedIX | derived integer type, e.g. MatrixXi |
[in] | X | m by n matrix whose entries are to be sorted |
[in] | dim | dimensional along which to sort: 1 sort each column (matlab default) 2 sort each row |
[in] | ascending | sort ascending (true, matlab default) or descending (false) |
[out] | Y | m by n matrix whose entries are sorted |
[out] | IX | m by n matrix of indices so that if dim = 1, then in matlab notation for j = 1:n, Y(:,j) = X(I(:,j),j); end |
void igl::sort | ( | const Eigen::DenseBase< DerivedX > & | X, |
const int | dim, | ||
const bool | ascending, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::sort_new | ( | const Eigen::DenseBase< DerivedX > & | X, |
const int | dim, | ||
const bool | ascending, | ||
Eigen::PlainObjectBase< DerivedY > & | Y, | ||
Eigen::PlainObjectBase< DerivedIX > & | IX | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::sort2 | ( | const Eigen::DenseBase< DerivedX > & | X, |
const int | dim, | ||
const bool | ascending, | ||
Eigen::PlainObjectBase< DerivedY > & | Y, | ||
Eigen::PlainObjectBase< DerivedIX > & | IX | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Special case if size(X,dim) == 2
void igl::sort3 | ( | const Eigen::DenseBase< DerivedX > & | X, |
const int | dim, | ||
const bool | ascending, | ||
Eigen::PlainObjectBase< DerivedY > & | Y, | ||
Eigen::PlainObjectBase< DerivedIX > & | IX | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Special case if size(X,dim) == 3
void igl::sort | ( | const std::vector< T > & | unsorted, |
const bool | ascending, | ||
std::vector< T > & | sorted, | ||
std::vector< size_t > & | index_map | ||
) |
Act like matlab's [Y,I] = SORT(X) for std library vectors.
T | should be a class that implements the '<' comparator operator |
[in] | unsorted | unsorted vector |
[in] | ascending | sort ascending (true, matlab default) or descending (false) |
[out] | sorted | sorted vector, allowed to be same as unsorted |
[out] | index_map | an index map such that sorted[i] = unsorted[index_map[i]] |
void igl::sort_angles | ( | const Eigen::MatrixBase< DerivedM > & | M, |
Eigen::PlainObjectBase< DerivedR > & | R | ||
) |
Sort angles in ascending order in a numerically robust way.
Instead of computing angles using atan2(y, x), sort directly on (y, x).
[in] | M | m by n matrix of scalars. (n >= 2). Assuming the first column of M contains values for y, and the second column is x. Using the rest of the columns as tie-breaker. |
[in] | R | an array of m indices. M.row(R[i]) contains the i-th smallest angle. |
void igl::sort_triangles | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedMV > & | MV, | ||
const Eigen::MatrixBase< DerivedP > & | P, | ||
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Sort triangles by depth (from back to front) using a painter's algorithm.
[in] | V | #V by 4 list of homogeneous vertex positions |
[in] | F | #F by 3 list of triangle indices |
[in] | MV | 4 by 4 model view matrix |
[in] | P | 4 by 4 projection matrix |
[out] | FF | #F by 3 list of sorted triangles indices |
[out] | I | #F list of sorted indices |
void igl::sort_vectors_ccw | ( | const Eigen::PlainObjectBase< DerivedS > & | P, |
const Eigen::PlainObjectBase< DerivedS > & | N, | ||
Eigen::PlainObjectBase< DerivedI > & | order, | ||
Eigen::PlainObjectBase< DerivedS > & | sorted, | ||
Eigen::PlainObjectBase< DerivedI > & | inv_order | ||
) |
Sorts a set of N coplanar vectors in a ccw order, and returns their order.
Optionally it also returns a copy of the ordered vector set, or the indices, in the original unordered set, of the vectors in the ordered set (called here the "inverse" set of indices).
[in] | P | 1 by 3N row vector of the vectors to be sorted, stacked horizontally |
[in] | N | #1 by 3 normal of the plane where the vectors lie |
[out] | order | N by 1 order of the vectors (indices of the unordered vectors into the ordered vector set) |
[out] | sorted | 1 by 3N row vector of the ordered vectors, stacked horizontally |
[out] | inv_order | N by 1 "inverse" order of the vectors (the indices of the ordered vectors into the unordered vector set) |
void igl::sort_vectors_ccw | ( | const Eigen::PlainObjectBase< DerivedS > & | P, |
const Eigen::PlainObjectBase< DerivedS > & | N, | ||
Eigen::PlainObjectBase< DerivedI > & | order, | ||
Eigen::PlainObjectBase< DerivedS > & | sorted | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::sort_vectors_ccw | ( | const Eigen::PlainObjectBase< DerivedS > & | P, |
const Eigen::PlainObjectBase< DerivedS > & | N, | ||
Eigen::PlainObjectBase< DerivedI > & | order, | ||
Eigen::PlainObjectBase< DerivedI > & | inv_order | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::sort_vectors_ccw | ( | const Eigen::PlainObjectBase< DerivedS > & | P, |
const Eigen::PlainObjectBase< DerivedS > & | N, | ||
Eigen::PlainObjectBase< DerivedI > & | order | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::sortrows | ( | const Eigen::DenseBase< DerivedX > & | X, |
const bool | ascending, | ||
Eigen::PlainObjectBase< DerivedY > & | Y, | ||
Eigen::PlainObjectBase< DerivedI > & | I | ||
) |
Act like matlab's [Y,I] = sortrows(X)
DerivedX | derived scalar type, e.g. MatrixXi or MatrixXd |
DerivedI | derived integer type, e.g. MatrixXi |
[in] | X | m by n matrix whose entries are to be sorted |
[in] | ascending | sort ascending (true, matlab default) or descending (false) |
[out] | Y | m by n matrix whose entries are sorted (should not be same reference as X) |
[out] | I | m list of indices so that Y = X(I,:); |
void igl::sortrows | ( | const Eigen::DenseBase< DerivedX > & | X, |
const bool | ascending, | ||
Eigen::PlainObjectBase< DerivedY > & | Y | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::sparse | ( | const IndexVectorI & | I, |
const IndexVectorJ & | J, | ||
const ValueVector & | V, | ||
const size_t | m, | ||
const size_t | n, | ||
Eigen::SparseMatrix< T > & | X | ||
) |
Build a sparse matrix from list of indices and values (I,J,V), functions like the sparse function in matlab.
IndexVector | list of indices, value should be non-negative and should expect to be cast to an index. Must implement operator(i) to retrieve ith element |
ValueVector | list of values, value should be expect to be cast to type T. Must implement operator(i) to retrieve ith element |
T | should be a eigen sparse matrix primitive type like int or double |
[in] | I | nnz vector of row indices of non zeros entries in X |
[in] | J | nnz vector of column indices of non zeros entries in X |
[in] | V | nnz vector of non-zeros entries in X |
[in] | m | number of rows |
[in] | n | number of cols |
[out] | X | m by n matrix of type T whose entries are to be found |
void igl::sparse | ( | const IndexVector & | I, |
const IndexVector & | J, | ||
const ValueVector & | V, | ||
Eigen::SparseMatrix< T > & | X | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::sparse | ( | const Eigen::PlainObjectBase< DerivedD > & | D, |
Eigen::SparseMatrix< T > & | X | ||
) |
Convert a full, dense matrix to a sparse one.
T | should be a eigen sparse matrix primitive type like int or double |
[in] | D | m by n full, dense matrix |
[out] | X | m by n sparse matrix |
Eigen::SparseMatrix< typename DerivedD::Scalar > igl::sparse | ( | const Eigen::PlainObjectBase< DerivedD > & | D | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::sparse_cached_precompute | ( | const Eigen::MatrixBase< DerivedI > & | I, |
const Eigen::MatrixBase< DerivedI > & | J, | ||
Eigen::VectorXi & | data, | ||
Eigen::SparseMatrix< Scalar > & | X | ||
) |
Build a sparse matrix from list of indices and values (I,J,V), similarly to the sparse function in matlab.
Divides the construction in two phases, one for fixing the sparsity pattern, and one to populate it with values. Compared to igl::sparse, this version is slower for the first time (since it requires a precomputation), but faster to the subsequent evaluations.
[in] | I | nnz vector of row indices of non zeros entries in X |
[in] | J | nnz vector of column indices of non zeros entries in X |
[out] | data | ?? vector of ?? |
[out] | X | m by n matrix of type T whose entries are to be found |
Eigen::SparseMatrix<double> A; std::vector<Eigen::Triplet<double> > IJV; slim_buildA(IJV); if (A.rows() == 0) { A = Eigen::SparseMatrix<double>(rows,cols); igl::sparse_cached_precompute(IJV,A_data,A); } else igl::sparse_cached(IJV,A_data,A);
void igl::sparse_cached_precompute | ( | const std::vector< Eigen::Triplet< Scalar > > & | triplets, |
Eigen::VectorXi & | data, | ||
Eigen::SparseMatrix< Scalar > & | X | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | triplets | nnz vector of triplets of non zeros entries in X |
void igl::sparse_cached | ( | const std::vector< Eigen::Triplet< Scalar > > & | triplets, |
const Eigen::VectorXi & | data, | ||
Eigen::SparseMatrix< Scalar > & | X | ||
) |
Build a sparse matrix from cached list of data and values.
[in] | triplets | nnz vector of triplets of non zeros entries in X |
[in] | data | ?? vector of ?? |
[in,out] | X | m by n matrix of type T whose entries are to be found |
void igl::sparse_cached | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::VectorXi & | data, | ||
Eigen::SparseMatrix< Scalar > & | X | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | V | #V list of values |
void igl::sparse_voxel_grid | ( | const Eigen::MatrixBase< DerivedP0 > & | p0, |
const Func & | scalarFunc, | ||
const double | eps, | ||
const int | expected_number_of_cubes, | ||
Eigen::PlainObjectBase< DerivedS > & | CS, | ||
Eigen::PlainObjectBase< DerivedV > & | CV, | ||
Eigen::PlainObjectBase< DerivedI > & | CI | ||
) |
Given a point, p0, on an isosurface, construct a shell of epsilon sized cubes surrounding the surface.
These cubes can be used as the input to marching cubes.
[in] | p0 | A 3D point on the isosurface surface defined by scalarFunc(x) = 0 |
[in] | scalarFunc | A scalar function from R^3 to R – points which map to 0 lie on the surface, points which are negative lie inside the surface, and points which are positive lie outside the surface |
[in] | eps | The edge length of the cubes surrounding the surface |
[in] | expected_number_of_cubes | This pre-allocates internal data structures to speed things up |
[out] | CS | #CV by 1 list of scalar values at the cube vertices |
[out] | CV | #CV by 3 list of cube vertex positions |
[out] | CI | #CI by 8 list of cube indices into rows of CS and CV. Each row represents 8 corners of cube in y-x-z binary counting order. |
void igl::speye | ( | const int | n, |
const int | m, | ||
Eigen::SparseMatrix< T > & | I | ||
) |
Builds an m by n sparse identity matrix like matlab's speye function.
T | should be a eigen sparse matrix primitive type like int or double |
[in] | m | number of rows |
[in] | n | number of cols |
[out] | I | m by n sparse matrix with 1's on the main diagonal |
void igl::speye | ( | const int | n, |
Eigen::SparseMatrix< T > & | I | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
m = n
void igl::split_nonmanifold | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedSF > & | SF, | ||
Eigen::PlainObjectBase< DerivedSVI > & | SVI | ||
) |
Split a non-manifold (or non-orientable) mesh into a orientable manifold mesh possibly with more connected components and geometrically duplicate vertices.
[in] | F | #F by 3 list of mesh triangle indices into rows of some V |
[out] | SF | #F by 3 list of mesh triangle indices into rows of a new vertex list SV = V(SVI,:) |
[out] | SVI | #SV list of indices into V identifying vertex positions |
void igl::split_nonmanifold | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedSV > & | SV, | ||
Eigen::PlainObjectBase< DerivedSF > & | SF, | ||
Eigen::PlainObjectBase< DerivedSVI > & | SVI | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | V | #V by dim explicit list of vertex positions |
[out] | SV | #SV by dim explicit list of vertex positions |
void igl::squared_edge_lengths | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedL > & | L | ||
) |
Constructs a list of squared lengths of edges opposite each index in a face (triangle/tet) list.
DerivedV | derived from vertex positions matrix type: i.e. MatrixXd |
DerivedF | derived from face indices matrix type: i.e. MatrixXi |
DerivedL | derived from edge lengths matrix type: i.e. MatrixXd |
[in] | V | eigen matrix #V by 3 |
[in] | F | #F by (2|3|4) list of mesh edges, triangles or tets |
[out] | L | #F by {1|3|6} list of edge lengths squared for edges, column of lengths for triangles, columns correspond to edges [1,2],[2,0],[0,1] for tets, columns correspond to edges [3 0],[3 1],[3 2],[1 2],[2 0],[0 1] |
bool igl::stdin_to_temp | ( | FILE ** | temp_file | ) |
Write stdin/piped input to a temporary file which can than be preprocessed as it is (a normal file).
This is often useful if you want to process stdin/piped with library functions that expect to be able to fseek(), rewind() etc..
If your application is not using fseek(), rewind(), etc. but just reading from stdin then this will likely cause a bottle neck as it defeats the whole purpose of piping.
[out] | temp_file | pointer to temp file pointer, rewound to beginning of file so its ready to be read |
void igl::straighten_seams | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedVT > & | VT, | ||
const Eigen::MatrixBase< DerivedFT > & | FT, | ||
const Scalar | tol, | ||
Eigen::PlainObjectBase< DerivedUE > & | UE, | ||
Eigen::PlainObjectBase< DerivedUT > & | UT, | ||
Eigen::PlainObjectBase< DerivedOT > & | OT | ||
) |
Given a obj-style mesh with (V,F) defining the geometric surface of the mesh and (VT,FT) defining the parameterization/texture-mapping of the mesh in the uv-domain, find all seams and boundaries in the texture-mapping and "straighten" them, remapping vertices along the boundary and in the interior.
This will be careful to consistently straighten multiple seams in the texture-mesh corresponding to the same edge chains in the surface-mesh.
[in] | V | #V by 3 list of vertices |
[in] | F | #F by 3 list of triangle indices |
[in] | VT | #VT by 2 list of texture coordinates |
[in] | FT | #F by 3 list of triangle texture coordinates |
[in] | tol | followed by Ramer-Douglas-Peucker tolerance as a fraction of the curves bounding box diagonal (see dpsimplify) |
[out] | UE | #UE by 2 list of indices into VT of coarse output polygon edges |
[out] | UT | #VT by 3 list of new texture coordinates |
[out] | OT | #OT by 2 list of indices into VT of boundary edges |
bool igl::starts_with | ( | const std::string & | str, |
const std::string & | prefix | ||
) |
Check if a string starts with a given prefix.
[in] | str | string to check |
[in] | prefix | prefix to check |
bool igl::starts_with | ( | const char * | str, |
const char * | prefix | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.include/igl/string_utils.h.
void igl::sum | ( | const Eigen::SparseMatrix< T > & | X, |
const int | dim, | ||
Eigen::SparseVector< T > & | S | ||
) |
Sum the columns or rows of a sparse matrix.
should | be a eigen sparse matrix primitive type like int or double |
[in] | X | m by n sparse matrix |
[in] | dim | dimension along which to sum (1 or 2) |
[out] | S | n-long sparse vector (if dim == 1) or m-long sparse vector (if dim == 2) |
M.colwise().sum() or M.rowwise().sum()
void igl::sum | ( | const Eigen::SparseMatrix< AType > & | A, |
const int | dim, | ||
Eigen::PlainObjectBase< DerivedB > & | B | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sum is "conducted" in the type of DerivedB::Scalar
AType | should be a eigen sparse matrix primitive type like int or double |
DerivedB | should be a eigen dense matrix primitive type like int or double |
void igl::svd3x3 | ( | const Eigen::Matrix< T, 3, 3 > & | A, |
Eigen::Matrix< T, 3, 3 > & | U, | ||
Eigen::Matrix< T, 3, 1 > & | S, | ||
Eigen::Matrix< T, 3, 3 > & | V | ||
) |
Super fast 3x3 SVD according to http://pages.cs.wisc.edu/~sifakis/project_pages/svd.html The resulting decomposition is A = U * diag(S[0], S[1], S[2]) * V'.
[in] | A | 3x3 matrix |
[out] | U | 3x3 left singular vectors |
[out] | S | 3x1 singular values |
[out] | V | 3x3 right singular vectors |
void igl::svd3x3_avx | ( | const Eigen::Matrix< T, 3 *8, 3 > & | A, |
Eigen::Matrix< T, 3 *8, 3 > & | U, | ||
Eigen::Matrix< T, 3 *8, 1 > & | S, | ||
Eigen::Matrix< T, 3 *8, 3 > & | V | ||
) |
Super fast 3x3 SVD according to http://pages.cs.wisc.edu/~sifakis/project_pages/svd.html This is AVX version of svd3x3 (see svd3x3.h) which works on 8 matrices at a time These eight matrices are simply stacked in columns, the rest is the same as for svd3x3.
[in] | A | 12 by 3 stack of 3x3 matrices |
[out] | U | 12x3 left singular vectors stacked |
[out] | S | 12x1 singular values stacked |
[out] | V | 12x3 right singular vectors stacked |
void igl::svd3x3_sse | ( | const Eigen::Matrix< T, 3 *4, 3 > & | A, |
Eigen::Matrix< T, 3 *4, 3 > & | U, | ||
Eigen::Matrix< T, 3 *4, 1 > & | S, | ||
Eigen::Matrix< T, 3 *4, 3 > & | V | ||
) |
[in] | A | 12 by 3 stack of 3x3 matrices |
[out] | U | 12x3 left singular vectors stacked |
[out] | S | 12x1 singular values stacked |
[out] | V | 12x3 right singular vectors stacked |
void igl::swept_volume | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const std::function< Eigen::Affine3d(const double t)> & | transform, | ||
const size_t | steps, | ||
const size_t | grid_res, | ||
const size_t | isolevel, | ||
Eigen::MatrixXd & | SV, | ||
Eigen::MatrixXi & | SF | ||
) |
Compute the surface of the swept volume of a solid object with surface (V,F) mesh under going rigid motion.
[in] | V | #V by 3 list of mesh positions in reference pose |
[in] | F | #F by 3 list of mesh indices into V |
[in] | transform | function handle so that transform(t) returns the rigid transformation at time t∈[0,1] |
[in] | steps | number of time steps: steps=3 --> t∈{0,0.5,1} |
[in] | grid_res | number of grid cells on the longest side containing the motion (isolevel+1 cells will also be added on each side as padding) |
[in] | isolevel | distance level to be contoured as swept volume |
[out] | SV | #SV by 3 list of mesh positions of the swept surface |
[out] | SF | #SF by 3 list of mesh faces into SV |
void igl::swept_volume_bounding_box | ( | const size_t & | n, |
const std::function< Eigen::RowVector3d(const size_t vi, const double t)> & | V, | ||
const size_t & | steps, | ||
Eigen::AlignedBox3d & | box | ||
) |
Construct an axis-aligned bounding box containing a shape undergoing a motion sampled at steps
discrete momements.
[in] | n | number of mesh vertices |
[in] | V | function handle so that V(i,t) returns the 3d position of vertex i at time t, for t∈[0,1] |
[in] | steps | number of time steps: steps=3 --> t∈{0,0.5,1} |
[out] | box | box containing mesh under motion |
void igl::swept_volume_signed_distance | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const std::function< Eigen::Affine3d(const double t)> & | transform, | ||
const size_t & | steps, | ||
const Eigen::MatrixXd & | GV, | ||
const Eigen::RowVector3i & | res, | ||
const double | h, | ||
const double | isolevel, | ||
const Eigen::VectorXd & | S0, | ||
Eigen::VectorXd & | S | ||
) |
Compute the signed distance to a sweep surface of a mesh under-going an arbitrary motion V(t) discretely sampled at steps
-many moments in time at a grid.
[in] | V | #V by 3 list of mesh positions in reference pose |
[in] | F | #F by 3 list of triangle indices [0,n) |
[in] | transform | function handle so that transform(t) returns the rigid transformation at time t∈[0,1] |
[in] | steps | number of time steps: steps=3 --> t∈{0,0.5,1} |
[in] | GV | #GV by 3 list of evaluation point grid positions |
[in] | res | 3-long resolution of GV grid |
[in] | h | edge-length of grid |
[in] | isolevel | isolevel to "focus" on; grid positions far enough away from isolevel (based on h) will get approximate values). Set isolevel=infinity to get good values everywhere (slow and unnecessary if just trying to extract isolevel-level set). |
[in] | S0 | #GV initial values (will take minimum with these), can be same as S) |
[out] | S | #GV list of signed distances |
void igl::swept_volume_signed_distance | ( | const Eigen::MatrixXd & | V, |
const Eigen::MatrixXi & | F, | ||
const std::function< Eigen::Affine3d(const double t)> & | transform, | ||
const size_t & | steps, | ||
const Eigen::MatrixXd & | GV, | ||
const Eigen::RowVector3i & | res, | ||
const double | h, | ||
const double | isolevel, | ||
Eigen::VectorXd & | S | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Scalar igl::tan_half_angle | ( | const Scalar & | a, |
const Scalar & | b, | ||
const Scalar & | c | ||
) |
Compute the tangent of half of the angle opposite the side with length a, in a triangle with side lengths (a,b,c).
[in] | a | scalar edge length of first side of triangle |
[in] | b | scalar edge length of second side of triangle |
[in] | c | scalar edge length of third side of triangle |
void igl::tet_tet_adjacency | ( | const Eigen::MatrixBase< DerivedT > & | T, |
Eigen::PlainObjectBase< DerivedTT > & | TT, | ||
Eigen::PlainObjectBase< DerivedTTi > & | TTi | ||
) |
Constructs the tet_tet adjacency matrix for a given tet mesh with tets T.
[in] | T | #T by 4 list of tets |
[out] | TT | #T by #4 adjacency matrix, the element i,j is the id of the tet adjacent to the j face of tet i |
[out] | TTi | #T by #4 adjacency matrix, the element i,j is the id of face of the tet TT(i,j) that is adjacent to tet i |
void igl::tet_tet_adjacency | ( | const Eigen::MatrixBase< DerivedT > & | T, |
Eigen::PlainObjectBase< DerivedTT > & | TT | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::tetrahedralized_grid | ( | const int | nx, |
const int | ny, | ||
const int | nz, | ||
const TetrahedralizedGripType | type, | ||
Eigen::PlainObjectBase< DerivedGV > & | GV, | ||
Eigen::PlainObjectBase< DerivedGT > & | GT | ||
) |
Construct vertices of a regular grid, suitable for input to igl::marching_tets
[in] | nx | number of grid vertices in x direction |
[in] | ny | number of grid vertices in y direction |
[in] | nz | number of grid vertices in z direction |
[in] | type | type of tetrahedralization of cube to use |
[out] | GV | nx*ny*nz by 3 list of grid vertex positions |
[out] | GT | (nx-1)*(ny-1)*(nz-1)*k by 4 list of tetrahedron indices into rows of V, where k is the number of tets per cube (dependent on type) |
void igl::tetrahedralized_grid | ( | const Eigen::MatrixBase< Derivedside > & | side, |
const TetrahedralizedGripType | type, | ||
Eigen::PlainObjectBase< DerivedGT > & | GT | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | side | 3-long list {nx,ny,nz} see above |
void igl::topological_hole_fill | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const std::vector< VectorIndex > & | holes, | ||
Eigen::PlainObjectBase< DerivedF_filled > & | F_filled | ||
) |
Topological fill hole on a mesh, with one additional vertex each hole Index of new abstract vertices will be F.maxCoeff() + (index of hole)
[in] | F | #F by simplex-size list of element indices |
[in] | holes | vector of hole loops to fill |
[out] | F_filled | input F stacked with filled triangles. |
void igl::trackball | ( | const double | w, |
const double | h, | ||
const Q_type | speed_factor, | ||
const double | down_mouse_x, | ||
const double | down_mouse_y, | ||
const double | mouse_x, | ||
const double | mouse_y, | ||
Q_type * | quat | ||
) |
Applies a trackball drag to identity.
[in] | w | width of the trackball context |
[in] | h | height of the trackball context |
[in] | speed_factor | controls how fast the trackball feels, 1 is normal |
[in] | down_mouse_x | x position of mouse down |
[in] | down_mouse_y | y position of mouse down |
[in] | mouse_x | current x position of mouse |
[in] | mouse_y | current y position of mouse |
[out] | quat | the resulting rotation (as quaternion) |
void igl::trackball | ( | const double | w, |
const double | h, | ||
const Q_type | speed_factor, | ||
const Q_type * | down_quat, | ||
const double | down_mouse_x, | ||
const double | down_mouse_y, | ||
const double | mouse_x, | ||
const double | mouse_y, | ||
Q_type * | quat | ||
) |
Applies a trackball drag to a given rotation.
[in] | w | width of the trackball context |
[in] | h | height of the trackball context |
[in] | speed_factor | controls how fast the trackball feels, 1 is normal |
[in] | down_quat | rotation at mouse down, i.e. the rotation we're applying the trackball motion to (as quaternion) |
[in] | down_mouse_x | x position of mouse down |
[in] | down_mouse_y | y position of mouse down |
[in] | mouse_x | current x position of mouse |
[in] | mouse_y | current y position of mouse |
[out] | quat | the resulting rotation (as quaternion) |
void igl::trackball | ( | const double | w, |
const double | h, | ||
const double | speed_factor, | ||
const Eigen::Quaternion< Scalardown_quat > & | down_quat, | ||
const double | down_mouse_x, | ||
const double | down_mouse_y, | ||
const double | mouse_x, | ||
const double | mouse_y, | ||
Eigen::Quaternion< Scalarquat > & | quat | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::transpose_blocks | ( | const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | A, |
const size_t | k, | ||
const size_t | dim, | ||
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & | B | ||
) |
Transpose blocks of a matrix.
T | should be a eigen matrix primitive type like int or double |
[in] | A | m*k by n (dim: 1) or m by n*k (dim: 2) eigen Matrix of type T values |
[in] | k | number of blocks |
[in] | dim | dimension in which to transpose |
[out] | B | n*k by m (dim: 1) or n by m*k (dim: 2) eigen Matrix of type T values, NOT allowed to be the same as A |
A = [ 1 2 3 4 5 6 7 8 101 102 103 104 105 106 107 108 201 202 203 204 205 206 207 208]; transpose_blocks(A,1,3,B); B -> [ 1 5 2 6 3 7 4 8 101 105 102 106 103 107 104 108 201 205 202 206 203 207 204 208];
bool igl::tri_tri_overlap_test_3d | ( | const Eigen::MatrixBase< DerivedP1 > & | p1, |
const Eigen::MatrixBase< DerivedQ1 > & | q1, | ||
const Eigen::MatrixBase< DerivedR1 > & | r1, | ||
const Eigen::MatrixBase< DerivedP2 > & | p2, | ||
const Eigen::MatrixBase< DerivedQ2 > & | q2, | ||
const Eigen::MatrixBase< DerivedR2 > & | r2 | ||
) |
bool igl::tri_tri_intersection_test_3d | ( | const Eigen::MatrixBase< DerivedP1 > & | p1, |
const Eigen::MatrixBase< DerivedQ1 > & | q1, | ||
const Eigen::MatrixBase< DerivedR1 > & | r1, | ||
const Eigen::MatrixBase< DerivedP2 > & | p2, | ||
const Eigen::MatrixBase< DerivedQ2 > & | q2, | ||
const Eigen::MatrixBase< DerivedR2 > & | r2, | ||
bool & | coplanar, | ||
Eigen::MatrixBase< DerivedS > & | source, | ||
Eigen::MatrixBase< DerivedT > & | target | ||
) |
bool igl::tri_tri_overlap_test_2d | ( | const Eigen::MatrixBase< DerivedP1 > & | p1, |
const Eigen::MatrixBase< DerivedQ1 > & | q1, | ||
const Eigen::MatrixBase< DerivedR1 > & | r1, | ||
const Eigen::MatrixBase< DerivedP2 > & | p2, | ||
const Eigen::MatrixBase< DerivedQ2 > & | q2, | ||
const Eigen::MatrixBase< DerivedR2 > & | r2 | ||
) |
void igl::triangle_fan | ( | const Eigen::MatrixBase< DerivedE > & | E, |
Eigen::PlainObjectBase< Derivedcap > & | cap | ||
) |
Given a list of faces tessellate all of the "exterior" edges forming another list of.
[in] | E | #E by simplex_size-1 list of exterior edges (see exterior_edges.h) |
[out] | cap | #cap by simplex_size list of "faces" tessellating the boundary edges |
Eigen::MatrixXi igl::triangle_fan | ( | const Eigen::MatrixXi & | E | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::triangle_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedTT > & | TT, | ||
Eigen::PlainObjectBase< DerivedTTi > & | TTi | ||
) |
Constructs the triangle-triangle adjacency matrix for a given mesh (V,F).
[in] | F | #F by simplex_size list of mesh faces (must be triangles) |
[out] | TT | #F by #3 adjacent matrix, the element i,j is the id of the triangle adjacent to the j edge of triangle i |
[out] | TTi | #F by #3 adjacent matrix, the element i,j is the id of edge of the triangle TT(i,j) that is adjacent with triangle i |
void igl::triangle_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedTT > & | TT | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::triangle_triangle_adjacency_preprocess | ( | const Eigen::MatrixBase< DerivedF > & | F, |
std::vector< std::vector< TTT_type > > & | TTT | ||
) |
Preprocessing for triangle_triangle_adjacency.
[in] | F | #F by simplex_size list of mesh faces (must be triangles) |
[in] | TT | #F by #3 adjacent matrix, the element i,j is the id of the triangle adjacent to the j edge of triangle i |
void igl::triangle_triangle_adjacency_extractTT | ( | const Eigen::MatrixBase< DerivedF > & | F, |
std::vector< std::vector< TTT_type > > & | TTT, | ||
Eigen::PlainObjectBase< DerivedTT > & | TT | ||
) |
Extract the face adjacencies for triangle_triangle_adjacency.
[in] | F | #F by simplex_size list of mesh faces (must be triangles) |
[in] | TTT | #F list of lists adjacent triangles |
[in] | TT | #F by #3 adjacentmatrix, the element i,j is the id of edge of the triangle TT(i,j) that is adjacent with triangle i |
void igl::triangle_triangle_adjacency_extractTTi | ( | const Eigen::MatrixBase< DerivedF > & | F, |
std::vector< std::vector< TTT_type > > & | TTT, | ||
Eigen::PlainObjectBase< DerivedTTi > & | TTi | ||
) |
Extract the face adjacencies indices for triangle_triangle_adjacency.
[in] | F | #F by simplex_size list of mesh faces (must be triangles) |
[in] | TTT | #F list of lists adjacent triangles |
[out] | TTi | #F by #3 adjacent matrix, the element i,j is the id of edge of the triangle TT(i,j) that is adjacent with triangle i |
void igl::triangle_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedF > & | F, |
std::vector< std::vector< std::vector< TTIndex > > > & | TT, | ||
std::vector< std::vector< std::vector< TTiIndex > > > & | TTi | ||
) |
Adjacency list version, which works with non-manifold meshes.
[in] | F | #F by 3 list of triangle indices |
[out] | TT | #F by 3 list of lists so that TT[i][c] --> {j,k,...} means that faces j and k etc. are edge-neighbors of face i on face i's edge opposite corner c |
[out] | TTj | #F list of lists so that TTj[i][c] --> {j,k,...} means that face TT[i][c][0] is an edge-neighbor of face i incident on the edge of face TT[i][c][0] opposite corner j, and TT[i][c][1] " corner k, etc. |
void igl::triangle_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedF > & | F, |
std::vector< std::vector< std::vector< TTIndex > > > & | TT | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::triangle_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const bool | construct_TTi, | ||
std::vector< std::vector< std::vector< TTIndex > > > & | TT, | ||
std::vector< std::vector< std::vector< TTiIndex > > > & | TTi | ||
) |
void igl::triangle_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedE > & | E, |
const Eigen::MatrixBase< DerivedEMAP > & | EMAP, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
const bool | construct_TTi, | ||
std::vector< std::vector< std::vector< TTIndex > > > & | TT, | ||
std::vector< std::vector< std::vector< TTiIndex > > > & | TTi | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | E | #F*3 by 2 list of all of directed edges in order (see oriented_facets ) |
[in] | EMAP | #F*3 list of indices into uE, mapping each directed edge to unique undirected edge |
[in] | uE2E | #uE list of lists of indices into E of coexisting edges |
[in] | construct_TTi | whether to compute TTi |
void igl::triangle_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedEMAP > & | EMAP, |
const Eigen::MatrixBase< DeriveduEC > & | uEC, | ||
const Eigen::MatrixBase< DeriveduEE > & | uEE, | ||
const bool | construct_TTi, | ||
std::vector< std::vector< std::vector< TTIndex > > > & | TT, | ||
std::vector< std::vector< std::vector< TTiIndex > > > & | TTi | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | uEC | #uE+1 list of cumulative counts of directed edges sharing each unique edge so the uEC(i+1)-uEC(i) is the number of directed edges sharing the ith unique edge. |
[in] | uEE | #E list of indices into E, so that the consecutive segment of indices uEE.segment(uEC(i),uEC(i+1)-uEC(i)) lists all directed edges sharing the ith unique edge. |
void igl::triangles_from_strip | ( | const Eigen::MatrixBase< DerivedS > & | S, |
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Create a list of triangles from a stream of indices along a strip.
[in] | S | #S list of indices |
[out] | F | #S-2 by 3 list of triangle indices |
void igl::triangulated_grid | ( | const XType & | nx, |
const YType & | ny, | ||
Eigen::PlainObjectBase< DerivedGV > & | GV, | ||
Eigen::PlainObjectBase< DerivedGF > & | GF | ||
) |
Create a regular grid of elements (only 2D supported, currently) Vertex position order is compatible with igl::grid
[in] | nx | number of vertices in the x direction |
[in] | ny | number of vertices in the y direction |
[out] | GV | nx*ny by 2 list of mesh vertex positions. |
[out] | GF | 2*(nx-1)*(ny-1) by 3 list of triangle indices |
void igl::triangulated_grid | ( | const XType & | nx, |
const YType & | ny, | ||
Eigen::PlainObjectBase< DerivedGF > & | GF | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
DerivedV::Scalar igl::turning_number | ( | const Eigen::MatrixBase< DerivedV > & | V | ) |
Compute the turning number of a closed curve in the plane.
[in] | V | #V by 2 list of vertex positions |
void igl::two_axis_valuator_fixed_up | ( | const int | w, |
const int | h, | ||
const double | speed, | ||
const Eigen::Quaternion< Scalardown_quat > & | down_quat, | ||
const int | down_x, | ||
const int | down_y, | ||
const int | mouse_x, | ||
const int | mouse_y, | ||
Eigen::Quaternion< Scalarquat > & | quat | ||
) |
Applies a two-axis valuator drag rotation (as seen in Maya/Studio max) to a given rotation.
[in] | w | width of the trackball context |
[in] | h | height of the trackball context |
[in] | speed | controls how fast the trackball feels, 1 is normal |
[in] | down_quat | rotation at mouse down, i.e. the rotation we're applying the trackball motion to (as quaternion). Note: Up-vector that is fixed is with respect to this rotation. |
[in] | down_x | position of mouse down |
[in] | down_y | position of mouse down |
[in] | mouse_x | current x position of mouse |
[in] | mouse_y | current y position of mouse |
[out] | quat | the resulting rotation (as quaternion) |
void igl::uniformly_sample_two_manifold | ( | const Eigen::MatrixXd & | W, |
const Eigen::MatrixXi & | F, | ||
const int | k, | ||
const double | push, | ||
Eigen::MatrixXd & | WS | ||
) |
Attempt to sample a mesh uniformly with k-points by furthest point relaxation as described in "Fast Automatic Skinning Transformations" [Jacobson et al.
12] Section 3.3. The input is not expected to be a typical 3D triangle mesh (e.g., [V,F]), instead each vertex is embedded in a high dimensional unit-hypercude ("weight space") defined by W, with triangles given by F. This algorithm will first conduct furthest point sampling from the set of vertices and then attempt to relax the sampled points along the surface of the high-dimensional triangle mesh (i.e., the output points may be in the middle of triangles, not just at vertices). An additional "push" factor will repel samples away from the corners of the hypercube.
[in] | W | #W by dim positions of mesh in weight space |
[in] | F | #F by 3 indices of triangles |
[in] | k | number of samples |
[in] | push | factor by which corners should be pushed away |
[out] | WS | k by dim locations in weight space |
void igl::uniformly_sample_two_manifold_at_vertices | ( | const Eigen::MatrixXd & | W, |
const int | k, | ||
const double | push, | ||
Eigen::VectorXi & | S | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.include/igl/uniformly_sample_two_manifold.h.
void igl::unique | ( | const std::vector< T > & | A, |
std::vector< T > & | C, | ||
std::vector< size_t > & | IA, | ||
std::vector< size_t > & | IC | ||
) |
Act like matlab's [C,IA,IC] = unique(X)
T | comparable type T |
[in] | A | #A vector of type T |
[out] | C | #C vector of unique entries in A |
[out] | IA | #C index vector so that C = A(IA); |
[out] | IC | #A index vector so that A = C(IC); |
void igl::unique | ( | const std::vector< T > & | A, |
std::vector< T > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::unique | ( | const Eigen::MatrixBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedIA > & | IA, | ||
Eigen::PlainObjectBase< DerivedIC > & | IC | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::unique | ( | const Eigen::MatrixBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::unique_edge_map | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
std::vector< std::vector< uE2EType > > & | uE2E | ||
) |
Construct relationships between facet "half"-(or rather "viewed")-edges E to unique edges of the mesh seen as a graph.
[in] | F | #F by 3 list of simplices |
[out] | E | #F*3 by 2 list of all directed edges, such that E.row(f+#F*c) is the edge opposite F(f,c) |
[out] | uE | #uE by 2 list of unique undirected edges |
[out] | EMAP | #F*3 list of indices into uE, mapping each directed edge to unique undirected edge so that uE(EMAP(f+#F*c)) is the unique edge corresponding to E.row(f+#F*c) |
[out] | uE2E | #uE list of lists of indices into E of coexisting edges, so that E.row(uE2E[i][j]) corresponds to uE.row(i) for all j in 0..uE2E[i].size()-1. |
void igl::unique_edge_map | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::unique_edge_map | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
Eigen::PlainObjectBase< DeriveduEC > & | uEC, | ||
Eigen::PlainObjectBase< DeriveduEE > & | uEE | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
It is usual much faster if your algorithm can be written in terms of (uEC,uEE) rather than (uE2E).
[out] | uEC | #uE+1 list of cumulative counts of directed edges sharing each unique edge so the uEC(i+1)-uEC(i) is the number of directed edges sharing the ith unique edge. |
[out] | uEE | #E list of indices into E, so that the consecutive segment of indices uEE.segment(uEC(i),uEC(i+1)-uEC(i)) lists all directed edges sharing the ith unique edge. |
void igl::unique_rows | ( | const Eigen::DenseBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< DerivedIA > & | IA, | ||
Eigen::PlainObjectBase< DerivedIC > & | IC | ||
) |
Act like matlab's [C,IA,IC] = unique(X,'rows')
DerivedA | derived scalar type, e.g. MatrixXi or MatrixXd |
DerivedIA | derived integer type, e.g. MatrixXi |
DerivedIC | derived integer type, e.g. MatrixXi |
[in] | A | m by n matrix whose entries are to unique'd according to rows |
[out] | C | #C vector of unique rows in A |
[out] | IA | #C index vector so that C = A(IA,:); |
[out] | IC | #A index vector so that A = C(IC,:); |
void igl::unique_simplices | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedIA > & | IA, | ||
Eigen::PlainObjectBase< DerivedIC > & | IC | ||
) |
Find combinatorially unique simplices in F.
Order independent
[in] | F | #F by simplex-size list of simplices |
[out] | FF | #FF by simplex-size list of unique simplices in F |
[out] | IA | #FF index vector so that FF == sort(F(IA,:),2); |
[out] | IC | #F index vector so that sort(F,2) == FF(IC,:); |
void igl::unique_simplices | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedFF > & | FF | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::unproject | ( | const Eigen::MatrixBase< Derivedwin > & | win, |
const Eigen::MatrixBase< Derivedmodel > & | model, | ||
const Eigen::MatrixBase< Derivedproj > & | proj, | ||
const Eigen::MatrixBase< Derivedviewport > & | viewport, | ||
Eigen::PlainObjectBase< Derivedscene > & | scene | ||
) |
Eigen reimplementation of gluUnproject.
[in] | win | #P by 3 or 3-vector (#P=1) of screen space x, y, and z coordinates |
[in] | model | 4x4 model-view matrix |
[in] | proj | 4x4 projection matrix |
[in] | viewport | 4-long viewport vector |
[out] | scene | #P by 3 or 3-vector (#P=1) the unprojected x, y, and z coordinates |
Eigen::Matrix< Scalar, 3, 1 > igl::unproject | ( | const Eigen::Matrix< Scalar, 3, 1 > & | win, |
const Eigen::Matrix< Scalar, 4, 4 > & | model, | ||
const Eigen::Matrix< Scalar, 4, 4 > & | proj, | ||
const Eigen::Matrix< Scalar, 4, 1 > & | viewport | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int igl::unproject_in_mesh | ( | const Eigen::Vector2f & | pos, |
const Eigen::Matrix4f & | model, | ||
const Eigen::Matrix4f & | proj, | ||
const Eigen::Vector4f & | viewport, | ||
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< Derivedobj > & | obj, | ||
std::vector< igl::Hit > & | hits | ||
) |
Unproject a screen location (using current opengl viewport, projection, and model view) to a 3D position inside a given mesh.
If the ray through the given screen location (x,y) hits the mesh more than twice then the 3D midpoint between the first two hits is return. If it hits once, then that point is return. If it does not hit the mesh then obj is not set.
[in] | pos | screen space coordinates |
[in] | model | model matrix |
[in] | proj | projection matrix |
[in] | viewport | vieweport vector |
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh triangle indices into V |
[out] | obj | 3d unprojected mouse point in mesh |
[out] | hits | vector of hits |
int igl::unproject_in_mesh | ( | const Eigen::Vector2f & | pos, |
const Eigen::Matrix4f & | model, | ||
const Eigen::Matrix4f & | proj, | ||
const Eigen::Vector4f & | viewport, | ||
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< Derivedobj > & | obj | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int igl::unproject_in_mesh | ( | const Eigen::Vector2f & | pos, |
const Eigen::Matrix4f & | model, | ||
const Eigen::Matrix4f & | proj, | ||
const Eigen::Vector4f & | viewport, | ||
const std::function< void(const Eigen::Vector3f &, const Eigen::Vector3f &, std::vector< igl::Hit > &) > & | shoot_ray, | ||
Eigen::PlainObjectBase< Derivedobj > & | obj, | ||
std::vector< igl::Hit > & | hits | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | shoot_ray | function handle that outputs first hit of a given ray against a mesh (embedded in function handles as captured variable/data) |
void igl::unproject_on_line | ( | const Eigen::MatrixBase< DerivedUV > & | UV, |
const Eigen::MatrixBase< DerivedM > & | M, | ||
const Eigen::MatrixBase< DerivedVP > & | VP, | ||
const Eigen::MatrixBase< Derivedorigin > & | origin, | ||
const Eigen::MatrixBase< Deriveddir > & | dir, | ||
typename DerivedUV::Scalar & | t | ||
) |
Given a screen space point (u,v) and the current projection matrix (e.g.
gl_proj * gl_modelview) and viewport, unproject the point into the scene so that it lies on given line (origin and dir) and projects as closely as possible to the given screen space point.
[in] | UV | 2-long uv-coordinates of screen space point |
[in] | M | 4 by 4 projection matrix |
[in] | VP | 4-long viewport: (corner_u, corner_v, width, height) |
[in] | origin | point on line |
[in] | dir | vector parallel to line |
[out] | t | line parameter so that closest poin on line to viewer ray through UV lies at origin+t*dir |
void igl::unproject_on_line | ( | const Eigen::MatrixBase< DerivedUV > & | UV, |
const Eigen::MatrixBase< DerivedM > & | M, | ||
const Eigen::MatrixBase< DerivedVP > & | VP, | ||
const Eigen::MatrixBase< Derivedorigin > & | origin, | ||
const Eigen::MatrixBase< Deriveddir > & | dir, | ||
Eigen::PlainObjectBase< DerivedZ > & | Z | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | Z | 3d position of closest point on line to viewing ray through UV |
void igl::unproject_on_plane | ( | const Eigen::MatrixBase< DerivedUV > & | UV, |
const Eigen::MatrixBase< DerivedM > & | M, | ||
const Eigen::MatrixBase< DerivedVP > & | VP, | ||
const Eigen::MatrixBase< DerivedP > & | P, | ||
Eigen::PlainObjectBase< DerivedZ > & | Z | ||
) |
Given a screen space point (u,v) and the current projection matrix (e.g.
gl_proj * gl_modelview) and viewport, unproject the point into the scene so that it lies on given plane.
[in] | UV | 2-long uv-coordinates of screen space point |
[in] | M | 4 by 4 projection matrix |
[in] | VP | 4-long viewport: (corner_u, corner_v, width, height) |
[in] | P | 4-long plane equation coefficients: P*(X 1) = 0 |
[out] | Z | 3-long world coordinate |
bool igl::unproject_onto_mesh | ( | const Eigen::Vector2f & | pos, |
const Eigen::Matrix4f & | model, | ||
const Eigen::Matrix4f & | proj, | ||
const Eigen::Vector4f & | viewport, | ||
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
int & | fid, | ||
Eigen::PlainObjectBase< Derivedbc > & | bc | ||
) |
Unproject a screen location (using current opengl viewport, projection, and model view) to a 3D position onto a given mesh, if the ray through the given screen location (x,y) hits the mesh.
[in] | pos | screen space coordinates |
[in] | model | model matrix |
[in] | proj | projection matrix |
[in] | viewport | vieweport vector |
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of mesh triangle indices into V |
[out] | fid | id of the first face hit |
[out] | bc | barycentric coordinates of hit |
bool igl::unproject_onto_mesh | ( | const Eigen::Vector2f & | pos, |
const Eigen::Matrix4f & | model, | ||
const Eigen::Matrix4f & | proj, | ||
const Eigen::Vector4f & | viewport, | ||
const std::function< bool(const Eigen::Vector3f &, const Eigen::Vector3f &, igl::Hit &) > & | shoot_ray, | ||
int & | fid, | ||
Eigen::PlainObjectBase< Derivedbc > & | bc | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | shoot_ray | function handle that outputs hits of a given ray against a mesh (embedded in function handles as captured variable/data) |
void igl::unproject_ray | ( | const Eigen::MatrixBase< Derivedpos > & | pos, |
const Eigen::MatrixBase< Derivedmodel > & | model, | ||
const Eigen::MatrixBase< Derivedproj > & | proj, | ||
const Eigen::MatrixBase< Derivedviewport > & | viewport, | ||
Eigen::PlainObjectBase< Deriveds > & | s, | ||
Eigen::PlainObjectBase< Deriveddir > & | dir | ||
) |
Construct a ray (source point + direction vector) given a screen space positions (e.g.
mouse) and a model-view projection constellation.
[in] | pos | 2d screen-space position (x,y) |
[in] | model | 4x4 model-view matrix |
[in] | proj | 4x4 projection matrix |
[in] | viewport | 4-long viewport vector |
[out] | s | source of ray (pos unprojected with z=0) |
[out] | dir | direction of ray (d - s) where d is pos unprojected with z=1 |
void igl::unzip_corners | ( | const std::vector< std::reference_wrapper< DerivedA > > & | A, |
Eigen::PlainObjectBase< DerivedU > & | U, | ||
Eigen::PlainObjectBase< DerivedG > & | G, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Given a triangle mesh where corners of each triangle index different matrices of attributes (e.g.
read from an OBJ file), unzip the corners into unique efficiently: attributes become properly vertex valued (usually creating greater than #V but less than #F*3 vertices).
To pass a list of attributes this function takes an std::vector of std::reference_wrapper of an Eigen::... type. This allows you to use list initializers without incurring a copy, but means you'll need to provide the derived type of A as an explicit template parameter:
unzip_corners<Eigen::MatrixXi>({F,FTC,FN},U,G,J);
[in] | A | #A list of #F by 3 attribute indices, typically {F,FTC,FN} |
[out] | U | #U by #A list of indices into each attribute for each unique mesh vertex: U(v,a) is the attribute index of vertex v in attribute a. |
[out] | G | #F by 3 list of triangle indices into U |
[out] | J | #F*3 by 1 list of indices so that A[](i,j) = U.row(i+j*#F) |
[V,F,TC,FTC] = readOBJ('~/Downloads/kiwis/kiwi.obj'); [U,G] = unzip_corners(cat(3,F,FTC)); % display mesh tsurf(G,V(U(:,1),:)); % display texture coordinates tsurf(G,TC(U(:,2),:));
void igl::upsample | ( | const int | n_verts, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::SparseMatrix< SType > & | S, | ||
Eigen::PlainObjectBase< DerivedNF > & | NF | ||
) |
Subdivide without moving vertices: Given the triangle mesh [V, F], where n_verts = V.rows(), computes newV and a sparse matrix S s.t.
[newV, newF] is the subdivided mesh where newV = S*V.
[in] | n_verts | an integer (number of mesh vertices) |
[in] | F | an m by 3 matrix of integers of triangle faces |
[out] | S | a sparse matrix (will become the subdivision matrix) |
[out] | newF | a matrix containing the new faces |
void igl::upsample | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedNV > & | NV, | ||
Eigen::PlainObjectBase< DerivedNF > & | NF, | ||
const int | number_of_subdivs = 1 |
||
) |
Subdivide a mesh without moving vertices: loop subdivision but odd vertices stay put and even vertices are just edge midpoints.
MatV | matrix for vertex positions, e.g. MatrixXd |
MatF | matrix for vertex positions, e.g. MatrixXi |
[in] | V | #V by dim mesh vertices |
[in] | F | #F by 3 mesh triangles |
[out] | NV | new vertex positions, V is guaranteed to be at top |
[out] | NF | new list of face indices |
void igl::upsample | ( | MatV & | V, |
MatF & | F, | ||
const int | number_of_subdivs = 1 |
||
) |
void igl::vector_area_matrix | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::SparseMatrix< Scalar > & | A | ||
) |
Constructs the symmetric area matrix A, s.t.
[V.col(0)' V.col(1)'] * A * [V.col(0); V.col(1)] is the vector area of the mesh (V,F).
DerivedV | derived type of eigen matrix for V (e.g. derived from MatrixXd) |
DerivedF | derived type of eigen matrix for F (e.g. derived from MatrixXi) |
Scalar | scalar type for eigen sparse matrix (e.g. double) |
[in] | F | #F by 3 list of mesh faces (must be triangles) |
[out] | A | #Vx2 by #Vx2 area matrix |
|
inline |
Provide a wrapper for printf, called verbose that functions exactly like printf if VERBOSE is defined and does exactly nothing if VERBOSE is undefined.
[in] | msg | printf style format string |
[in] | ... | printf style arguments |
void igl::vertex_components | ( | const Eigen::SparseCompressedBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedC > & | C, | ||
Eigen::PlainObjectBase< Derivedcounts > & | counts | ||
) |
Compute connected components of a graph represented by an adjacency matrix.
Outputs a component ID per vertex of the graph where connectivity is established by edges.
[in] | A | n by n adjacency matrix |
[out] | C | n list of component ids (starting with 0) |
[out] | counts | #components list of counts for each component |
void igl::vertex_components | ( | const Eigen::SparseCompressedBase< DerivedA > & | A, |
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::vertex_components | ( | const Eigen::MatrixBase< DerivedF > & | F, |
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute the connected components for a mesh given its faces.
Returns a component ID per vertex of the mesh where connectivity is established by edges.
For computing connected components per face see igl::facet_components
[in] | F | n by 3 list of triangle indices |
[out] | C | max(F) list of component ids |
void igl::vertex_triangle_adjacency | ( | const typename DerivedF::Scalar | n, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
std::vector< std::vector< VFType > > & | VF, | ||
std::vector< std::vector< VFiType > > & | VFi | ||
) |
vertex_face_adjacency constructs the vertex-face topology of a given mesh (V,F)
[in] | n | number of vertices #V (e.g. F.maxCoeff()+1 or V.rows() ) |
[in] | F | #F by dim list of mesh faces (must be triangles) |
[out] | VF | #V list of lists of incident faces (adjacency list) |
[out] | VI | #V list of lists of index of incidence within incident faces listed in VF |
void igl::vertex_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
std::vector< std::vector< IndexType > > & | VF, | ||
std::vector< std::vector< IndexType > > & | VFi | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::vertex_triangle_adjacency | ( | const Eigen::MatrixBase< DerivedF > & | F, |
const int | n, | ||
Eigen::PlainObjectBase< DerivedVF > & | VF, | ||
Eigen::PlainObjectBase< DerivedNI > & | NI | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | F | #F by 3 list of triangle indices into some vertex list V |
[in] | n | number of vertices, #V (e.g., F.maxCoeff()+1) |
[out] | VF | 3*#F list List of faces indice on each vertex, so that VF(NI(i)+j) = f, means that face f is the jth face (in no particular order) incident on vertex i. |
[out] | NI | #V+1 list cumulative sum of vertex-triangle degrees with a preceeding zero. "How many faces" have been seen before visiting this vertex and its incident faces. |
void igl::volume | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedT > & | T, | ||
Eigen::PlainObjectBase< Derivedvol > & | vol | ||
) |
Compute volume for all tets of a given tet mesh (V,T)
[in] | V | #V by dim list of vertex positions |
[in] | T | #T by 4 list of tet indices |
[out] | vol | #T list of tetrahedron volumes |
void igl::volume | ( | const Eigen::MatrixBase< DerivedA > & | A, |
const Eigen::MatrixBase< DerivedB > & | B, | ||
const Eigen::MatrixBase< DerivedC > & | C, | ||
const Eigen::MatrixBase< DerivedD > & | D, | ||
Eigen::PlainObjectBase< Derivedvol > & | vol | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | A | #V by dim list of first corner position |
[in] | B | #V by dim list of second corner position |
[in] | C | #V by dim list of third corner position |
[in] | D | #V by dim list of fourth corner position |
VecA::Scalar igl::volume_single | ( | const VecA & | a, |
const VecB & | b, | ||
const VecC & | c, | ||
const VecD & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Single tet
void igl::volume | ( | const Eigen::MatrixBase< DerivedL > & | L, |
Eigen::PlainObjectBase< Derivedvol > & | vol | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Intrinsic version:
[in] | L | #V by 6 list of edge lengths (see edge_lengths) |
void igl::voxel_grid | ( | const Eigen::AlignedBox< Scalar, 3 > & | box, |
const int | s, | ||
const int | pad_count, | ||
Eigen::PlainObjectBase< DerivedGV > & | GV, | ||
Eigen::PlainObjectBase< Derivedside > & | side | ||
) |
Construct the cell center positions of a regular voxel grid (lattice) made of perfectly square voxels.
[in] | box | bounding box to enclose by grid |
[in] | s | number of cell centers on largest side (including 2*pad_count) |
[in] | pad_count | number of cells beyond box |
[out] | GV | side(0)*side(1)*side(2) by 3 list of cell center positions |
[out] | side | 1 by 3 list of dimension of voxel grid |
void igl::voxel_grid | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const typename DerivedV::Scalar | offset, | ||
const int | s, | ||
const int | pad_count, | ||
Eigen::PlainObjectBase< DerivedGV > & | GV, | ||
Eigen::PlainObjectBase< Derivedside > & | side | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | offset | offset to add to each cell center |
void igl::winding_number | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedO > & | O, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Computes the generalized winding number at each dim-dimensional query point in O with respect to the oriented one-codimensional mesh (V,F).
This is equivalent to summing the subtended signed angles/solid angles of each element in (V,F). See, "Robust Inside-Outside Segmentation using Generalized Winding Numbers" [Jacobson et al. 2013].
[in] | V | #V by dim list of mesh vertex positions |
[in] | F | #F by dim list of mesh facets as indices into rows of V. If dim==2, then (V,F) describes a set of edges in the plane. If dim==3, then (V,F) describes a triangle mesh/soup. |
[in] | O | #O by dim list of query points |
[out] | W | #O by 1 list of winding numbers |
DerivedV::Scalar igl::winding_number | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedp > & | p | ||
) |
Compute winding number of a single point.
[in] | V | n by dim list of vertex positions |
[in] | F | #F by dim list of triangle indices, minimum index is 0 |
[in] | p | single origin position |
[out] | w | winding number of this point |
bool igl::write_triangle_mesh | ( | const std::string | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
FileEncoding | encoding = FileEncoding::Ascii |
||
) |
write mesh to a file with automatic detection of file format.
supported: obj, off, stl, wrl, ply, mesh).
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
Index | type for indices (will be read as int and cast to Index) |
[in] | str | path to file |
[in] | V | eigen double matrix #V by 3 |
[in] | F | eigen int matrix #F by 3 |
[in] | encoding | set file encoding (ascii or binary) when both are available |
bool igl::writeBF | ( | const std::string & | filename, |
const Eigen::PlainObjectBase< DerivedWI > & | WI, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
const Eigen::PlainObjectBase< DerivedO > & | O | ||
) |
Write a bones forest to a file.
[in] | file_name | path to .bf bones tree file |
[in] | WI | #B list of unique weight indices |
[in] | P | #B list of parent indices into B, -1 for roots |
[in] | O | #B list of tip offsets |
bool igl::writeDMAT | ( | const std::string | file_name, |
const Eigen::MatrixBase< DerivedW > & | W, | ||
const bool | ascii = true |
||
) |
Write a matrix using ascii dmat file type.
Mat | matrix type that supports .rows(), .cols(), operator(i,j) |
[in] | file_name | path to .dmat file |
[in] | W | eigen matrix containing to-be-written coefficients |
[in] | ascii | write ascii file {true} |
bool igl::writeDMAT | ( | const std::string | file_name, |
const std::vector< std::vector< Scalar > > & | W, | ||
const bool | ascii = true |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writeDMAT | ( | const std::string | file_name, |
const std::vector< Scalar > & | W, | ||
const bool | ascii = true |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writeMESH | ( | const std::string | mesh_file_name, |
const std::vector< std::vector< Scalar > > & | V, | ||
const std::vector< std::vector< Index > > & | T, | ||
const std::vector< std::vector< Index > > & | F | ||
) |
save a tetrahedral volume mesh to a .mesh file
Scalar | type for positions and vectors (will be cast as double) |
Index | type for indices (will be cast to int) |
[in] | mesh_file_name | path of .mesh file |
[in] | V | double matrix of vertex positions #V by 3 |
[in] | T | #T list of tet indices into vertex positions |
[in] | F | #F list of face indices into vertex positions |
bool igl::writeMESH | ( | const std::string | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedT > & | T, | ||
const Eigen::MatrixBase< DerivedF > & | F | ||
) |
save a tetrahedral volume mesh to a .mesh file
DerivedV | real-value: i.e. from MatrixXd |
DerivedT | integer-value: i.e. from MatrixXi |
DerivedF | integer-value: i.e. from MatrixXi |
[in] | mesh_file_name | path of .mesh file |
[in] | V | eigen double matrix #V by 3 |
[in] | T | eigen int matrix #T by 4 |
[in] | F | eigen int matrix #F by 3 |
bool igl::writeMSH | ( | const std::string & | msh, |
const Eigen::MatrixXd & | X, | ||
const Eigen::MatrixXi & | Tri, | ||
const Eigen::MatrixXi & | Tet, | ||
const Eigen::MatrixXi & | TriTag, | ||
const Eigen::MatrixXi & | TetTag, | ||
const std::vector< std::string > & | XFields, | ||
const std::vector< Eigen::MatrixXd > & | XF, | ||
const std::vector< std::string > & | EFields, | ||
const std::vector< Eigen::MatrixXd > & | TriF, | ||
const std::vector< Eigen::MatrixXd > & | TetF | ||
) |
write triangle surface mesh and tetrahedral volume mesh to .msh file
[in] | msh | - file name |
[in] | X | eigen double matrix of vertex positions #X by 3 |
[in] | Tri | #Tri eigen integer matrix of triangular faces indices into vertex positions |
[in] | Tet | #Tet eigen integer matrix of tetrahedral indices into vertex positions |
[in] | TriTag | #Tri eigen integer vector of tags associated with surface faces |
[in] | TetTag | #Tet eigen integer vector of tags associated with volume elements |
[in] | XFields | #XFields list of strings with field names associated with nodes |
[in] | XF | #XFields list of eigen double matrices, fields associated with nodes |
[in] | EFields | #EFields list of strings with field names associated with elements |
[in] | TriF | #EFields list of eigen double matrices, fields associated with surface elements |
[in] | TetF | #EFields list of eigen double matrices, fields associated with volume elements |
bool igl::writeOBJ | ( | const std::string | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedCN > & | CN, | ||
const Eigen::MatrixBase< DerivedFN > & | FN, | ||
const Eigen::MatrixBase< DerivedTC > & | TC, | ||
const Eigen::MatrixBase< DerivedFTC > & | FTC | ||
) |
Write a mesh in an ascii obj file.
[in] | str | path to outputfile |
[in] | V | #V by 3 mesh vertex positions |
[in] | F | #F by 3|4 mesh indices into V |
[in] | CN | #CN by 3 normal vectors |
[in] | FN | #F by 3|4 corner normal indices into CN |
[in] | TC | #TC by 2|3 texture coordinates |
[in] | FTC | #F by 3|4 corner texture coord indices into TC |
bool igl::writeOBJ | ( | const std::string | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writeOBJ | ( | const std::string & | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const std::vector< std::vector< T > > & | F | ||
) |
Write a mesh of mixed tris and quads to an ascii obj file.
[in] | str | path to outputfile |
[in] | V | #V by 3 mesh vertex positions |
[in] | F | #F std::vector of std::vector<Index> of size 3 or 4 mesh indices into V |
bool igl::writeOFF | ( | const std::string | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedC > & | C | ||
) |
Export geometry and colors-by-vertex to an ascii OFF file.
Only triangle meshes are supported
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
Index | type for indices (will be read as int and cast to Index) |
[in] | str | path to .off output file |
[in] | V | #V by 3 mesh vertex positions |
[in] | F | #F by 3 mesh indices into V |
[in] | C | double matrix of rgb values per vertex #V by 3 |
bool igl::writeOFF | ( | const std::string | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writePLY | ( | std::ostream & | ply_stream, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedUV > & | UV, | ||
const Eigen::MatrixBase< DerivedVD > & | VD, | ||
const std::vector< std::string > & | VDheader, | ||
const Eigen::MatrixBase< DerivedFD > & | FD, | ||
const std::vector< std::string > & | FDheader, | ||
const Eigen::MatrixBase< DerivedED > & | ED, | ||
const std::vector< std::string > & | EDheader, | ||
const std::vector< std::string > & | comments, | ||
FileEncoding | encoding | ||
) |
write triangular mesh to ply file
Derived | from Eigen matrix parameters |
[in] | ply_stream | ply file output stream |
[in] | V | (#V,3) matrix of vertex positions |
[in] | F | (#F,3) list of face indices into vertex positions |
[in] | E | (#E,2) list of edge indices into vertex positions |
[in] | N | (#V,3) list of normals |
[in] | UV | (#V,2) list of texture coordinates |
[in] | VD | (#V,*) additional vertex data |
[in] | Vheader | (#V) list of vertex data headers |
[in] | FD | (#F,*) additional face data |
[in] | Fheader | (#F) list of face data headers |
[in] | ED | (#E,*) additional edge data |
[in] | Eheader | (#E) list of edge data headers |
[in] | comments | (*) file comments |
[in] | encoding | - enum, to set binary or ascii file format |
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedUV > & | UV, | ||
const Eigen::MatrixBase< DerivedVD > & | VD, | ||
const std::vector< std::string > & | VDheader, | ||
const Eigen::MatrixBase< DerivedFD > & | FD, | ||
const std::vector< std::string > & | FDheader, | ||
const Eigen::MatrixBase< DerivedED > & | ED, | ||
const std::vector< std::string > & | EDheader, | ||
const std::vector< std::string > & | comments, | ||
FileEncoding | encoding | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | filename | path to .ply file |
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedF > & | E | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedUV > & | UV | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedUV > & | UV | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
FileEncoding | encoding | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
FileEncoding | encoding | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedUV > & | UV, | ||
const Eigen::MatrixBase< DerivedVD > & | VD = Eigen::MatrixXd(0, 0) , |
||
const std::vector< std::string > & | VDheader = {} , |
||
const std::vector< std::string > & | comments = {} |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writePLY | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedUV > & | UV, | ||
const Eigen::MatrixBase< DerivedVD > & | VD = Eigen::MatrixXd(0, 0) , |
||
const std::vector< std::string > & | VDheader = {} , |
||
const std::vector< std::string > & | comments = {} |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writeSTL | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
FileEncoding | encoding = FileEncoding::Ascii |
||
) |
Write a mesh to an stl file.
Scalar | type for positions and vectors (will be read as double and cast to Scalar) |
[in] | filename | path to .obj file |
[in] | V | double matrix of vertex positions #F*3 by 3 |
[in] | F | index matrix of triangle indices #F by 3 |
[in] | N | double matrix of vertex positions #F by 3 |
[in] | encoding | enum to set file encoding (ascii by default) |
bool igl::writeSTL | ( | const std::string & | filename, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
FileEncoding | encoding = FileEncoding::Ascii |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writeTGF | ( | const std::string | tgf_filename, |
const std::vector< std::vector< double > > & | C, | ||
const std::vector< std::vector< int > > & | E | ||
) |
Write a graph to a .tgf file.
[in] | filename | .tgf file name |
[in] | V | # vertices by 3 list of vertex positions |
[in] | E | # edges by 2 list of edge indices |
bool igl::writeTGF | ( | const std::string | tgf_filename, |
const Eigen::MatrixXd & | C, | ||
const Eigen::MatrixXi & | E | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::writeWRL | ( | const std::string & | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F | ||
) |
Write mesh to a .wrl file.
[in] | str | path to .wrl file |
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
bool igl::writeWRL | ( | const std::string & | str, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< DerivedC > & | C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | C | double matrix of rgb values per vertex #V by 3 |
const float igl::IDENTITY_QUAT_F[4] = {0,0,0,1} |
const float igl::XY_PLANE_QUAT_F[4] = {0,0,0,1} |
const float igl::XZ_PLANE_QUAT_F[4] = {-SQRT_2_OVER_2,0,0,SQRT_2_OVER_2} |
const float igl::YZ_PLANE_QUAT_F[4] = {-0.5,-0.5,-0.5,0.5} |
const float igl::CANONICAL_VIEW_QUAT_F[][4] |
const double igl::IDENTITY_QUAT_D[4] = {0,0,0,1} |
const double igl::XY_PLANE_QUAT_D[4] = {0,0,0,1} |
const double igl::XZ_PLANE_QUAT_D[4] = {-SQRT_2_OVER_2,0,0,SQRT_2_OVER_2} |
const double igl::YZ_PLANE_QUAT_D[4] = {-0.5,-0.5,-0.5,0.5} |
const double igl::CANONICAL_VIEW_QUAT_D[][4] |
const double igl::DOUBLE_EPS = 1.0e-14 |
Standard value for double epsilon.
const double igl::DOUBLE_EPS_SQ = 1.0e-28 |
Standard value for double epsilon²
const float igl::FLOAT_EPS = 1.0e-7f |
Standard value for single epsilon.
const float igl::FLOAT_EPS_SQ = 1.0e-14f |
Standard value for single epsilon²
const float igl::GOLD_AMBIENT[4] = { 51.0/255.0, 43.0/255.0,33.3/255.0,1.0f } |
const float igl::GOLD_DIFFUSE[4] = { 255.0/255.0,228.0/255.0,58.0/255.0,1.0f } |
const float igl::GOLD_SPECULAR[4] = { 255.0/255.0,235.0/255.0,80.0/255.0,1.0f } |
const float igl::SILVER_AMBIENT[4] = { 0.2f, 0.2f, 0.2f, 1.0f } |
const float igl::SILVER_DIFFUSE[4] = { 1.0f, 1.0f, 1.0f, 1.0f } |
const float igl::SILVER_SPECULAR[4] = { 1.0f, 1.0f, 1.0f, 1.0f } |
const float igl::CYAN_AMBIENT[4] = { 59.0/255.0, 68.0/255.0,255.0/255.0,1.0f } |
const float igl::CYAN_DIFFUSE[4] = { 94.0/255.0,185.0/255.0,238.0/255.0,1.0f } |
const float igl::CYAN_SPECULAR[4] = { 163.0/255.0,221.0/255.0,255.0/255.0,1.0f } |
const float igl::DENIS_PURPLE_DIFFUSE[4] = { 80.0/255.0,64.0/255.0,255.0/255.0,1.0f } |
const float igl::LADISLAV_ORANGE_DIFFUSE[4] = {1.0f, 125.0f / 255.0f, 19.0f / 255.0f, 0.0f} |
const float igl::FAST_GREEN_DIFFUSE[4] = { 113.0f/255.0f, 239.0f/255.0f, 46.0f/255.0f, 1.0f} |
const float igl::FAST_RED_DIFFUSE[4] = { 255.0f/255.0f, 65.0f/255.0f, 46.0f/255.0f, 1.0f} |
const float igl::FAST_BLUE_DIFFUSE[4] = { 106.0f/255.0f, 106.0f/255.0f, 255.0f/255.0f, 1.0f} |
const float igl::FAST_GRAY_DIFFUSE[4] = { 150.0f/255.0f, 150.0f/255.0f, 150.0f/255.0f, 1.0f} |
const float igl::WHITE[4] = { 255.0/255.0,255.0/255.0,255.0/255.0,1.0f } |
const float igl::BLACK[4] = { 0.0/255.0,0.0/255.0,0.0/255.0,1.0f } |
const float igl::WHITE_AMBIENT[4] = { 255.0/255.0,255.0/255.0,255.0/255.0,1.0f } |
const float igl::WHITE_DIFFUSE[4] = { 255.0/255.0,255.0/255.0,255.0/255.0,1.0f } |
const float igl::WHITE_SPECULAR[4] = { 255.0/255.0,255.0/255.0,255.0/255.0,1.0f } |
const float igl::BBW_POINT_COLOR[4] = {239./255.,213./255.,46./255.,255.0/255.0} |
const float igl::BBW_LINE_COLOR[4] = {106./255.,106./255.,255./255.,255./255.} |
const float igl::MIDNIGHT_BLUE_DIFFUSE[4] = { 21.0f/255.0f, 27.0f/255.0f, 84.0f/255.0f, 1.0f} |
const float igl::EASTER_RED_DIFFUSE[4] = {0.603922,0.494118f,0.603922f,1.0f} |
const float igl::WN_OPEN_BOUNDARY_COLOR[4] = {154./255.,0./255.,0./255.,1.0f} |
const float igl::WN_NON_MANIFOLD_EDGE_COLOR[4] = {201./255., 51./255.,255./255.,1.0f} |
const char igl::CHAR_ONE = 1 |
Often one needs a reference to a dummy variable containing one as its value, for example when using AntTweakBar's TwSetParam( "3D View", "opened", TW_PARAM_INT32, 1, &INT_ONE);.
const int igl::INT_ONE = 1 |
const unsigned int igl::UNSIGNED_INT_ONE = 1 |
const double igl::DOUBLE_ONE = 1 |
const float igl::FLOAT_ONE = 1 |
|
constexpr |
π
const char igl::CHAR_ZERO = 0 |
const int igl::INT_ZERO = 0 |
const unsigned int igl::UNSIGNED_INT_ZERO = 0 |
const double igl::DOUBLE_ZERO = 0 |
const float igl::FLOAT_ZERO = 0 |