.h file | Functions |
---|---|
active_set.h |
// Known Bugs: rows of [Aeq;Aieq] **must** be linearly independent. Should be // using QR decomposition otherwise: // http://www.okstate.edu/sas/v8/sashtml/ormp/chap5/sect32.htm // // ACTIVE_SET Minimize quadratic energy Z'*A*Z + Z'*B + C with constraints // 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 // // Templates: // Inputs: // A n by n matrix of quadratic coefficients // B n by 1 column of linear coefficients // known list of indices to known rows in Z // Y list of fixed values corresponding to known rows in Z // Aeq meq by n list of linear equality constraint coefficients // Beq meq by 1 list of linear equality constraint constant values // Aieq mieq by n list of linear equality constraint coefficients // Bieq mieq by 1 list of linear equality constraint constant values // lx n by 1 list of lower bounds [] implies -Inf // ux n by 1 list of upper bounds [] implies Inf // params struct of additional parameters (see below) // Outputs: // Z n by 1 list of solution values // Returns true on success, false on error // // Benchmark: For a harmonic solve on a mesh with 325K facets, matlab 2.2 // secs, igl/min_quad_with_fixed.h 7.1 secs //
// Input parameters for active_set: // inactive_threshold Threshold on Lagrange multiplier values to determine // solution_diff_threshold Threshold on the squared norm of the difference |
adjacency_list.h | // Constructs the graph adjacency list of a given mesh (V,F) // Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // F #F by dim list of mesh faces (must be triangles) // sorted flag that indicates if the list should be sorted counter-clockwise // Outputs: // A vector<vector<T> > containing at row i the adjacent vertices of vertex i // // Example: // // Mesh in (V,F) // vector<vector<double> > A; // adjacency_list(F,A); // // See also: edges, cotmatrix, diag
|
adjacency_matrix.h | // Constructs the graph adjacency matrix of a given mesh (V,F) // Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // F #F by dim list of mesh simplices // Outputs: // A max(F) by max(F) cotangent matrix, each row i corresponding to V(i,:) // // Example: // // Mesh in (V,F) // Eigen::SparseMatrix<double> A; // adjacency_matrix(F,A); // // sum each row // SparseVector<double> Asum; // sum(A,1,Asum); // // Convert row sums into diagonal of sparse matrix // SparseMatrix<double> Adiag; // diag(Asum,Adiag); // // Build uniform laplacian // SparseMatrix<double> U; // U = A-Adiag; // // See also: edges, cotmatrix, diag
|
all_edges.h | // ALL_EDGES Determines all "directed edges" of a given set of simplices // // Inputs: // F #F by simplex_size list of "faces" // Outputs: // E #E by simplex_size-1 list of edges // // Note: this is not the same as igl::edges because this includes every // directed edge including repeats (meaning interior edges on a surface will // show up once for each direction and non-manifold edges may appear more than // once for each direction).
|
all_pairs_distances.h | // ALL_PAIRS_DISTANCES compute distances between each point i in V and point j // in U // // D = all_pairs_distances(V,U) // // Templates: // Mat matrix class like MatrixXd // Inputs: // V #V by dim list of points // U #U by dim list of points // squared whether to return squared distances // Outputs: // D #V by #U matrix of distances, where D(i,j) gives the distance or // squareed distance between V(i,:) and U(j,:) //
|
axis_angle_to_quat.h | // 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 // Inputs: // axis 3d vector // angle scalar // Outputs: // quaternion
|
barycenter.h | // BARYCENTER // // B = barycenter(V,F) // // Compute the barycenter of every triangle // // Inputs: // V #V x dim matrix of vertex coordinates // F #F x simplex_size matrix of indices of triangle corners // Output: // BC a #F x dim matrix of 3d vertices
|
basename.h | // Function like PHP's basename // Input: // path string containing input path // Returns string containing basename (see php's basename) // // See also: dirname, pathinfo
|
boundary_conditions.h |
// Compute boundary conditions for automatic weights computation // Inputs: // V #V by dim list of domain vertices // Ele #Ele by simplex-size list of simplex indices // C #C by dim list of handle positions // P #P by 1 list of point handle indices into C // BE #BE by 2 list of bone edge indices into C // CE #CE by 2 list of cage edge indices into *P*, unused // Outputs: // b #b list of boundary indices (indices into V of vertices which have // known, fixed values) // 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] // Returns true if boundary conditions make sense
|
boundary_faces.h | // BOUNDARY_FACES Determine boundary faces (edges) of tetrahedra (triangles) // stored in T // // Templates: // IntegerT integer-value: e.g. int // IntegerF integer-value: e.g. int // Input: // T tetrahedron (triangle) index list, m by 4 (3), where m is the number of tetrahedra // Output: // F list of boundary faces, n by 3 (2), where n is the number of boundary faces // //
// Templates: // DerivedT integer-value: i.e. from MatrixXi // DerivedF integer-value: i.e. from MatrixXi
// Same as above but returns F
|
bounding_box_diagonal.h | // Compute the length of the diagonal of a given meshes axis-aligned bounding // box // // Inputs: // V #V by 3 list of vertex positions // F #F by 3 list of triangle indices into V // Returns length of bounding box diagonal
|
canonical_quaternions.h |
// Float versions // Identity // X points right, Y points *in* and Z points up
// Double versions // Identity // X points right, Y points *in* and Z points up
// NOTE: I want to rather be able to return a Q_type[][] but C++ is not // making it easy. So instead I've written a per-element accessor // Return element [i][j] of the corresponding CANONICAL_VIEW_QUAT_* of the // given templated type // Inputs: // i index of quaternion // j index of coordinate in quaternion i // Returns values of CANONICAL_VIEW_QUAT_*[i][j]
// Template specializations for float and double
|
cat.h | // If you're using Dense matrices you might be better off using the << operator // This is an attempt to act like matlab's cat function. // Perform concatenation of a two matrices along a single dimension // If dim == 1, then C = [A;B]. If dim == 2 then C = [A B] // // Template: // 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 ouput matrix (e.g. MatrixXd) needs to support // resize // Inputs: // A first input matrix // B second input matrix // dim dimension along which to concatenate, 0 or 1 // Outputs: // C output matrix //
// Wrapper that returns C
// Note: Maybe we can autogenerate a bunch of overloads D = cat(int,A,B,C), // E = cat(int,A,B,C,D), etc. // Concatenate a "matrix" of blocks // C = [A0;A1;A2;...;An] where Ai = [A[i][0] A[i][1] ... A[i][m]]; // // Inputs: // A a matrix (vector of row vectors) // Output: // C
|
cocoa_key_to_anttweakbar_key.h | // Convert an unsigned char (like that from Cocoa apps) to AntTweakBar key // code. // See also: TranslateKey() in TwMgr.cpp in AntTweakBar source // Inputs: // key unsigned char key from keyboard // Returns int of new key code
|
colon.h | // Note: // This should be potentially replaced with eigen's LinSpaced() function // Colon operator like matlab's colon operator. Enumerats values between low // and hi with step step. // Templates: // 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 // Inputs: // low starting value if step is valid then this is *always* the first // element of I // 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. // 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 // Output: // I list of values from low to hi with step size step
// Same as above but step == (T)1
// Return output rather than set in reference
|
concat.h | // Concatenates dense matrices // Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // A first matrix // B second matrix // horiz if true, matrices are concatenated horizontally // Output: // O if horiz = false return [A;B] else [A,B]
|
cotangent.h | // COTANGENT compute the cotangents of each angle in mesh (V,F) // // Templates: // MatV vertex position matrix, e.g. Eigen::MatrixXd // MatF face index matrix, e.g. Eigen::MatrixXd // MatC cotangent weights matrix, e.g. Eigen::MatrixXd // Inputs: // V #V by dim list of rest domain positions // for triangles, columns correspond to edges 23,31,12 // for tets, columns correspond to edges 23,31,12,41,42,43
|
cotmatrix.h | // Constructs the cotangent stiffness matrix (discrete laplacian) for a given // mesh (V,F). // // Templates: // 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) // Inputs: // V #V by dim list of mesh vertex positions // F #F by simplex_size list of mesh faces (must be triangles) // Outputs: // L #V by #V cotangent matrix, each row i corresponding to V(i,:) // // See also: adjacency_matrix // // Known bugs: off by 1e-16 on regular grid. I think its a problem of // arithmetic order in cotangent.h: C(i,e) = (arithmetic)/dblA/4
|
create_index_vbo.h |
// Inputs: // F #F by 3 eigen Matrix of face (triangle) indices // Outputs: // F_vbo_id buffer id for face indices //
|
create_mesh_vbo.h |
// Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // Outputs: // V_vbo_id buffer id for vertex positions // F_vbo_id buffer id for face indices // // NOTE: when using glDrawElements VBOs for V and F using MatrixXd and // MatrixXi will have types GL_DOUBLE and GL_UNSIGNED_INT respectively //
// Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // N #V by 3 eigen Matrix of mesh vertex 3D normals // Outputs: // V_vbo_id buffer id for vertex positions // F_vbo_id buffer id for face indices // N_vbo_id buffer id for vertex positions
|
create_shader_program.h | // Create a shader program with a vertex and fragments shader loading from // source strings and vertex attributes assigned from a map before linking the // shaders to the program, making it ready to use with glUseProgram(id) // Inputs: // vert_source string containing source code of vertex shader // frag_source string containing source code of fragment shader // attrib map containing table of vertex attribute strings add their // correspondingly ids (generated previously using glBindAttribLocation) // Outputs: // id index id of created shader, set to 0 on error // Returns true on success, false on error // // Note: Caller is responsible for making sure that current value of id is not // leaking a shader (since it will be overwritten) // // See also: destroy_shader_program
|
create_vector_vbo.h |
// Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // V m by n eigen Matrix of type T values // Outputs: // V_vbo_id buffer id for vectors //
|
cross.h | // Computes out = cross(a,b) // Inputs: // a left 3d vector // b right 3d vector // Outputs: // out result 3d vector
|
destroy_shader_program.h | // Properly destroy a shader program. Detach and delete each of its shaders // and delete it // Inputs: // id index id of created shader, set to 0 on error // Returns true on success, false on error // // Note: caller is responsible for making sure he doesn't foolishly continue // to use id as if it still contains a program // // See also: create_shader_program
|
diag.h | // Either extracts the main diagonal of a matrix as a vector OR converts a // vector into a matrix with vector along the main diagonal. Like matlab's // diag function // Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // X an m by n sparse matrix // Outputs: // V a min(m,n) sparse vector
// Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // V a m sparse vector // Outputs: // X a m by m sparse matrix
|
dirname.h | // Function like PHP's dirname // Input: // path string containing input path // Returns string containing dirname (see php's dirname) // // See also: basename, pathinfo
|
dot.h | // Computes out = dot(a,b) // Inputs: // a left 3d vector // b right 3d vector // Returns scalar dot product
|
doublearea.h | // DOUBLEAREA computes twice the area for each input triangle // // Templates: // 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) // Inputs: // V #V by dim list of mesh vertex positions // F #F by simplex_size list of mesh faces (must be triangles) // Outputs: // dblA #F list of triangle double areas // // Note: THESE ARE *NOT* SIGNED. In matlab doublearea is signed in 2d
// Same as above but use instrinsic edge lengths rather than (V,F) mesh // Templates: // 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) // Inputs: // l #F by dim list of edge lengths using // for triangles, columns correspond to edges 23,31,12 // Outputs: // dblA #F list of triangle double areas
|
draw_beach_ball.h | // Draw a beach ball icon/glyph (from AntTweakBar) at the current origin // according to the current orientation: ball has radius 0.75 and axis have // length 1.15
|
draw_mesh.h | // Draw OpenGL commands needed to display a mesh with normals // // Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // N #V by 3 eigen Matrix of mesh vertex 3D normals
// Draw OpenGL commands needed to display a mesh with normals and per-vertex // colors // // Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // N #V by 3 eigen Matrix of mesh vertex 3D normals // C #V by 3 eigen Matrix of mesh vertex RGB colors
// Draw OpenGL commands needed to display a mesh with normals, per-vertex // colors and LBS weights // // Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // N #V by 3 eigen Matrix of mesh vertex 3D normals // C #V by 3 eigen Matrix of mesh vertex RGB colors // TC #V by 3 eigen Matrix of mesh vertex UC coorindates between 0 and 1 // W #V by #H eigen Matrix of per mesh vertex, per handle weights // W_index Specifies the index of the "weight" vertex attribute: see // glBindAttribLocation, if W_index is 0 then weights are ignored // WI #V by #H eigen Matrix of per mesh vertex, per handle weight ids // WI_index Specifies the index of the "weight" vertex attribute: see // glBindAttribLocation, if WI_index is 0 then weight indices are ignored
// Draw OpenGL commands needed to display a mesh with normals, per-vertex // colors and LBS weights // // Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // N #V by 3 eigen Matrix of mesh vertex 3D normals // NF #F by 3 eigen Matrix of face (triangle) normal indices, <0 means no // normal // C #V by 3 eigen Matrix of mesh vertex RGB colors // TC #V by 3 eigen Matrix of mesh vertex UC coorindates between 0 and 1 // TF #F by 3 eigen Matrix of face (triangle) texture indices, <0 means no // texture // W #V by #H eigen Matrix of per mesh vertex, per handle weights // W_index Specifies the index of the "weight" vertex attribute: see // glBindAttribLocation, if W_index is 0 then weights are ignored // WI #V by #H eigen Matrix of per mesh vertex, per handle weight ids // WI_index Specifies the index of the "weight" vertex attribute: see // glBindAttribLocation, if WI_index is 0 then weight indices are ignored
|
draw_point.h |
|
edges.h | // Constructs a list of unique edges represented in a given mesh (V,F) // Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // F #F by 3 list of mesh faces (must be triangles) // or // T #T x 4 matrix of indices of tet corners // Outputs: // E #E by 2 list of edges in no particular order // // See also: adjacency_matrix
|
edgetopology.h | // Initialize Edges and their topological relations // Output: // EV : #Ex2, Stores the edge description as pair of indices to vertices // FE : #Fx3, Stores the Triangle-Edge relation // EF : #Ex2: Stores the Edge-Triangle relation
|
edge_lengths.h | // Constructs a list of lengths of edges opposite each index in a face // (triangle) list // Templates: // 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 // Inputs: // V eigen matrix #V by 3 // F #F by 3 list of mesh faces (must be triangles) // Outputs: // E #E by 2 list of edges in no particular order // // See also: adjacency_matrix
|
example_fun.h | // This is an example of a function, it takes a templated parameter and // shovels it into cout // // Templates: // T type that supports // Input: // input some input of a Printable type // Returns true for the sake of returning something
|
faces_first.h | // FACES_FIRST 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 // // [RV,RT,RF,IM] = faces_first(V,T,F); // // Templates: // MatV matrix for vertex positions, e.g. MatrixXd // MatF matrix for face indices, e.g. MatrixXi // VecI vector for index map, e.g. VectorXi // Input: // V # vertices by 3 vertex positions // F # faces by 3 list of face indices // Output: // 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 // RF # faces by 3 list of face indices, reindexed to use RV // IM #V by 1 list of indices such that: RF = IM(F) and RT = IM(T) // and RV(IM,:) = V // // // Example: // // Tet mesh in (V,T,F) // faces_first(V,F,IM); // T = T.unaryExpr(bind1st(mem_fun( static_cast<VectorXi::Scalar& // (VectorXi::*)(VectorXi::Index)>(&VectorXi::operator())), // &IM)).eval();
// Virtual "in place" wrapper
|
face_occurences.h | // Count the occruances of each face (row) in a list of face indices // (irrespecitive of order) // Inputs: // F #F by simplex-size // Outputs // C #F list of counts // Known bug: triangles/tets only (where ignoring order still gives simplex)
|
file_contents_as_string.h | // Read a files contents as plain text into a given string // Inputs: // file_name path to file to be read // Outputs: // content output string containing contents of the given file // Returns true on succes, false on error
|
file_exists.h | // Check if a file or directory exists like PHP's file_exists function: // http://php.net/manual/en/function.file-exists.php // Input: // filename path to file // Returns true if file exists and is readable and false if file doesn't // exist or *is not readable*
|
find.h | // Find the non-zero entries and there respective indices in a sparse matrix. // Like matlab's [I,J,V] = find(X) // // Templates: // T should be a eigen sparse matrix primitive type like int or double // Input: // X m by n matrix whose entries are to be found // Outputs: // I nnz vector of row indices of non zeros entries in X // J nnz vector of column indices of non zeros entries in X // V nnz vector of type T non-zeros entries in X //
// Find the non-zero entries and there respective indices in a sparse vector. // Similar to matlab's [I,J,V] = find(X), but instead of [I,J] being // subscripts into X, since X is a vector we just return I, a list of indices // into X // // Templates: // T should be a eigen sparse matrix primitive type like int or double // Input: // X vector whose entries are to be found // Outputs: // I nnz vector of indices of non zeros entries in X // V nnz vector of type T non-zeros entries in X
|
full.h | // This is totally unnecessary. You can just call MatrixXd B = MatrixXd(A); // // Convert a sparsematrix into a full one // // Templates: // T should be a eigen sparse matrix primitive type like int or double // Input: // A m by n sparse matrix // Output: // B m by n dense/full matrix
// If already full then this will just be a copy by assignment
|
get_seconds.h | // Return the current time in seconds since program start
|
get_seconds_hires.h | // Return the current time in seconds using performance counters
|
gl_type_size.h | // Return the number of bytes for a given OpenGL type // Inputs: // type enum value of opengl type // Returns size in bytes of type
|
grad.h | // GRAD // G = grad(V,F,X) // // Compute the numerical gradient at every face of a triangle mesh. // // Inputs: // V #vertices by 3 list of mesh vertex positions // F #faces by 3 list of mesh face indices // X # vertices list of scalar function values // Outputs: // G #faces by 3 list of gradient values // // Gradient of a scalar function defined on piecewise linear elements (mesh) // is constant on each triangle 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 //
|
gradMat.h | // GRAD
// G = grad(V,F) // // Compute the numerical gradient operator // // Inputs: // V #vertices by 3 list of mesh vertex positions // F #faces by 3 list of mesh face indices // Outputs: // G #faces*dim by #V Gradient operator //
// Gradient of a scalar function defined on piecewise linear elements (mesh) // is constant on each triangle 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 //
|
harwell_boeing.h | // 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 // Templates: // Scalar type of sparse matrix like double // Inputs: // A sparse m by n matrix // Outputs: // num_rows number of rows // V non-zero values, row indices running fastest, size(V) = nnz // R row indices corresponding to vals, size(R) = nnz // C index in vals of first entry in each column, size(C) = num_cols+1 // // All indices and pointers are 0-based
|
hsv_to_rgb.h | // Convert RGB to HSV // // Inputs: // h hue value (degrees: [0,360]) // s saturation value ([0,1]) // v value value ([0,1]) // Outputs: // r red value ([0,1]) // g green value ([0,1]) // b blue value ([0,1])
|
invert_diag.h | // Invert the diagonal entries of a matrix (if the matrix is a diagonal // matrix then this amounts to inverting the matrix) // Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // X an m by n sparse matrix // Outputs: // Y an m by n sparse matrix
|
is_border_vertex.h | // Determine vertices on open boundary of a (manifold) mesh with triangle // faces F // // Inputs: // V #V by dim list of vertex positions // F #F by 3 list of triangle indices // Returns vector of indices of vertices on open boundary of F // // Known Bugs: does not depend on V //
|
is_dir.h | // Act like php's is_dir function // http://php.net/manual/en/function.is-dir.php // Tells whether the given filename is a directory. // Input: // filename Path to the file. If filename is a relative filename, it will // be checked relative to the current working directory. // Returns TRUE if the filename exists and is a directory, FALSE // otherwise.
|
is_file.h | // Act like php's is_file function // http://php.net/manual/en/function.is-file.php // Tells whether the given filename is a regular file. // Input: // filename Path to the file. If filename is a relative filename, it will // be checked relative to the current working directory. // Returns TRUE if the filename exists and is a regular file, FALSE // otherwise.
|
is_manifold.h | // check if the mesh is edge-manifold // // Not clear whether this returns true or false if the mesh is disc topology // // Known Bugs: // Does not check for non-manifold vertices
|
is_readable.h | // Check if a file is reabable like PHP's is_readable function: // http://www.php.net/manual/en/function.is-readable.php // Input: // filename path to file // Returns true if file exists and is readable and false if file doesn't // exist or *is not readable* // // Note: Windows version will not check user or group ids
|
is_sparse.h | // Determine if a matrix A is sparse // // Template: // T,DerivedA defines scalar type // Inputs: // A matrix in question // Returns true if A is represented with a sparse matrix
|
is_symmetric.h | // Returns true if the given matrix is symmetric // Inputs: // A m by m matrix // Returns true if the matrix is square and symmetric
// Inputs: // epsilon threshold on L1 difference between A and A'
|
is_writable.h | // Check if a file exists *and* is writable like PHP's is_writable function: // http://www.php.net/manual/en/function.is-writable.php // Input: // filename path to file // Returns true if file exists and is writable and false if file doesn't // exist or *is not writable* // // Note: Windows version will not test group and user id
|
jet.h | // JET like MATLAB's jet // // Inputs: // m number of colors // Outputs: // J m by list of RGB colors between 0 and 1 // //#ifndef IGL_NO_EIGEN // void jet(const int m, Eigen::MatrixXd & J); //#endif // Wrapper for directly computing [r,g,b] values for a given factor f between // 0 and 1 // // Inputs: // f factor determining color value as if 0 was min and 1 was max // Outputs: // r red value // g green value // b blue value
|
launch_medit.h | // Writes the tetmesh in (V,T,F) to a temporary file, opens it with medit // (forking with a system call) and returns // // // Templates: // DerivedV real-value: i.e. from MatrixXd // DerivedT integer-value: i.e. from MatrixXi // DerivedF integer-value: i.e. from MatrixXi // Inputs: // V double matrix of vertex positions #V by 3 // T #T list of tet indices into vertex positions // F #F list of face indices into vertex positions // wait whether to wait for medit process to finish before returning // Returns returned value of system call (probably not useful if wait=false // because of the fork)
|
limit_faces.h | // LIMIT_FACES limit given faces F to those which contain (only) indices found // in L. // // [LF] = limit_faces(F,L,exclusive); // [LF,in] = limit_faces(F,L,exclusive); // // Templates: // MatF matrix type of faces, matrixXi // VecL matrix type of vertex indices, VectorXi // Inputs: // F #F by 3 list of face indices // L #L by 1 list of allowed indices // exclusive flag specifying whether a face is included only if all its // indices are in L, default is false // Outputs: // LF #LF by 3 list of remaining faces after limiting // in #F list of whether given face was included //
|
list_to_matrix.h | // Convert a list (std::vector) of row vectors of the same length to a matrix // Template: // T type that can be safely cast to type in Mat via '=' // Mat Matrix type, must implement: // .resize(m,n) // .row(i) = Row // Inputs: // V a m-long list of vectors of size n // Outputs: // M an m by n matrix // Returns true on success, false on errors
// Vector wrapper
|
load_shader.h | // Creates and compiles a shader from a given string // Inputs: // src string containing GLSL shader code // type GLSL type of shader, one of: // GL_VERTEX_SHADER // GL_FRAGMENT_SHADER // GL_GEOMETRY_SHADER // Returns index id of the newly created shader, 0 on error
|
lu_lagrange.h | // KNOWN BUGS: This does not seem to be correct for non-empty C // // LU_LAGRANGE Compute a LU decomposition for a special type of // matrix Q that is symmetric but not positive-definite: // Q = [A'*A C // C' 0]; // where A'*A, or ATA, is given as a symmetric positive definite matrix and C // has full column-rank(?) // // [J] = lu_lagrange(ATA,C) // // Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // ATA n by n square, symmetric, positive-definite system matrix, usually // the quadratic coefficients corresponding to the original unknowns in a // system // C n by m rectangular matrix corresponding the quadratic coefficients of // the original unknowns times the lagrange multipliers enforcing linear // equality constraints // Outputs: // L lower triangular matrix such that Q = L*U // U upper triangular matrix such that Q = L*U // Returns true on success, false on error // // Note: C should *not* have any empty columns. Typically C is the slice of // the linear constraints matrix Aeq concerning the unknown variables of a // quadratic optimization. Generally constraints may deal with unknowns as // well as knowns. Each linear constraint corresponds to a column of Aeq. As // long as each constraint concerns at least one unknown then the // corresponding column in C will have at least one non zero entry. If a // constraint concerns *no* unknowns, you should double check that this is a // valid constraint. How can you constrain known values to each other? This // is either a contradiction to the knowns' values or redundent. In either // case, it's not this functions responsiblilty to handle empty constraints // so you will get an error. //
|
marching_cubes.h | // marching_cubes( values, points, x_res, y_res, z_res, vertices, faces ) // // performs marching cubes reconstruction on the grid defined by values, and // points, and generates vertices and faces // // Input: // xres, yres, zres resolutions of the grid in x,y,z dimensions // values #number_of_grid_points x 1 array -- the scalar values of an // implicit function defined on the grid points (<0 in the inside of the // surface, 0 on the border, >0 outside) // points #number_of_grid_points x 3 array -- 3-D positions of the grid // points, ordered in x,y,z order: // points[index] = the point at (x,y,z) where : // x = (index % (xres -1), // y = (index / (xres-1)) %(yres-1), // z = index / (xres -1) / (yres -1) ). // where x,y,z index x, y, z dimensions // i.e. index = x + y*xres + z*xres*yres // Output: // vertices #V by 3 list of mesh vertex positions // faces #F by 3 list of mesh triangle indices //
|
massmatrix.h |
// Constructs the mass (area) matrix for a given mesh (V,F). // // Templates: // 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) // Inputs: // V #V by dim list of mesh vertex positions // F #F by simplex_size list of mesh faces (must be triangles) // type one of the following ints: // IGL_MASSMATRIX_BARYCENTRIC barycentric // Outputs: // M #V by #V mass matrix // // See also: adjacency_matrix //
|
matlab_format.h | // This is a routine to print a matrix using format suitable for pasting into // the matlab IDE // // Templates: // DerivedM e.g. derived from MatrixXd // Input: // input some matrix to be formated // name name of matrix // Returns Formated matrix // // Example: // // M := [1 2 3;4 5 6]; // cout<<matlab_format(M)<<endl; // // Prints: // // [ // // 1 2 3 // // 4 5 6 // // ]; // cout<<matlab_format(M,"M")<<endl; // // Prints: // // M = [ // // 1 2 3 // // 4 5 6 // // ];
// Same but for sparse matrices. Print IJV format into an auxillary variable // and then print a call to sparse which will construct the sparse matrix // Example: // // S := [0 2 3;4 5 0]; // cout<<matlab_format(S,"S")<<endl; // // Prints: // // SIJV = [ // // 2 1 4 // // 1 2 2 // // 2 2 5 // // 1 3 3 // // ]; // // S = sparse(SIJV(:,1),SIJV(:,2),SIJV(:,3)); //
// Return just IOFormat // // Example: // // M := [1 2 3;4 5 6]; // cout<<M.format(matlab_format())<<endl; // // Prints: // // [ // // 1 2 3 // // 4 5 6 // // ];
|
matrix_to_list.h | // Convert a matrix to a list (std::vector) of row vectors of the same size // Template: // Mat Matrix type, must implement: // .resize(m,n) // .row(i) = Row // T type that can be safely cast to type in Mat via '=' // Inputs: // V a m-long list of vectors of size n // Outputs: // M an m by n matrix // // See also: list_to_matrix
// For vector input
// Return wrapper
|
mat_max.h | // Ideally this becomes a super overloaded function supporting everything // that matlab's max supports // Max function for matrices to act like matlab's max function. Specifically // like [Y,I] = max(X,[],dim); // // Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // X m by n matrix // dim dimension along which to take max // Outputs: // Y n-long sparse vector (if dim == 1) // or // Y m-long sparse vector (if dim == 2) // I vector the same size as Y containing the indices along dim of maximum // entries
|
mat_min.h | // Ideally this becomes a super overloaded function supporting everything // that matlab's min supports // Min function for matrices to act like matlab's min function. Specifically // like [Y,I] = min(X,[],dim); // // Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // X m by n matrix // dim dimension along which to take min // Outputs: // Y n-long sparse vector (if dim == 1) // or // Y m-long sparse vector (if dim == 2) // I vector the same size as Y containing the indices along dim of minimum // entries // // See also: mat_max
// Use Y = X.colwise().minCoeff() instead //// In-line wrapper //template <typename T> //IGL_INLINE Eigen::Matrix<T,Eigen::Dynamic,1> mat_min( // const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> & X, // const int dim); |
mat_to_quat.h | // Convert a OpenGL (rotation) matrix to a quaternion // // Input: // m 16-element opengl rotation matrix // Output: // q 4-element quaternion (not normalized)
// TODO: implement for mat3 etc. |
max_size.h | // Determine max size of lists in a vector // Template: // T some list type object that implements .size() // Inputs: // V vector of list types T // Returns max .size() found in V, returns -1 if V is empty
|
median.h | // Compute the median of an eigen vector // // Inputs: // V #V list of unsorted values // Outputs: // m median of those values // Returns true on success, false on failure
|
min_quad_dense.h | // MIN_QUAD_WITH_FIXED Minimize quadratic energy Z'*A*Z + Z'*B + C // subject to linear constraints Aeq*Z = Beq // // Templates: // T should be a eigen matrix primitive type like float or double // Inputs: // A n by n matrix of quadratic coefficients // B n by 1 column of linear coefficients // Aeq m by n list of linear equality constraint coefficients // Beq m by 1 list of linear equality constraint constant values // use_lu_decomposition use lu rather than SVD // Outputs: // S n by (n + m) "solve" matrix, such that S*[B', Beq'] is a solution // Returns true on success, false on error
|
min_quad_with_fixed.h |
// Known Bugs: rows of Aeq **must** be linearly independent. Should be using // QR decomposition otherwise: // http://www.okstate.edu/sas/v8/sashtml/ormp/chap5/sect32.htm // // MIN_QUAD_WITH_FIXED Minimize quadratic energy Z'*A*Z + Z'*B + C with // constraints that Z(known) = Y, optionally also subject to the constraints // Aeq*Z = Beq // // Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // A n by n matrix of quadratic coefficients // known list of indices to known rows in Z // Y list of fixed values corresponding to known rows in Z // Aeq m by n list of linear equality constraint coefficients // pd flag specifying whether A(unknown,unknown) is positive definite // Outputs: // data factorization struct with all necessary information to solve // using min_quad_with_fixed_solve // Returns true on success, false on error // // Benchmark: For a harmonic solve on a mesh with 325K facets, matlab 2.2 // secs, igl/min_quad_with_fixed.h 7.1 secs //
// Solves a system previously factored using min_quad_with_fixed_precompute // // Template: // 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) // Inputs: // data factorization struct with all necessary precomputation to solve // B n by 1 column of linear coefficients // Beq m by 1 list of linear equality constraint constant values // Outputs: // Z n by cols solution // sol #unknowns+#lagrange by cols solution to linear system // Returns true on success, false on error
// Wrapper without sol
// Size of original system: number of unknowns + number of knowns
// Whether A(unknown,unknown) is positive definite
// Whether A(unknown,unknown) is symmetric
// Indices of known variables
// Indices of unknown variables
// Indices of lagrange variables
// Indices of unknown variable followed by Indices of lagrange variables
// Matrix multiplied against Y when constructing right hand side
// Solvers
// Debug
|
min_size.h | // Determine min size of lists in a vector // Template: // T some list type object that implements .size() // Inputs: // V vector of list types T // Returns min .size() found in V, returns -1 if V is empty
|
mode.h | // Takes mode of coefficients in a matrix along a given dension // // Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // X m by n original matrix // d dension along which to take mode, m or n // Outputs: // 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
|
moveFV.h | // moveFV // Move a scalar field defined on faces to vertices by averaging // // Input: // V,F: mesh // S: scalar field defined on faces, Fx1 // // Output: // SV: scalar field defined on vertices
|
mvc.h | // MVC - MEAN VALUE COORDINATES // // mvc(V,C,W) // // Inputs: // V #V x dim list of vertex positions (dim = 2 or dim = 3) // C #C x dim list of polygon vertex positions in counter-clockwise order // (dim = 2 or dim = 3) // // Outputs: // W weights, #V by #C matrix of weights // // Known Bugs: implementation is listed as "Broken"
|
normalize_quat.h | // 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 // Inputs: // q input quaternion // Outputs: // out result of normalization, allowed to be same as q // Returns true on success, false if len(q) < EPS
|
normalize_row_lengths.h | // Normalize the rows in A so that their lengths are each 1 and place the new // entries in B // Inputs: // A #rows by k input matrix // Outputs: // B #rows by k input matrix, can be the same as A
|
normalize_row_sums.h | // Normalize the rows in A so that their sums are each 1 and place the new // entries in B // Inputs: // A #rows by k input matrix // Outputs: // B #rows by k input matrix, can be the same as A
|
on_boundary.h | // BOUNDARY_FACES Determine boundary faces of tetrahedra stored in T // // Templates: // IntegerT integer-value: i.e. int // IntegerF integer-value: i.e. int // Input: // T tetrahedron index list, m by 4, where m is the number of tetrahedra // Output: // I m long list of bools whether tet is on boundary // C m by 4 list of bools whether opposite face is on boundary //
// Templates: // DerivedT integer-value: i.e. from MatrixXi // DerivedI bool-value: i.e. from MatrixXi // DerivedC bool-value: i.e. from MatrixXi
|
orth.h | // ORTH Orthogonalization. // 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 // // Inputs: // A m by n matrix // Outputs: // Q m by n matrix with orthonormal columns spanning same column space as // A // // Known bugs: Implementation listed as "Broken"
|
pathinfo.h | //// Decided not to use these //const int PATHINFO_DIRNAME 01 //const int PATHINFO_BASENAME 02 //const int PATHINFO_EXTENSION 04 //const int PATHINFO_FILENAME 08 // Function like PHP's pathinfo // returns information about path // Input: // path string containing input path // Outputs: // dirname string containing dirname (see dirname.h) // basename string containing basename (see basename.h) // extension string containing extension (characters after last '.') // filename string containing extension (characters of basename before last // '.') // // See also: basename, dirname
|
per_corner_normals.h | // Compute vertex normals via vertex position list, face list // Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // corner_threshold threshold in degrees on sharp angles // Output: // CN #F*3 by 3 eigen Matrix of mesh vertex 3D normals, where the normal // for corner F(i,j) is at CN(i*3+j,:)
// Other Inputs: // FN #F by 3 eigen Matrix of face normals
// Other Inputs: // VF map from vertices to list of incident faces
|
per_face_normals.h | // Compute face normals via vertex position list, face list // Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // Output: // N #F by 3 eigen Matrix of mesh face (triangle) 3D normals
|
per_vertex_attribute_smoothing.h | // Smooth vertex attributes using uniform Laplacian // Inputs: // Ain #V by #A eigen Matrix of mesh vertex attributes (each vertex has #A attributes) // F #F by 3 eigne Matrix of face (triangle) indices // Output: // Aout #V by #A eigen Matrix of mesh vertex attributes
|
per_vertex_normals.h | // Compute vertex normals via vertex position list, face list // Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigne Matrix of face (triangle) indices // Output: // N #V by 3 eigen Matrix of mesh vertex 3D normals
|
plot_vector.h | // Not clear what these are supposed to be doing. Currently they print // vectors to standard error...
|
point_in_circle.h | // Determine if 2d point is in a circle // Inputs: // qx x-coordinate of query point // qy y-coordinate of query point // cx x-coordinate of circle center // cy y-coordinate of circle center // r radius of circle // Returns true if query point is in circle, false otherwise
|
print_gl_get.h | // Prints the value of pname found by issuing glGet*(pname,*) // Inputs: // pname enum key to gl parameter
|
print_ijv.h | // 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 // // Templates: // T should be a eigen sparse matrix primitive type like int or double // Input: // X m by n matrix whose entries are to be sorted
|
print_program_info_log.h | // Inputs: // obj OpenGL index of program to print info log about
|
print_shader_info_log.h | // Inputs: // obj OpenGL index of shader to print info log about
|
project.h | // Wrapper for gluProject that uses the current GL_MODELVIEW_MATRIX, // GL_PROJECTION_MATRIX, and GL_VIEWPORT // Inputs: // obj* 3D objects' x, y, and z coordinates respectively // Outputs: // win* pointers to screen space x, y, and z coordinates respectively // Returns return value of gluProject call
|
project_to_line.h | // PROJECT_TO_LINES project points onto vectors, that is find the paramter // 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 // // [T,sqrD] = project_to_lines(P,S,D) // // Templates: // MatP matrix template for P, implementing .cols(), .rows() // MatL matrix template for S and D, implementing .size(), .array(), .sum() // Matt matrix template for t // MatsqrD matrix template for sqrD // Inputs: // P #P by dim list of points to be projected // S size dim start position of line vector // D size dim destination position of line vector // Outputs: // T #P by 1 list of parameters // sqrD #P by 1 list of squared distances // // Copyright 2011, Alec Jacobson (jacobson@inf.ethz.ch) //
// Same as above but for a single query point
// Same as above but for a single query point
|
quat_conjugate.h | // 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 // Inputs: // q1 input quaternion // Outputs: // out result of conjugation, allowed to be same as input
|
quat_mult.h | // 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 // Inputs: // q1 left quaternion // q2 right quaternion // Outputs: // out result of multiplication
|
quat_to_axis_angle.h | // 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 // Inputs: // q quaternion // Outputs: // axis 3d vector // angle scalar in radians
// Wrapper with angle in degrees
|
quat_to_mat.h | // 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 // Input: // quat pointer to four elements of quaternion (x,y,z,w) // Output: // mat pointer to 16 elements of matrix
|
read.h | // read mesh from an ascii file with automatic detection of file format. supported: obj, off) // Templates: // 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) // Inputs: // Inputs: // str path to .obj/.off file // Outputs: // V eigen double matrix #V by 3 // F eigen int matrix #F by 3
|
readDMAT.h | // Read a matrix from an ascii dmat file // // Inputs: // file_name path to .dmat file // Outputs: // W eigen matrix containing read-in coefficients // Returns true on success, false on error //
// Wrapper for vector of vectors
|
readMESH.h | // load a tetrahedral volume mesh from a .mesh file // // Templates: // 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) // Input: // mesh_file_name path of .mesh file // Outputs: // V double matrix of vertex positions #V by 3 // T #T list of tet indices into vertex positions // F #F list of face indices into vertex positions // // Known bugs: Holes and regions are not supported
// Input: // mesh_file_name path of .mesh file // Outputs: // V eigen double matrix #V by 3 // T eigen int matrix #T by 4 // F eigen int matrix #F by 3
|
readNODE.h | // load a list of points from a .node file // // Templates: // 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) // Input: // node_file_name path of .node file // Outputs: // V double matrix of vertex positions #V by dim // I list of indices (first tells whether 0 or 1 indexed)
// Input: // node_file_name path of .node file // Outputs: // V eigen double matrix #V by dim
|
readOBJ.h | // 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 // // Templates: // 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) // Inputs: // str path to .obj file // Outputs: // V double matrix of vertex positions #V by 3 // F #F list of face indices into vertex positions // TC double matrix of texture coordinats #TC by 2 // FTC #F list of face indices into vertex texture coordinates // N double matrix of corner normals #N by 3 // FN #F list of face indices into vertex normals // Returns true on success, false on errors
//! Read a mesh from an ascii obj file // Inputs: // str path to .obj file // Outputs: // V eigen matrix #V by 3 // F eigen matrix #F by 3 // // KNOWN BUG: This only knows how to read *triangle* meshes. It will probably // crash or give garbage on anything else. // // KNOWN BUG: This only knows how to face lines without normal or texture // indices. It will probably crash or give garbage on anything else. // // KNOWN BUG: The order of the attributes is different than the vector // version above
//! Read a poly mesh from an ascii obj file // Inputs: // str path to .obj file // Outputs: // V eigen matrix #V by 3 // POLYF vector of vector with face indices // // // KNOWN BUG: This only knows how to face lines without normal or texture // indices. It will probably crash or give garbage on anything else. // // KNOWN BUG: The order of the attributes is different than the vector // version above
//! Read a mesh from an ascii obj file // Inputs: // str path to .obj file // Outputs: // V eigen matrix #V by 3 // F eigen matrix #F by 3 // // KNOWN BUG: This only knows how to read *triangle* meshes. It will probably // crash or give garbage on anything else. // // KNOWN BUG: This only knows how to face lines without normal or texture // indices. It will probably crash or give garbage on anything else.
|
readOFF.h |
// 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 // // Templates: // 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) // Inputs: // str path to .obj file // Outputs: // V double matrix of vertex positions #V by 3 // F #F list of face indices into vertex positions // TC double matrix of texture coordinats #TC by 2 // FTC #F list of face indices into vertex texture coordinates // N double matrix of corner normals #N by 3 // FN #F list of face indices into vertex normals // Returns true on success, false on errors
// read mesh from a ascii off file // Inputs: // str path to .off file // Outputs: // V eigen double matrix #V by 3 // F eigen int matrix #F by 3
|
readTGF.h | // READTGF // // [V,E,P,BE,CE,PE] = readTGF(filename) // // Read a graph from a .tgf file // // Input: // filename .tgf file name // Ouput: // 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
|
remove_duplicate_vertices.h | // REMOVE_DUPLICATE_VERTICES Remove duplicate vertices upto a uniqueness // tolerance (epsilon) // // Inputs: // V #V by dim list of vertex positions // epsilon uniqueness tolerance (significant digit), can probably think of // this as a tolerance on L1 distance // Outputs: // SV #SV by dim new list of vertex positions // SVI #V by 1 list of indices so SV = V(SVI,:) // SVJ #SV by 1 list of indices so V = SV(SVJ,:) // // Example: // % Mesh in (V,F) // [SV,SVI,SVJ] = remove_duplicate_vertices(V,1e-7); // % remap faces // SF = SVJ(F); //
// Wrapper that also remaps given faces (F) --> (SF) so that SF index SV
|
removeDuplicates.h | // [ NV, NF ] = removeDuplicates( V,F,epsilon ) // Merge the duplicate vertices from V, fixing the topology accordingly // // Input: // V,F: mesh description // epsilon: minimal distance to consider two vertices identical // // Output: // NV, NF: new mesh without duplicate vertices // template <typename T, typename S> // IGL_INLINE void removeDuplicates( // const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> &V, // const Eigen::Matrix<S, Eigen::Dynamic, Eigen::Dynamic> &F, // Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> &NV, // Eigen::Matrix<S, Eigen::Dynamic, Eigen::Dynamic> &NF, // Eigen::Matrix<S, Eigen::Dynamic, 1> &I, // const double epsilon = 2.2204e-15);
|
removeUnreferenced.h | // [ NV, NF ] = removeUnreferenced( V,F,epsilon ) // Remove unreferenced vertices from V, updating F accordingly // // Input: // V,F: mesh description // // Output: // NV, NF: new mesh without unreferenced vertices // // Known bugs: // Also removes combinatorially degenerate faces in NF
|
render_to_tga.h | // Render current open GL image to .tga file // Inputs: // tga_file path to output .tga file // width width of scene and resulting image // height height of scene and resulting image /// alpha whether to include alpha channel // Returns true only if no errors occured // // See also: png/render_to_png which is slower but writes .png files
|
reorder.h | // Act like matlab's Y = X[I] for std vectors // where I contains a vector of indices so that after, // Y[j] = X[I[j]] for index j // this implies that Y.size() == I.size() // X and Y are allowed to be the same reference
|
repdiag.h | // REPDIAG 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 // // Inputs: // A m by n matrix we are repeating along the diagonal. May be dense or // sparse // d number of times to repeat A along the diagonal // Outputs: // B m*d by n*d matrix with A repeated d times along the diagonal, // will be dense or sparse to match A // // Sparse version
// Dense version
// Wrapper with B as output
|
repmat.h | // Ideally this is a super overloaded function that behaves just like // matlab's repmat // Replicate and tile a matrix // // Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // A m by n input matrix // r number of row-direction copies // c number of col-direction copies // Outputs: // B r*m by c*n output matrix //
|
report_gl_error.h | // Print last OpenGL error to stderr prefixed by specified id string // Inputs: // id string to appear before any error msgs // Returns result of glGetError()
// No prefix
|
rgb_to_hsv.h | // Convert RGB to HSV // // Inputs: // r red value ([0,1]) // g green value ([0,1]) // b blue value ([0,1]) // Outputs: // h hue value (degrees: [0,360]) // s saturation value ([0,1]) // v value value ([0,1])
|
right_axis.h | // Determines the right axis or depth axis of the current gl matrix // Outputs: // x pointer to x-coordinate in scene coordinates of the un-normalized // right axis // y pointer to y-coordinate in scene coordinates of the un-normalized // right axis // z pointer to z-coordinate in scene coordinates of the un-normalized // right axis // mv pointer to modelview matrix // // Note: Right axis is returned *UN-normalized*
|
rotate_by_quat.h | // 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 // Inputs: // v input 3d point/vector // q input quaternion // Outputs: // out result of rotation, allowed to be same as v
|
round.h | // Round a scalar value // // Inputs: // x number // Returns x rounded to integer
// Round a given matrix to nearest integers // // Inputs: // X m by n matrix of scalars // Outputs: // Y m by n matrix of rounded integers
|
rows_to_matrix.h | // Convert a list (std::vector) of row vectors of the same length to a matrix // Template: // Row row vector type, must implement: // .size() // Mat Matrix type, must implement: // .resize(m,n) // .row(i) = Row // Inputs: // V a m-long list of vectors of size n // Outputs: // M an m by n matrix // Returns true on success, false on errors
|
sample_edges.h | // Compute samples_per_edge extra points along each edge in E defined over // vertices of V. // // Inputs: // V vertices over which edges are defined, # vertices by dim // E edge list, # edges by 2 // k number of extra samples to be computed along edge not // including start and end points // Output: // S sampled vertices, size less than # edges * (2+k) by dim always begins // with V so that E is also defined over S
|
slice.h | // THIS MAY HAVE BEEN SUPERSEDED BY EIGEN'S select FUNCTION // // Act like the matlab X(row_indices,col_indices) operator // // Inputs: // X m by n matrix // R list of row indices // C list of column indices // Output: // Y #R by #C matrix
// Wrapper to only slice in one direction // // Inputs: // dim dimension to slice in 1 or 2, dim=1 --> X(R,:), dim=2 --> X(:,R)
|
slice_into.h | // Act like the matlab Y(row_indices,col_indices) = X // // Inputs: // X xm by xn rhs matrix // R list of row indices // C list of column indices // Y ym by yn lhs matrix // Output: // Y ym by yn lhs matrix, same as input but Y(R,C) = X
|
snap_to_canonical_view_quat.h | // Snap a given quaternion to the "canonical quaternion" rotations. // Inputs: // q input quaternion // threshold threshold between 0 and 1, where 0 means
|
sort.h |
// Sort the elements of a matrix X along a given dimension like matlabs sort // function // // Templates: // DerivedX derived scalar type, e.g. MatrixXi or MatrixXd // DerivedIX derived integer type, e.g. MatrixXi // Inputs: // X m by n matrix whose entries are to be sorted // dim dimensional along which to sort: // 1 sort each column (matlab default) // 2 sort each row // ascending sort ascending (true, matlab default) or descending (false) // Outputs: // Y m by n matrix whose entries are sorted // 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
// Only better if size(X,dim) is small
// Special case if size(X,dim) == 2
// Act like matlab's [Y,I] = SORT(X) for std library vectors // Templates: // T should be a class that implements the '<' comparator operator // Input: // unsorted unsorted vector // ascending sort ascending (true, matlab default) or descending (false) // Output: // sorted sorted vector, allowed to be same as unsorted // index_map an index map such that sorted[i] = unsorted[index_map[i]]
|
sortrows.h | // Act like matlab's [Y,I] = sortrows(X) // // Templates: // DerivedX derived scalar type, e.g. MatrixXi or MatrixXd // DerivedIX derived integer type, e.g. MatrixXi // Inputs: // X m by n matrix whose entries are to be sorted // ascending sort ascending (true, matlab default) or descending (false) // Outputs: // Y m by n matrix whose entries are sorted // 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
|
sparse.h | // Build a sparse matrix from list of indices and values (I,J,V), functions // like the sparse function in matlab // // Templates: // 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 // Input: // I nnz vector of row indices of non zeros entries in X // J nnz vector of column indices of non zeros entries in X // V nnz vector of non-zeros entries in X // Optional: // m number of rows // n number of cols // Outputs: // X m by n matrix of type T whose entries are to be found //
// THIS MAY BE SUPERSEDED BY EIGEN'S .sparseView Indeed it is. // Convert a full, dense matrix to a sparse one // // Templates: // T should be a eigen sparse matrix primitive type like int or double // Input: // D m by n full, dense matrix // Output: // X m by n sparse matrix
// Wrapper with return
|
speye.h | // Builds an m by n sparse identity matrix like matlab's speye function // Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // m number of rows // n number of cols // Outputs: // I m by n sparse matrix with 1's on the main diagonal
// Builds an n by n sparse identity matrix like matlab's speye function // Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // n number of rows and cols // Outputs: // I n by n sparse matrix with 1's on the main diagonal
|
stdin_to_temp.h | // 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. // // Outputs: // temp_file pointer to temp file pointer, rewound to beginning of file so // its ready to be read // Return true only if no errors were found // // Note: Caller is responsible for closing the file (tmpfile() automatically // unlinks the file so there is no need to remove/delete/unlink the file)
|
sum.h | // Note: If your looking for dense matrix matlab like sum for eigen matrics // just use: // M.colwise().sum() or M.rowwise().sum() // // Sum the columns or rows of a sparse matrix // Templates: // T should be a eigen sparse matrix primitive type like int or double // Inputs: // X m by n sparse matrix // dim dimension along which to sum (1 or 2) // Output: // S n-long sparse vector (if dim == 1) // or // S m-long sparse vector (if dim == 2)
|
svd.h | // // Compute 3x3 SVD using lapack's dgesdd_ function // // // // Input: // // a pointer to 3x3 matrix in COLUMN MAJOR order // // Outputs: // // u pointer to 3x3 matrix in COLUMN MAJOR order // // s pointer to 3 vector // // vt pointer to 3x3 matrix in COLUMN MAJOR order, or think of this as v in // // row-major order // // Returns true on success, false on failure // // // // Known bugs: This only compiles on Mac and depends on Lapack rather than eigen // bool svd3x3(double * a, double * u, double * s, double * vt); |
texture_from_tga.h | // Read an image from a .tga file and use it as a texture // // Input: // tga_file path to .tga file // Output: // id of generated openGL texture // Returns true on success, false on failure
|
tga.h |
|
trackball.h | // Applies a trackball drag to identity // Inputs: // w width of the trackball context // h height of the trackball context // speed_factor controls how fast the trackball feels, 1 is normal // down_mouse_x x position of mouse down // down_mouse_y y position of mouse down // mouse_x current x position of mouse // mouse_y current y position of mouse // Outputs: // quat the resulting rotation (as quaternion)
// Applies a trackball drag to a given rotation // Inputs: // w width of the trackball context // h height of the trackball context // speed_factor controls how fast the trackball feels, 1 is normal // down_quat rotation at mouse down, i.e. the rotation we're applying the // trackball motion to (as quaternion) // down_mouse_x x position of mouse down // down_mouse_y y position of mouse down // mouse_x current x position of mouse // mouse_y current y position of mouse // Outputs: // quat the resulting rotation (as quaternion)
|
transpose_blocks.h | // Templates: // T should be a eigen matrix primitive type like int or double // Inputs: // A m*k by n (dim: 1) or m by n*k (dim: 2) eigen Matrix of type T values // k number of blocks // dim dimension in which to transpose // Output // 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 // // Example: // 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]; //
|
tt.h | // Preprocessing
// Extract the face adjacencies
// Extract the face adjacencies indices (needed for fast traversal)
// Compute triangle-triangle adjacency
// Compute triangle-triangle adjacency with indices
|
uniform_type_to_string.h | // Convert a GL uniform variable type (say, returned from // glGetActiveUniform) and output a string naming that type // Inputs: // type enum for given type // Returns string name of that type
|
unique.h | // Act like matlab's [C,IA,IC] = unique(X) // // Templates: // T comparable type T // Inputs: // A #A vector of type T // Outputs: // C #C vector of unique entries in A // IA #A index vector so that C = A(IA); // IC #C index vector so that A = C(IC);
// Act like matlab's [C,IA,IC] = unique(X,'rows') // // Templates: // DerivedA derived scalar type, e.g. MatrixXi or MatrixXd // DerivedIA derived integer type, e.g. MatrixXi // DerivedIC derived integer type, e.g. MatrixXi // Inputs: // A m by n matrix whose entries are to unique'd according to rows // Outputs: // C #C vector of unique rows in A // IA #A index vector so that C = A(IA,:); // IC #C index vector so that A = C(IC,:);
|
unique_simplices.h | // Find *combinatorially* unique simplices in F // // Inputs: // F #F by simplex-size list of simplices // Outputs: // FF #FF by simplex-size list of unique simplices in F
|
unproject.h | // Wrapper for gluUnproject that uses the current GL_MODELVIEW_MATRIX, // GL_PROJECTION_MATRIX, and GL_VIEWPORT // Inputs: // win* screen space x, y, and z coordinates respectively // Outputs: // obj* pointers to 3D objects' x, y, and z coordinates respectively // Returns return value of gluUnProject call
|
unproject_to_zero_plane.h | // Wrapper for gluUnproject that uses the current GL_MODELVIEW_MATRIX, // GL_PROJECTION_MATRIX, and GL_VIEWPORT to unproject a screen postion // (winX,winY) to a 3d location at same depth as the current origin. // Inputs: // win* screen space x, y, and z coordinates respectively // Outputs: // obj* pointers to 3D objects' x, y, and z coordinates respectively // Returns return value of gluUnProject call
|
upsample.h | // Subdivide a mesh without moving vertices: loop subdivision but odd // vertices stay put and even vertices are just edge midpoints // // Templates: // MatV matrix for vertex positions, e.g. MatrixXd // MatF matrix for vertex positions, e.g. MatrixXi // Inputs: // V #V by dim mesh vertices // F #F by 3 mesh triangles // Outputs: // NV new vertex positions, V is guaranteed to be at top // NF new list of face indices // // NOTE: V should not be the same as NV, // NOTE: F should not be the same as NF, use other proto
// Virtually in place wrapper
|
up_axis.h | // Determines the up axis or depth axis of the current gl matrix // Outputs: // x pointer to x-coordinate in scene coordinates of the un-normalized // up axis // y pointer to y-coordinate in scene coordinates of the un-normalized // up axis // z pointer to z-coordinate in scene coordinates of the un-normalized // up axis // mv pointer to modelview matrix // // Note: Up axis is returned *UN-normalized*
|
vf.h | // Constructs the vertex-face topology of a given mesh (V,F) // Inputs: // V #V by 3 list of vertex coordinates // F #F by dim list of mesh faces (must be triangles) // Outputs: // // // See also: edges, cotmatrix, diag, vv
|
view_axis.h | // Determines the view axis or depth axis of the current gl matrix // Outputs: // x pointer to x-coordinate in scene coordinates of the un-normalized // viewing axis // y pointer to y-coordinate in scene coordinates of the un-normalized // viewing axis // z pointer to z-coordinate in scene coordinates of the un-normalized // viewing axis // mv pointer to modelview matrix // // Note: View axis is returned *UN-normalized*
|
write.h | // write mesh to an ascii file with automatic detection of file format. supported: obj, off) // Known Bugs: // Does not correctly find file extensions: myfile.foo.off
|
writeDMAT.h | // Write a matrix using ascii dmat file type // // Template: // Mat matrix type that supports .rows(), .cols(), operator(i,j) // Inputs: // file_name path to .dmat file // W eigen matrix containing to-be-written coefficients
|
writeMESH.h | // save a tetrahedral volume mesh to a .mesh file // // Templates: // Scalar type for positions and vectors (will be cast as double) // Index type for indices (will be cast to int) // Input: // mesh_file_name path of .mesh file // V double matrix of vertex positions #V by 3 // T #T list of tet indices into vertex positions // F #F list of face indices into vertex positions // // Known bugs: Holes and regions are not supported
// Templates: // DerivedV real-value: i.e. from MatrixXd // DerivedT integer-value: i.e. from MatrixXi // DerivedF integer-value: i.e. from MatrixXi // Input: // mesh_file_name path of .mesh file // V eigen double matrix #V by 3 // T eigen int matrix #T by 4 // F eigen int matrix #F by 3
|
writeOBJ.h | // Write a mesh in an ascii obj file // Inputs: // str path to outputfile // V eigen double matrix #V by 3 (mesh vertices) // F eigen int matrix #F by 3 (mesh indices) // Returns true on success, false on error
|
writeOFF.h |
|
writeTGF.h | // WRITETGF // // Write a graph to a .tgf file // // Input: // filename .tgf file name // V # vertices by 3 list of vertex positions // E # edges by 2 list of edge indices // // Assumes that graph vertices are 3 dimensional
|
Camera.h |
|
EPS.h |
// Function returning EPS for corresponding type
// Template specializations for float and double
|
ReAntTweakBar.h |
|
See also: tutorial, style guidelines, file formats
Automatically generated on Fri Sep 13 13:21:17 CEST 2013 by scripts/doc.sh.