Easy3D 2.5.3
|
Namespaces | |
namespace | buffer |
Functions for updating render buffers. | |
namespace | console |
Defines the styles for output to the console window. | |
namespace | curve |
Algorithms for evaluating curves. | |
namespace | file_system |
A very basic filesystem implementation. | |
namespace | geom |
Functions for basic geometric computations. | |
namespace | io |
File input/output functionalities. | |
namespace | logging |
The logging mechanism. | |
namespace | resource |
Resources used in Easy3D. | |
namespace | setting |
Default parameters used for initializing rendering and UI. | |
namespace | shape |
A collection of functions for rendering basic shapes. | |
namespace | string |
String manipulation utilities. | |
namespace | transform |
Classes | |
class | AmbientOcclusion |
Traditional Screen Space Ambient Occlusion (SSAO) technique. More... | |
class | AverageColorBlending |
Transparency effect using average color blending. More... | |
class | AxisPlaneConstraint |
An abstract class for Frame Constraints defined by an axis or a plane. More... | |
class | BasePropertyArray |
Base class for a property array. More... | |
class | Bezier |
Class for Bezier curve fitting. Works for both 2D and 3D. Example: More... | |
class | BSpline |
Class for BSpline curve fitting. Works for both 2D and 3D. Example: More... | |
class | Camera |
A perspective or orthographic camera. More... | |
class | CameraConstraint |
An AxisPlaneConstraint defined in the camera coordinate system. More... | |
class | CatmullRom |
Class for CatmullRom curve interpolation. Works for both 2D and 3D. Example: More... | |
class | ClippingPlane |
An implementation of a manipulable clipping plane for visualization of model interiors and cross sections. More... | |
class | Collider |
Efficient collision detection. More... | |
class | Constraint |
An interface class for Frame constraints. More... | |
class | Curve |
Base class for curve fitting/interpolation. More... | |
class | Delaunay |
Base class for Delaunay triangulation. More... | |
class | Delaunay2 |
2D Delaunay triangulation, using Jonathan Richard Shewchuk's "triangle" implementation. More... | |
class | Delaunay3 |
3D Delaunay triangulation, using Hang Si's tetgen. More... | |
class | Drawable |
The base class for drawable objects. A drawable represent a set of points, line segments, or triangles. More... | |
class | DualDepthPeeling |
Transparency effect using dual depth peeling. More... | |
class | EigenSolver |
An easy-to-use eigen solver. More... | |
class | EyeDomeLighting |
An implementation of the Eye Dome Lighting (EDL) technique. More... | |
class | Frame |
The Frame class represents a coordinate system, defined by a position and an orientation. More... | |
class | FramebufferObject |
An implementation of framebuffer object (FBO). More... | |
class | Frustum |
A Frustum description for perspective projection. More... | |
class | GaussianNoise |
Add Gaussian noise to 3D models. More... | |
class | GenericBox |
GenericBox represents the bounding box of shapes. More... | |
class | GenericLine |
A generic line representation, which supports both 2D and 3D lines. More... | |
class | GenericOrientedLine |
OrientedLine implements plucker coordinates, which enables oriented lines to be compared. More... | |
class | GenericPlane |
A 3D Plane of equation a*x + b*y + c*z + d = 0. More... | |
class | GenericPolygon |
A 2D polygon representation. More... | |
class | GenericRect |
The GenericRect class defines a rectangle in the 2D space. More... | |
class | GenericSegment |
A generic segmentation representation, which supports both 2D and 3D line segments. More... | |
class | Graph |
A Graph data structure with easy property management. More... | |
class | GraphIO |
Implementation of file input/output operations for Graph (Currently only PLY format is supported). More... | |
class | Heap |
A class implementing a heap. More... | |
class | ImageIO |
Implementation of file input/output operations for images. More... | |
class | KdTreeSearch |
Base class for nearest neighbor search using KdTree. More... | |
class | KdTreeSearch_ANN |
KdTree implementation based on ANN. More... | |
class | KdTreeSearch_ETH |
KdTree implementation based on Richard Keiser's KdTree code. More... | |
class | KdTreeSearch_FLANN |
KdTree implementation based on FLANN. More... | |
class | KdTreeSearch_NanoFLANN |
KdTree implementation based on NanoFLANN. More... | |
class | KeyFrameInterpolator |
A keyframe interpolator for animation generation. More... | |
class | LinesDrawable |
The drawable for rendering a set of line segments, e.g., edges of a mesh, vector fields. More... | |
class | LocalConstraint |
An AxisPlaneConstraint defined in the Frame local coordinate system. More... | |
class | ManipulatedCameraFrame |
A manipulated frame with camera specific mouse bindings. More... | |
class | ManipulatedFrame |
A Frame that can be rotated and translated using the mouse. More... | |
class | Manipulator |
A manipulator is for manipulation of an object. More... | |
class | Mat |
Base class for matrix types. More... | |
class | Mat2 |
2 by 2 matrix. Extends Mat with 2D-specific functionality and constructors. More... | |
class | Mat3 |
3x3 matrix. Extends Mat with 3D-specific functionality and constructors. More... | |
class | Mat4 |
4x4 matrix. Extends Mat with 4D-specific functionality and constructors. More... | |
class | Matrix |
A matrix representation, which supports dynamic sizes. More... | |
class | Model |
The base class of renderable 3D models. More... | |
class | ModelPicker |
Implementation of picking mechanism for set of models. More... | |
class | MultiViewer |
A viewer that supports multiple views (arranged in a grid layout). More... | |
class | NormalCone |
A class implementing a normal cone. More... | |
class | OpenGLTimer |
Accurate timing of GPU operations. More... | |
class | OpenglUtil |
Utilities for OpenGL initialization and states query. More... | |
class | OverlappingFaces |
Detects/Removes duplicate and folding faces for a triangle mesh. More... | |
class | Picker |
Base class for picking mechanism. More... | |
class | PointCloud |
A data structure for point clouds. More... | |
class | PointCloudIO |
Implementation of file input/output operations for PointCloud. More... | |
class | PointCloudNormals |
Estimate point cloud normals. It also allows to reorients the point cloud normals based on a minimum spanning tree algorithm. More... | |
class | PointCloudPicker |
Implementation of picking points from a point cloud. More... | |
class | PointCloudSimplification |
PointCloudSimplification provides various point cloud simplification algorithms. More... | |
class | PointsDrawable |
The drawable for rendering a set of points, e.g., point clouds, vertices of a mesh. More... | |
class | PoissonReconstruction |
Poisson surface reconstruction. More... | |
class | PolygonPartition |
Convex partition of polygons. More... | |
class | PolyMesh |
Data structure representing a polyhedral mesh. More... | |
class | PolyMeshIO |
Implementation of file input/output operations for PolyMesh. More... | |
class | PrimitivesRansac |
Extract primitives from point clouds using RANSAC.Usage example: More... | |
class | PrincipalAxes |
Computes the center and inertia axes of a set of 2D or 3D points. More... | |
class | ProgressClient |
The based class of GUI element reporting the progress. More... | |
class | ProgressLogger |
An implementation of progress logging mechanism. More... | |
class | Property |
Implementation of a generic property. More... | |
class | PropertyArray |
Implementation of a generic property array. More... | |
class | PropertyContainer |
Implementation of generic property container. More... | |
class | Quadric |
A quadric as a symmetric 4x4 matrix. Used by the error quadric mesh decimation algorithms. More... | |
class | Quat |
The Quaternion class represents 3D rotations and orientations. More... | |
class | Renderer |
A Renderer manages the drawables (and thus the rendering) of a model. More... | |
class | SelfIntersection |
Detects and resolves self-intersection for surface mesh. More... | |
class | ShaderManager |
Management of shader programs. More... | |
class | ShaderProgram |
OpenGL Shader Compilation. More... | |
class | Shadow |
Shadow implements the standard shadow map (hard shadow) algorithm. More... | |
class | Signal |
A light-weight implementation of the simple signal-slot mechanism. More... | |
class | SoftShadow |
An implementation of the Percentage-Closer Soft Shadows. More... | |
class | SplineCurveFitting |
Spline curve fitting for arbitrary dimensions. More... | |
class | SplineCurveInterpolation |
Cubic spline curve interpolation for arbitrary dimensions. More... | |
class | SplineInterpolation |
Cubic spline interpolation. More... | |
class | State |
Class representing the rendering state of a drawable. More... | |
class | StopWatch |
A high resolution stop watch/timer. More... | |
class | SurfaceMesh |
A halfedge data structure for polygonal meshes of 2-manifold. More... | |
class | SurfaceMeshBuilder |
A helper class for constructing manifold surface mesh models. More... | |
class | SurfaceMeshComponent |
A connected component of a SurfaceMesh. More... | |
class | SurfaceMeshCurvature |
Compute per-vertex curvatures, i.e., principle (min, max), mean, Gaussian. More... | |
class | SurfaceMeshEnumerator |
Enumerates connected components for a surface mesh. More... | |
class | SurfaceMeshFactory |
Factory class to generate different types of basic shapes. More... | |
class | SurfaceMeshFairing |
A class for implicitly fairing a surface mesh.See the following paper for more details: More... | |
class | SurfaceMeshFeatures |
Detect and mark feature edges based on boundary or dihedral angle. More... | |
class | SurfaceMeshGeodesic |
This class computes geodesic distance from a set of seed vertices. More... | |
class | SurfaceMeshHoleFilling |
This class closes simple holes in a surface mesh. More... | |
class | SurfaceMeshIO |
Implementation of file input/output operations for SurfaceMesh. More... | |
class | SurfaceMeshParameterization |
A class for surface parameterization. More... | |
class | SurfaceMeshPicker |
Implementation of picking elements (i.e, vertices, faces, edges) from a surface mesh. More... | |
class | SurfaceMeshPolygonization |
Merge connected coplanar faces into a general polygon face. More... | |
class | SurfaceMeshRemeshing |
A class for uniform and adaptive surface remeshing. More... | |
class | SurfaceMeshSampler |
Sample a surface mesh (near uniformly) into a point cloud. More... | |
class | SurfaceMeshSimplification |
Surface mesh simplification based on approximation error and fairness criteria. More... | |
class | SurfaceMeshSmoothing |
A class for Laplacian smoothing.See the following papers for more details: More... | |
class | SurfaceMeshStitching |
Stitch coincident border edges of a surface mesh. More... | |
class | SurfaceMeshSubdivision |
SurfaceMeshSubdivision implement several well-known subdivision algorithms. More... | |
class | SurfaceMeshTetrehedralization |
Generate quality tetrahedralization from closed shells. More... | |
class | SurfaceMeshTopology |
Compute various topological characteristics of a surface mesh component. More... | |
class | SurfaceMeshTriangulation |
Triangulate a polygonal mesh into a pure triangle mesh. More... | |
class | Surfacer |
A collection of mesh (and polygon soup) processing functions. More... | |
class | Tessellator |
Tessellator subdivides concave planar polygons, polygons with holes, or polygons with intersecting edges into triangles or simple contours. More... | |
class | TextMesher |
Generate a 3D surface mesh from a text string. More... | |
class | TextRenderer |
TextRenderer enables quick and easy string rendering in OpenGL applications. More... | |
class | Texture |
OpenGL texture. More... | |
class | TextureManager |
Management of OpenGL textures. More... | |
class | Timer |
A light-weight implementation of the timer mechanism. More... | |
class | Tokenizer |
A class for tokenizing input character streams. More... | |
class | Translator |
Manages the translation of all the models during the file IO. More... | |
class | Transparency |
Base class for rendering with transparency. More... | |
class | TriangleMeshKdTree |
A k-d tree for triangular surface meshes. More... | |
class | TrianglesDrawable |
The drawable for rendering a set of triangles, e.g., the surface of a triangular mesh. More... | |
class | Vec |
Base class for vector types. It provides generic functionality for N dimensional vectors. More... | |
class | Vec< 2, T > |
A 2D vector (used for representing 2D points or vectors). More... | |
class | Vec< 3, T > |
A 3D vector (used for representing 3D points or vectors). More... | |
class | Vec< 4, T > |
A 4D vector (used for representing 3D points or vectors in homogeneous coordinates). More... | |
class | VertexArrayObject |
A thin wrapper around an OpenGL Vertex Array Object (VAO). More... | |
class | VideoEncoder |
A class that encodes video frames (e.g., images) into a video file. More... | |
class | Viewer |
The built-in Easy3D viewer. More... | |
class | VoronoiCell3d |
A data structure for 3D Voronoi cells. More... | |
class | WorldConstraint |
An AxisPlaneConstraint defined in the world coordinate system. More... | |
Typedefs | |
using | MATRIX = easy3d::Matrix< double > |
typedef Vec< 2, float > | vec2 |
A 2D point/vector of float type. | |
typedef Vec< 3, float > | vec3 |
A 3D point/vector of float type. | |
typedef Vec< 4, float > | vec4 |
A 4D point/vector of float type. | |
typedef Vec< 2, double > | dvec2 |
A 2D point/vector of double type. | |
typedef Vec< 3, double > | dvec3 |
A 3D point/vector of double type. | |
typedef Vec< 4, double > | dvec4 |
A 4D point/vector of double type. | |
typedef Vec< 2, int32_t > | ivec2 |
A 2D point/vector of int32_t type. | |
typedef Vec< 3, int32_t > | ivec3 |
A 3D point/vector of int32_t type. | |
typedef Vec< 4, int32_t > | ivec4 |
A 4D point/vector of int32_t type. | |
typedef Mat2< float > | mat2 |
A 2 by 2 matrix of float type. | |
typedef Mat3< float > | mat3 |
A 3 by 3 matrix of float type. | |
typedef Mat4< float > | mat4 |
A 4 by 4 matrix of float type. | |
typedef Mat< 3, 4, float > | mat34 |
A 3 by 4 matrix of float type. | |
typedef Mat< 4, 3, float > | mat43 |
A 4 by 3 matrix of float type. | |
typedef Mat2< double > | dmat2 |
A 2 by 2 matrix of double type. | |
typedef Mat3< double > | dmat3 |
A 3 by 3 matrix of double type. | |
typedef Mat4< double > | dmat4 |
A 4 by 4 matrix of double type. | |
typedef Mat< 3, 4, double > | dmat34 |
A 3 by 4 matrix of double type. | |
typedef Mat< 4, 3, double > | dmat43 |
A 4 by 3 matrix of double type. | |
typedef Quat< float > | quat |
A quaternion of float type. | |
typedef Quat< double > | dquat |
A quaternion of double type. | |
typedef GenericLine< 2, float > | Line2 |
A 2D line of float type. | |
typedef GenericLine< 3, float > | Line3 |
A 3D line of float type. | |
typedef GenericOrientedLine< float > | OrientedLine3 |
A 3D oriented line of float type. | |
typedef GenericSegment< 2, float > | Segment2 |
A 2D line segment of float type. | |
typedef GenericSegment< 3, float > | Segment3 |
A 3D line segment of float type. | |
typedef GenericPlane< float > | Plane3 |
A 3D plane of float type. | |
typedef GenericBox< 2, float > | Box2 |
A 2D axis-aligned bounding box of float type. | |
typedef GenericBox< 3, float > | Box3 |
A 3D axis-aligned bounding box of float type. | |
typedef GenericRect< float > | Rect |
A 2D axis-aligned rectangle of float type. | |
typedef GenericRect< int32_t > | iRect |
A 2D axis-aligned rectangle of int32_t type. | |
typedef GenericPolygon< float > | Polygon2 |
A 2D polygon of float type. | |
Enumerations | |
enum | Sign { NEGATIVE = -1 , ZERO = 0 , POSITIVE = 1 } |
The sign. | |
Functions | |
bool | extrude (SurfaceMesh *mesh, const std::vector< Polygon2 > &contours, float height) |
Extrudes a 3D surface mesh from a set of simple contours. More... | |
SurfaceMesh * | extrude (const std::vector< Polygon2 > &contours, float height) |
Extrudes a 3D surface mesh from a set of simple contours. More... | |
template<int DIM, typename FT > | |
bool | has_nan (const GenericBox< DIM, FT > &box) |
template<typename FT > | |
FT | min () |
Function returning minimum representable value for a given type. | |
template<typename FT > | |
FT | max () |
Function returning maximum representable value for a given type. | |
template<> | |
int | min< int > () |
Function returning min for int type numbers. | |
template<> | |
int | max< int > () |
Function returning max for int type numbers. | |
template<> | |
float | min< float > () |
Function returning min for float type numbers. | |
template<> | |
float | max< float > () |
Function returning max for float type numbers. | |
template<> | |
double | min< double > () |
Function returning min for double type numbers. | |
template<> | |
double | max< double > () |
Function returning max for double type numbers. | |
template<typename FT > | |
FT | epsilon () |
Function returning the epsilon value for a given type. | |
template<typename FT > | |
FT | epsilon_sqr () |
Function returning the squared epsilon value for a given type. | |
template<> | |
float | epsilon< float > () |
Function returning epsilon for float type numbers. | |
template<> | |
float | epsilon_sqr< float > () |
Function returning squared epsilon for float type numbers. | |
template<> | |
double | epsilon< double > () |
Function returning epsilon for double type numbers. | |
template<> | |
double | epsilon_sqr< double > () |
Function returning squared epsilon for double type numbers. | |
template<typename FT > | |
bool | epsilon_equal (FT const &x, FT const &y, FT const &eps) |
Tests if two values are Epsilon equal. | |
template<typename FT > | |
bool | epsilon_not_equal (FT const &x, FT const &y, FT const &eps) |
Tests if two values are not Epsilon equal. | |
std::ostream & | operator<< (std::ostream &os, Graph::Vertex v) |
std::ostream & | operator<< (std::ostream &os, Graph::Edge e) |
template<typename T > | |
void | hash_combine (uint64_t &seed, T const &value) |
std::size_t has 64 bits on most systems, but 32 bits on 32-bit Windows. To make the same code robustly run on both 32-bit and 64-bit systems, Easy3D uses 64-bit integer for hash values. This function implements the 64-bit hash combine algorithm (inspired by the Hash128to64 function in CityHash). | |
template<typename FT > | |
uint64_t | hash (const Vec< 2, FT > &value) |
Computes the hash value of a 2D vector. | |
template<typename FT > | |
uint64_t | hash (const Vec< 3, FT > &value) |
Computes the hash value of a 3D vector. | |
template<int DIM, typename FT > | |
uint64_t | hash (const Vec< DIM, FT > &value) |
Computes the hash value of a DIM dimensional vector. | |
template<typename Iterator > | |
uint64_t | hash (Iterator first, Iterator last) |
Computes the hash value of a 1D array. | |
template<typename Iterator > | |
void | hash (uint64_t &seed, Iterator first, Iterator last) |
Computes the hash value of a 1D array with a given seed value. | |
template<int DIM, typename FT > | |
std::ostream & | operator<< (std::ostream &os, const GenericLine< DIM, FT > &line) |
template<int DIM, typename FT > | |
std::istream & | operator>> (std::istream &is, GenericLine< DIM, FT > &line) |
template<size_t N, size_t M, typename T > | |
Mat< N, M, T > | operator* (T lhs, const Mat< N, M, T > &rhs) |
Component-wise scalar-matrix multiplication. | |
template<typename T > | |
Mat2< T > | operator* (const Mat2< T > &lhs, const Mat2< T > &rhs) |
Specialized matrix-matrix multiplication for 2x2 matrices. | |
template<typename T > | |
Mat3< T > | operator* (const Mat3< T > &lhs, const Mat3< T > &rhs) |
Specialized matrix-matrix multiplication for 3x3 matrices. | |
template<typename T > | |
Mat4< T > | operator* (const Mat4< T > &lhs, const Mat4< T > &rhs) |
Specialized matrix-matrix multiplication for 4x4 matrices. | |
template<typename T > | |
Vec< 3, T > | operator* (const Mat4< T > &lhs, const Vec< 3, T > &rhs) |
Specialized matrix-vector multiplication for 4x4 matrices and 3D vectors. rhs is treated as an homogeneous vector (with w = 1). | |
template<typename T > | |
Vec< 2, T > | operator* (const Mat3< T > &lhs, const Vec< 2, T > &rhs) |
Specialized matrix-vector multiplication for 3x3 matrices and 2D vectors. rhs is treated as an homogeneous vector (with z = 1). | |
template<typename T > | |
Vec< 2, T > | operator* (const Mat2< T > &lhs, const Vec< 2, T > &rhs) |
Non-homogeneous, specialized matrix-vector multiplication for 2x2 matrices and 2D vectors. | |
template<typename T > | |
Vec< 3, T > | operator* (const Mat3< T > &lhs, const Vec< 3, T > &rhs) |
Non-homogeneous, specialized matrix-vector multiplication for 3x3 matrices and 3D vectors. More... | |
template<typename T > | |
Vec< 4, T > | operator* (const Mat4< T > &lhs, const Vec< 4, T > &rhs) |
Non-homogeneous, specialized matrix-vector multiplication for 4x4 matrices and 4D vectors. More... | |
template<size_t N, typename T > | |
T | trace (const Mat< N, N, T > &m) |
Return the trace (sum of elements on the main diagonal) of N by N (square) matrix m. | |
template<size_t N, typename T , size_t A> | |
T | determinant (const Mat< N, N, T > &m) |
Return the determinant of N x N (square) matrix m. More... | |
template<size_t N, size_t M, typename T > | |
Mat< M, N, T > | transpose (const Mat< N, M, T > &m) |
Transpose m. | |
template<size_t N, typename T > | |
Mat< N, N, T > | inverse (const Mat< N, N, T > &m) |
Return the inverse of N x N (square) matrix m. More... | |
template<size_t M, size_t N, typename T > | |
Mat< N, M, T > | tensor (const Vec< M, T > &u, const Vec< N, T > &v) |
template<size_t N, size_t M, typename T > | |
bool | gauss_jordan_elimination (const Mat< N, N, T > &a, const Mat< N, M, T > &b, Mat< N, N, T > *ainv, Mat< N, M, T > *x) |
Perform Gauss-Jordan elimination to solve a set of linear equations and additionally compute the inverse of the input coefficient matrix. More... | |
template<size_t N, typename T > | |
bool | lu_decomposition (const Mat< N, N, T > &a, Mat< N, N, T > *alu, Vec< N, T > *rowp, T *d) |
Perform LU decomposition of a square matrix. More... | |
template<size_t N, typename T > | |
void | lu_back_substitution (const Mat< N, N, T > &alu, const Vec< N, T > &rowp, const Vec< N, T > &b, Vec< N, T > *x) |
Solve a set of linear equations using outputs from lu_decomposition() as inputs. More... | |
template<size_t N, typename FT > | |
bool | cholesky_decompose (const Mat< N, N, FT > &A, Mat< N, N, FT > &L) |
Cholesky decomposition of a symmetric, positive definite matrix. More... | |
template<size_t N, typename FT > | |
void | cholesky_solve (const Mat< N, N, FT > &L, const Vec< N, FT > &b, Vec< N, FT > &x) |
template<size_t N, size_t M, typename T > | |
void | cholesky_solve (const Mat< N, N, T > &L, const Mat< N, M, T > &B, Mat< N, M, T > &X) |
template<size_t N, size_t M, typename T > | |
std::ostream & | operator<< (std::ostream &output, const Mat< N, M, T > &m) |
template<size_t N, size_t M, typename T > | |
std::istream & | operator>> (std::istream &input, Mat< N, M, T > &m) |
template<size_t D, typename T > | |
T | trace (const Mat< D, D, T > &m) |
template<size_t N, typename T > | |
T | determinant (const Mat< N, N, T > &m) |
template<typename T > | |
T | determinant (const Mat2< T > &m) |
template<typename T > | |
T | determinant (const Mat3< T > &m) |
template<typename T > | |
T | determinant (const Mat4< T > &m) |
template<typename T > | |
Mat2< T > | inverse (const Mat2< T > &m) |
template<typename T > | |
Mat3< T > | inverse (const Mat3< T > &m) |
template<typename T > | |
Mat4< T > | inverse (const Mat4< T > &m) |
template<size_t N, typename FT > | |
Mat< N, 1, FT > | to_matrix (const Vec< N, FT > &v) |
Convert a N-dimensional vector into a N by 1 matrix. | |
template<size_t N, typename FT > | |
Mat< 1, N, FT > | transpose (const Vec< N, FT > &v) |
Construct a 1 by N matrix from a N-dimensional vector. | |
template<size_t N, size_t M, typename T > | |
bool | has_nan (const Mat< N, M, T > &m) |
Test if a matrix has NaN entry. | |
template<typename FT > | |
std::ostream & | operator<< (std::ostream &, const Matrix< FT > &) |
input and output More... | |
template<typename FT > | |
std::istream & | operator>> (std::istream &, Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | operator- (const Matrix< FT > &) |
arithmetic operators More... | |
template<typename FT > | |
Matrix< FT > | operator+ (const Matrix< FT > &, const FT &) |
template<typename FT > | |
Matrix< FT > | operator+ (const FT &, const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | operator+ (const Matrix< FT > &, const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | operator- (const Matrix< FT > &, const FT &) |
template<typename FT > | |
Matrix< FT > | operator- (const FT &, const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | operator- (const Matrix< FT > &, const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | operator* (const Matrix< FT > &, const Matrix< FT > &) |
template<typename FT > | |
std::vector< FT > | operator* (const Matrix< FT > &, const std::vector< FT > &) |
template<typename FT1 , typename FT2 > | |
Matrix< FT1 > | operator* (const Matrix< FT1 > &A, const FT2 &s) |
matrix-scalar multiplication | |
template<typename FT1 , typename FT2 > | |
Matrix< FT1 > | operator* (const FT2 &s, const Matrix< FT1 > &A) |
scalar-matrix multiplication | |
template<typename FT1 , typename FT2 > | |
Matrix< FT1 > | operator/ (const Matrix< FT1 > &A, const FT2 &s) |
matrix-scalar division | |
template<typename FT1 , typename FT2 > | |
Matrix< FT1 > | operator/ (const FT2 &s, const Matrix< FT1 > &A) |
scalar-matrix division | |
template<typename FT > | |
void | mult (const Matrix< FT > &, const Matrix< FT > &, Matrix< FT > &) |
multiplication More... | |
template<typename FT > | |
void | mult (const Matrix< FT > &, const std::vector< FT > &, std::vector< FT > &) |
template<typename FT > | |
Matrix< FT > | mult (const Matrix< FT > &, const Matrix< FT > &) |
template<typename FT > | |
std::vector< FT > | mult (const Matrix< FT > &, const std::vector< FT > &) |
template<typename FT > | |
Matrix< FT > | elem_mult (const Matrix< FT > &, const Matrix< FT > &) |
element-wise multiplication / division More... | |
template<typename FT > | |
Matrix< FT > | elem_divd (const Matrix< FT > &, const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > & | elem_mult_eq (Matrix< FT > &, const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > & | elem_divd_eq (Matrix< FT > &, const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | transpose (const Matrix< FT > &) |
transpose and conjugate transpose More... | |
template<typename FT > | |
Matrix< FT > | conjugate_transpose (const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | transpose_mult (const Matrix< FT > &, const Matrix< FT > &) |
transpose multiplication More... | |
template<typename FT > | |
std::vector< FT > | transpose_mult (const Matrix< FT > &, const std::vector< FT > &) |
template<typename FT > | |
Matrix< FT > | mult_transpose (const Matrix< FT > &, const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | mult_transpose (const std::vector< FT > &, const std::vector< FT > &) |
template<typename FT > | |
Matrix< FT > | identity (int, const FT &) |
unit and diagonal matrix More... | |
template<typename FT > | |
Matrix< FT > | diagonal (const std::vector< FT > &) |
template<typename FT > | |
std::vector< FT > | diagonal (const Matrix< FT > &) |
template<typename FT > | |
FT | trace (const Matrix< FT > &) |
template<typename FT > | |
FT | norm (const Matrix< FT > &) |
utilities More... | |
template<typename FT > | |
void | swap (Matrix< FT > &, Matrix< FT > &) |
template<typename FT > | |
std::vector< FT > | sum (const Matrix< FT > &) |
template<typename FT > | |
std::vector< FT > | min (const Matrix< FT > &) |
template<typename FT > | |
std::vector< FT > | max (const Matrix< FT > &) |
template<typename FT > | |
std::vector< FT > | mean (const Matrix< FT > &) |
template<typename FT > | |
Matrix< FT > | abs (const Matrix< std::complex< FT > > &A) |
Get magnitude of a std::complex matrix. | |
template<typename FT > | |
Matrix< FT > | arg (const Matrix< std::complex< FT > > &A) |
Get angle of a std::complex matrix. | |
template<typename FT > | |
Matrix< FT > | real (const Matrix< std::complex< FT > > &A) |
Get real part of a std::complex matrix. | |
template<typename FT > | |
Matrix< FT > | imag (const Matrix< std::complex< FT > > &A) |
Get imaginary part of a std::complex matrix. | |
template<typename FT > | |
Matrix< std::complex< FT > > | complex_matrix (const Matrix< FT > &) |
Convert real matrix to complex matrix. More... | |
template<typename FT > | |
Matrix< std::complex< FT > > | complex_matrix (const Matrix< FT > &mR, const Matrix< FT > &mI) |
Convert real matrix to std::complex matrix (A for real, B for imaginary) | |
template<typename FT > | |
std::ostream & | operator<< (std::ostream &, const std::vector< FT > &) |
input and output More... | |
template<typename FT > | |
std::istream & | operator>> (std::istream &in, std::vector< FT > &A) |
Input stream support for std::vector<FT>. | |
template<typename FT > | |
std::vector< FT > | operator- (const std::vector< FT > &) |
arithmetic operators More... | |
template<typename FT > | |
std::vector< FT > | operator+ (const std::vector< FT > &A, const std::vector< FT > &B) |
vector-vector addition | |
template<typename FT > | |
std::vector< FT > | operator+ (const std::vector< FT > &A, const FT &s) |
vector-scalar addition. | |
template<typename FT > | |
std::vector< FT > | operator+ (const FT &s, const std::vector< FT > &A) |
scalar-vector addition. | |
template<typename FT > | |
std::vector< FT > | operator- (const std::vector< FT > &A, const std::vector< FT > &B) |
vector-vector subtraction | |
template<typename FT > | |
std::vector< FT > | operator- (const std::vector< FT > &A, const FT &s) |
vector-scalar subtraction. | |
template<typename FT > | |
std::vector< FT > | operator- (const FT &s, const std::vector< FT > &A) |
scalar-vector subtraction. | |
template<typename FT1 , typename FT2 > | |
std::vector< FT1 > | operator* (const std::vector< FT1 > &A, const FT2 &s) |
vector-scalar multiplication | |
template<typename FT1 , typename FT2 > | |
std::vector< FT1 > | operator* (const FT2 &s, const std::vector< FT1 > &A) |
vector-scalar multiplication | |
template<typename FT1 , typename FT2 > | |
std::vector< FT1 > | operator/ (const std::vector< FT1 > &A, const FT2 &s) |
vector-scalar division | |
template<typename FT1 , typename FT2 > | |
std::vector< FT1 > | operator/ (const FT2 &s, const std::vector< FT1 > &A) |
vector-scalar division | |
template<typename FT > | |
std::vector< FT > | elem_mult (const std::vector< FT > &, const std::vector< FT > &) |
element-wise multiplication / division More... | |
template<typename FT > | |
std::vector< FT > | elem_divd (const std::vector< FT > &v1, const std::vector< FT > &v2) |
vector-vector element-wise division | |
template<typename FT > | |
std::vector< FT > & | elem_mult_eq (std::vector< FT > &v1, const std::vector< FT > &v2) |
vector-vector element-wise multiplication: v1 *= v2. | |
template<typename FT > | |
std::vector< FT > & | elem_divd_eq (std::vector< FT > &v1, const std::vector< FT > &v2) |
vector-vector element-wise division: v1 /= v2. | |
template<typename FT > | |
FT | operator* (const std::vector< FT > &, const std::vector< FT > &) |
dot product More... | |
template<typename FT > | |
FT | dot (const std::vector< FT > &v1, const std::vector< FT > &v2) |
Inner product for vectors. | |
template<typename FT > | |
FT | norm (const std::vector< FT > &) |
utilities More... | |
template<typename FT > | |
FT | norm (const std::vector< std::complex< FT > > &v) |
std::vector's norm in Euclidean space. | |
template<typename FT > | |
void | swap (std::vector< FT > &lhs, std::vector< FT > &rhs) |
Swap two vectors. | |
template<typename FT > | |
std::vector< FT > | linspace (FT a, FT b, int n) |
Generates a vector of n points linearly spaced between and including a and b. | |
template<typename FT > | |
FT | sum (const std::vector< FT > &v) |
std::vector's sum. | |
template<typename FT > | |
FT | min (const std::vector< FT > &v) |
Minimum value of vector. | |
template<typename FT > | |
FT | max (const std::vector< FT > &v) |
Maximum value of vector. | |
template<typename FT > | |
FT | mean (const std::vector< FT > &v) |
std::vector's mean. | |
template<typename FT > | |
std::vector< FT > | abs (const std::vector< std::complex< FT > > &v) |
Get magnitude of a complex vector. | |
template<typename FT > | |
std::vector< FT > | arg (const std::vector< std::complex< FT > > &v) |
Get angle of a complex vector. | |
template<typename FT > | |
std::vector< FT > | real (const std::vector< std::complex< FT > > &v) |
Get real part of a complex vector. | |
template<typename FT > | |
std::vector< FT > | imag (const std::vector< std::complex< FT > > &v) |
Get imaginary part of a complex vector. | |
template<typename FT > | |
std::vector< std::complex< FT > > | complex_vector (const std::vector< FT > &) |
Convert real vector to complex vector. | |
template<typename FT > | |
std::vector< std::complex< FT > > | complex_vector (const std::vector< FT > &vR, const std::vector< FT > &vI) |
Convert real vector to complex vector (A for real, B for imaginary) | |
double | determinant (const MATRIX &A) |
bool | inverse (const MATRIX &A, MATRIX &invA) |
MATRIX | inverse (const MATRIX &A) |
void | svd_decompose (const MATRIX &A, MATRIX &U, MATRIX &S, MATRIX &V) |
bool | solve_least_squares (const MATRIX &A, const std::vector< double > &b, std::vector< double > &x) |
template<class T > | |
Sign | sign (T x) |
returns the sign of a value. | |
template<typename FT > | |
std::ostream & | operator<< (std::ostream &os, const GenericPlane< FT > &plane) |
Output stream support for GenericPlane. | |
template<typename FT > | |
std::istream & | operator>> (std::istream &is, GenericPlane< FT > &plane) |
Input stream support for GenericPlane. | |
std::ostream & | operator<< (std::ostream &os, PointCloud::Vertex v) |
Output stream support for PointCloud::Vertex. | |
std::ostream & | operator<< (std::ostream &os, PolyMesh::Vertex v) |
Output stream support for PolyMesh::Vertex. | |
std::ostream & | operator<< (std::ostream &os, PolyMesh::Edge e) |
Output stream support for PolyMesh::Edge. | |
std::ostream & | operator<< (std::ostream &os, PolyMesh::HalfFace h) |
Output stream support for PolyMesh::HalfFace. | |
std::ostream & | operator<< (std::ostream &os, PolyMesh::Face f) |
Output stream support for PolyMesh::Face. | |
std::ostream & | operator<< (std::ostream &os, PolyMesh::Cell c) |
Output stream support for PolyMesh::Cell. | |
template<typename FT > | |
std::ostream & | operator<< (std::ostream &os, const Quat< FT > &Q) |
Output stream support for Quat. | |
template<typename FT > | |
std::istream & | operator>> (std::istream &is, Quat< FT > &Q) |
Input stream support for Quat. | |
template<class FT > | |
bool | has_nan (const Quat< FT > &Q) |
Do the coordinates of the quaternion have NaN? | |
float | random_float () |
Random real in [0, 1]. | |
float | random_float (float min, float max) |
Random real number in the range [min, max]. | |
vec3 | random_color (bool allow_dark=false) |
Generates a random color. The parameter allow_dark controls if too dark colors are allowed. | |
std::ostream & | operator<< (std::ostream &os, SurfaceMesh::Vertex v) |
Output stream support for SurfaceMesh::Vertex. | |
std::ostream & | operator<< (std::ostream &os, SurfaceMesh::Halfedge h) |
Output stream support for SurfaceMesh::Halfedge. | |
std::ostream & | operator<< (std::ostream &os, SurfaceMesh::Edge e) |
Output stream support for SurfaceMesh::Edge. | |
std::ostream & | operator<< (std::ostream &os, SurfaceMesh::Face f) |
Output stream support for SurfaceMesh::Face. | |
template<typename FT > | |
bool | is_nan (FT v) |
Is this NaN? | |
template<class T > | |
T | clamp (T x, T lower, T upper) |
Clamps a num to be within a given range. | |
int | next_pow2 (int a) |
Calculates the next larger power of 2. If the input is already a power of 2, it will return itself. More... | |
template<class FT > | |
FT | truncate_digits (const FT &v, int num) |
Rounds the given floating point number v to have num digits. | |
template<size_t N, class T > | |
T | dot (const Vec< N, T > &v1, const Vec< N, T > &v2) |
Computes the dot product of two vectors. | |
template<size_t N, class T > | |
Vec< N, T > | operator- (const Vec< N, T > &v1) |
Computes the 'negative' vector. | |
template<class T2 , size_t N, class T > | |
Vec< N, T > | operator* (T2 s, const Vec< N, T > &v) |
Computes the scalar-vector product. | |
template<size_t N, class T > | |
Vec< N, T > | operator+ (const Vec< N, T > &v1, const Vec< N, T > &v2) |
Computes the addition of two vectors. | |
template<size_t N, class T > | |
Vec< N, T > | operator- (const Vec< N, T > &v1, const Vec< N, T > &v2) |
Computes the subtraction of two vectors. | |
template<size_t N, class T > | |
T | length (const Vec< N, T > &v) |
Computes the length/magnitude of a vector. | |
template<size_t N, class T > | |
T | norm (const Vec< N, T > &v) |
Computes the length/magnitude of a vector. | |
template<size_t N, class T > | |
T | length2 (const Vec< N, T > &v) |
Computes the squared length/magnitude of a vector. | |
template<size_t N, class T > | |
T | distance (const Vec< N, T > &v1, const Vec< N, T > &v2) |
Computes the distance between two vectors/points. | |
template<size_t N, class T > | |
T | distance2 (const Vec< N, T > &v1, const Vec< N, T > &v2) |
Computes the squared distance between two vectors/points. | |
template<size_t N, class T > | |
Vec< N, T > | normalize (const Vec< N, T > &v) |
Computes and returns the normalized vector (Note: the input vector is not modified). | |
template<size_t N, class T > | |
Vec< N, T > | mix (const Vec< N, T > &v1, const Vec< N, T > &v2, T w) |
template<class T > | |
T | dot (const Vec< 2, T > &v1, const Vec< 2, T > &v2) |
Compute the dot product of two 2D vectors. | |
template<class T > | |
T | det (const Vec< 2, T > &v1, const Vec< 2, T > &v2) |
Compute the determinant of the 2x2 matrix formed by the two 2D vectors as the two rows. | |
template<class T > | |
Vec< 2, T > | operator- (const Vec< 2, T > &v1) |
The negative vector. | |
template<class T2 , class T > | |
Vec< 2, T > | operator* (T2 s, const Vec< 2, T > &v) |
Scalar-vector multiplication. | |
template<class T > | |
Vec< 2, T > | operator+ (const Vec< 2, T > &v1, const Vec< 2, T > &v2) |
Vector-vector addition. | |
template<class T > | |
Vec< 2, T > | operator- (const Vec< 2, T > &v1, const Vec< 2, T > &v2) |
Vector-vector subtraction. | |
template<class T > | |
T | dot (const Vec< 3, T > &v1, const Vec< 3, T > &v2) |
Compute the dot product of two 3D vectors. | |
template<class T > | |
Vec< 3, T > | cross (const Vec< 3, T > &v1, const Vec< 3, T > &v2) |
Compute the cross product of two 3D vectors. | |
template<class T > | |
Vec< 3, T > | operator- (const Vec< 3, T > &v1) |
The negative vector. | |
template<class T2 , class T > | |
Vec< 3, T > | operator* (T2 s, const Vec< 3, T > &v) |
Scalar-vector multiplication. | |
template<class T > | |
Vec< 3, T > | operator+ (const Vec< 3, T > &v1, const Vec< 3, T > &v2) |
Vector-vector addition. | |
template<class T > | |
Vec< 3, T > | operator- (const Vec< 3, T > &v1, const Vec< 3, T > &v2) |
Vector-vector subtraction. | |
template<class T > | |
Vec< 3, T > | orthogonal (const Vec< 3, T > &v) |
Compute a vector that is orthogonal to the given vector. | |
template<class T > | |
T | dot (const Vec< 4, T > &v1, const Vec< 4, T > &v2) |
Compute the dot product of two 4D vectors. | |
template<class T > | |
Vec< 4, T > | operator- (const Vec< 4, T > &v1) |
The negative vector. | |
template<class T2 , class T > | |
Vec< 4, T > | operator* (T2 s, const Vec< 4, T > &v) |
Scalar-vector multiplication. | |
template<class T > | |
Vec< 4, T > | operator+ (const Vec< 4, T > &v1, const Vec< 4, T > &v2) |
Vector-vector addition. | |
template<class T > | |
Vec< 4, T > | operator- (const Vec< 4, T > &v1, const Vec< 4, T > &v2) |
Vector-vector subtraction. | |
template<size_t N, class T > | |
std::ostream & | operator<< (std::ostream &out, const Vec< N, T > &v) |
Output stream support for Vec. | |
template<size_t N, class T > | |
std::istream & | operator>> (std::istream &in, Vec< N, T > &v) |
Input stream support for Vec. | |
template<class T > | |
std::ostream & | operator<< (std::ostream &out, const Vec< 2, T > &v) |
Output stream support specialized for 2D vectors. | |
template<class T > | |
std::istream & | operator>> (std::istream &in, Vec< 2, T > &v) |
Input stream support specialized for 2D vectors. | |
template<class T > | |
std::ostream & | operator<< (std::ostream &out, const Vec< 3, T > &v) |
Output stream support specialized for 3D vectors. | |
template<class T > | |
std::istream & | operator>> (std::istream &in, Vec< 3, T > &v) |
Input stream support specialized for 3D vectors. | |
template<class T > | |
std::ostream & | operator<< (std::ostream &out, const Vec< 4, T > &v) |
Output stream support specialized for 4D vectors. | |
template<class T > | |
std::istream & | operator>> (std::istream &in, Vec< 4, T > &v) |
Input stream support specialized for 4D vectors. | |
template<size_t N, class T > | |
bool | has_nan (const Vec< N, T > &v) |
Do the coordinates of a vector have NaN? | |
template<size_t N, class T > | |
bool | operator== (const Vec< N, T > &a, const Vec< N, T > &b) |
Test if two vectors are strictly identical. | |
template<size_t N, class T > | |
bool | operator!= (const Vec< N, T > &a, const Vec< N, T > &b) |
Test if two vectors are strictly not identical. | |
template<size_t N, class T > | |
bool | operator< (const Vec< N, T > &a, const Vec< N, T > &b) |
Lexicographic comparison of two vectors. | |
template<size_t N, class T > | |
Vec< N, T > | comp_product (const Vec< N, T > &v1, const Vec< N, T > &v2) |
Component-wise product of two vectors. | |
template<size_t N, class T > | |
Vec< N, T > | comp_min (const Vec< N, T > &v1, const Vec< N, T > &v2) |
Component-wise minimum vector. | |
template<size_t N, class T > | |
Vec< N, T > | comp_max (const Vec< N, T > &v1, const Vec< N, T > &v2) |
Component-wise maximum vector. | |
template<size_t N, class T > | |
T | min_coord (const Vec< N, T > &a) |
The minimum coordinate of elements in a vector. | |
template<size_t N, class T > | |
T | max_coord (const Vec< N, T > &a) |
The maximum coordinate of elements in a vector. | |
template<size_t N, class T > | |
Vec< N, T > | clamp (const Vec< N, T > &a, const Vec< N, T > &lower, const Vec< N, T > &upper) |
Component-wise clamp. | |
void | discretize_image (std::vector< unsigned char > &data, int width, int height, int channels, int num_stripes) |
Discretize a gradually varying-color (from left to right) image into a set of uniform colored vertical stripes. More... | |
std::ostream & | operator<< (std::ostream &s, console::Style style) |
Call this function to enable the console style (if supported) More... | |
std::string | relative_path (const std::string &from_path, const std::string &to_path) |
std::string | absolute_path (const std::string &path) |
std::string | convert_to_windows_style (const std::string &path) |
std::string | convert_to_unix_style (const std::string &path) |
char | native_path_separator () |
bool | is_native_style (const std::string &path) |
std::string | convert_to_native_style (const std::string &path) |
void | get_directory_entries (const std::string &dir, std::vector< std::string > &result, bool recursive) |
void | get_files (const std::string &dir, std::vector< std::string > &result, bool recursive) |
void | get_sub_directories (const std::string &dir, std::vector< std::string > &result, bool recursive) |
bool | copy_file (const std::string &original, const std::string ©) |
bool | file_contains_string (const std::string &file_name, const std::string &x) |
void | read_file_to_string (const std::string &filename, std::string &data) |
void | write_string_to_file (const std::string &data, const std::string &filename) |
void | initialize (bool use_log_file=false, bool use_setting_file=false, const std::string &resource_dir=Easy3D_RESOURCE_DIR) |
Initialization of Easy3D. More... | |
void | print_progress (float percentage) |
int | version_major () |
returns the major version number of Easy3D | |
int | version_minor () |
returns the major version number of Easy3D | |
int | version_patch () |
returns the minor version number of Easy3D | |
std::string | version () |
returns the version string of Easy3D | |
Global methods for connection and disconnection. | |
template<typename SIGNAL , typename FUNCTION > | |
int | connect (SIGNAL *signal, FUNCTION const &slot) |
Connects a function to the signal. More... | |
template<typename SIGNAL , typename CLASS , typename FUNCTION > | |
int | connect (SIGNAL *signal, CLASS *inst, FUNCTION const &slot) |
Connects a member function of an object to this Signal. More... | |
template<typename... Args> | |
int | connect (Signal< Args... > *sender, Signal< Args... > *receiver) |
Connects this signal to another signal. More... | |
template<typename SIGNAL > | |
void | disconnect (SIGNAL *signal, int id) |
Disconnects a previously connected function. | |
template<typename SIGNAL > | |
void | disconnect_all (SIGNAL *signal) |
Disconnects all previously connected functions. | |
Helper functions for resolving overloaded functions. | |
template<typename... Args> | |
constexpr auto | overload (void(*func)(Args...)) -> void(*)(Args...) |
Helper function for resolving overloaded non-member functions. More... | |
template<typename C , typename... Args> | |
constexpr auto | overload (void(C::*func)(Args...)) -> void(C::*)(Args...) |
Helper function for resolving overloaded member functions. More... | |
The code is adapted from libQGLViewer with modifications.
libQGLViewer is a C++ library based on Qt that eases the creation of OpenGL 3D viewers.
Gathers different basic types for geometric operations. Types defined here are points/vectors, lines, segments, planes, boxes and matrices in 2D and 3D.
the code is adapted from Surface_mesh with modifications and significant enhancement.
Surface_mesh is a halfedge-based mesh data structure for representing and processing 2-manifold polygonal surface meshes. It is implemented in C++ and designed with an emphasis on simplicity and efficiency.
the code is adapted from libQGLViewer with modifications.
libQGLViewer is a C++ library based on Qt that eases the creation of OpenGL 3D viewers.
The code in this file is adapted from libQGLViewer with significant modifications and enhancement.
the code is adapted from ShaderProgram with modifications.
This class allows to create programs, load shaders from files, associate vertex attribute names with locations, and work with uniforms, including blocks. It also provides access to the info logs, and many more useful functionalities.
Cholesky decomposition of a symmetric, positive definite matrix.
For a symmetric, positive definite matrix A, this function computes the Cholesky factorization, i.e. it computes a lower triangular matrix L such that A = L*L'. If the matrix is not symmetric or positive definite, the function computes only a partial decomposition.
Solve a linear system A*x = b, using the previously computed Cholesky factorization of A: L*L'.
L | N x N matrix, which is the result of a call to cholesky_decompose(). |
b | N-dimensional input right-hand vector. |
x | Output N-dimensional solution set. |
Solve a set (i.e, M) of linear systems A*X = B, using the previously computed Cholesky factorization of A: L*L'. (this function can be used to solve for the inverse of a symmetric, positive definite matrix, by using B = I).
L | N x N matrix, which is the result of a call to cholesky_decompose(). |
B | N x M right-hand matrix. |
X | Output N x M solution matrix. |
Convert real matrix to complex matrix.
Convert real matrix to std::complex matrix.
|
inline |
Connects a member function of an object to this Signal.
The returned value can be used to disconnect the function from this signal.
overload
for a lighter syntax.
|
inline |
Connects a function to the signal.
The returned value can be used to disconnect the function from this signal.
overload
for a lighter syntax. Connects this signal to another
signal.
Upon return, the emission of this signal will trigger another
to be emitted. The returned value can be used to disconnect the connected signal.
|
inline |
Partial specialization for computing the determinant of a 2x2 matrix.
|
inline |
Partial specialization for computing the determinant of a 3x3 matrix.
|
inline |
Partial specialization for computing the determinant of a 4x4 matrix.
T easy3d::determinant | ( | const Mat< N, N, T > & | m | ) |
Return the determinant of N x N (square) matrix m.
|
inline |
Compute the determinant of a square matrix.
double determinant | ( | const MATRIX & | A | ) |
Compute the determinant of a square matrix.
A | The input matrix. |
std::vector< FT > diagonal | ( | const Matrix< FT > & | A | ) |
Get the diagonal entries of matrix.
Matrix< FT > diagonal | ( | const std::vector< FT > & | d | ) |
Generate the diagonal of matrix by given its diagonal elements.
void discretize_image | ( | std::vector< unsigned char > & | data, |
int | width, | ||
int | height, | ||
int | channels, | ||
int | num_stripes | ||
) |
Discretize a gradually varying-color (from left to right) image into a set of uniform colored vertical stripes.
data | The input data to be discretized. |
width | The width of the image (i.e., number of pixels in a row). |
height | The height of the image (i.e., number of pixels in a column). |
channels | The number or color component per pixel. |
num_stripes | The number of stripes. The image will remain unmodified if num_stripes >= image width. |
element-wise multiplication / division
matrix-matrix element-wise multiplication
|
inline |
element-wise multiplication / division
vector-vector element-wise multiplication
matrix-matrix element-wise multiplication
SurfaceMesh * extrude | ( | const std::vector< Polygon2 > & | contours, |
float | height | ||
) |
Extrudes a 3D surface mesh from a set of simple contours.
contours | The input contours, which must be simple, i.e.,
|
height | The height (in the Z direction) of the extruded 3D model. |
bool extrude | ( | SurfaceMesh * | mesh, |
const std::vector< Polygon2 > & | contours, | ||
float | height | ||
) |
Extrudes a 3D surface mesh from a set of simple contours.
mesh | The output mesh model. Must be allocated before hand. |
contours | The input contours, which must be simple, i.e.,
|
height | The height (in the Z direction) of the extruded 3D model. |
|
inline |
Perform Gauss-Jordan elimination to solve a set of linear equations and additionally compute the inverse of the input coefficient matrix.
a | N x N input matrix. |
b | N x M input matrix containing right-hand vectors. |
ainv | Output inverse of a. This may safely be the same location as a (a will be overwritten). |
x | Output solution set. This may safely be the same location as b (b will be overwritten). |
true
on success, false if a is a singular matrix.
|
inline |
Does the representation of a box have NaN?
Matrix< FT > identity | ( | int | N, |
const FT & | x | ||
) |
unit and diagonal matrix
Generate an identity matrix.
void initialize | ( | bool | use_log_file = false , |
bool | use_setting_file = false , |
||
const std::string & | resource_dir = Easy3D_RESOURCE_DIR |
||
) |
Initialization of Easy3D.
This function initializes logging, setting, and resources. Internally it calls (and is thus identical to calling) logging::initialize(), setting::initialize(), and resource::initialize(). For more fine-grained initializations, please refer to the documentation of these functions.
use_log_file | True to create a ".log" file (which will be created next to the executable program). |
use_setting_file | True to create an ".ini" file (which will be created next to the executable program). This setting file stores the default rendering parameters. Users can modify this file to change the default rendering parameters, then the changes will be effective for the future. |
resource_dir | The resource directory containing color maps, shaders, textures, fonts, etc. Easy3D_RESOURCE_DIR is the default value, which is the directory coming with the Easy3D distribution. In most cases you should use the default resource directory (unless you want to use different resources). |
Partial specialization for computing the inverse of a 2x2 matrix.
Partial specialization for computing the inverse of a 3x3 matrix.
Partial specialization for computing the inverse of a 4x4 matrix.
Return the inverse of N x N (square) matrix m.
Compute the inverse of a square matrix.
Compute the inverse of a square matrix. This is a wrapper around Eigen's inverse function.
A | The input matrix. |
Compute the inverse of a square matrix. This is a wrapper around Eigen's inverse function.
A | The input matrix. |
invA | The inverse of A. |
|
inline |
Solve a set of linear equations using outputs from lu_decomposition() as inputs.
alu | N x N matrix, which is the result of a call to lu_decomposition(). |
rowp | Row permutation data for alu, which is the result of a call to lu_decomposition(). |
b | N-dimensional input right-hand vector. |
x | Output N-dimensional solution set. |
Solve a linear system:
The last line may be repeated for any number of b vectors using the same alu and rowp inputs.
Find the inverse of a matrix:
Find the determinant of a matrix:
|
inline |
Perform LU decomposition of a square matrix.
The outputs from this method can further be used for multiple purposes:
a | N x N input matrix. |
alu | Output N x N matrix, containing the LU decomposition of a row-wise permutation of a. This may safely be the same location as a (a will be overwritten). |
rowp | Output row permutation data for alu. |
d | The sign of determinant |
true
on success, false if a is a singular matrix. std::vector< FT > max | ( | const Matrix< FT > & | A | ) |
Maximum of matrix's column vectors.
std::vector< FT > min | ( | const Matrix< FT > & | A | ) |
Minimum of matrix's column vectors.
linear interpolation between between two vectors (x and y). The return value is computed as (1 − w) * v1 + w * v2.
This is an optimized version of matrix-matrix multiplication, where the destination matrix has already been allocated.
multiplication
This is an optimized version of matrix-matrix multiplication, where the destination matrix has already been allocated.
std::vector< FT > mult | ( | const Matrix< FT > & | A, |
const std::vector< FT > & | b | ||
) |
This is an optimized version of matrix-vector multiplication, where the destination vector has already been allocated.
void mult | ( | const Matrix< FT > & | A, |
const std::vector< FT > & | b, | ||
std::vector< FT > & | c | ||
) |
This is an optimized version of matrix-vector multiplication, where the destination vector has already been allocated.
matrix-matrix tranpose multiplication: A * B^T.
Matrix< FT > mult_transpose | ( | const std::vector< FT > & | a, |
const std::vector< FT > & | b | ||
) |
vector-vector tranpose multiplication: a * b^T.
|
inline |
Calculates the next larger power of 2. If the input is already a power of 2, it will return itself.
a | The starting point for finding the next power of 2. |
FT norm | ( | const Matrix< FT > & | A | ) |
utilities
Compute Frobenius norm of matrix.
FT norm | ( | const std::vector< FT > & | v | ) |
utilities
std::vector's norm in Euclidean space.
Non-homogeneous, specialized matrix-vector multiplication for 3x3 matrices and 3D vectors.
Matrix-vector multiplication for 3x3 matrices and 3D vectors.
Non-homogeneous, specialized matrix-vector multiplication for 4x4 matrices and 4D vectors.
Matrix-vector multiplication for 4x4 matrices and 4D vectors.
matrix-matrix multiplication
std::vector< FT > operator* | ( | const Matrix< FT > & | A, |
const std::vector< FT > & | b | ||
) |
matrix-vector multiplication
FT operator* | ( | const std::vector< FT > & | v1, |
const std::vector< FT > & | v2 | ||
) |
dot product
Inner product for vectors.
matrix-matrix addition
matrix-matrix subtraction
std::vector< FT > operator- | ( | const std::vector< FT > & | A | ) |
arithmetic operators
get negative vector
std::ostream & operator<< | ( | std::ostream & | out, |
const Matrix< FT > & | A | ||
) |
input and output
Overload the output stream function.
std::ostream & operator<< | ( | std::ostream & | out, |
const std::vector< FT > & | A | ||
) |
input and output
Output stream support for std::vector<FT>.
|
inline |
Output stream support for GenericLine.
|
inline |
Output stream support for Graph::Edge.
|
inline |
Output stream support for Graph::Vertex.
|
inline |
Output stream support for Mat.
std::ostream & operator<< | ( | std::ostream & | s, |
console::Style | style | ||
) |
Call this function to enable the console style (if supported)
Styled output. Example usage:
std::istream & operator>> | ( | std::istream & | in, |
Matrix< FT > & | A | ||
) |
Overload the input stream function.
std::istream & operator>> | ( | std::istream & | input, |
Mat< N, M, T > & | m | ||
) |
Input stream support for Mat.
|
inline |
Input stream support for GenericLine.
|
inlineconstexpr |
Helper function for resolving overloaded non-member functions.
In case of overloading, the pointer to a function does not map to a unique symbol, so the compiler won't be able to pick the right symbol. One way of resolving the right symbol is to explicitly cast the function pointer to the right function type, e.g., static_cast<void (*)(const std::string&, int)>(func), which is a bit heavy syntax. This helper function does just that for a lighter syntax. Example usage:
|
inlineconstexpr |
Helper function for resolving overloaded member functions.
In case of overloading, the pointer to a member function does not map to a unique symbol, so the compiler won't be able to pick the right symbol. One way of resolving the right symbol is to explicitly cast the function pointer to the right function type, e.g., static_cast<void (Viewer::*)(const std::string&, int)>(&Viewer::print), which is a bit heave syntax. This helper function does just that for a lighter syntax. Example usage:
void print_progress | ( | float | percentage | ) |
A simple progress indicator for console applications. Given percentage = 0.75, the output looks like 75% [|||||||||||||||||||||||||||||||||||||||||| ]
bool solve_least_squares | ( | const MATRIX & | A, |
const std::vector< double > & | b, | ||
std::vector< double > & | x | ||
) |
Solve a linear system (Ax=b) in the least squares sense.
A | The m-by-n (m >= n) coefficient matrix. |
b | The right-hand constant vector (m dimensional). |
x | The result of the system was successfully solved (m dimensional). |
Compute the Singular Value Decomposition (SVD) of an M by N matrix. This is a wrapper around Eigen's JacobiSVD.
For an m-by-n matrix A, the singular value decomposition is an m-by-m orthogonal matrix U, an m-by-n diagonal matrix S, and an n-by-n orthogonal matrix V so that A = U*S*V^T.
The singular values, s[k] = S[k][k], are sorted in decreasing order, i.e., sigma[i] >= sigma[i+1] for any i.
The singular value decomposition always exists, so the decomposition will never fail.
A | The input matrix to be decomposed, which can have an arbitrary size. |
U | The left side M by M orthogonal matrix. |
S | The middle M by N diagonal matrix, with zero elements outside of its main diagonal. |
V | The right side N by N orthogonal matrix V. |
Return the tensor product (outer product) of vectors u and v, where u is treated as a column vector and v is treated as a row vector.
|
inline |
Compute the trace of a square matrix.
FT trace | ( | const Matrix< FT > & | A | ) |
the trace of this matrix, i.e. the sum of the coefficients on the main diagonal. NOTE: the matrix can be any matrix, not necessarily square.
Compute the trace of this matrix, i.e. the sum of the coefficients on the main diagonal. NOTE: the matrix can be any matrix, not necessarily square.
transpose multiplication
matrix-matrix transpose multiplication: A^T * B.
std::vector< FT > transpose_mult | ( | const Matrix< FT > & | A, |
const std::vector< FT > & | v | ||
) |
matrix-vector transpose multiplication: A^T * b.