Visual Computing Library
|
List functions that allows to check, enable and assert characteristics and the availability of components in the Elements of a Mesh. More...
Modules | |
Edge Requirements | |
List functions that allows to check, enable and assert the availability of components in the Edge Elements of a Mesh. | |
Face Requirements | |
List functions that allows to check, enable and assert the availability of components in the Face Elements of a Mesh. | |
Vertex Requirements | |
List functions that allows to check, enable and assert the availability of components in the Vertex Elements of a Mesh. | |
Functions | |
template<uint ELEM_ID, MeshConcept MeshType> | |
bool | vcl::isElementContainerCompact (const MeshType &m) |
Returns true if the given mesh has its Container of the given Element compact. | |
template<uint ELEM_ID, uint COMP_ID, MeshConcept MeshType> | |
bool | vcl::isPerElementComponentAvailable (const MeshType &m) |
Returns true if the given component is available in the given element of the input mesh m. | |
template<uint ELEM_ID, uint COMP_ID, MeshConcept MeshType> | |
bool | vcl::enableIfPerElementComponentOptional (MeshType &m) |
Makes available the given Component in the given Element of the input mesh m, and returns true if it succeeds. | |
template<uint ELEM_ID, MeshConcept MeshType> | |
void | vcl::requireElementContainerCompactness (const MeshType &m) |
This function asserts that a Mesh has the Container of the given Element ID compact (no elements flagged as deleted). | |
template<uint ELEM_ID, uint COMP_ID, MeshConcept MeshType> | |
void | vcl::requirePerElementComponent (const MeshType &m) |
This function asserts that a Mesh has the Container of the given Element ID, the Element has a Component of the given Component ID, and that Component is available at runtime. | |
template<MeshConcept MeshType> | |
bool | vcl::isTriangleMesh (const MeshType &m) |
Checks at run time if the mesh m is composed of triangles. | |
template<MeshConcept MeshType> | |
bool | vcl::isQuadMesh (const MeshType &m) |
Checks at run time if the mesh is composed of quads. | |
template<MeshConcept MeshType> | |
bool | vcl::isCompact (const MeshType &m) |
Checks if a Mesh is compact, that is if it does not contains deleted elements. | |
template<FaceMeshConcept MeshType> | |
void | vcl::requireTriangleMesh (const MeshType &m) |
Checks if the mesh is composed of triangles, and if not, throws an exception. | |
template<FaceMeshConcept MeshType> | |
void | vcl::requireQuadMesh (const MeshType &m) |
Checks if the mesh is composed of quads, and if not, throws an exception. | |
template<MeshConcept MeshType> | |
void | vcl::requireCompactness (const MeshType &m) |
Checks if a Mesh is compact, that is if it does not contains deleted elements, and if not, throws an exception. | |
List functions that allows to check, enable and assert characteristics and the availability of components in the Elements of a Mesh.
bool vcl::enableIfPerElementComponentOptional | ( | MeshType & | m | ) |
Makes available the given Component in the given Element of the input mesh m, and returns true
if it succeeds.
If the input mesh has a Container of the given Element ID, and the Element has a Component of the given Component ID, this function enables the Component in the Element if the component needs to be enabled. Returns true
if, after the call of this function, the component will be available in the Element of the mesh.
ELEM_ID | the ID of the Element on which enable the component. |
COMP_ID | the ID of the Component to enable. |
MeshType | the type of the Mesh to check. |
[in] | m | the mesh on which enable the component in the Element. |
true
if the Component is available in the Element after the call of this funciton. Checks if a Mesh is compact, that is if it does not contains deleted elements.
It is equivalent to call m.isCompact()
.
true
if m
is compact, false
otherwise. bool vcl::isElementContainerCompact | ( | const MeshType & | m | ) |
Returns true
if the given mesh has its Container of the given Element compact.
ELEM_ID | the Element ID of the ElementContainer to check. |
MeshType | the type of the Mesh to check. It must satisfy the MeshConcept. |
[in] | m | the mesh on which check the compactness of the Container of the given Element. |
true
if the Container of the given Element is compact. bool vcl::isPerElementComponentAvailable | ( | const MeshType & | m | ) |
Returns true if the given component is available in the given element of the input mesh m.
This function returns true
when the component can be used on the element, whether the component is horizontal, vertical or optional.
These are the following cases:
false
;false
;true
;true
if the component is enabled, false otherwise (this check is the only one that is made at runtime);ELEM_ID | the ID of the Element to check. |
COMP_ID | the ID of the Component to check. |
MeshType | the type of the Mesh to check. |
[in] | m | the mesh on which check the availability of the Component in the Element. |
Checks at run time if the mesh is composed of quads.
This function works both for quad and polygonal meshes composed of faces having 4 vertices. If the size of the Face Vertices is 4, this check is immediate. If it is not 4, the functions checks for each face if it has 4 vertices.
Complexity: O(n)
MeshType | the type of the mesh. It must satisfy the MeshConcept. |
[in] | m | the mesh on which check if each face has 4 vertices. |
true
if every face of the mesh is composed of 4 vertices. Checks at run time if the mesh m is composed of triangles.
This function works both for triangle and polygonal meshes composed of faces having 3 vertices. If the size of the Face Vertices is static and 3, this check is immediate. If it is not 3, the functions checks for each face if it has 3 vertices.
Complexity: O(n)
MeshType | the type of the mesh. It must satisfy the MeshConcept. |
[in] | m | the mesh on which check if each face has 3 vertices. |
true
if every face of the mesh is composed of 3 vertices. Checks if a Mesh is compact, that is if it does not contains deleted elements, and if not, throws an exception.
vcl::MissingCompactnessException | if the mesh is not compact. |
MeshType | the type of the mesh. It must satisfy the MeshConcept. |
[in] | m | the mesh on which check if is compact. |
void vcl::requireElementContainerCompactness | ( | const MeshType & | m | ) |
This function asserts that a Mesh has the Container of the given Element ID compact (no elements flagged as deleted).
If the Container of the given Element ID is not compact, a vcl::MissingCompactnessException will be thrown. If the mesh has not a Container of the given Element ID, a build error will be raised.
ELEM_ID | the Element ID of the ElementContainer to check. |
MeshType | the type of the Mesh to check. |
vcl::MissingCompactnessException | if the Container of the given ElementEnumType is not compact. |
[in] | m | the mesh on which check the compactness of the Container of the given Element. |
void vcl::requirePerElementComponent | ( | const MeshType & | m | ) |
This function asserts that a Mesh has the Container of the given Element ID, the Element has a Component of the given Component ID, and that Component is available at runtime.
If the Mesh does not satisfy one of these conditions, a vcl::MissingComponentException will be thrown:
ELEM_ID | the ID of the Element to check. |
COMP_ID | the ID of the Component to check. |
MeshType | the type of the Mesh to check. |
vcl::MissingComponentException | if the Component is not enabled or available in the Element Container of the Mesh. |
[in] | m | the mesh on which check the availability of the Component in the Element. |
Checks if the mesh is composed of quads, and if not, throws an exception.
This function works both for quad and polygonal meshes composed of faces having 4 vertices. If the size of the Face Vertices is static and 3, this check is immediate. If it is not 4, the functions checks for each face if it has 4 vertices.
Complexity: O(n)
vcl::MissingQuadRequirementException | if the mesh is not composed of quads. |
MeshType | the type of the mesh. It must satisfy the FaceMeshConcept. |
[in] | m | the mesh on which check if each face has 4 vertices. |
Checks if the mesh is composed of triangles, and if not, throws an exception.
This function works both for triangle and polygonal meshes composed of faces having 3 vertices. If the size of the Face Vertices is static and 3, this check is immediate. If it is not 3, the functions checks for each face if it has 3 vertices.
Complexity: O(n)
vcl::MissingTriangularRequirementException | if the mesh is not composed of triangles. |
MeshType | the type of the mesh. It must satisfy the FaceMeshConcept. |
[in] | m | the mesh on which check if each face has 3 vertices. |