![]() |
VCG Library
|
Namespaces | |
| namespace | io |
Classes | |
| class | Allocator |
| Class to safely add and delete elements in a mesh. More... | |
| class | AnisotropicDistance |
| class | Append |
| Class to safely duplicate and append (portion of) meshes. More... | |
| struct | BaseInterpolator |
| struct | BasicCrossFunctor |
| struct | CenterPointBarycenter |
| class | Clean |
| Class of static functions to clean//restore meshs. More... | |
| class | CoM |
| A class for managing curves on a 2-manifold (Curve on Manifold - CoM). More... | |
| class | ConnectedComponentIterator |
| class | EdgeConnectedComponentIterator |
| class | EdgeLen |
| class | EdgeSplSphere |
| struct | EuclideanDistance |
| class | Fitmaps |
| class | Geodesic |
| Class for computing approximate geodesic distances on a mesh. More... | |
| class | HalfEdgeTopology |
| Class containing functions to modify the topology of a halfedge based mesh. More... | |
| class | HausdorffSampler |
| class | Inertia |
| Methods for computing Polyhedral Mass properties (like inertia tensor, volume, etc) More... | |
| class | IsotropicDistance |
| class | MeshSampler |
| struct | MidPoint |
| struct | MidPointArc |
| struct | MidPointArcNaive |
| struct | MidPointButterfly |
| struct | MidPointButterfly2 |
| struct | MidPointSphere |
| class | QualityEdgePredicate |
| class | QualityMidPointFunctor |
| class | RedetailSampler |
| class | RefinedFaceData |
| class | SelectionStack |
| A stack for saving and restoring selection. More... | |
| class | Split |
| class | SurfaceSampling |
| Main Class of the Sampling framework. More... | |
| class | TriSplit |
| Triangle split Simple templated function for splitting a triangle with a internal point. It can be templated on a CenterPoint class that is used to generate the position of the internal point. More... | |
| class | TrivialPointerSampler |
| class | TrivialSampler |
| A basic sampler class that show the required interface used by the SurfaceSampling class. More... | |
| class | UpdateBounding |
| This class is used to compute or update the bounding box of a mesh.. More... | |
| class | UpdateColor |
| Generation and processing of per-vertex and per-face colors according to various strategy. More... | |
| class | UpdateComponentEP |
| This class is used to compute or update the precomputed data used to efficiently compute point-face distances. More... | |
| class | UpdateCurvature |
| Management, updating and computation of per-vertex and per-face normals. More... | |
| class | UpdateCurvatureFitting |
| Computation of per-vertex directions and values of curvature. More... | |
| class | UpdateFlags |
| Management, updating and computation of per-vertex and per-face flags (like border flags). More... | |
| class | UpdateHalfEdges |
| This class is used to build edge based data structure from indexed data structure and viceversa. More... | |
| struct | UpdateIndexed |
| class | UpdateNormal |
| Management, updating and computation of per-vertex, per-face, and per-wedge normals. More... | |
| class | UpdatePosition |
| This class is used to update vertex position according to a transformation matrix. More... | |
| class | UpdateQuality |
| Generation of per-vertex and per-face qualities. More... | |
| class | UpdateSelection |
| Management, updating and conditional computation of selections (per-vertex, per-edge, and per-face). More... | |
| class | UpdateTexture |
| This class is used to update/generate texcoord position according to various critera. More... | |
| class | UpdateTopology |
| Generation of per-vertex and per-face topological information. More... | |
Functions | |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::VertexType &v) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::FaceType &f) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::EdgeType &e) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::HEdgeType &h) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::TetraType &t) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::VertexType *vp) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::FaceType *fp) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::EdgeType *e) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::HEdgeType *h) |
| template<class MeshType > | |
| size_t | Index (const MeshType &m, const typename MeshType::TetraType *t) |
| template<class MeshType > | |
| bool | IsValidPointer (MeshType &m, const typename MeshType::VertexType *vp) |
| template<class MeshType > | |
| bool | IsValidPointer (MeshType &m, const typename MeshType::EdgeType *ep) |
| template<class MeshType > | |
| bool | IsValidPointer (MeshType &m, const typename MeshType::FaceType *fp) |
| template<class MeshType > | |
| bool | IsValidPointer (MeshType &m, const typename MeshType::HEdgeType *hp) |
| template<class MeshType > | |
| bool | IsValidPointer (MeshType &m, const typename MeshType::TetraType *tp) |
| template<class MeshType , class ATTR_CONT > | |
| void | ReorderAttribute (ATTR_CONT &c, std::vector< size_t > &newVertIndex, MeshType &) |
| template<class MeshType , class ATTR_CONT > | |
| void | ResizeAttribute (ATTR_CONT &c, size_t sz, MeshType &) |
| template<class MeshType , typename Callable > | |
| void | ForEachFacePos (const MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachFacePos (MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachFace (const MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachFace (MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachVertex (const MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachVertex (MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachHEdge (const MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachHEdge (MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachEdge (const MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachEdge (MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachTetra (const MeshType &m, Callable action) |
| template<class MeshType , typename Callable > | |
| void | ForEachTetra (MeshType &m, Callable action) |
| template<class MeshType > | |
| MeshType::ScalarType | ComputePoissonDiskRadius (MeshType &origMesh, int sampleNum) |
| template<class MeshType > | |
| void | MontecarloSampling (MeshType &m, MeshType &mm, int sampleNum) |
| template<class MeshType > | |
| void | MontecarloSampling (MeshType &m, std::vector< Point3f > &montercarloSamples, int sampleNum) |
| template<class MeshType > | |
| void | PoissonSampling (MeshType &m, std::vector< typename MeshType::CoordType > &poissonSamples, int sampleNum, typename MeshType::ScalarType &radius, typename MeshType::ScalarType radiusVariance=1, typename MeshType::ScalarType PruningByNumberTolerance=0.04f, unsigned int randSeed=0) |
| template<class MeshType > | |
| void | PoissonPruning (MeshType &m, std::vector< typename MeshType::VertexPointer > &poissonSamples, float radius, unsigned int randSeed=0) |
| Low level wrapper for Poisson Disk Pruning. | |
| template<class MeshType > | |
| void | PoissonPruning (MeshType &m, std::vector< typename MeshType::CoordType > &poissonSamples, float radius, unsigned int randSeed=0) |
| Low level wrapper for Poisson Disk Pruning. | |
| template<class MeshType > | |
| void | PoissonPruningExact (MeshType &m, std::vector< typename MeshType::VertexPointer > &poissonSamples, typename MeshType::ScalarType &radius, int sampleNum, float tolerance=0.04, int maxIter=20, unsigned int randSeed=0) |
| Very simple wrapping for the Exact Poisson Disk Pruning. | |
| template<class MESH_TYPE , class MIDPOINT , class EDGEPRED > | |
| bool | RefineE (MESH_TYPE &m, MIDPOINT &mid, EDGEPRED &ep, bool RefineSelected=false, CallBackPos *cb=0) |
| template<class MESH_TYPE , class MIDPOINT > | |
| bool | Refine (MESH_TYPE &m, MIDPOINT mid, typename MESH_TYPE::ScalarType thr=0, bool RefineSelected=false, CallBackPos *cb=0) |
| template<class MeshType > | |
| void | TrivialMidPointRefine (MeshType &m, bool onlySelected=false) |
| Trivial function for 1->4 triangle split. | |
| template<class MESH_TYPE , class EDGEPRED > | |
| bool | RefineMidpoint (MESH_TYPE &m, EDGEPRED &ep, bool RefineSelected=false, CallBackPos *cb=0) |
| template<class TetraMeshType > | |
| void | Tetrahedron (TetraMeshType &in) |
| Build a tetrahedron as a triangular mesh. | |
| template<class DodMeshType > | |
| void | Dodecahedron (DodMeshType &in) |
| Build a dodecahedron as a triangular mesh. | |
| template<class DodMeshType > | |
| void | DodecahedronSym (DodMeshType &in) |
| Build a symmetric dodecahedron as a triangular mesh. | |
| template<class OctMeshType > | |
| void | Octahedron (OctMeshType &in) |
| Build an octahedron as a triangular mesh. | |
| template<class IcoMeshType > | |
| void | Icosahedron (IcoMeshType &in) |
| Build an icosahedron as a triangular mesh. | |
| template<class MeshType > | |
| void | Hexahedron (MeshType &in) |
| Build a hexahedron (cube) as a triangular mesh. | |
| template<class MeshType > | |
| void | Square (MeshType &in) |
| Build a unit square in the XY plane as two triangles. | |
| template<class MeshType > | |
| void | SphericalCap (MeshType &in, float angleRad, const int subdiv=3) |
| Build a spherical cap from a hexagon refined on the sphere. | |
| template<class MeshType > | |
| void | Sphere (MeshType &in, const int subdiv=3) |
| Build a geodesic sphere by recursive icosahedron refinement. | |
| template<class MeshType > | |
| void | Sphere (MeshType &m, const typename MeshType::CoordType &position, typename MeshType::ScalarType radius=0, const int subdiv=3) |
| Convenience overload: build and place a sphere at a position with a radius. | |
| template<class MeshType > | |
| void | Cone (MeshType &in, const typename MeshType::ScalarType r1, const typename MeshType::ScalarType r2, const typename MeshType::ScalarType h, const int SubDiv=36) |
| r1 = raggio 1, r2 = raggio2, h = altezza (asse y) | |
| template<class MeshType > | |
| void | OrientedCone (MeshType &m, const typename MeshType::CoordType origin, const typename MeshType::CoordType end, const typename MeshType::ScalarType r1, const typename MeshType::ScalarType r2, const int SubDiv=36) |
| Build a cone/frustum oriented from origin to end. | |
| template<class MeshType > | |
| void | Box (MeshType &in, const typename MeshType::BoxType &bb) |
| Build a box aligned with the axes from a bounding box. | |
| template<class MeshType > | |
| void | Torus (MeshType &m, float hRingRadius, float vRingRadius, int hRingDiv=24, int vRingDiv=12) |
| Build a torus mesh around Z axis. | |
| template<class MeshType > | |
| void | SuperToroid (MeshType &m, float hRingRadius, float vRingRadius, float vSquareness, float hSquareness, int hRingDiv=24, int vRingDiv=12) |
| Build a supertoroid (superquadric torus). | |
| template<class MeshType > | |
| void | SuperEllipsoid (MeshType &m, float rFeature, float sFeature, float tFeature, int hRingDiv=24, int vRingDiv=12) |
| Build a superellipsoid (superquadric sphere-like surface). | |
| template<class MeshType , class InCoordType , class InFaceIndexType > | |
| void | BuildMeshFromCoordVectorIndexVector (MeshType &in, const std::vector< InCoordType > &v, const std::vector< InFaceIndexType > &f) |
| Build a mesh from coordinate and face-index vectors. | |
| template<class MeshType , class V > | |
| void | BuildMeshFromCoordVector (MeshType &in, const V &v) |
| Build a point-only mesh from coordinate vector (no faces). | |
| template<class TriMeshType , class EdgeMeshType > | |
| void | BuildFromFaceEdgeSel (TriMeshType &in, EdgeMeshType &out) |
| Build an edge mesh from the selected edges of a triangle mesh. | |
| template<class MeshType > | |
| void | Grid (MeshType &in, int w, int h, float wl, float hl, float *data=0) |
| Build a regular height-field grid mesh (vertices and faces). | |
| template<class MeshType > | |
| void | FaceGrid (MeshType &in, int w, int h) |
| Build faces for a regular grid given pre-allocated vertices. | |
| template<class MeshType > | |
| void | SparseFaceGrid (MeshType &in, const std::vector< int > &grid, int w, int h) |
| Build faces for a sparsely sampled regular grid. | |
| template<class MeshType > | |
| void | Annulus (MeshType &m, float externalRadius, float internalRadius, int slices) |
| Build an annulus (ring) in the XY plane. | |
| template<class MeshType > | |
| void | OrientedAnnulus (MeshType &m, typename MeshType::CoordType center, typename MeshType::CoordType norm, float externalRadius, float internalRadius, int slices) |
| Build an oriented annulus in 3D, centered and rotated. | |
| template<class MeshType > | |
| void | Circle2D (MeshType &m, float radius=1.0, int sides=32) |
| Build a 2D circle as a polyline (edges only) in XY plane. | |
| template<class MeshType > | |
| void | Disk (MeshType &m, int slices) |
| Build a unit disk (triangle fan) in the XY plane. | |
| template<class MeshType > | |
| void | OrientedDisk (MeshType &m, typename MeshType::CoordType center, typename MeshType::CoordType norm, float radius, int slices) |
| Build a disk oriented in 3D space. | |
| template<class MeshType > | |
| void | OrientedEllipticPrism (MeshType &m, const typename MeshType::CoordType origin, const typename MeshType::CoordType end, float radius, float xScale, float yScale, bool capped, int slices=32, int stacks=4) |
| Build an oriented elliptic prism (scaled cylinder), optionally capped. | |
| template<class MeshType > | |
| void | OrientedCylinder (MeshType &m, const typename MeshType::CoordType origin, const typename MeshType::CoordType end, float radius, bool capped, int slices=32, int stacks=4) |
| Build an oriented cylinder along a segment, optionally capped. | |
| template<class MeshType > | |
| void | Cylinder (MeshType &m, int slices, int stacks, bool capped=false) |
| Build a unit cylinder aligned to Y, optionally capped. | |
| template<class MeshType > | |
| void | BuildPrismFaceShell (MeshType &mIn, MeshType &mOut, float height=0, float inset=0, bool smoothFlag=false) |
| Build a shell made of face-aligned prisms for each face. | |
| template<class MeshType > | |
| void | BuildCylinderEdgeShell (MeshType &mIn, MeshType &mOut, float radius=0, int slices=16, int stacks=1) |
| Build a tubular shell around edges using oriented cylinders. | |
| template<class MeshType > | |
| void | BuildSphereVertexShell (MeshType &mIn, MeshType &mOut, float radius=0, int recDiv=2) |
| Build a spherical shell on each vertex by instancing a small sphere. | |
| template<class MeshType > | |
| void | BuildCylinderVertexShell (MeshType &mIn, MeshType &mOut, float radius=0, float height=0, int slices=16, int stacks=1) |
| Build a cylindrical shell on each vertex aligned with its normal. | |
| template<class MeshType > | |
| void | GenerateCameraMesh (MeshType &in) |
| Build a simple camera-shaped mesh (mainly for visualization). | |
| template<class MeshType > | |
| void | OrientedRect (MeshType &square, float width, float height, typename MeshType::CoordType c, typename MeshType::CoordType dir=typename MeshType::CoordType(0, 0, 0), float angleDeg=0, typename MeshType::CoordType preRotTra=typename MeshType::CoordType(0, 0, 0)) |
| Build a rectangle in 3D with orientation and optional pre-rotation. | |
| template<class MeshType > | |
| void | OrientedSquare (MeshType &square, float width, typename MeshType::CoordType c, typename MeshType::CoordType dir=typename MeshType::CoordType(0, 0, 0), float angleDeg=0, typename MeshType::CoordType preRotTra=typename MeshType::CoordType(0, 0, 0)) |
| Build an oriented square (special case of OrientedRect). | |
Variables | |
| const Split | SplitTab [8] |
Everything about triangular meshes lie in this namespace
| void vcg::tri::Annulus | ( | MeshType & | m, |
| float | externalRadius, | ||
| float | internalRadius, | ||
| int | slices | ||
| ) |
Build an annulus (ring) in the XY plane.
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| externalRadius | Outer radius. |
| internalRadius | Inner radius. |
| slices | Number of angular segments. |
| void vcg::tri::Box | ( | MeshType & | in, |
| const typename MeshType::BoxType & | bb | ||
| ) |
Build a box aligned with the axes from a bounding box.
| MeshType | Triangular mesh type. |
| in | Output mesh. |
| bb | Bounding box providing min/max corners. |
| void vcg::tri::BuildCylinderEdgeShell | ( | MeshType & | mIn, |
| MeshType & | mOut, | ||
| float | radius = 0, |
||
| int | slices = 16, |
||
| int | stacks = 1 |
||
| ) |
Build a tubular shell around edges using oriented cylinders.
| MeshType | Mesh type (input/output). |
| mIn | Input mesh. |
| mOut | Output mesh (append mode). |
| radius | Cylinder radius (auto from bbox if 0). |
| slices | Angular segments. |
| stacks | Longitudinal segments. |
| void vcg::tri::BuildCylinderVertexShell | ( | MeshType & | mIn, |
| MeshType & | mOut, | ||
| float | radius = 0, |
||
| float | height = 0, |
||
| int | slices = 16, |
||
| int | stacks = 1 |
||
| ) |
Build a cylindrical shell on each vertex aligned with its normal.
| MeshType | Triangular mesh type. |
| mIn | Input mesh. |
| mOut | Output mesh (append mode). |
| radius | Cylinder radius (auto if 0). |
| height | Half-height along the vertex normal (auto if 0). |
| slices | Angular segments. |
| stacks | Longitudinal segments. |
| void vcg::tri::BuildFromFaceEdgeSel | ( | TriMeshType & | in, |
| EdgeMeshType & | out | ||
| ) |
Build an edge mesh from the selected edges of a triangle mesh.
| TriMeshType | Triangle mesh type (input). |
| EdgeMeshType | Edge mesh type (output). |
| in | Input triangle mesh with face-edge selection. |
| out | Output edge mesh with selected edges. |
| void vcg::tri::BuildMeshFromCoordVector | ( | MeshType & | in, |
| const V & | v | ||
| ) |
Build a point-only mesh from coordinate vector (no faces).
| MeshType | Mesh type. |
| V | Coordinate container type. |
| in | Output mesh; cleared and filled with vertices only. |
| v | Input vertex coordinates. |
| void vcg::tri::BuildMeshFromCoordVectorIndexVector | ( | MeshType & | in, |
| const std::vector< InCoordType > & | v, | ||
| const std::vector< InFaceIndexType > & | f | ||
| ) |
Build a mesh from coordinate and face-index vectors.
| MeshType | Triangular mesh type. |
| InCoordType | Input coordinate type supporting operator[] for xyz. |
| InFaceIndexType | Input face index type supporting operator[] for 3 vertex indices. |
| in | Output mesh; cleared and filled. |
| v | Input vertex coordinates (size = vn). |
| f | Input triangle indices (size = fn). |
| void vcg::tri::BuildPrismFaceShell | ( | MeshType & | mIn, |
| MeshType & | mOut, | ||
| float | height = 0, |
||
| float | inset = 0, |
||
| bool | smoothFlag = false |
||
| ) |
Build a shell made of face-aligned prisms for each face.
| MeshType | Triangular mesh type supporting polygonal faux edges. |
| mIn | Input mesh. |
| mOut | Output mesh (append mode). |
| height | Prism height (auto from bbox if 0). |
| inset | Inset amount along face to shrink border (auto if 0). |
| smoothFlag | Apply smoothing on side strips if true. |
| void vcg::tri::BuildSphereVertexShell | ( | MeshType & | mIn, |
| MeshType & | mOut, | ||
| float | radius = 0, |
||
| int | recDiv = 2 |
||
| ) |
Build a spherical shell on each vertex by instancing a small sphere.
| MeshType | Triangular mesh type. |
| mIn | Input mesh. |
| mOut | Output mesh (append mode). |
| radius | Sphere radius (auto from bbox if 0). |
| recDiv | Sphere recursion divisions. |
| void vcg::tri::Circle2D | ( | MeshType & | m, |
| float | radius = 1.0, |
||
| int | sides = 32 |
||
| ) |
Build a 2D circle as a polyline (edges only) in XY plane.
| MeshType | Edge-capable mesh type. |
| m | Output mesh. |
| radius | Circle radius. |
| sides | Number of segments. |
| void vcg::tri::Cone | ( | MeshType & | in, |
| const typename MeshType::ScalarType | r1, | ||
| const typename MeshType::ScalarType | r2, | ||
| const typename MeshType::ScalarType | h, | ||
| const int | SubDiv = 36 |
||
| ) |
r1 = raggio 1, r2 = raggio2, h = altezza (asse y)
Build a cone or truncated cone aligned to Y axis.
| MeshType | Triangular mesh type. |
| in | Output mesh (cleared and filled). |
| r1 | Radius at y = -h/2 (base). |
| r2 | Radius at y = +h/2 (top). Use 0 for apex. |
| h | Height of the cone (along Y). |
| SubDiv | Number of radial slices. |
| void vcg::tri::Cylinder | ( | MeshType & | m, |
| int | slices, | ||
| int | stacks, | ||
| bool | capped = false |
||
| ) |
Build a unit cylinder aligned to Y, optionally capped.
| MeshType | Triangular mesh type. |
| slices | Angular segments. |
| stacks | Longitudinal segments. |
| m | Output mesh. |
| capped | Add end caps if true. |
| void vcg::tri::Disk | ( | MeshType & | m, |
| int | slices | ||
| ) |
Build a unit disk (triangle fan) in the XY plane.
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| slices | Number of angular segments. |
| void vcg::tri::Dodecahedron | ( | DodMeshType & | in | ) |
Build a dodecahedron as a triangular mesh.
| DodMeshType | Triangular mesh type with Coord/Vertex/Face types. |
| in | Mesh to fill; each pentagon is split into 3 triangles; faux edges are marked. |
| void vcg::tri::DodecahedronSym | ( | DodMeshType & | in | ) |
Build a symmetric dodecahedron as a triangular mesh.
| DodMeshType | Triangular mesh type with Coord/Vertex/Face types. |
| in | Mesh to fill; each pentagon is star-triangulated using a center vertex (5 triangles). |
| void vcg::tri::FaceGrid | ( | MeshType & | in, |
| int | w, | ||
| int | h | ||
| ) |
Build faces for a regular grid given pre-allocated vertices.
| MeshType | Triangular mesh type. |
| in | Mesh with at least w*h vertices. |
| w | Grid width (columns). |
| h | Grid height (rows). |
| void vcg::tri::GenerateCameraMesh | ( | MeshType & | in | ) |
Build a simple camera-shaped mesh (mainly for visualization).
| MeshType | Triangular mesh type. |
| in | Output mesh. |
| void vcg::tri::Grid | ( | MeshType & | in, |
| int | w, | ||
| int | h, | ||
| float | wl, | ||
| float | hl, | ||
| float * | data = 0 |
||
| ) |
Build a regular height-field grid mesh (vertices and faces).
| MeshType | Triangular mesh type. |
| in | Output mesh; cleared and filled. |
| w | Grid width (number of columns). |
| h | Grid height (number of rows). |
| wl | Physical width. |
| hl | Physical height. |
| data | Optional height buffer (row-major, size w*h). |
| void vcg::tri::Hexahedron | ( | MeshType & | in | ) |
Build a hexahedron (cube) as a triangular mesh.
| MeshType | Triangular mesh type with Coord/Vertex/Face types. |
| in | Mesh to fill with 8 vertices and 12 faces. |
| void vcg::tri::Icosahedron | ( | IcoMeshType & | in | ) |
Build an icosahedron as a triangular mesh.
| IcoMeshType | Triangular mesh type with Coord/Vertex/Face types. |
| in | Mesh to fill with 12 vertices and 20 faces. |
| void vcg::tri::Octahedron | ( | OctMeshType & | in | ) |
Build an octahedron as a triangular mesh.
| OctMeshType | Triangular mesh type with Coord/Vertex/Face types. |
| in | Mesh to fill with 6 vertices and 8 faces. |
| void vcg::tri::OrientedAnnulus | ( | MeshType & | m, |
| typename MeshType::CoordType | center, | ||
| typename MeshType::CoordType | norm, | ||
| float | externalRadius, | ||
| float | internalRadius, | ||
| int | slices | ||
| ) |
Build an oriented annulus in 3D, centered and rotated.
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| center | Center position. |
| norm | Normal direction. |
| externalRadius | Outer radius. |
| internalRadius | Inner radius. |
| slices | Number of segments. |
| void vcg::tri::OrientedCone | ( | MeshType & | m, |
| const typename MeshType::CoordType | origin, | ||
| const typename MeshType::CoordType | end, | ||
| const typename MeshType::ScalarType | r1, | ||
| const typename MeshType::ScalarType | r2, | ||
| const int | SubDiv = 36 |
||
| ) |
Build a cone/frustum oriented from origin to end.
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| origin | Start point of the axis. |
| end | End point of the axis. |
| r1 | Radius at origin end. |
| r2 | Radius at end point. |
| SubDiv | Number of radial slices. |
| void vcg::tri::OrientedCylinder | ( | MeshType & | m, |
| const typename MeshType::CoordType | origin, | ||
| const typename MeshType::CoordType | end, | ||
| float | radius, | ||
| bool | capped, | ||
| int | slices = 32, |
||
| int | stacks = 4 |
||
| ) |
Build an oriented cylinder along a segment, optionally capped.
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| origin | Cylinder base center. |
| end | Cylinder top center. |
| radius | Cylinder radius. |
| capped | Add end caps if true. |
| slices | Angular segments. |
| stacks | Longitudinal segments. |
| void vcg::tri::OrientedDisk | ( | MeshType & | m, |
| typename MeshType::CoordType | center, | ||
| typename MeshType::CoordType | norm, | ||
| float | radius, | ||
| int | slices | ||
| ) |
Build a disk oriented in 3D space.
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| center | Disk center. |
| norm | Disk normal. |
| radius | Disk radius. |
| slices | Number of segments. |
| void vcg::tri::OrientedEllipticPrism | ( | MeshType & | m, |
| const typename MeshType::CoordType | origin, | ||
| const typename MeshType::CoordType | end, | ||
| float | radius, | ||
| float | xScale, | ||
| float | yScale, | ||
| bool | capped, | ||
| int | slices = 32, |
||
| int | stacks = 4 |
||
| ) |
Build an oriented elliptic prism (scaled cylinder), optionally capped.
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| origin | Prism start point. |
| end | Prism end point. |
| radius | Base radius before scaling. |
| xScale | Scale along local X. |
| yScale | Scale along local Z. |
| capped | Add end caps if true. |
| slices | Angular segments. |
| stacks | Longitudinal segments. |
| void vcg::tri::OrientedRect | ( | MeshType & | square, |
| float | width, | ||
| float | height, | ||
| typename MeshType::CoordType | c, | ||
| typename MeshType::CoordType | dir = typename MeshType::CoordType(0,0,0), |
||
| float | angleDeg = 0, |
||
| typename MeshType::CoordType | preRotTra = typename MeshType::CoordType(0,0,0) |
||
| ) |
Build a rectangle in 3D with orientation and optional pre-rotation.
| MeshType | Triangular mesh type. |
| square | Output mesh. |
| width | Rectangle width (X extent). |
| height | Rectangle height (Y extent). |
| c | Center position. |
| dir | Rotation axis. |
| angleDeg | Rotation angle in degrees around dir. |
| preRotTra | Translation applied before rotation (to rotate around custom pivot). |
| void vcg::tri::OrientedSquare | ( | MeshType & | square, |
| float | width, | ||
| typename MeshType::CoordType | c, | ||
| typename MeshType::CoordType | dir = typename MeshType::CoordType(0,0,0), |
||
| float | angleDeg = 0, |
||
| typename MeshType::CoordType | preRotTra = typename MeshType::CoordType(0,0,0) |
||
| ) |
Build an oriented square (special case of OrientedRect).
| MeshType | Triangular mesh type. |
| square | Output mesh. |
| width | Side length. |
| c | Center position. |
| dir | Rotation axis. |
| angleDeg | Rotation angle in degrees. |
| preRotTra | Pre-rotation translation. |
| void vcg::tri::PoissonPruning | ( | MeshType & | m, |
| std::vector< typename MeshType::CoordType > & | poissonSamples, | ||
| float | radius, | ||
| unsigned int | randSeed = 0 |
||
| ) |
Low level wrapper for Poisson Disk Pruning.
This function simply takes a mesh containing a point cloud to be pruned and a radius It returns a vector of CoordType listing the "surviving" points.
| void vcg::tri::PoissonPruning | ( | MeshType & | m, |
| std::vector< typename MeshType::VertexPointer > & | poissonSamples, | ||
| float | radius, | ||
| unsigned int | randSeed = 0 |
||
| ) |
Low level wrapper for Poisson Disk Pruning.
This function simply takes a mesh and a radius and returns a vector of vertex pointers listing the "surviving" points.
| void vcg::tri::PoissonPruningExact | ( | MeshType & | m, |
| std::vector< typename MeshType::VertexPointer > & | poissonSamples, | ||
| typename MeshType::ScalarType & | radius, | ||
| int | sampleNum, | ||
| float | tolerance = 0.04, |
||
| int | maxIter = 20, |
||
| unsigned int | randSeed = 0 |
||
| ) |
Very simple wrapping for the Exact Poisson Disk Pruning.
This function simply takes a mesh and an expected number of points and returns vector of points. It performs multiple attempts with varius radii to correctly get the expected number of samples. It is obviously much slower than the other versions...
| poissonSamples | the mesh that has to be pruned |
| radius | the vector that will contain the chosen set of points |
| void vcg::tri::SparseFaceGrid | ( | MeshType & | in, |
| const std::vector< int > & | grid, | ||
| int | w, | ||
| int | h | ||
| ) |
Build faces for a sparsely sampled regular grid.
| MeshType | Triangular mesh type. |
| in | Mesh with vertices; not necessarily w*h of them. |
| grid | Index grid mapping (size w*h), -1 for missing vertices. |
| w | Grid width. |
| h | Grid height. |
| void vcg::tri::Sphere | ( | MeshType & | in, |
| const int | subdiv = 3 |
||
| ) |
Build a geodesic sphere by recursive icosahedron refinement.
| MeshType | Triangular mesh type. |
| in | Output mesh; if empty, an icosahedron is used as base. Vertices are projected on unit sphere. |
| subdiv | Number of refinement steps. |
| void vcg::tri::Sphere | ( | MeshType & | m, |
| const typename MeshType::CoordType & | position, | ||
| typename MeshType::ScalarType | radius = 0, |
||
| const int | subdiv = 3 |
||
| ) |
Convenience overload: build and place a sphere at a position with a radius.
| MeshType | Triangular mesh type. |
| m | Output mesh (cleared and filled). |
| position | Center of the sphere. |
| radius | Sphere radius. |
| subdiv | Number of refinement steps. |
| void vcg::tri::SphericalCap | ( | MeshType & | in, |
| float | angleRad, | ||
| const int | subdiv = 3 |
||
| ) |
Build a spherical cap from a hexagon refined on the sphere.
| MeshType | Triangular mesh type. |
| in | Output mesh (cleared and filled). |
| angleRad | Angular aperture (cap diameter) in radians. |
| subdiv | Number of refinement steps on the initial hexagon. |
| void vcg::tri::Square | ( | MeshType & | in | ) |
Build a unit square in the XY plane as two triangles.
| MeshType | Triangular mesh type with Coord/Vertex/Face types. |
| in | Mesh to fill with 4 vertices and 2 faces. |
| void vcg::tri::SuperEllipsoid | ( | MeshType & | m, |
| float | rFeature, | ||
| float | sFeature, | ||
| float | tFeature, | ||
| int | hRingDiv = 24, |
||
| int | vRingDiv = 12 |
||
| ) |
Build a superellipsoid (superquadric sphere-like surface).
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| rFeature | Exponent along X. |
| sFeature | Exponent along Y. |
| tFeature | Exponent along Z. |
| hRingDiv | Vertical divisions. |
| vRingDiv | Horizontal divisions. |
| void vcg::tri::SuperToroid | ( | MeshType & | m, |
| float | hRingRadius, | ||
| float | vRingRadius, | ||
| float | vSquareness, | ||
| float | hSquareness, | ||
| int | hRingDiv = 24, |
||
| int | vRingDiv = 12 |
||
| ) |
Build a supertoroid (superquadric torus).
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| hRingRadius | Main ring radius. |
| vRingRadius | Tube radius. |
| vSquareness | Exponent along torus axis (u power). |
| hSquareness | Exponent around tube (v power). |
| hRingDiv | Segments around the main ring. |
| vRingDiv | Segments around the tube. |
| void vcg::tri::Tetrahedron | ( | TetraMeshType & | in | ) |
Build a tetrahedron as a triangular mesh.
A set of functions that builds meshes that represent surfaces of platonic solids, and other simple shapes.
The 1st parameter is usually the mesh that will be filled with the solid.
| TetraMeshType | Triangular mesh type with Coord/Vertex/Face types. |
| in | Mesh to fill; cleared and populated with 4 vertices and 4 faces. |
| void vcg::tri::Torus | ( | MeshType & | m, |
| float | hRingRadius, | ||
| float | vRingRadius, | ||
| int | hRingDiv = 24, |
||
| int | vRingDiv = 12 |
||
| ) |
Build a torus mesh around Z axis.
| MeshType | Triangular mesh type. |
| m | Output mesh. |
| hRingRadius | Main ring radius (distance from center). |
| vRingRadius | Tube radius. |
| hRingDiv | Number of segments around the main ring. |
| vRingDiv | Number of segments around the tube. |
| void vcg::tri::TrivialMidPointRefine | ( | MeshType & | m, |
| bool | onlySelected = false |
||
| ) |
Trivial function for 1->4 triangle split.
It does not require any topology information, Face Attributes are copied to the new faces. Vertex Attributes are not interpolated Warning if the mesh has FFAdjacency it will be corrupted, and if only a subset of the faces are selected T-vertices will be created.
| const Split vcg::tri::SplitTab[8] |