Developer Documentation
QtPlaneSelect Class Reference
Inheritance diagram for QtPlaneSelect:

Public Slots

void slotMouseEvent (QMouseEvent *_event)
 
void slotKeyReleaseEvent (QKeyEvent *_event)
 

Signals

void signalTriggerCut ()
 
void updateViewProxy ()
 
void nodeVisChangedProxy (int _id)
 

Public Member Functions

 QtPlaneSelect (ACG::GLState &glState)
 
ACG::Vec3d getNormal ()
 
ACG::Vec3d getSourcePoint ()
 
size_t getNode ()
 
size_t getTargetIndex ()
 
void setClamping (bool clamp)
 

Protected Attributes

ACG::GLStateglState
 
ACG::Vec3d sourcePoint2D
 
ACG::Vec3d sourcePoint3D
 
ACG::Vec3d normal_
 
size_t nodeIdx_
 
size_t targetIdx_
 
bool isDragging_
 
bool clamp_ = false
 
PlaneNodeplaneNode_
 

Private Types

using Plane = ACG::Geometry::Plane
 

Private Member Functions

void setPlaneAndSize (const ACG::Vec3d &_sourcePoint3D, const ACG::Vec3d &_target2D)
 

Private Attributes

Plane plane_
 

Detailed Description

Definition at line 60 of file QtPlaneSelect.hh.

Member Typedef Documentation

◆ Plane

Definition at line 122 of file QtPlaneSelect.hh.

Constructor & Destructor Documentation

◆ QtPlaneSelect()

QtPlaneSelect::QtPlaneSelect ( ACG::GLState glState)
explicit

Definition at line 54 of file QtPlaneSelect.cc.

◆ ~QtPlaneSelect()

QtPlaneSelect::~QtPlaneSelect ( )

Definition at line 64 of file QtPlaneSelect.cc.

Member Function Documentation

◆ getNode()

size_t QtPlaneSelect::getNode ( )
inline

Definition at line 102 of file QtPlaneSelect.hh.

◆ getNormal()

ACG::Vec3d QtPlaneSelect::getNormal ( )
inline

Definition at line 100 of file QtPlaneSelect.hh.

◆ getSourcePoint()

ACG::Vec3d QtPlaneSelect::getSourcePoint ( )
inline

Definition at line 101 of file QtPlaneSelect.hh.

◆ getTargetIndex()

size_t QtPlaneSelect::getTargetIndex ( )
inline

Definition at line 103 of file QtPlaneSelect.hh.

◆ setClamping()

void QtPlaneSelect::setClamping ( bool  clamp)
inline

Definition at line 104 of file QtPlaneSelect.hh.

◆ setPlaneAndSize()

void QtPlaneSelect::setPlaneAndSize ( const ACG::Vec3d _sourcePoint3D,
const ACG::Vec3d _target2D 
)
private

angle (15°) at which we clamp in radians

center towards origin

compute angle in CCW dir to the x-axis

difference to next multiple of clamped angle

compute corrected angle

if we are at the lower half, clamp down

if we are at the upper half, clamp up

construct two vectors in the plane, orthogonally to each other

compute normal vector

create plane using point and normal

Definition at line 190 of file QtPlaneSelect.cc.

◆ slotKeyReleaseEvent

void QtPlaneSelect::slotKeyReleaseEvent ( QKeyEvent *  _event)
slot

Definition at line 73 of file QtPlaneSelect.cc.

◆ slotMouseEvent

void QtPlaneSelect::slotMouseEvent ( QMouseEvent *  _event)
slot

remember the 2d click position (for clamping)

Definition at line 89 of file QtPlaneSelect.cc.

Member Data Documentation

◆ clamp_

bool QtPlaneSelect::clamp_ = false
protected

Definition at line 117 of file QtPlaneSelect.hh.

◆ glState

ACG::GLState& QtPlaneSelect::glState
protected

Definition at line 110 of file QtPlaneSelect.hh.

◆ isDragging_

bool QtPlaneSelect::isDragging_
protected

Definition at line 116 of file QtPlaneSelect.hh.

◆ nodeIdx_

size_t QtPlaneSelect::nodeIdx_
protected

Definition at line 114 of file QtPlaneSelect.hh.

◆ normal_

ACG::Vec3d QtPlaneSelect::normal_
protected

Definition at line 113 of file QtPlaneSelect.hh.

◆ plane_

Plane QtPlaneSelect::plane_
private

Definition at line 123 of file QtPlaneSelect.hh.

◆ planeNode_

PlaneNode* QtPlaneSelect::planeNode_
protected

Definition at line 119 of file QtPlaneSelect.hh.

◆ sourcePoint2D

ACG::Vec3d QtPlaneSelect::sourcePoint2D
protected

Definition at line 111 of file QtPlaneSelect.hh.

◆ sourcePoint3D

ACG::Vec3d QtPlaneSelect::sourcePoint3D
protected

Definition at line 112 of file QtPlaneSelect.hh.

◆ targetIdx_

size_t QtPlaneSelect::targetIdx_
protected

Definition at line 115 of file QtPlaneSelect.hh.


The documentation for this class was generated from the following files: