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

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

#include <qgarlib/primitives.H>

Inheritance diagram for qgar::GenArc< T >:

qgar::AbstractGenPrimitive< T > qgar::ISerializable List of all members.

Detailed Description

template<class T>
class qgar::GenArc< T >

Arc of circle, with coordinates of type T.

Warning:
The coherence of the data structure of an arc after modifications of its source and/or its target and/or its center is the user's responsibility!
Author:
Gérald Masini
Date:
June 20, 2003 19:23
Since:
Qgar 2.1

Definition at line 131 of file _QGAR_GenArc.H.

Public Types

Types
typedef T value_type
 Type of the coordinates of the source, target and center.
typedef value_typereference
 Reference to qgar::GenArc::value_type.
typedef const value_typeconst_reference
 Constant reference to qgar::GenArc::value_type.
typedef value_typepointer
 Pointer to qgar::GenArc::value_type.
typedef const value_typeconst_pointer
 Constant pointer to qgar::GenArc::value_type.

Public Member Functions

Constructors
 GenArc ()
 Default constructor.
 GenArc (const GenArc< value_type > &anArc)
 Copy constructor.
 GenArc (const GenQgarArc< value_type > &aQArc)
 Initialize from a Qgar arc.
 GenArc (const GenPoint< value_type > &aSource, const GenPoint< value_type > &aTarget, const GenPoint< value_type > &aCenter)
 Initialize from three points.
Destructor
virtual ~GenArc ()
 Virtual destructor.
Copy
virtual GenArc< value_type > * clone () const
 Return a deep copy of the current arc.
Access to geometrical features
double radius () const
 Get radius.
double length () const
 Get arc length.
double angle () const
 Get arc angle, in [0, 2PI] radians.
double angleDegrees () const
 Get arc angle, in [0, 360] degrees.
double sourceAngle () const
 Get the so-called source angle.
double sourceAngleDegrees () const
 Get the source angle, in [0, 360] degrees.
double targetAngle () const
 Get the so-called target angle.
double targetAngleDegrees () const
 Get the target angle, in [0, 360] degrees.
Center
const GenPoint< value_type > & accessCenter () const
 Get the center point.
GenPoint< value_typecenter () const
 Get a copy of the center point.
value_type xCenter () const
 Get X coordinate of center point.
value_type yCenter () const
 Get Y coordinate of center point.
void setXCenter (value_type aX)
 Set X coordinate of the center point.
void setYCenter (value_type aY)
 Set Y coordinate of the center point.
void setCenter (value_type aX, value_type aY)
 Set the center point.
void setCenter (const GenPoint< value_type > &aCenter)
 Set the center point.
Operators
GenArc< value_type > & operator= (const GenArc< value_type > &anArc)
 Assignment.
bool operator== (const GenArc< value_type > &anArc) const
 Same as function qgar::GenArc::eq.
bool operator!= (const GenArc< value_type > &anArc) const
 Same as function qgar::GenArc::notEq.
Functional operators
bool eq (const GenArc< value_type > &anArc) const
 Equality.
bool notEq (const GenArc< value_type > &anArc) const
 Inequality.
Geometry: Translation
virtual void translate (value_type aTransX, value_type aTransY)
 Translate current arc along X and Y axis.
Serialization/deserialization
virtual std::istream & read (std::istream &anInStream)
 Deserializes the current arc from an input stream.
virtual std::ostream & write (std::ostream &anOutStream) const
 Serializes the current arc to an input stream.

Protected Member Functions

Implementation of pure virtual functions
virtual void updateSource ()
 Update the geometrical structure when the source has been changed.
virtual void updateTarget ()
 Update the geometrical structure when the target has been changed.
virtual void updateSourceTarget ()
 Update the geometrical structure when both source and target have been changed.

Protected Attributes

Structure of an arc
GenPoint< value_type_center
 Center of the circle supporting the arc.


Member Typedef Documentation

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

Constant pointer to qgar::GenArc::value_type.

Reimplemented from qgar::AbstractGenPrimitive< T >.

Definition at line 170 of file _QGAR_GenArc.H.

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

Constant reference to qgar::GenArc::value_type.

Reimplemented from qgar::AbstractGenPrimitive< T >.

Definition at line 160 of file _QGAR_GenArc.H.

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

Pointer to qgar::GenArc::value_type.

Reimplemented from qgar::AbstractGenPrimitive< T >.

Definition at line 165 of file _QGAR_GenArc.H.

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

Reference to qgar::GenArc::value_type.

Reimplemented from qgar::AbstractGenPrimitive< T >.

Definition at line 155 of file _QGAR_GenArc.H.

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

Type of the coordinates of the source, target and center.

Reimplemented from qgar::AbstractGenPrimitive< T >.

Definition at line 150 of file _QGAR_GenArc.H.


Constructor & Destructor Documentation

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

Default constructor.

Zero-length arc located at the origin of the coordinate system.

Todo:
Such an arc does not conform the definition of an arc!

Definition at line 58 of file _QGAR_GenArc.TCC.

template<class T>
qgar::GenArc< T >::GenArc const GenArc< value_type > &  anArc  ) 
 

Copy constructor.

template<class T>
qgar::GenArc< T >::GenArc const GenQgarArc< value_type > &  aQArc  )  [explicit]
 

Initialize from a Qgar arc.

Parameters:
aQArc a Qgar arc
Warning:
This kind of conversion must be explicitely specified by the client.

Definition at line 84 of file _QGAR_GenArc.TCC.

template<class T>
qgar::GenArc< T >::GenArc const GenPoint< value_type > &  aSource,
const GenPoint< value_type > &  aTarget,
const GenPoint< value_type > &  aCenter
 

Initialize from three points.

Parameters:
aSource source point
aTarget target point
aCenter center point

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

Virtual destructor.

Definition at line 115 of file _QGAR_GenArc.TCC.


Member Function Documentation

template<class T>
const GenPoint< T > & qgar::GenArc< T >::accessCenter  )  const [inline]
 

Get the center point.

Definition at line 240 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::_center.

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

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, inherited]
 

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>
double qgar::GenArc< T >::angle  )  const
 

Get arc angle, in [0, 2PI] radians.

Always positive.

Definition at line 163 of file _QGAR_GenArc.TCC.

References qgar::Math::QG_2PI, qgar::GenArc< T >::sourceAngle(), and qgar::GenArc< T >::targetAngle().

Referenced by qgar::GenArc< T >::angleDegrees(), and qgar::GenArc< T >::length().

template<class T>
double qgar::GenArc< T >::angleDegrees  )  const [inline]
 

Get arc angle, in [0, 360] degrees.

Always positive.

Definition at line 183 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::angle(), and qgar::qgRadiansToDegrees().

template<class T>
GenPoint< T > qgar::GenArc< T >::center  )  const [inline]
 

Get a copy of the center point.

Definition at line 250 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::_center.

Referenced by qgar::GenArc< T >::write().

template<class T>
GenArc< T > * qgar::GenArc< T >::clone  )  const [virtual]
 

Return a deep copy of the current arc.

Implements qgar::AbstractGenPrimitive< T >.

Definition at line 128 of file _QGAR_GenArc.TCC.

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

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, inherited]
 

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>
bool qgar::GenArc< T >::eq const GenArc< value_type > &  anArc  )  const
 

Equality.

Return true if the current arc and the given arc have the same coordinates.

Parameters:
anArc an arc

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

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
[inherited]
 

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
[inherited]
 

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
[inherited]
 

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  )  [inherited]
 

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
[inherited]
 

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  )  [inherited]
 

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  )  [inherited]
 

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  )  [inherited]
 

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  )  [inherited]
 

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>
double qgar::GenArc< T >::length  )  const
 

Get arc length.

Definition at line 153 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::angle().

template<class T>
bool qgar::GenArc< T >::notEq const GenArc< value_type > &  anArc  )  const
 

Inequality.

Return true if the coordinates of the current and given arcs are different.

Parameters:
anArc an arc

template<class T>
bool qgar::GenArc< T >::operator!= const GenArc< value_type > &  anArc  )  const [inline]
 

Same as function qgar::GenArc::notEq.

template<class T>
GenArc<value_type>& qgar::GenArc< T >::operator= const GenArc< value_type > &  anArc  ) 
 

Assignment.

Parameters:
anArc an arc

template<class T>
bool qgar::GenArc< T >::operator== const GenArc< value_type > &  anArc  )  const [inline]
 

Same as function qgar::GenArc::eq.

template<class T>
double qgar::GenArc< T >::radius  )  const [inline]
 

Get radius.

Definition at line 143 of file _QGAR_GenArc.TCC.

References qgar::qgDist().

Referenced by qgar::TgifFile::write(), and qgar::DxfFile::write().

template<class T>
std::istream & qgar::GenArc< T >::read std::istream &  anInStream  )  [virtual]
 

Deserializes the current arc from an input stream.

A serialized arc is represented as:

Arc(<SOURCE>)(<TARGET>)(<CENTER>)

Parameters:
anInStream The input stream

Implements qgar::ISerializable.

Definition at line 396 of file _QGAR_GenArc.TCC.

References qgar::qgReadObjData(), and qgar::qgReadObjName().

template<class T>
void qgar::GenArc< T >::setCenter const GenPoint< value_type > &  aCenter  )  [inline]
 

Set the center point.

Parameters:
aCenter point representing the new center

template<class T>
void qgar::GenArc< T >::setCenter value_type  aX,
value_type  aY
[inline]
 

Set the center point.

Parameters:
aX X coordinate of the new center
aY Y coordinate of the new center

Definition at line 302 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::_center.

Referenced by qgar::GenArc< T >::translate().

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

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, inherited]
 

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
[inherited]
 

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
[inherited]
 

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, inherited]
 

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, inherited]
 

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::GenArc< T >::setXCenter value_type  aX  )  [inline]
 

Set X coordinate of the center point.

Parameters:
aX new X coordinate

Definition at line 281 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::_center.

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

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, inherited]
 

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::GenArc< T >::setYCenter value_type  aY  )  [inline]
 

Set Y coordinate of the center point.

Parameters:
aY new Y coordinate

Definition at line 292 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::_center.

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

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, inherited]
 

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, inherited]
 

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>
double qgar::GenArc< T >::sourceAngle  )  const [inline]
 

Get the so-called source angle.

It is the angle between the vector joining the center to the source point and the X axis, in [0, 2PI] radians.

Definition at line 194 of file _QGAR_GenArc.TCC.

References qgar::qgAngle().

Referenced by qgar::GenArc< T >::angle().

template<class T>
double qgar::GenArc< T >::sourceAngleDegrees  )  const [inline]
 

Get the source angle, in [0, 360] degrees.

Definition at line 204 of file _QGAR_GenArc.TCC.

References qgar::qgRadiansToDegrees().

Referenced by qgar::TgifFile::write(), and qgar::DxfFile::write().

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

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>
double qgar::GenArc< T >::targetAngle  )  const [inline]
 

Get the so-called target angle.

It is the angle between the vector joining the center to the target point and the X axis, in [0, 2PI] radians.

Definition at line 215 of file _QGAR_GenArc.TCC.

References qgar::qgAngle().

Referenced by qgar::GenArc< T >::angle().

template<class T>
double qgar::GenArc< T >::targetAngleDegrees  )  const [inline]
 

Get the target angle, in [0, 360] degrees.

Definition at line 225 of file _QGAR_GenArc.TCC.

References qgar::qgRadiansToDegrees().

Referenced by qgar::TgifFile::write(), and qgar::DxfFile::write().

template<class T>
void qgar::GenArc< T >::translate value_type  aTransX,
value_type  aTransY
[inline, virtual]
 

Translate current arc along X and Y axis.

Parameters:
aTransX X translation factor
aTransY Y translation factor

Implements qgar::AbstractGenPrimitive< T >.

Definition at line 473 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::_center, qgar::GenArc< T >::setCenter(), qgar::AbstractGenPrimitive< T >::setSourceTarget(), qgar::GenPoint< T >::x(), qgar::AbstractGenPrimitive< T >::xTarget(), qgar::GenPoint< T >::y(), qgar::AbstractGenPrimitive< T >::ySource(), and qgar::AbstractGenPrimitive< T >::yTarget().

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

Update the geometrical structure when the source has been changed.

Inherited from qgar::AbstractGenPrimitive.

Implements qgar::AbstractGenPrimitive< T >.

Definition at line 440 of file _QGAR_GenArc.TCC.

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

Update the geometrical structure when both source and target have been changed.

Inherited from qgar::AbstractGenPrimitive.

Implements qgar::AbstractGenPrimitive< T >.

Definition at line 460 of file _QGAR_GenArc.TCC.

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

Update the geometrical structure when the target has been changed.

Inherited from qgar::AbstractGenPrimitive.

Implements qgar::AbstractGenPrimitive< T >.

Definition at line 450 of file _QGAR_GenArc.TCC.

template<class T>
std::ostream & qgar::GenArc< T >::write std::ostream &  anOutStream  )  const [virtual]
 

Serializes the current arc to an input stream.

A serialized arc is represented as:

Arc(<SOURCE>)(<TARGET>)(<CENTER>)

Parameters:
anOutStream The output stream

Implements qgar::ISerializable.

Definition at line 410 of file _QGAR_GenArc.TCC.

References qgar::GenArc< T >::center(), qgar::AbstractGenPrimitive< T >::source(), and qgar::AbstractGenPrimitive< T >::target().

template<class T>
T qgar::GenArc< T >::xCenter  )  const [inline]
 

Get X coordinate of center point.

Definition at line 260 of file _QGAR_GenArc.TCC.

References qgar::GenPoint< T >::x().

Referenced by qgar::TgifFile::write(), and qgar::DxfFile::write().

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

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, inherited]
 

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::GenArc< T >::yCenter  )  const [inline]
 

Get Y coordinate of center point.

Definition at line 270 of file _QGAR_GenArc.TCC.

Referenced by qgar::TgifFile::write(), and qgar::DxfFile::write().

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

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, inherited]
 

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::GenArc< T >::_center [protected]
 

Center of the circle supporting the arc.

Definition at line 470 of file _QGAR_GenArc.H.

Referenced by qgar::GenArc< T >::accessCenter(), qgar::GenArc< T >::center(), qgar::GenArc< T >::setCenter(), qgar::GenArc< T >::setXCenter(), qgar::GenArc< T >::setYCenter(), and qgar::GenArc< T >::translate().

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

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, inherited]
 

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: