KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EC_CIRCLE Class Reference

EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a circle. More...

#include <edit_constraints.h>

Inheritance diagram for EC_CIRCLE:
EDIT_CONSTRAINT< EDIT_POINT >

Public Member Functions

 EC_CIRCLE (EDIT_POINT &aConstrained, const EDIT_POINT &aCenter, const EDIT_POINT &aEnd)
 
virtual void Apply (EDIT_POINT &aHandle, const GRID_HELPER &aGrid) override
 Correct coordinates of the constrained edit handle.
 
void Apply (const GRID_HELPER &aGrid)
 Correct coordinates of the constrained edit handle.
 

Protected Attributes

EDIT_POINTm_constrained
 Point that is constrained by rules implemented by Apply().
 

Private Attributes

const EDIT_POINTm_center
 < Point that imposes the constraint (center of the circle).
 
const EDIT_POINTm_end
 

Detailed Description

EDIT_CONSTRAINT that imposes a constraint that a point has to lie on a circle.

Definition at line 183 of file edit_constraints.h.

Constructor & Destructor Documentation

◆ EC_CIRCLE()

EC_CIRCLE::EC_CIRCLE ( EDIT_POINT aConstrained,
const EDIT_POINT aCenter,
const EDIT_POINT aEnd 
)
inline
Parameters
aConstrainedis the point that is put under constrain.
aCenteris the point that is the center of the circle.
aEndis the point that decides on the radius of the circle. Correct coordinates of the constrained edit handle.

Definition at line 191 of file edit_constraints.h.

Member Function Documentation

◆ Apply() [1/2]

void EDIT_CONSTRAINT< EDIT_POINT >::Apply ( const GRID_HELPER aGrid)
inlineinherited

Correct coordinates of the constrained edit handle.

Definition at line 82 of file edit_constraints.h.

◆ Apply() [2/2]

void EC_CIRCLE::Apply ( EDIT_POINT aHandle,
const GRID_HELPER aGrid 
)
overridevirtual

Correct coordinates of the constrained edit handle.

Implements EDIT_CONSTRAINT< EDIT_POINT >.

Definition at line 111 of file edit_constraints.cpp.

References VECTOR2< T >::EuclideanNorm(), EDIT_POINT::GetPosition(), m_center, m_end, RotatePoint(), and EDIT_POINT::SetPosition().

Member Data Documentation

◆ m_center

const EDIT_POINT& EC_CIRCLE::m_center
private

< Point that imposes the constraint (center of the circle).

Point that imposes the constraint (decides on the radius of the circle).

Definition at line 202 of file edit_constraints.h.

Referenced by Apply().

◆ m_constrained

EDIT_POINT & EDIT_CONSTRAINT< EDIT_POINT >::m_constrained
protectedinherited

Point that is constrained by rules implemented by Apply().

Definition at line 88 of file edit_constraints.h.

◆ m_end

const EDIT_POINT& EC_CIRCLE::m_end
private

Definition at line 205 of file edit_constraints.h.

Referenced by Apply().


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