Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::AbstractGenPrimitive< T > Class Template Reference
[Geometrical primitives]

#include <qgarlib/primitives.H>

Inheritance diagram for qgar::AbstractGenPrimitive< T >:

qgar::GenArc< T > qgar::GenPolygon< T > qgar::GenPolyline< T > qgar::GenSegment< T > List of all members.

Detailed Description

template<class T>
class qgar::AbstractGenPrimitive< T >

Geometrical primitives with coordinates of type T.

Such a primitive is provided with a so-called source point (head) and a so-called target point (tail), arbitrarily defined.

Predefined types: qgar::Primitive, qgar::IPrimitive, qgar::FPrimitive, qgar::DPrimitive.

Warning:
This is an abstract class: It cannot be instantiated. Pure virtual functions are:

Author:
Gérald Masini
Date:
June 20, 2003 18:08
Since:
Qgar 2.1.1

Definition at line 96 of file _QGAR_AbstractGenPrimitive.H.

Public Types

Types
typedef T value_type
 Type of a point of a primitive.
typedef value_typereference
 Reference to qgar::AbstractGenPrimitive::value_type.
typedef const value_typeconst_reference
 Constant reference to qgar::AbstractGenPrimitive::value_type.
typedef value_typepointer
 Pointer to qgar::AbstractGenPrimitive::value_type.
typedef const value_typeconst_pointer
 Constant pointer to qgar::AbstractGenPrimitive::value_type.

Public Member Functions

Constructors
 AbstractGenPrimitive ()
 Default constructor.
 AbstractGenPrimitive (const AbstractGenPrimitive< value_type > &aPrim)
 Copy constructor.
 AbstractGenPrimitive (const GenPoint< value_type > aSource, const GenPoint< value_type > aTarget)
 Initialize from source and target.
 AbstractGenPrimitive (value_type aXSource, value_type aYSource, value_type aXTarget, value_type aYTarget)
 Initialize from coordinates.
Destructor
virtual ~AbstractGenPrimitive ()
 Virtual destructor.
Copy
virtual AbstractGenPrimitive<
value_type > * 
clone () const =0
 Perform a deep copy.
Access to source and target
const GenPoint< value_type > & accessSource () const
 Get source point.
GenPoint< value_typesource () const
 Get a copy of the source point.
const GenPoint< value_type > & accessTarget () const
 Get target point.
GenPoint< value_typetarget () const
 Get a copy of the target point.
Access to separate coordinates
value_type xSource () const
 Get X coordinate of the source point.
value_type xTarget () const
 Get X coordinate of the target point.
value_type ySource () const
 Get Y coordinate of the source point.
value_type yTarget () const
 Get Y coordinate of the target point.
Access to geometrical characteristics
value_type dx () const
 Difference between target and source X coordinates.
value_type dy () const
 Difference between target and source Y coordinates.
Set source and/or target without update
void setSource (value_type aX, value_type aY)
 Set source point.
void setSource (const GenPoint< value_type > &aPt)
 Set source point.
void setTarget (value_type aX, value_type aY)
 Set target point.
void setTarget (const GenPoint< value_type > &aPt)
 Set target point.
void setSourceTarget (value_type aXSource, value_type aYSource, value_type aXTarget, value_type aYTarget)
 Set both source and target points.
void setSourceTarget (const GenPoint< value_type > &aSource, const GenPoint< value_type > &aTarget)
 Set both source and target points.
Set source and/or target with update
void fixSource (value_type aX, value_type aY)
 Set source point.
void fixSource (const GenPoint< value_type > &aPt)
 Set source point.
void fixTarget (value_type aX, value_type aY)
 Set target point.
void fixTarget (const GenPoint< value_type > &aPt)
 Set target point.
void fixSourceTarget (value_type aXSource, value_type aYSource, value_type aXTarget, value_type aYTarget)
 Set both source and target points.
void fixSourceTarget (const GenPoint< value_type > &aSource, const GenPoint< value_type > &aTarget)
 Set both source and target points.
Set separate (source and target) coordinates without update
void setXSource (value_type aX)
 Set X coordinate of the source point.
void setXTarget (value_type aX)
 Set X coordinate of the target point.
void setYSource (value_type aY)
 Set Y coordinate of the source point.
void setYTarget (value_type aY)
 Set Y coordinate of the target point.
Set separate (source and target) coordinates with update
void fixXSource (value_type aX)
 Set X coordinate of the source point.
void fixXTarget (value_type aX)
 Set X coordinate of the target point.
void fixYSource (value_type aY)
 Set Y coordinate of the source point.
void fixYTarget (value_type aY)
 Set Y coordinate of the target point.
Operators
AbstractGenPrimitive< value_type > & operator= (const AbstractGenPrimitive< value_type > &aPrim)
 Assignment.
Geometry: Translation
virtual void translate (value_type aX, value_type aY)=0
 Translate current primitive along X and Y axis.

Protected Member Functions

Updates subsequent to source and target modifications
virtual void updateSource ()=0
 Update the geometrical structure when the source point is modified.
virtual void updateTarget ()=0
 Update the geometrical structure when the target point is modified.
virtual void updateSourceTarget ()=0
 Update the geometrical structure when both source and targets points are modified.

Protected Attributes

Source and target
Apply a central symmetry to the current primitive, using the point of given coordinates as the symmetry center. Apply a central symmetry to the current primitive, using the given point as the symmetry center. Apply a mirror symmetry to the current primitive, using the line passing through the two given points for the symmetry. Apply a mirror symmetry to the current primitive, using the line supporting the given segment for the symmetry.

GenPoint< value_type_source
 Source point.
GenPoint< value_type_target
 Target point.


Member Typedef Documentation

template<class T>
typedef const value_type* qgar::AbstractGenPrimitive< T >::const_pointer
 

Constant pointer to qgar::AbstractGenPrimitive::value_type.

Reimplemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

Definition at line 131 of file _QGAR_AbstractGenPrimitive.H.

template<class T>
typedef const value_type& qgar::AbstractGenPrimitive< T >::const_reference
 

Constant reference to qgar::AbstractGenPrimitive::value_type.

Reimplemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

Definition at line 121 of file _QGAR_AbstractGenPrimitive.H.

template<class T>
typedef value_type* qgar::AbstractGenPrimitive< T >::pointer
 

Pointer to qgar::AbstractGenPrimitive::value_type.

Reimplemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

Definition at line 126 of file _QGAR_AbstractGenPrimitive.H.

template<class T>
typedef value_type& qgar::AbstractGenPrimitive< T >::reference
 

Reference to qgar::AbstractGenPrimitive::value_type.

Reimplemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

Definition at line 116 of file _QGAR_AbstractGenPrimitive.H.

template<class T>
typedef T qgar::AbstractGenPrimitive< T >::value_type
 

Type of a point of a primitive.

Reimplemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

Definition at line 111 of file _QGAR_AbstractGenPrimitive.H.


Constructor & Destructor Documentation

template<class T>
qgar::AbstractGenPrimitive< T >::AbstractGenPrimitive  ) 
 

Default constructor.

Source and target at (0, 0).

Definition at line 63 of file _QGAR_AbstractGenPrimitive.TCC.

template<class T>
qgar::AbstractGenPrimitive< T >::AbstractGenPrimitive const AbstractGenPrimitive< value_type > &  aPrim  ) 
 

Copy constructor.

Parameters:
aPrim primitive to be copied

template<class T>
qgar::AbstractGenPrimitive< T >::AbstractGenPrimitive const GenPoint< value_type aSource,
const GenPoint< value_type aTarget
 

Initialize from source and target.

Parameters:
aSource source point
aTarget target point

template<class T>
qgar::AbstractGenPrimitive< T >::AbstractGenPrimitive value_type  aXSource,
value_type  aYSource,
value_type  aXTarget,
value_type  aYTarget
 

Initialize from coordinates.

Parameters:
aXSource X coordinate of source point
aYSource Y coordinate of source point
aXTarget X coordinate of target point
aYTarget Y coordinate of target point

Definition at line 106 of file _QGAR_AbstractGenPrimitive.TCC.

template<class T>
qgar::AbstractGenPrimitive< T >::~AbstractGenPrimitive  )  [virtual]
 

Virtual destructor.

Definition at line 128 of file _QGAR_AbstractGenPrimitive.TCC.


Member Function Documentation

template<class T>
const GenPoint< T > & qgar::AbstractGenPrimitive< T >::accessSource  )  const [inline]
 

Get source point.

Definition at line 143 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source.

Referenced by qgar::AbstractGenQgarPrimitive< T >::accessSource().

template<class T>
const GenPoint< T > & qgar::AbstractGenPrimitive< T >::accessTarget  )  const [inline]
 

Get target point.

Definition at line 163 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_target.

Referenced by qgar::AbstractGenQgarPrimitive< T >::accessTarget(), and qgar::GenSegment< T >::slope().

template<class T>
virtual AbstractGenPrimitive<value_type>* qgar::AbstractGenPrimitive< T >::clone  )  const [pure virtual]
 

Perform a deep copy.

Implemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

template<class T>
T qgar::AbstractGenPrimitive< T >::dx  )  const [inline]
 

Difference between target and source X coordinates.

Definition at line 233 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source, qgar::AbstractGenPrimitive< T >::_target, and qgar::GenPoint< T >::x().

Referenced by qgar::GenSegment< T >::contains(), and qgar::AbstractGenQgarPrimitive< T >::dx().

template<class T>
T qgar::AbstractGenPrimitive< T >::dy  )  const [inline]
 

Difference between target and source Y coordinates.

Definition at line 243 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source, qgar::AbstractGenPrimitive< T >::_target, and qgar::GenPoint< T >::y().

Referenced by qgar::GenSegment< T >::contains(), qgar::AbstractGenQgarPrimitive< T >::dy(), and qgar::GenSegment< T >::length().

template<class T>
void qgar::AbstractGenPrimitive< T >::fixSource const GenPoint< value_type > &  aPt  ) 
 

Set source point.

Parameters:
aPt a point
Warning:
Function qgar::AbstractGenPrimitive::updateSource is called after the modification of the source point.

template<class T>
void qgar::AbstractGenPrimitive< T >::fixSource value_type  aX,
value_type  aY
 

Set source point.

Parameters:
aX new X coordinate of the source point
aY new Y coordinate of the source point
Warning:
Function qgar::AbstractGenPrimitive::updateSource is called after the modification of the source point.

Definition at line 327 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::setSource(), and qgar::AbstractGenPrimitive< T >::updateSource().

Referenced by qgar::AbstractGenQgarPrimitive< T >::fixSource().

template<class T>
void qgar::AbstractGenPrimitive< T >::fixSourceTarget const GenPoint< value_type > &  aSource,
const GenPoint< value_type > &  aTarget
 

Set both source and target points.

Parameters:
aSource source point
aTarget target point
Warning:
Function qgar::AbstractGenPrimitive::updateSourceTarget is called after the modification of the source and target points.

template<class T>
void qgar::AbstractGenPrimitive< T >::fixSourceTarget value_type  aXSource,
value_type  aYSource,
value_type  aXTarget,
value_type  aYTarget
 

Set both source and target points.

Parameters:
aXSource new X coordinate of the source point
aYSource new Y coordinate of the source point
aXTarget new X coordinate of the target point
aYTarget new Y coordinate of the target point
Warning:
Function qgar::AbstractGenPrimitive::updateSourceTarget is called after the modification of the source and target points.

Definition at line 369 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::setSourceTarget(), and qgar::AbstractGenPrimitive< T >::updateSourceTarget().

Referenced by qgar::AbstractGenQgarPrimitive< T >::fixSourceTarget().

template<class T>
void qgar::AbstractGenPrimitive< T >::fixTarget const GenPoint< value_type > &  aPt  ) 
 

Set target point.

Parameters:
aPt a point
Warning:
Function qgar::AbstractGenPrimitive::updateTarget is called after the modification of the source target.

template<class T>
void qgar::AbstractGenPrimitive< T >::fixTarget value_type  aX,
value_type  aY
 

Set target point.

Parameters:
aX new X coordinate of the target point
aY new Y coordinate of the target point
Warning:
Function qgar::AbstractGenPrimitive::updateTarget is called after the modification of the target point.

Definition at line 348 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::setTarget(), and qgar::AbstractGenPrimitive< T >::updateTarget().

Referenced by qgar::AbstractGenQgarPrimitive< T >::fixTarget().

template<class T>
void qgar::AbstractGenPrimitive< T >::fixXSource value_type  aX  ) 
 

Set X coordinate of the source point.

Parameters:
aX new X coordinate of the source point
Warning:
Function qgar::AbstractGenPrimitive::updateSource is called after the modification of the source point.

Definition at line 443 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::setXSource(), and qgar::AbstractGenPrimitive< T >::updateSource().

Referenced by qgar::AbstractGenQgarPrimitive< T >::fixXSource().

template<class T>
void qgar::AbstractGenPrimitive< T >::fixXTarget value_type  aX  ) 
 

Set X coordinate of the target point.

Parameters:
aX new X coordinate of the target point
Warning:
Function qgar::AbstractGenPrimitive::updateTarget is called after the modification of the target point.

Definition at line 454 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::setXTarget(), and qgar::AbstractGenPrimitive< T >::updateTarget().

Referenced by qgar::AbstractGenQgarPrimitive< T >::fixXTarget().

template<class T>
void qgar::AbstractGenPrimitive< T >::fixYSource value_type  aY  ) 
 

Set Y coordinate of the source point.

Parameters:
aY new Y coordinate of the source point
Warning:
Function qgar::AbstractGenPrimitive::updateSource is called after the modification of the source point.

Definition at line 465 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::setYSource(), and qgar::AbstractGenPrimitive< T >::updateSource().

Referenced by qgar::AbstractGenQgarPrimitive< T >::fixYSource().

template<class T>
void qgar::AbstractGenPrimitive< T >::fixYTarget value_type  aY  ) 
 

Set Y coordinate of the target point.

Parameters:
aY new Y coordinate of the target point
Warning:
Function qgar::AbstractGenPrimitive::updateTarget is called after the modification of the target point.

Definition at line 476 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::setYTarget(), and qgar::AbstractGenPrimitive< T >::updateTarget().

Referenced by qgar::AbstractGenQgarPrimitive< T >::fixYTarget().

template<class T>
AbstractGenPrimitive<value_type>& qgar::AbstractGenPrimitive< T >::operator= const AbstractGenPrimitive< value_type > &  aPrim  ) 
 

Assignment.

Parameters:
aPrim a geometrical primitive

template<class T>
void qgar::AbstractGenPrimitive< T >::setSource const GenPoint< value_type > &  aPt  )  [inline]
 

Set source point.

Parameters:
aPt a point
Warning:
The data structure of the primitive is not subsequently updated.

template<class T>
void qgar::AbstractGenPrimitive< T >::setSource value_type  aX,
value_type  aY
[inline]
 

Set source point.

Parameters:
aX new X coordinate of the source point
aY new Y coordinate of the source point
Warning:
The data structure of the primitive is not subsequently updated.

Definition at line 259 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source, and qgar::GenPoint< T >::setXY().

Referenced by qgar::AbstractGenPrimitive< T >::fixSource(), qgar::WDSegmentList::PRIVATEperform(), and qgar::AbstractGenQgarPrimitive< T >::setSource().

template<class T>
void qgar::AbstractGenPrimitive< T >::setSourceTarget const GenPoint< value_type > &  aSource,
const GenPoint< value_type > &  aTarget
 

Set both source and target points.

Parameters:
aSource source point
aTarget target point
Warning:
The data structure of the primitive is not subsequently updated.

template<class T>
void qgar::AbstractGenPrimitive< T >::setSourceTarget value_type  aXSource,
value_type  aYSource,
value_type  aXTarget,
value_type  aYTarget
 

Set both source and target points.

Parameters:
aXSource new X coordinate of the source point
aYSource new Y coordinate of the source point
aXTarget new X coordinate of the target point
aYTarget new Y coordinate of the target point
Warning:
The data structure of the primitive is not subsequently updated.

Definition at line 297 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source, qgar::AbstractGenPrimitive< T >::_target, and qgar::GenPoint< T >::setXY().

Referenced by qgar::AbstractGenPrimitive< T >::fixSourceTarget(), qgar::AbstractGenQgarPrimitive< T >::setSourceTarget(), qgar::GenSegment< T >::translate(), qgar::GenPolyline< T >::translate(), qgar::GenPolygon< T >::translate(), and qgar::GenArc< T >::translate().

template<class T>
void qgar::AbstractGenPrimitive< T >::setTarget const GenPoint< value_type > &  aPt  )  [inline]
 

Set target point.

Parameters:
aPt a point
Warning:
The data structure of the primitive is not subsequently updated.

template<class T>
void qgar::AbstractGenPrimitive< T >::setTarget value_type  aX,
value_type  aY
[inline]
 

Set target point.

Parameters:
aX new X coordinate of the target point
aY new Y coordinate of the target point
Warning:
The data structure of the primitive is not subsequently updated.

Definition at line 278 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_target, and qgar::GenPoint< T >::setXY().

Referenced by qgar::AbstractGenPrimitive< T >::fixTarget(), qgar::WDSegmentList::PRIVATEperform(), and qgar::AbstractGenQgarPrimitive< T >::setTarget().

template<class T>
void qgar::AbstractGenPrimitive< T >::setXSource value_type  aX  )  [inline]
 

Set X coordinate of the source point.

Parameters:
aX new X coordinate of the source point
Warning:
The data structure of the primitive is not subsequently updated.

Definition at line 398 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source.

Referenced by qgar::AbstractGenPrimitive< T >::fixXSource(), and qgar::AbstractGenQgarPrimitive< T >::setXSource().

template<class T>
void qgar::AbstractGenPrimitive< T >::setXTarget value_type  aX  )  [inline]
 

Set X coordinate of the target point.

Parameters:
aX new X coordinate of the target point
Warning:
The data structure of the primitive is not subsequently updated.

Definition at line 408 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_target.

Referenced by qgar::AbstractGenPrimitive< T >::fixXTarget(), and qgar::AbstractGenQgarPrimitive< T >::setXTarget().

template<class T>
void qgar::AbstractGenPrimitive< T >::setYSource value_type  aY  )  [inline]
 

Set Y coordinate of the source point.

Parameters:
aY new Y coordinate of the source point
Warning:
The data structure of the primitive is not subsequently updated.

Definition at line 418 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source.

Referenced by qgar::AbstractGenPrimitive< T >::fixYSource(), and qgar::AbstractGenQgarPrimitive< T >::setYSource().

template<class T>
void qgar::AbstractGenPrimitive< T >::setYTarget value_type  aY  )  [inline]
 

Set Y coordinate of the target point.

Parameters:
aY new Y coordinate of the target point
Warning:
The data structure of the primitive is not subsequently updated.

Definition at line 428 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_target.

Referenced by qgar::AbstractGenPrimitive< T >::fixYTarget(), and qgar::AbstractGenQgarPrimitive< T >::setYTarget().

template<class T>
GenPoint< T > qgar::AbstractGenPrimitive< T >::source  )  const [inline]
 

Get a copy of the source point.

Definition at line 153 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source.

Referenced by qgar::GenImage< T, CheckPolicy >::draw(), qgar::WDSegment::operator=(), qgar::WDSegmentList::PRIVATEperform(), qgar::AbstractGenQgarPrimitive< T >::source(), qgar::GenPolyline< T >::toQgarSegList(), qgar::GenPolyline< T >::toSegList(), qgar::GenPolygon< T >::write(), and qgar::GenArc< T >::write().

template<class T>
GenPoint< T > qgar::AbstractGenPrimitive< T >::target  )  const [inline]
 

Get a copy of the target point.

Definition at line 173 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_target.

Referenced by qgar::GenImage< T, CheckPolicy >::draw(), qgar::WDSegment::operator=(), qgar::WDSegmentList::PRIVATEperform(), qgar::AbstractGenQgarPrimitive< T >::target(), qgar::GenPolyline< T >::toQgarSegList(), qgar::GenPolyline< T >::toSegList(), qgar::GenPolygon< T >::write(), and qgar::GenArc< T >::write().

template<class T>
virtual void qgar::AbstractGenPrimitive< T >::translate value_type  aX,
value_type  aY
[pure virtual]
 

Translate current primitive along X and Y axis.

Parameters:
aX X translation factor
aY Y translation factor
Warning:
This is a pure virtual function.

Implemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

template<class T>
virtual void qgar::AbstractGenPrimitive< T >::updateSource  )  [protected, pure virtual]
 

Update the geometrical structure when the source point is modified.

Warning:
This is a pure virtual function.

Implemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

Referenced by qgar::AbstractGenPrimitive< T >::fixSource(), qgar::AbstractGenPrimitive< T >::fixXSource(), and qgar::AbstractGenPrimitive< T >::fixYSource().

template<class T>
virtual void qgar::AbstractGenPrimitive< T >::updateSourceTarget  )  [protected, pure virtual]
 

Update the geometrical structure when both source and targets points are modified.

Warning:
This is a pure virtual function.

Implemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

Referenced by qgar::AbstractGenPrimitive< T >::fixSourceTarget().

template<class T>
virtual void qgar::AbstractGenPrimitive< T >::updateTarget  )  [protected, pure virtual]
 

Update the geometrical structure when the target point is modified.

Warning:
This is a pure virtual function.

Implemented in qgar::GenArc< T >, qgar::GenPolygon< T >, qgar::GenPolyline< T >, qgar::GenSegment< T >, qgar::GenArc< value_type >, qgar::GenPolygon< value_type >, qgar::GenPolyline< value_type >, qgar::GenSegment< value_type >, and qgar::GenSegment< int >.

Referenced by qgar::AbstractGenPrimitive< T >::fixTarget(), qgar::AbstractGenPrimitive< T >::fixXTarget(), and qgar::AbstractGenPrimitive< T >::fixYTarget().

template<class T>
T qgar::AbstractGenPrimitive< T >::xSource  )  const [inline]
 

Get X coordinate of the source point.

Definition at line 188 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source, and qgar::GenPoint< T >::x().

Referenced by qgar::GenSegment< T >::contains(), qgar::GenSegment< T >::rho(), qgar::TgifFile::write(), qgar::DxfFile::write(), and qgar::AbstractGenQgarPrimitive< T >::xSource().

template<class T>
T qgar::AbstractGenPrimitive< T >::xTarget  )  const [inline]
 

Get X coordinate of the target point.

Definition at line 198 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_target, and qgar::GenPoint< T >::x().

Referenced by qgar::GenSegment< T >::contains(), qgar::GenSegment< T >::rho(), qgar::GenSegment< T >::translate(), qgar::GenPolyline< T >::translate(), qgar::GenPolygon< T >::translate(), qgar::GenArc< T >::translate(), qgar::TgifFile::write(), qgar::DxfFile::write(), and qgar::AbstractGenQgarPrimitive< T >::xTarget().

template<class T>
T qgar::AbstractGenPrimitive< T >::ySource  )  const [inline]
 

Get Y coordinate of the source point.

Definition at line 208 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_source, and qgar::GenPoint< T >::y().

Referenced by qgar::GenSegment< T >::contains(), qgar::GenSegment< T >::translate(), qgar::GenPolyline< T >::translate(), qgar::GenPolygon< T >::translate(), qgar::GenArc< T >::translate(), qgar::TgifFile::write(), qgar::DxfFile::write(), and qgar::AbstractGenQgarPrimitive< T >::ySource().

template<class T>
T qgar::AbstractGenPrimitive< T >::yTarget  )  const [inline]
 

Get Y coordinate of the target point.

Definition at line 218 of file _QGAR_AbstractGenPrimitive.TCC.

References qgar::AbstractGenPrimitive< T >::_target, and qgar::GenPoint< T >::y().

Referenced by qgar::GenSegment< T >::contains(), qgar::GenSegment< T >::rho(), qgar::GenSegment< T >::translate(), qgar::GenPolyline< T >::translate(), qgar::GenPolygon< T >::translate(), qgar::GenArc< T >::translate(), qgar::TgifFile::write(), qgar::DxfFile::write(), and qgar::AbstractGenQgarPrimitive< T >::yTarget().


Member Data Documentation

template<class T>
GenPoint<value_type> qgar::AbstractGenPrimitive< T >::_source [protected]
 

Source point.

Definition at line 615 of file _QGAR_AbstractGenPrimitive.H.

Referenced by qgar::AbstractGenPrimitive< T >::accessSource(), qgar::AbstractGenPrimitive< T >::dx(), qgar::AbstractGenPrimitive< T >::dy(), qgar::GenPolygon< T >::GenPolygon(), qgar::GenPolyline< T >::GenPolyline(), qgar::WDSegment::set(), qgar::AbstractGenPrimitive< T >::setSource(), qgar::AbstractGenPrimitive< T >::setSourceTarget(), qgar::AbstractGenPrimitive< T >::setXSource(), qgar::AbstractGenPrimitive< T >::setYSource(), qgar::AbstractGenPrimitive< T >::source(), qgar::GenPolyline< T >::updateSource(), qgar::GenPolygon< T >::updateSource(), qgar::WDSegment::WDSegment(), qgar::GenSegment< T >::write(), qgar::GenPolyline< T >::write(), qgar::AbstractGenPrimitive< T >::xSource(), and qgar::AbstractGenPrimitive< T >::ySource().

template<class T>
GenPoint<value_type> qgar::AbstractGenPrimitive< T >::_target [protected]
 

Target point.

Definition at line 620 of file _QGAR_AbstractGenPrimitive.H.

Referenced by qgar::AbstractGenPrimitive< T >::accessTarget(), qgar::GenPolyline< T >::append(), qgar::GenPolygon< T >::append(), qgar::AbstractGenPrimitive< T >::dx(), qgar::AbstractGenPrimitive< T >::dy(), qgar::GenPolygon< T >::GenPolygon(), qgar::GenPolyline< T >::GenPolyline(), qgar::WDSegment::set(), qgar::AbstractGenPrimitive< T >::setSourceTarget(), qgar::AbstractGenPrimitive< T >::setTarget(), qgar::AbstractGenPrimitive< T >::setXTarget(), qgar::AbstractGenPrimitive< T >::setYTarget(), qgar::AbstractGenPrimitive< T >::target(), qgar::GenPolyline< T >::updateTarget(), qgar::GenPolygon< T >::updateTarget(), qgar::WDSegment::WDSegment(), qgar::GenSegment< T >::write(), qgar::GenPolyline< T >::write(), qgar::AbstractGenPrimitive< T >::xTarget(), and qgar::AbstractGenPrimitive< T >::yTarget().


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