Public Types | Public Member Functions | Protected Member Functions | List of all members
iedge::CEdgeLine Class Reference

#include <CEdgeLine.h>

Inheritance diagram for iedge::CEdgeLine:
i2d::CObject2dBase i2d::IObject2d iser::IObject i2d::ICalibrationProvider iser::ISerializable istd::IChangeable istd::IChangeable istd::IPolymorphic istd::IPolymorphic

Public Types

typedef i2d::CObject2dBase BaseClass
 

Public Member Functions

 CEdgeLine ()
 
 CEdgeLine (const CEdgeLine &edgeLine)
 
void Clear ()
 
int GetNodesCount () const
 Get number of nodes. More...
 
int GetSegmentsCount () const
 Get number of segments. More...
 
void SetNodesCount (int count)
 Set number of nodes in container without initializing it. More...
 
const CEdgeNodeGetNode (int index) const
 Return node at specified index. More...
 
CEdgeNodeGetNodeRef (int index)
 Return reference to node at specified index. More...
 
void SetNode (int index, const CEdgeNode &node)
 Set node at specified index. More...
 
bool IsClosed () const
 
void SetClosed (bool state=true)
 
double GetTotalLength () const
 
double GetMinWeight () const
 
double GetMaxWeight () const
 
bool InsertNode (const CEdgeNode &node)
 
void CopyFromPolyline (const i2d::CPolyline &polyline, double weight=1.0, const i2d::CAffine2d *transformPtr=NULL)
 Create this line using polyline object. More...
 
void CopyToPolyline (i2d::CPolyline &polyline, const i2d::CAffine2d *transformPtr=NULL) const
 Copy this line to polyline. More...
 
virtual i2d::CVector2d GetCenter () const
 
virtual void MoveCenterTo (const i2d::CVector2d &position)
 
virtual i2d::CRectangle GetBoundingBox () const
 
virtual bool Transform (const i2d::ITransformation2d &transformation, i2d::ITransformation2d::ExactnessMode mode=i2d::ITransformation2d::EM_NONE, double *errorFactorPtr=NULL)
 
virtual bool InvTransform (const i2d::ITransformation2d &transformation, i2d::ITransformation2d::ExactnessMode mode=i2d::ITransformation2d::EM_NONE, double *errorFactorPtr=NULL)
 
virtual bool GetTransformed (const i2d::ITransformation2d &transformation, IObject2d &result, i2d::ITransformation2d::ExactnessMode mode=i2d::ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const
 
virtual bool GetInvTransformed (const i2d::ITransformation2d &transformation, IObject2d &result, i2d::ITransformation2d::ExactnessMode mode=i2d::ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const
 
virtual bool Serialize (iser::IArchive &archive)
 
- Public Member Functions inherited from i2d::CObject2dBase
virtual bool Transform (const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL)
 
virtual bool InvTransform (const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL)
 
virtual bool GetTransformed (const ITransformation2d &transformation, IObject2d &result, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const
 
virtual bool GetInvTransformed (const ITransformation2d &transformation, IObject2d &result, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const
 
virtual QByteArray GetFactoryId () const
 
virtual bool Serialize (IArchive &archive)=0
 
virtual IChangeable * CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 
- Public Member Functions inherited from i2d::IObject2d
virtual void SetCalibration (const ICalibration2d *calibrationPtr, bool releaseFlag=false)=0
 
- Public Member Functions inherited from i2d::ICalibrationProvider
virtual const ICalibration2dGetCalibration () const =0
 

Protected Member Functions

void EnsureVolatileValid () const
 Make sure, that all volatile values are calculated and valid. More...
 
virtual void CalcVolatile () const
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 

Detailed Description

Definition at line 19 of file CEdgeLine.h.

Member Typedef Documentation

Definition at line 22 of file CEdgeLine.h.

Constructor & Destructor Documentation

iedge::CEdgeLine::CEdgeLine ( )
iedge::CEdgeLine::CEdgeLine ( const CEdgeLine edgeLine)

Member Function Documentation

virtual void iedge::CEdgeLine::CalcVolatile ( ) const
protectedvirtual

Referenced by EnsureVolatileValid().

void iedge::CEdgeLine::Clear ( )
void iedge::CEdgeLine::CopyFromPolyline ( const i2d::CPolyline polyline,
double  weight = 1.0,
const i2d::CAffine2d transformPtr = NULL 
)

Create this line using polyline object.

Please note, that no calibration will be copied.

Parameters
polylinesource polyline object.
weightweight used for all nodes.
transformPtroptional transformation used to convert node positions.
void iedge::CEdgeLine::CopyToPolyline ( i2d::CPolyline polyline,
const i2d::CAffine2d transformPtr = NULL 
) const

Copy this line to polyline.

Please note, that no calibration will be copied.

Parameters
polylineresult polyline object.
transformPtroptional transformation used to convert node positions.
void iedge::CEdgeLine::EnsureVolatileValid ( ) const
inlineprotected

Make sure, that all volatile values are calculated and valid.

Definition at line 199 of file CEdgeLine.h.

References CalcVolatile().

Referenced by GetMaxWeight(), GetMinWeight(), and GetTotalLength().

virtual i2d::CRectangle iedge::CEdgeLine::GetBoundingBox ( ) const
virtual

Implements i2d::CObject2dBase.

virtual i2d::CVector2d iedge::CEdgeLine::GetCenter ( ) const
virtual

Implements i2d::CObject2dBase.

virtual bool iedge::CEdgeLine::GetInvTransformed ( const i2d::ITransformation2d transformation,
IObject2d &  result,
i2d::ITransformation2d::ExactnessMode  mode = i2d::ITransformation2d::EM_NONE,
double *  errorFactorPtr = NULL 
) const
virtual
double iedge::CEdgeLine::GetMaxWeight ( ) const
inline

Definition at line 183 of file CEdgeLine.h.

References EnsureVolatileValid().

double iedge::CEdgeLine::GetMinWeight ( ) const
inline

Definition at line 175 of file CEdgeLine.h.

References EnsureVolatileValid().

const CEdgeNode & iedge::CEdgeLine::GetNode ( int  index) const
inline

Return node at specified index.

Parameters
indexan index in node table.

Definition at line 155 of file CEdgeLine.h.

CEdgeNode & iedge::CEdgeLine::GetNodeRef ( int  index)
inline

Return reference to node at specified index.

Parameters
indexan index in node table.

Definition at line 161 of file CEdgeLine.h.

int iedge::CEdgeLine::GetNodesCount ( ) const
inline

Get number of nodes.

Definition at line 143 of file CEdgeLine.h.

int iedge::CEdgeLine::GetSegmentsCount ( ) const
inline

Get number of segments.

Definition at line 149 of file CEdgeLine.h.

double iedge::CEdgeLine::GetTotalLength ( ) const
inline

Definition at line 167 of file CEdgeLine.h.

References EnsureVolatileValid().

virtual bool iedge::CEdgeLine::GetTransformed ( const i2d::ITransformation2d transformation,
IObject2d &  result,
i2d::ITransformation2d::ExactnessMode  mode = i2d::ITransformation2d::EM_NONE,
double *  errorFactorPtr = NULL 
) const
virtual
bool iedge::CEdgeLine::InsertNode ( const CEdgeNode node)
virtual bool iedge::CEdgeLine::InvTransform ( const i2d::ITransformation2d transformation,
i2d::ITransformation2d::ExactnessMode  mode = i2d::ITransformation2d::EM_NONE,
double *  errorFactorPtr = NULL 
)
virtual
bool iedge::CEdgeLine::IsClosed ( ) const
inline

Definition at line 191 of file CEdgeLine.h.

virtual void iedge::CEdgeLine::MoveCenterTo ( const i2d::CVector2d position)
virtual

Implements i2d::CObject2dBase.

virtual void iedge::CEdgeLine::OnEndChanges ( const ChangeSet changeSet)
protectedvirtual
virtual bool iedge::CEdgeLine::Serialize ( iser::IArchive archive)
virtual
void iedge::CEdgeLine::SetClosed ( bool  state = true)
void iedge::CEdgeLine::SetNode ( int  index,
const CEdgeNode node 
)

Set node at specified index.

Parameters
indexindex in node table.
nodenew node position.
void iedge::CEdgeLine::SetNodesCount ( int  count)

Set number of nodes in container without initializing it.

virtual bool iedge::CEdgeLine::Transform ( const i2d::ITransformation2d transformation,
i2d::ITransformation2d::ExactnessMode  mode = i2d::ITransformation2d::EM_NONE,
double *  errorFactorPtr = NULL 
)
virtual

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

© 2007-2017 Witold Gantzke and Kirill Lepskiy