Radium Engine
1.5.20
|
#include <Core/Geometry/deprecated/TopologicalMesh.hpp>
Public Member Functions | |
template<typename NonManifoldFaceCommand > | |
TopologicalMesh (const Ra::Core::Geometry::TriangleMesh &triMesh, NonManifoldFaceCommand command) | |
TopologicalMesh (const Ra::Core::Geometry::TriangleMesh &triMesh) | |
Convenience constructor. | |
TopologicalMesh () | |
TriangleMesh | toTriangleMesh () |
void | updateTriangleMesh (Ra::Core::Geometry::TriangleMesh &mesh) |
HalfedgeHandle | halfedge_handle (VertexHandle vh, FaceHandle fh) const |
const Normal & | normal (VertexHandle vh, FaceHandle fh) const |
void | set_normal (VertexHandle vh, FaceHandle fh, const Normal &n) |
void | propagate_normal_to_halfedges (VertexHandle vh) |
const OpenMesh::HPropHandleT< Index > & | getInputTriangleMeshIndexPropHandle () const |
const OpenMesh::HPropHandleT< Index > & | getOutputTriangleMeshIndexPropHandle () const |
Const access to handles of the HalfEdge properties coming from | |
the TriangleMesh attributes. | |
const std::vector< OpenMesh::HPropHandleT< Scalar > > & | getFloatPropsHandles () const |
const std::vector< OpenMesh::HPropHandleT< Vector2 > > & | getVector2PropsHandles () const |
const std::vector< OpenMesh::HPropHandleT< Vector3 > > & | getVector3PropsHandles () const |
const std::vector< OpenMesh::HPropHandleT< Vector4 > > & | getVector4PropsHandles () const |
Dealing with normals | |
Utils to deal with normals when modifying the mesh topology. | |
void | createNormalPropOnFaces (OpenMesh::FPropHandleT< Normal > &fProp) |
void | clearProp (OpenMesh::FPropHandleT< Normal > &fProp) |
void | copyNormal (HalfedgeHandle input_heh, HalfedgeHandle copy_heh) |
void | copyNormalFromFace (FaceHandle fh, HalfedgeHandle heh, OpenMesh::FPropHandleT< Normal > fProp) |
void | interpolateNormal (HalfedgeHandle in_a, HalfedgeHandle in_b, HalfedgeHandle out, Scalar f) |
void | interpolateNormalOnFaces (FaceHandle fh, OpenMesh::FPropHandleT< Normal > fProp) |
Dealing with custom properties | |
Utils to deal with custom properties of any type when modifying the mesh topology. | |
template<typename T > | |
void | createPropsOnFaces (const std::vector< OpenMesh::HPropHandleT< T > > &input, std::vector< OpenMesh::FPropHandleT< T > > &output) |
template<typename T > | |
void | clearProps (std::vector< OpenMesh::FPropHandleT< T > > &props) |
template<typename T > | |
void | copyProps (HalfedgeHandle input_heh, HalfedgeHandle copy_heh, const std::vector< OpenMesh::HPropHandleT< T > > &props) |
template<typename T > | |
void | copyPropsFromFace (FaceHandle fh, HalfedgeHandle heh, const std::vector< OpenMesh::FPropHandleT< T > > &fProps, const std::vector< OpenMesh::HPropHandleT< T > > &hProps) |
template<typename T > | |
void | interpolateProps (HalfedgeHandle in_a, HalfedgeHandle in_b, HalfedgeHandle out, Scalar f, const std::vector< OpenMesh::HPropHandleT< T > > &props) |
template<typename T > | |
void | interpolatePropsOnFaces (FaceHandle fh, const std::vector< OpenMesh::HPropHandleT< T > > &hProps, const std::vector< OpenMesh::FPropHandleT< T > > &fProps) |
Deal with all attributes* Utils to deal with the normal and | |
custom properties when modifying the mesh topology. | |
void | createAllPropsOnFaces (OpenMesh::FPropHandleT< Normal > &normalProp, std::vector< OpenMesh::FPropHandleT< Scalar > > &floatProps, std::vector< OpenMesh::FPropHandleT< Vector2 > > &vec2Props, std::vector< OpenMesh::FPropHandleT< Vector3 > > &vec3Props, std::vector< OpenMesh::FPropHandleT< Vector4 > > &vec4Props) |
void | clearAllProps (OpenMesh::FPropHandleT< Normal > &normalProp, std::vector< OpenMesh::FPropHandleT< Scalar > > &floatProps, std::vector< OpenMesh::FPropHandleT< Vector2 > > &vec2Props, std::vector< OpenMesh::FPropHandleT< Vector3 > > &vec3Props, std::vector< OpenMesh::FPropHandleT< Vector4 > > &vec4Props) |
void | copyAllProps (HalfedgeHandle input_heh, HalfedgeHandle copy_heh) |
void | copyAllPropsFromFace (FaceHandle fh, HalfedgeHandle heh, OpenMesh::FPropHandleT< Normal > normalProp, std::vector< OpenMesh::FPropHandleT< Scalar > > &floatProps, std::vector< OpenMesh::FPropHandleT< Vector2 > > &vec2Props, std::vector< OpenMesh::FPropHandleT< Vector3 > > &vec3Props, std::vector< OpenMesh::FPropHandleT< Vector4 > > &vec4Props) |
void | interpolateAllProps (HalfedgeHandle in_a, HalfedgeHandle in_b, HalfedgeHandle out, Scalar f) |
void | interpolateAllPropsOnFaces (FaceHandle fh, OpenMesh::FPropHandleT< Normal > normalProp, std::vector< OpenMesh::FPropHandleT< Scalar > > &floatProps, std::vector< OpenMesh::FPropHandleT< Vector2 > > &vec2Props, std::vector< OpenMesh::FPropHandleT< Vector3 > > &vec3Props, std::vector< OpenMesh::FPropHandleT< Vector4 > > &vec4Props) |
Topological operations | |
bool | splitEdge (TopologicalMesh::EdgeHandle eh, Scalar f) |
bool | splitEdgeWedge (TopologicalMesh::EdgeHandle eh, Scalar f) |
Friends | |
class | TMOperations |
This class represents a mesh with topological information on the vertex graph, using a half-edge representation.
This integration is inspired by: https://gist.github.com/Unril/03fa353d0461ed6bd41d
rename methods to respect Radium guideline (get/set/is, camelCase)
private inheritance from OpenMesh, and import relevant methods.
Definition at line 56 of file TopologicalMesh.hpp.
|
inlineexplicit |
Construct a topological mesh from a triangle mesh. This operation merges vertex with same position, but keeps vertex attributes on halfedges, so that TriangleMesh vertices with the same 3D position are represented only once in the topological mesh.
NonManifoldFaceCommand | Command executed when non-manifold faces are found. API and default implementation: struct DefaultNonManifoldFaceCommand {
LOG( logWARNING ) << "Invalid face handle returned : face not added " + m_details;
}
|
Definition at line 394 of file TopologicalMesh.hpp.
|
explicit |
Convenience constructor.
Definition at line 76 of file TopologicalMesh.cpp.
|
explicit |
Construct an empty topological mesh, only init mandatory properties.
Definition at line 79 of file TopologicalMesh.cpp.
|
inline |
Remove all the given properties from mesh.
Definition at line 759 of file TopologicalMesh.hpp.
|
inline |
Remove face property prop from mesh.
Definition at line 606 of file TopologicalMesh.hpp.
void Ra::Core::Geometry::deprecated::TopologicalMesh::clearProps | ( | std::vector< OpenMesh::FPropHandleT< T > > & | props | ) |
|
inline |
Copy all properties from input_heh to copy_heh.
Definition at line 771 of file TopologicalMesh.hpp.
|
inline |
Copy all given face properties from fh to heh.
Definition at line 780 of file TopologicalMesh.hpp.
|
inline |
Copy the normal property from input_heh to copy_heh.
Definition at line 610 of file TopologicalMesh.hpp.
|
inline |
Copy the face normal property fProp from fh to heh.
Definition at line 619 of file TopologicalMesh.hpp.
void Ra::Core::Geometry::deprecated::TopologicalMesh::copyProps | ( | HalfedgeHandle | input_heh, |
HalfedgeHandle | copy_heh, | ||
const std::vector< OpenMesh::HPropHandleT< T > > & | props ) |
Copy props properties from input_heh to copy_heh.
Definition at line 682 of file TopologicalMesh.hpp.
void Ra::Core::Geometry::deprecated::TopologicalMesh::copyPropsFromFace | ( | FaceHandle | fh, |
HalfedgeHandle | heh, | ||
const std::vector< OpenMesh::FPropHandleT< T > > & | fProps, | ||
const std::vector< OpenMesh::HPropHandleT< T > > & | hProps ) |
Copy face properties props from fh to heh.
Definition at line 691 of file TopologicalMesh.hpp.
|
inline |
Create a new property for each property of mesh on faces. Outputs the new face properties handles in the corresponding output parameters.
Definition at line 746 of file TopologicalMesh.hpp.
|
inline |
Create a new property for normals on faces of mesh.
Definition at line 597 of file TopologicalMesh.hpp.
void Ra::Core::Geometry::deprecated::TopologicalMesh::createPropsOnFaces | ( | const std::vector< OpenMesh::HPropHandleT< T > > & | input, |
std::vector< OpenMesh::FPropHandleT< T > > & | output ) |
Create a new property for each input properties of mesh on faces.
Definition at line 663 of file TopologicalMesh.hpp.
|
inline |
Definition at line 578 of file TopologicalMesh.hpp.
|
inline |
Return a handle to the halfedge property storing vertices indices within the TriangleMesh *this has been built on.
Definition at line 568 of file TopologicalMesh.hpp.
|
inline |
Return a handle to the halfedge property storing vertices indices within the TriangleMesh returned by toTriangleMesh().
Definition at line 573 of file TopologicalMesh.hpp.
|
inline |
Definition at line 583 of file TopologicalMesh.hpp.
|
inline |
Definition at line 588 of file TopologicalMesh.hpp.
|
inline |
Definition at line 593 of file TopologicalMesh.hpp.
|
inline |
Return the half-edge associated with a given vertex and face.
Definition at line 558 of file TopologicalMesh.hpp.
|
inline |
Interpolate all properties on edge center (after edge split).
Definition at line 794 of file TopologicalMesh.hpp.
|
inline |
Interpolate hprops on face center.
Definition at line 805 of file TopologicalMesh.hpp.
|
inline |
Interpolate normal property on edge center (after edge split).
Definition at line 630 of file TopologicalMesh.hpp.
|
inline |
Interpolate normal property on face center.
Definition at line 639 of file TopologicalMesh.hpp.
void Ra::Core::Geometry::deprecated::TopologicalMesh::interpolateProps | ( | HalfedgeHandle | in_a, |
HalfedgeHandle | in_b, | ||
HalfedgeHandle | out, | ||
Scalar | f, | ||
const std::vector< OpenMesh::HPropHandleT< T > > & | props ) |
Interpolate props on edge center (after edge split).
Definition at line 703 of file TopologicalMesh.hpp.
void Ra::Core::Geometry::deprecated::TopologicalMesh::interpolatePropsOnFaces | ( | FaceHandle | fh, |
const std::vector< OpenMesh::HPropHandleT< T > > & | hProps, | ||
const std::vector< OpenMesh::FPropHandleT< T > > & | fProps ) |
Interpolate hprops on face center.
Definition at line 715 of file TopologicalMesh.hpp.
|
inline |
Get normal of the vertex vh, when member of fh.
Definition at line 528 of file TopologicalMesh.hpp.
|
inline |
Set the normal n to all the halfedges that points to vh (i.e. incomming halfedges) . If you work with vertex normals, please call this function on all vertex handles before convertion with toTriangleMesh.
Definition at line 548 of file TopologicalMesh.hpp.
|
inline |
Set normal of the vertex vh, when member of fh.
Definition at line 539 of file TopologicalMesh.hpp.
bool Ra::Core::Geometry::deprecated::TopologicalMesh::splitEdge | ( | TopologicalMesh::EdgeHandle | eh, |
Scalar | f ) |
Apply a 2-4 edge split.
eh | The handle to the edge to split. |
f | The interpolation factor to place the new point on the edge. Must be in [0,1]. |
Definition at line 195 of file TopologicalMesh.cpp.
TriangleMesh Ra::Core::Geometry::deprecated::TopologicalMesh::toTriangleMesh | ( | ) |
Return a triangleMesh from the topological mesh.
Definition at line 83 of file TopologicalMesh.cpp.
void Ra::Core::Geometry::deprecated::TopologicalMesh::updateTriangleMesh | ( | Ra::Core::Geometry::TriangleMesh & | mesh | ) |
Update triangle mesh data, assuming the mesh and this topo mesh has the same topology.
|
friend |
Definition at line 390 of file TopologicalMesh.hpp.