27#ifndef EDIT_CONSTRAINTS_H_ 
   28#define EDIT_CONSTRAINTS_H_ 
   61template<
class EDIT_TYPE>
 
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
 
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
 
EC_45DEGREE(EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
 
EC_90DEGREE(EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
 
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
 
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
 
const EDIT_POINT & m_end
Point that imposes the constraint (decides on the radius of the circle).
 
EC_CIRCLE(EDIT_POINT &aConstrained, const EDIT_POINT &aCenter, const EDIT_POINT &aEnd)
 
const EDIT_POINT & m_center
Point that imposes the constraint (center of the circle).
 
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
 
std::unique_ptr< EDIT_CONSTRAINT< EDIT_POINT > > m_endSideConstraint
Constraint for end side segment.
 
EC_CONVERGING(EDIT_LINE &aLine, EDIT_POINTS &aPoints)
 
std::unique_ptr< EDIT_CONSTRAINT< EDIT_POINT > > m_originSideConstraint
Constraint for origin side segment.
 
EDIT_CONSTRAINT< EDIT_POINT > * m_colinearConstraint
Additional constraint, applied when at least two points are collinear.
 
VECTOR2I m_midVector
Vector from the convergence point to the mid-line point.
 
VECTOR2I m_draggedVector
Vector that represents the initial direction of the dragged segment.
 
EDIT_POINT * m_prevOrigin
Previous and next points to keep drag endpoints fixed.
 
bool m_originCollinear
Flags to indicate when dragged and neighbouring lines are (almost) collinear.
 
EDIT_POINTS & m_editPoints
EDIT_POINTS instance that stores currently modified lines.
 
virtual void Apply(EDIT_LINE &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
 
VECTOR2I m_convergencePoint
Original convergence point of adjacent segments.
 
EC_HORIZONTAL(EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
 
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
 
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
 
VECTOR2I GetLineVector() const
 
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
 
VECTOR2I m_line
Vector representing the constraining line.
 
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
 
const EDIT_POINT & GetConstrainer() const
 
EC_LINE(EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
 
EC_PERPLINE(EDIT_LINE &aLine)
 
virtual void Apply(EDIT_LINE &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
 
virtual void Apply(EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
Correct coordinates of the constrained edit handle.
 
EC_VERTICAL(EDIT_POINT &aConstrained, const EDIT_POINT &aConstrainer)
 
const EDIT_POINT & m_constrainer
Point that imposes the constraint.
 
void Apply(const GRID_HELPER &aGrid)
Correct coordinates of the constrained edit handle.
 
EDIT_TYPE & m_constrained
Point that is constrained by rules implemented by Apply().
 
EDIT_CONSTRAINT(EDIT_TYPE &aConstrained)
 
virtual void Apply(EDIT_TYPE &aHandle, const GRID_HELPER &aGrid)=0
Correct coordinates of the constrained edit handle.
 
virtual ~EDIT_CONSTRAINT()
 
Represent a line connecting two EDIT_POINTs.
 
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
 
Represent a single point that can be used for modifying items.
 
VECTOR2< int32_t > VECTOR2I