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 Function Documentation

◆ 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.

◆ slotMouseEvent

void QtPlaneSelect::slotMouseEvent ( QMouseEvent *  _event)
slot

remember the 2d click position (for clamping)

Definition at line 89 of file QtPlaneSelect.cc.


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