A simple class that allows to store which elements and their components have been imported/loaded or are going to be exported/saved on a mesh file or some other data structure.
More...
|
enum class | MeshType { TRIANGLE_MESH
, QUAD_MESH
, POLYGON_MESH
, UNKNOWN
} |
| Enum used to describe the type of the Mesh - by default, the value is set to UNKNOWN.
|
|
enum | Element {
VERTEX
, FACE
, EDGE
, MESH
,
NUM_ELEMENTS
} |
| Enum used to describe the type of Elements that can be found in a file. More...
|
|
enum | Component {
COORD
, VREFS
, NORMAL
, COLOR
,
QUALITY
, TEXCOORD
, WEDGE_TEXCOORDS
, CUSTOM_COMPONENTS
,
TEXTURES
, NUM_COMPONENTS
} |
| Enum used to describe the type of Components that each Element can have.
|
|
using | DataType = PrimitiveType |
| Enum used to describe the type of Data stored in a component.
|
|
|
| MeshInfo () |
| Default constructor.
|
|
template<MeshConcept Mesh> |
| MeshInfo (const Mesh &m) |
| Sets the current status of the MeshInfo object from the input mesh.
|
|
void | clear () |
| Clears the MeshInfo object.
|
|
bool | isEmpty () const |
| Returns whether the current MeshInfo object is empty, i.e., it has no Elements set.
|
|
bool | isUnkownMesh () const |
|
bool | isTriangleMesh () const |
| Returns true if the current object has Mesh type set to MeshType::TRIANGLE_MESH.
|
|
bool | isQuadMesh () const |
| Returns true if the current object has Mesh type set to MeshType::QUAD_MESH.
|
|
bool | isPolygonMesh () const |
| Returns true if the current object has Mesh type set to MeshType::POLYGON_MESH.
|
|
bool | hasElement (Element el) const |
|
bool | hasPerElementComponent (Element el, Component comp) const |
|
bool | hasVertices () const |
| Returns true if the current object has Vertex Elements.
|
|
bool | hasVertexCoords () const |
| Returns true if the current object has Vertex Coordinates.
|
|
bool | hasVertexNormals () const |
| Returns true if the current object has Vertex Normals.
|
|
bool | hasVertexColors () const |
| Returns true if the current object has Vertex Colors.
|
|
bool | hasVertexQuality () const |
| Returns true if the current object has Vertex Quality.
|
|
bool | hasVertexTexCoords () const |
| Returns true if the current object has Vertex Texture Coordinates.
|
|
bool | hasVertexCustomComponents () const |
| Returns true if the current object has Vertex Custom Components.
|
|
bool | hasFaces () const |
| Returns true if the current object has Face Elements.
|
|
bool | hasFaceVRefs () const |
| Returns true if the current object has per Face Vertex References.
|
|
bool | hasFaceNormals () const |
|
bool | hasFaceColors () const |
|
bool | hasFaceQuality () const |
|
bool | hasFaceWedgeTexCoords () const |
|
bool | hasFaceCustomComponents () const |
|
bool | hasEdges () const |
| Returns true if the current object has Edge Elements.
|
|
bool | hasEdgeVRefs () const |
|
bool | hasEdgeColors () const |
|
bool | hasEdgeNormals () const |
|
bool | hasEdgeQuality () const |
|
bool | hasEdgeCustomComponents () const |
|
bool | hasTextures () const |
|
void | updateMeshType (uint faceSize) |
|
void | setUnknownMesh () |
|
void | setTriangleMesh () |
|
void | setQuadMesh () |
|
void | setPolygonMesh () |
|
void | setMeshType (MeshType t) |
|
void | setElement (Element el, bool b=true) |
|
void | setElementComponents (Element el, Component c, bool b, DataType t) |
|
void | setVertices (bool b=true) |
|
void | setVertexCoords (bool b=true, DataType t=PrimitiveType::DOUBLE) |
|
void | setVertexNormals (bool b=true, DataType t=PrimitiveType::FLOAT) |
|
void | setVertexColors (bool b=true, DataType t=PrimitiveType::UCHAR) |
|
void | setVertexQuality (bool b=true, DataType t=PrimitiveType::DOUBLE) |
|
void | setVertexTexCoords (bool b=true, DataType t=PrimitiveType::FLOAT) |
|
void | setVertexCustomComponents (bool b=true) |
|
void | setFaces (bool b=true) |
|
void | setFaceVRefs (bool b=true) |
|
void | setFaceNormals (bool b=true, DataType t=PrimitiveType::FLOAT) |
|
void | setFaceColors (bool b=true, DataType t=PrimitiveType::UCHAR) |
|
void | setFaceQuality (bool b=true, DataType t=PrimitiveType::DOUBLE) |
|
void | setFaceWedgeTexCoords (bool b=true, DataType t=PrimitiveType::FLOAT) |
|
void | setFaceCustomComponents (bool b=true) |
|
void | setEdges (bool b=true) |
|
void | setEdgeVRefs (bool b=true) |
|
void | setEdgeColors (bool b=true, DataType t=PrimitiveType::UCHAR) |
|
void | setEdgeNormals (bool b=true, DataType t=PrimitiveType::FLOAT) |
|
void | setEdgeQuality (bool b=true, DataType t=PrimitiveType::DOUBLE) |
|
void | setEdgeCustomComponents (bool b=true) |
|
void | setTextures (bool b=true) |
|
void | addElementCustomComponent (Element el, const std::string &name, DataType t) |
|
void | clearElementCustomComponents (Element el) |
|
void | addVertexCustomComponent (const std::string &name, DataType t) |
|
void | clearVertexCustomComponents () |
|
void | addFaceCustomComponent (const std::string &name, DataType t) |
|
void | clearFaceCustomComponents () |
|
void | addEdgeCustomComponent (const std::string &name, DataType t) |
|
void | clearEdgeCustomComponents () |
|
DataType | elementComponentType (Element el, Component comp) const |
|
DataType | vertexCoordsType () const |
|
DataType | vertexNormalsType () const |
|
DataType | vertexColorsType () const |
|
DataType | vertexQualityType () const |
|
DataType | vertexTexCoordsType () const |
|
DataType | faceNormalsType () const |
|
DataType | faceColorsType () const |
|
DataType | faceQualityType () const |
|
DataType | faceWedgeTexCoordsType () const |
|
DataType | edgeColorsType () const |
|
DataType | edgeNormalsType () const |
|
DataType | edgeQualityType () const |
|
const std::vector< CustomComponent > & | vertexCustomComponents () const |
|
const std::vector< CustomComponent > & | faceCustomComponents () const |
|
const std::vector< CustomComponent > & | edgeCustomComponents () const |
|
MeshInfo | intersect (const MeshInfo &info) const |
| Returns a MeshInfo object that is the intersection between this and info .
|
|
A simple class that allows to store which elements and their components have been imported/loaded or are going to be exported/saved on a mesh file or some other data structure.
For example, when loading a Mesh from a file, an object of this type is used to know which Elements/Components have been loaded from the file, using the getter functions:
(info.hasFaceColors()) {
}
}
A simple class that allows to store which elements and their components have been imported/loaded or ...
Definition mesh_info.h:76
bool hasFaces() const
Returns true if the current object has Face Elements.
Definition mesh_info.h:397
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
When saving a Mesh to a file, an object of this type is used to tell which Elements/Components save on the file and, when the file format supports it, to choose the type used to store a specific component:
info.setVertexCoords(true, MeshInfo::FLOAT);
info.setVertexColors(false);
void save(const MeshType &m, const std::string &filename, LogType &log=nullLogger, const SaveSettings &settings=SaveSettings())
Saves a mesh to a file with the given filename. Checks automatically the file format to save from the...
Definition save.h:59