Class AIAC::CutBladeThicknessVisualizer¶
ClassList > AIAC > CutBladeThicknessVisualizer
The idea behind the CutBladeThicknessVisualizer is to give a visual feedback on the thickness of the blade. We do this by intersecting the two neighbours faces of the current highlighted face.
#include <CutBladeThicknessVisualizer.h>
Inherits the following classes: AIAC::FeedbackVisualizer
Inherited by the following classes: AIAC::CircularSawCutBladeThicknessVisualizer
Public Attributes¶
Type | Name |
---|---|
bool | IsSegmenDetectToolPlaneVisible = = false < |
Public Functions¶
Type | Name |
---|---|
CutBladeThicknessVisualizer () |
Public Functions inherited from AIAC::FeedbackVisualizer¶
Type | Name |
---|---|
virtual void | Activate () |
virtual void | Deactivate () |
FeedbackVisualizer () = default | |
~FeedbackVisualizer () = default |
Public Static Functions inherited from AIAC::FeedbackVisualizer¶
Type | Name |
---|---|
std::string | toString (double val) Convert a double value to the real world scale in mm and return a string with 2 digits. If the value in mm is > 99, return "99". |
Protected Attributes¶
Type | Name |
---|---|
float | m_BladeOverhangScaled the reference to the current toolhead's normal start |
float | m_BladeTotalThicknessScaled the overhang distance of the blade's teeth from one side only |
glm::vec3 | m_DisplacedCenterAwayFromCamera |
glm::vec3 | m_DisplacedCenterTowardsCamera the displaced center of the face away from the camera |
std::shared_ptr< GOLine > | m_LongestIntersectSegmenDetectToolPlane < |
std::shared_ptr< GOLine > | m_LongestIntersectSegmentAwayFromCameraA the thickness A of the blade away from the camera on second neighbour side |
std::shared_ptr< GOLine > | m_LongestIntersectSegmentAwayFromCameraB the scaled thickness of the blade towards the camera |
std::shared_ptr< GOLine > | m_LongestIntersectSegmentTowardsCameraA the thickness of the blade towards the camera on second neighbour side |
std::shared_ptr< GOLine > | m_LongestIntersectSegmentTowardsCameraB the thickness A of the blade away from the camera on first neighbour side |
glm::vec3 | m_NormalOppositeUnitized the displaced center of the face towards the camera |
glm::vec3 | m_NormalUnitized the opposite unitize value of the normal |
glm::vec3 | m_ToolheadRefCenter the unitize value of the normal |
glm::vec3 | m_ToolheadRefNormEnd the reference to the current toolhead's center |
glm::vec3 | m_ToolheadRefNormStart the reference to the current toolhead's normal end |
Protected Attributes inherited from AIAC::FeedbackVisualizer¶
Type | Name |
---|---|
std::vector< std::shared_ptr< GOPrimitive > > | m_AllPrimitives |
Protected Functions¶
Type | Name |
---|---|
virtual bool | IntersectBladeWithNeighbours (AIAC::TimberInfo::Cut * cut, AIAC::TimberInfo::Cut::Face & face, bool isTowardsCamera, bool isDetectToolPlane, std::shared_ptr< GOLine > & lineIntersection) = 0 This function intersect the plane of the blade with the two(or one) neighbour faces. |
virtual void | UpdateToolheadsData () = 0 Update the current toolhead's data: normalStart, normEnd and center, as well the thickness. Since there could be multiple cutting toolheads (sawblade or chainsaw), we need to get the correct toolhead's type. |
Public Attributes Documentation¶
variable IsSegmenDetectToolPlaneVisible¶
<
if the segment of the detected blade is visible
Public Functions Documentation¶
function CutBladeThicknessVisualizer¶
Protected Attributes Documentation¶
variable m_BladeOverhangScaled¶
the reference to the current toolhead's normal start
variable m_BladeTotalThicknessScaled¶
the overhang distance of the blade's teeth from one side only
variable m_DisplacedCenterAwayFromCamera¶
variable m_DisplacedCenterTowardsCamera¶
the displaced center of the face away from the camera
variable m_LongestIntersectSegmenDetectToolPlane¶
<
the segment where the blade is detected by the toolhead
the thickness of the blade towards the camera on first neighbour side
variable m_LongestIntersectSegmentAwayFromCameraA¶
the thickness A of the blade away from the camera on second neighbour side
std::shared_ptr<GOLine> AIAC::CutBladeThicknessVisualizer::m_LongestIntersectSegmentAwayFromCameraA;
variable m_LongestIntersectSegmentAwayFromCameraB¶
the scaled thickness of the blade towards the camera
std::shared_ptr<GOLine> AIAC::CutBladeThicknessVisualizer::m_LongestIntersectSegmentAwayFromCameraB;
variable m_LongestIntersectSegmentTowardsCameraA¶
the thickness of the blade towards the camera on second neighbour side
variable m_LongestIntersectSegmentTowardsCameraB¶
the thickness A of the blade away from the camera on first neighbour side
variable m_NormalOppositeUnitized¶
the displaced center of the face towards the camera
variable m_NormalUnitized¶
the opposite unitize value of the normal
variable m_ToolheadRefCenter¶
the unitize value of the normal
variable m_ToolheadRefNormEnd¶
the reference to the current toolhead's center
variable m_ToolheadRefNormStart¶
the reference to the current toolhead's normal end
Protected Functions Documentation¶
function IntersectBladeWithNeighbours¶
This function intersect the plane of the blade with the two(or one) neighbour faces.
virtual bool AIAC::CutBladeThicknessVisualizer::IntersectBladeWithNeighbours (
AIAC::TimberInfo::Cut * cut,
AIAC::TimberInfo::Cut::Face & face,
bool isTowardsCamera,
bool isDetectToolPlane,
std::shared_ptr< GOLine > & lineIntersection
) = 0
Parameters:
cut
the TimberInfo::Cut objectface
the face belonging to the cut to intersect withisTowardsCamera
the boolean to indicate if we intersect the blade's edge close to the cameraisDetectToolPlane
the intersection is for the reference toolhead's planelineIntersection
the reference to the line intersection
Returns:
bool true if the intersection is successful, false otherwise
function UpdateToolheadsData¶
Update the current toolhead's data: normalStart, normEnd and center, as well the thickness. Since there could be multiple cutting toolheads (sawblade or chainsaw), we need to get the correct toolhead's type.
The documentation for this class was generated from the following file src/AIAC/Feedback/CutBladeThicknessVisualizer.h