|
| MeshStack () |
| Create an empty object. More...
|
|
| MeshStack (const Mesh &) |
| Create a geometry stack from a given object. More...
|
|
| ~MeshStack () |
| Empty.
|
|
void | Push () |
| Push the current geometry generation state. More...
|
|
void | Pop () |
| Pop a previously pushed geometry generation state. More...
|
|
void | PopAll () |
| Pop all previously pushed geometry generation states and resets to original frame.
|
|
void | Transform (const FrameScaled &) |
| Apply a given transformation to the next geometric operations. More...
|
|
void | Translate (const Vector &) |
| Apply a given translation to the next geometric operations. More...
|
|
void | Rotate (const Vector &) |
| Apply a given Euler rotation to the next geometric operations. More...
|
|
void | Scale (const Vector &) |
| Apply a given scale to the next geometric operations. More...
|
|
void | AddTriangle (const Vector &, const Vector &, const Vector &) |
| Add a triangle to the geometry. More...
|
|
void | AddQuadrangle (const Vector &, const Vector &, const Vector &, const Vector &) |
| Add a quadrangle to the geometry. More...
|
|
void | AddGeometry (const Mesh &) |
| Add a given mesh to the shape. More...
|
|
FrameScaled | GetFrame () const |
| Get the current building frame.
|
|
| Mesh () |
| Initialize the mesh to empty.
|
|
| Mesh (const Mesh2 &) |
| Initialize the structure from a two dimensional mesh. More...
|
|
| Mesh (const QVector< Vector > &) |
| Create a mesh from a set of vertices. More...
|
|
| Mesh (const QVector< Vector > &, const QVector< int > &, bool=true) |
| Create a mesh from a set of vertices and a set of triangle indexes. More...
|
|
| Mesh (const QVector< Vector > &, const QVector< Vector > &, const QVector< int > &, const QVector< int > &) |
| Create the mesh. More...
|
|
| ~Mesh () |
| Empty.
|
|
void | Reserve (int, int, int, int) |
| Reserve memory for arrays. More...
|
|
Triangle | GetTriangle (int) const |
| Get a triangle. More...
|
|
const Vector | Vertex (int) const |
| Get a vertex. More...
|
|
Vector & | Vertex (int) |
| Acces to a vertex. More...
|
|
Vector | Vertex (int, int) const |
| Get a vertex from a specific triangle. More...
|
|
Vector | Normal (int) const |
| Get a normal. More...
|
|
int | Triangles () const |
| Get the number of triangles.
|
|
int | Vertexes () const |
| Get the number of vertices in the geometry. More...
|
|
bool | Manifold () const |
| Check if a mesh is manifold.
|
|
void | Append (const Mesh &) |
| Merge two meshes into a single one. More...
|
|
QVector< Vector > | GetVertices () const |
| Get the array of vertices.
|
|
QVector< Vector > | GetNormals () const |
| Get the array of normals.
|
|
QVector< int > | VertexIndexes () const |
| Return the set of vertex indexes.
|
|
QVector< int > | NormalIndexes () const |
| Return the set of normal indexes.
|
|
QVector< Triangle > | GetTriangles () const |
| Returns the geometry as a set of triangles.
|
|
int | VertexIndex (int, int) const |
| Get the vertex index of a given triangle. More...
|
|
int | NormalIndex (int, int) const |
| Get the normal index of a given triangle. More...
|
|
Vector | operator[] (int) const |
| Get a vertex. More...
|
|
double | R (const Vector &) const |
| Compute the squared distance to the mesh. More...
|
|
double | Signed (const Vector &) const |
| Compute the signed distance to the mesh. More...
|
|
bool | Intersect (const Ray &, double &, int &) const |
| Compute the intersection between a ray and the mesh. More...
|
|
int | Intersections (const Ray &) const |
| Compute the number of intersections between a ray and the mesh. More...
|
|
bool | Inside (const Vector &) const |
| Check if a point is inside or outside of the object. More...
|
|
Box | GetBox () const |
| Compute the bounding box of the object.
|
|
Sphere | GetSphere () const |
| Compute the bounding sphere of the object.
|
|
double | AverageEdgeLength () const |
| Compute the average edge length.
|
|
void | EdgeLengthRange (double &, double &) const |
| Compute the range of edge lengths. More...
|
|
QVector< int > | AspectRatios (int=4) const |
| Compute the histogram of the aspect ratio of the triangles of the mesh. More...
|
|
void | EdgeCollapse (const double &) |
| Run a simple edge collapse algorithm over a triangle mesh. More...
|
|
void | Transform (const FrameScaled &) |
| Transforms the mesh given a transformation. More...
|
|
Mesh | Transformed (const FrameScaled &) const |
| Transforms the mesh given a transformation. More...
|
|
void | InverseTransform (const FrameScaled &) |
| Inverse transform. More...
|
|
void | Symmetry (const Plane &) |
| Apply a planar symmetry to the object. More...
|
|
void | Rotate (const Matrix &) |
| Rotate the mesh. More...
|
|
void | Translate (const Vector &) |
| Translate the mesh. More...
|
|
void | Scale (const Vector &) |
| Scale the mesh. More...
|
|
void | Scale (const double &) |
| Scale the mesh. More...
|
|
void | SmoothNormals () |
| Smooth the normals of the mesh. More...
|
|
int | IsSmooth (int) const |
| Check if the ith triangle in the mesh is a flat or smooth triangle. More...
|
|
| Mesh (const Capsule &, int, int=2) |
| Creates a capsule. More...
|
|
| Mesh (const Quadrangle &, int, int) |
| Generate a grid geometry over an input quadrangle. More...
|
|
| Mesh (const Quadrangle &) |
| Generate a quadrangle. More...
|
|
| Mesh (const Octahedron &) |
| Creates the mesh of an octaedron. More...
|
|
| Mesh (const Box &) |
| Creates an axis aligned box. More...
|
|
| Mesh (const Triangle &) |
| Creates a triangle. More...
|
|
| Mesh (const Sphere &, int) |
| Creates a sphere, using polar coordinates. More...
|
|
| Mesh (const SphereSet &, int) |
| Creates a set of spheres. More...
|
|
| Mesh (const Cylinder &, int, bool=true, bool=true) |
| Creates a cylinder. More...
|
|
| Mesh (const Disc &, int) |
| Creates a disc. More...
|
|
| Mesh (const Dodecahedron &) |
| This function creates the mesh of a dodecahedron. More...
|
|
| Mesh (const Icosahedron &) |
| Create the mesh of an icosahedron. More...
|
|
| Mesh (const QVector< Vector > &, const QVector< Vector > &, const Vector &, const Vector &) |
| Create a generalized cylinder with star-shaped contours. More...
|
|
| Mesh (const Torus &, int, int, int=-1, int=-1) |
| Create the mesh of an torus. More...
|
|
| Mesh (const Cuboctahedron &) |
| Create the mesh of a cuboctahedron. More...
|
|
| Mesh (const Icosidodecahedron &) |
| Create the mesh of an icosidodecahedron. More...
|
|
| Mesh (const Hexagonal &) |
| Create the mesh of a hexagonal prism. More...
|
|
| Mesh (const Cone &, int) |
| Creates the mesh of a cone. More...
|
|
| Mesh (const Rectangles &, int, int) |
| Generate a grid geometry over an input rectangle. More...
|
|
| Mesh (const Cuboid &) |
| Creates the mesh of a cuboid. More...
|
|
| Mesh (const QuadricSurface &, const Box2 &, int, int) |
| Generate a grid geometry and polygonize the quadric surface. More...
|
|
| Mesh (const QuadricCurve &, const double &, int, int) |
| Create a swept-sphere along a quadric curve. More...
|
|
| Mesh (const CubicCurveSet &, const double &, int, int) |
| Create a swept-sphere along a cubic curve. More...
|
|
| Mesh (const QuadricCurveSet &, const double &, int, int=2) |
| Create a swept-sphere along a set of quadric curves. More...
|
|
Mesh | ShrinkedTriangles (const double &) const |
| Scales (shrinks) all the triangles of the model. More...
|
|
void | Load (const QString &) |
| Import a mesh from an .obj file. More...
|
|
void | SaveObj (const QString &, const QString &=QString("mesh")) const |
| Save the mesh in .obj format, with vertices and normals. More...
|
|
|
void | Reserve (int, int, int) |
| Reserves some space for the vertex, normal and triangle arrays. More...
|
|
void | AddTriangle (int, int, int, int) |
| Add a triangle to the geometry. More...
|
|
void | AddSmoothTriangle (int, int, int, int, int, int) |
| Add a smooth triangle to the geometry. More...
|
|
void | AddSmoothQuadrangle (int, int, int, int, int, int, int, int) |
| Add a smmoth quadrangle to the geometry. More...
|
|
void | AddQuadrangle (int, int, int, int) |
| Add a quadrangle to the geometry. More...
|
|
void | AddQuadrangle (int, int, int, int, int) |
| Add a quadrangle to the geometry. More...
|
|
void | AddPentagon (int, int, int, int, int, int) |
| Add a pentagon to the geometry. More...
|
|
int | NextIndex (int) const |
| Compute the next index of an edge in a triangle. More...
|
|
int | PrevIndex (int) const |
| Compute the previous index of an edge in a triangle. More...
|
|
int | BaseIndex (int) const |
| Compute the base index of a triangle given an edge index. More...
|
|
A framework for creating an object incrementally.
The geometry can be created by using low level specific member functions adding triangles or quadrangles to the object. Higher level primitives such as box, cylinders, or surfaces of revolution are provided.