SpecularPoints is a class that mirrors a point cloud w.r.t. a reference plane, on a target surface geometry if any. More...
#include <SpecularPoints.hpp>
Protected Member Functions | |
virtual void | plotOptionalResults () |
void | swap (SpecularPoints &x) noexcept |
Protected Member Functions inherited from mimmo::ProjPatchOnSurface | |
void | projection () |
void | swap (ProjPatchOnSurface &x) noexcept |
Protected Member Functions inherited from mimmo::ProjPrimitivesOnSurfaces | |
void | swap (ProjPrimitivesOnSurfaces &x) noexcept |
Protected Member Functions inherited from mimmo::BaseManipulation | |
void | _apply (MimmoPiercedVector< darray3E > &displacements) |
void | addChild (BaseManipulation *child) |
void | addParent (BaseManipulation *parent) |
void | addPinIn (BaseManipulation *objIn, PortID portR) |
void | addPinOut (BaseManipulation *objOut, PortID portS, PortID portR) |
virtual void | apply () |
void | cleanBufferIn (PortID port) |
template<typename T , typename O > | |
bool | createPortIn (O *obj, void(O::*setVar_)(T), PortID portR, bool mandatory=false, int family=0) |
template<typename T , typename O > | |
bool | createPortIn (T *var_, PortID portR, bool mandatory=false, int family=0) |
template<typename T , typename O > | |
bool | createPortOut (O *obj, T(O::*getVar_)(), PortID portS) |
template<typename T , typename O > | |
bool | createPortOut (T *var_, PortID portS) |
void | deletePorts () |
PortID | findPinIn (PortIn &pin) |
PortID | findPinOut (PortOut &pin) |
void | initializeLogger (bool logexists) |
void | readBufferIn (PortID port) |
void | removePinIn (BaseManipulation *objIn, PortID portR) |
void | removePinIn (PortID portR, int j) |
void | removePinOut (BaseManipulation *objOut, PortID portS) |
void | removePinOut (PortID portS, int j) |
void | setBufferIn (PortID port, mimmo::IBinaryStream &input) |
void | swap (BaseManipulation &x) noexcept |
void | unsetChild (BaseManipulation *child) |
void | unsetParent (BaseManipulation *parent) |
void | write (MimmoSharedPointer< MimmoObject > geometry) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data, Args ... args) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data, Args ... args) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data, Args ... args) |
Detailed Description
SpecularPoints is a class that mirrors a point cloud w.r.t. a reference plane, on a target surface geometry if any.
SpecularPoints is a custom derivation of ProjPatchOnSurface class, specialized for Point Clouds. Given a point cloud and a reference plane, the class mirrors such points with respect to this plane. If a surface geometry is linked, it projects the final mirrored points on it.
Any data attached, as scalar/vector float data format, are mirrored as well.
Ports available in SpecularPoints Class :
Port Input | ||
---|---|---|
PortType | variable/function | DataType |
M_GEOM2 | setPointCloud | (MC_SCALAR, MD_MIMMO_) |
M_GEOM | setGeometry | (MC_SCALAR, MD_MIMMO_) |
M_VECTORFIELD | setVectorData | (MC_SCALAR, MD_MPVECARR3FLOAT_) |
M_SCALARFIELD | setScalarData | (MC_SCALAR, MD_MPVECFLOAT_) |
M_PLANE | setPlane | (MC_ARRAY4, MD_FLOAT) |
M_POINT | setOrigin | (MC_ARRAY3, MD_FLOAT) |
M_AXIS | setNormal | (MC_ARRAY3, MD_FLOAT) |
Port Output | ||
---|---|---|
PortType | variable/function | DataType |
M_VECTORFIELD | getMirroredVectorData | (MC_SCALAR, MD_MPVECARR3FLOAT_) |
M_SCALARFIELD | getMirroredScalarData | (MC_SCALAR, MD_MPVECFLOAT_) |
M_GEOM | getMirroredPointCloud | (MC_SCALAR, MD_MIMMO_) |
The xml available parameters, sections and subsections are the following :
Inherited from BaseManipulation:
- ClassName: name of the class as
mimmo.SpecularPoints
; - Priority: uint marking priority in multi-chain execution;
- PlotInExecution: boolean 0/1 print optional results of the class;
- OutputPlot: target directory for optional results writing.
Inherited from ProjPatchOnSurface:
- KdTree : evaluate kdTree true 1/false 0 for final Point Cloud;
Proper of the class:
- Force: boolean 0/1. If true, force mirroring of points that lies on the plane;
- InsideOut: boolean 0/1 to align/reverse mirroring with/against the plane normal;
- Plane: section defining the plane's normal and a point belonging to it :
<Plane>
<Point> 0.0 0.0 0.0 </Point>
<Normal> 0.0 1.0 0.0 </Normal>
</Plane>
Points list and data have to be mandatorily passed through port.
- Examples
- utils_example_00003.cpp.
Definition at line 91 of file SpecularPoints.hpp.
Constructor & Destructor Documentation
◆ SpecularPoints() [1/3]
mimmo::SpecularPoints::SpecularPoints | ( | ) |
Default constructor of SpecularPoints
Definition at line 32 of file SpecularPoints.cpp.
◆ SpecularPoints() [2/3]
mimmo::SpecularPoints::SpecularPoints | ( | const bitpit::Config::Section & | rootXML | ) |
Custom constructor reading xml data
- Parameters
-
[in] rootXML reference to your xml tree section
Definition at line 48 of file SpecularPoints.cpp.
◆ ~SpecularPoints()
mimmo::SpecularPoints::~SpecularPoints | ( | ) |
Default destructor of SpecularPoints
Definition at line 72 of file SpecularPoints.cpp.
◆ SpecularPoints() [3/3]
mimmo::SpecularPoints::SpecularPoints | ( | const SpecularPoints & | other | ) |
Copy constructor of SpecularPoints. No result are copied.
Definition at line 76 of file SpecularPoints.cpp.
Member Function Documentation
◆ absorbSectionXML()
|
virtual |
It sets infos reading from a XML bitpit::Config::section.
- Parameters
-
[in] slotXML bitpit::Config::Section of XML file [in] name name associated to the slot
Reimplemented from mimmo::ProjPatchOnSurface.
Definition at line 554 of file SpecularPoints.cpp.
◆ buildPorts()
|
virtual |
It builds the input/output ports of the object
Reimplemented from mimmo::ProjPatchOnSurface.
Definition at line 119 of file SpecularPoints.cpp.
◆ clear()
void mimmo::SpecularPoints::clear | ( | ) |
Clear all content of the class
Definition at line 538 of file SpecularPoints.cpp.
◆ execute()
|
virtual |
Execution command.Mirror the list of points linked, with data attached if any. If a geometry is linked, project all resulting points on it.
Reimplemented from mimmo::ProjPrimitivesOnSurfaces.
Definition at line 355 of file SpecularPoints.cpp.
◆ flushSectionXML()
|
virtual |
It sets infos from class members in a XML bitpit::Config::section.
- Parameters
-
[in] slotXML bitpit::Config::Section of XML file [in] name name associated to the slot
Reimplemented from mimmo::ProjPatchOnSurface.
Definition at line 613 of file SpecularPoints.cpp.
◆ getMirroredLabels()
livector1D mimmo::SpecularPoints::getMirroredLabels | ( | ) |
It gets the labels associated to the list of getMirroredRawCoords. Meaningful after execution.
- Returns
- labels of mirrored raw point cloud coordinates.
Definition at line 195 of file SpecularPoints.cpp.
◆ getMirroredPointCloud()
MimmoSharedPointer< MimmoObject > mimmo::SpecularPoints::getMirroredPointCloud | ( | ) |
- Returns
- final mirrored point cloud.
Definition at line 211 of file SpecularPoints.cpp.
◆ getMirroredRawCoords()
dvecarr3E mimmo::SpecularPoints::getMirroredRawCoords | ( | ) |
It gets the coordinates of the mirrored point cloud. Meaningful after execution.
- Returns
- raw list of coordinates of local point cloud.
Definition at line 178 of file SpecularPoints.cpp.
◆ getMirroredScalarData()
dmpvector1D * mimmo::SpecularPoints::getMirroredScalarData | ( | ) |
Returns pointer to the scalar data field attached to mirrored cloud points
- Returns
- output scalar field
Definition at line 159 of file SpecularPoints.cpp.
◆ getMirroredVectorData()
dmpvecarr3E * mimmo::SpecularPoints::getMirroredVectorData | ( | ) |
Returns pointer to the vector data field attached to mirrored cloud points
- Returns
- output vector field
Definition at line 168 of file SpecularPoints.cpp.
◆ getOriginalScalarData()
dmpvector1D * mimmo::SpecularPoints::getOriginalScalarData | ( | ) |
Returns pointer to the original scalar data field attached to cloud points
- Returns
- input scalar field
Definition at line 141 of file SpecularPoints.cpp.
◆ getOriginalVectorData()
dmpvecarr3E * mimmo::SpecularPoints::getOriginalVectorData | ( | ) |
Returns pointer to the original vector data field attached to cloud points
- Returns
- input vector field
Definition at line 150 of file SpecularPoints.cpp.
◆ getPlane()
darray4E mimmo::SpecularPoints::getPlane | ( | ) |
Returns plane set up in the class, for mirroring
- Returns
- plane coefficients
Definition at line 220 of file SpecularPoints.cpp.
◆ isForced()
bool mimmo::SpecularPoints::isForced | ( | ) |
Returns if even the points belonging to the symmetry plane has to be mirrored (i.e. duplicated).
- Returns
- true if points on symmetry plane has to be duplicated
Definition at line 240 of file SpecularPoints.cpp.
◆ isInsideOut()
bool mimmo::SpecularPoints::isInsideOut | ( | ) |
Returns which half-space intercepeted by the plane is interested by mirroring. False represents the half-space where plane normal is directed, true the other one.
- Returns
- insideout flag
Definition at line 230 of file SpecularPoints.cpp.
◆ operator=()
SpecularPoints & mimmo::SpecularPoints::operator= | ( | SpecularPoints | other | ) |
Assignment operator. No result are copied
Definition at line 91 of file SpecularPoints.cpp.
◆ plotOptionalResults()
|
protectedvirtual |
Plot as optional results the mirrored list of points with the updated data field associated to it
Reimplemented from mimmo::ProjPrimitivesOnSurfaces.
Definition at line 657 of file SpecularPoints.cpp.
◆ setForce()
void mimmo::SpecularPoints::setForce | ( | bool | flag | ) |
Set if even the points belonging to the symmetry plane have to be mirrored (i.e. duplicated).
- Parameters
-
[in] flag true if the points on the symmetry plane have to be duplicated during mirroring.
- Examples
- utils_example_00003.cpp.
Definition at line 346 of file SpecularPoints.cpp.
◆ setInsideOut()
void mimmo::SpecularPoints::setInsideOut | ( | bool | flag | ) |
Returns which half-space intercepeted by the plane is interested by mirroring.
- Parameters
-
[in] flag false to select the half-space where plane normal is directed, true to select the other one.
- Examples
- utils_example_00003.cpp.
Definition at line 336 of file SpecularPoints.cpp.
◆ setNormal()
void mimmo::SpecularPoints::setNormal | ( | darray3E | normal | ) |
It sets normal of mirroring plane
- Parameters
-
[in] normal plane normal
- Examples
- utils_example_00003.cpp.
Definition at line 327 of file SpecularPoints.cpp.
◆ setOrigin()
void mimmo::SpecularPoints::setOrigin | ( | darray3E | origin | ) |
It sets origin of mirroring plane
- Parameters
-
[in] origin point belonging to plane
- Examples
- utils_example_00003.cpp.
Definition at line 317 of file SpecularPoints.cpp.
◆ setPlane() [1/2]
Set Plane for mirroring cloud points. All points not belonging to plane will be mirrored
- Parameters
-
[in] origin points belonging to plane [in] normal plane normal
Definition at line 297 of file SpecularPoints.cpp.
◆ setPlane() [2/2]
void mimmo::SpecularPoints::setPlane | ( | darray4E | plane | ) |
Set Plane for mirroring cloud points. All points not belonging to plane will be mirrored
- Parameters
-
[in] plane coefficients a,b,c,d of plane in its implicit form a*x+b*y+c*z+d = 0
Definition at line 285 of file SpecularPoints.cpp.
◆ setPointCloud()
void mimmo::SpecularPoints::setPointCloud | ( | MimmoSharedPointer< MimmoObject > | targetpatch | ) |
It sets the target point cloud to be processed.
- Parameters
-
[in] targetpatch point cloud to be mirrored .
- Examples
- utils_example_00003.cpp.
Definition at line 250 of file SpecularPoints.cpp.
◆ setScalarData()
void mimmo::SpecularPoints::setScalarData | ( | dmpvector1D * | scalardata | ) |
Set the original scalar data field attached to target point cloud
- Parameters
-
[in] scalardata scalar field pointer;
Definition at line 263 of file SpecularPoints.cpp.
◆ setVectorData()
void mimmo::SpecularPoints::setVectorData | ( | dmpvecarr3E * | vectordata | ) |
Set the original vector data field attached to target point cloud
- Parameters
-
[in] vectordata vector field pointer;
- Examples
- utils_example_00003.cpp.
Definition at line 274 of file SpecularPoints.cpp.
◆ swap()
|
protectednoexcept |
Swap function
- Parameters
-
[in] x object to be swapped
Definition at line 100 of file SpecularPoints.cpp.
The documentation for this class was generated from the following files:
- src/utils/SpecularPoints.hpp
- src/utils/SpecularPoints.cpp