RVC::CADELEMENT Class Reference

CAD Element Definition This class is used to define and use a CAD object element. More...

#include <rvc/cadelement.h>

List of all members.

Classes

class  BOX
 CAD element TYPE_RotationBox class implementation. More...
class  DRAW
 CADELEMENT Interface class to render and/or transform CAD Elements into common types. More...
class  INSERT
 CAD element TYPE_Insert class implementation. More...
class  MESH
 CAD element TYPE_Mesh class implementation. More...

Public Types

enum  TYPE {
  TYPE_Insert = 0, TYPE_Point = 1, TYPE_Circle = 2, TYPE_Arc = 3,
  TYPE_ArcChord = 4, TYPE_Text = 5, TYPE_Line = 7, TYPE_RotationBox = 8,
  TYPE_Polygon = 9, TYPE_Mesh = 10, TYPE_Ellipse = 11, TYPE_EllipticalArc = 12,
  TYPE_ArcWedge = 14, TYPE_EllipticalArcWedge = 15, TYPE_EllipticalArcChord = 16, TYPE_MultiLine = 17,
  TYPE_MultiPoint = 18, TYPE_MultiPolygon = 19, TYPE_LAST
}

Public Member Functions

 CADELEMENT (const CADELEMENT &rhs)
 CADELEMENT ()
 ~CADELEMENT ()
void Clear ()
double ComputeDistanceFrom (const DPOINT2D &point) const
bool ComputeExtents (DRECT3D &Extents, const RVC::STYLE *StyleObj=0) const
bool ComputeInsertBorder (const CAD &CadObj, POLYLINE &Border) const
bool ComputeInsertExtents (const CAD &CadObj, DRECT3D &Extents) const
void ConvertForward (const TRANS3D &t3d)
ERRVALUE ConvertForward (const TRANS2D_MAPGEN &tmg)
void ConvertForward (const TRANS2D_AFFINE &taf)
ERRVALUE ConvertForwardDense (const TRANS2D_MAPGEN &tmg)
void ConvertInverse (const TRANS3D &t3d)
ERRVALUE ConvertInverse (const TRANS2D_MAPGEN &tmg)
void ConvertInverse (const TRANS2D_AFFINE &taf)
ERRVALUE ConvertInverseDense (const TRANS2D_MAPGEN &tmg)
ERRVALUE DrawElement (DRAW &Draw, const TRANS2D_AFFINE &BlockToCAD, double MinChordDist=0.0, DIMENSION dim=DIMENSION_2D)
ELEMTYPE GetApproximateElementType () const
bool GetBox (BOX &Box) const
INT32 GetDatabaseIndex () const
bool GetElementStyle (POLYSTYLE &polystyle) const
bool GetElementStyle (LINESTYLE &linestyle) const
bool GetElementStyle (POINTSTYLE &pointstyle) const
bool GetElementStyle (TEXTSTYLE &textstyle) const
TYPE GetElementType () const
bool GetGMLElement (MISTRING &GMLElement, const MILIST< std::pair< MISTRING, MISTRING > > &AttribList)
bool GetInsert (INSERT &Insert) const
bool GetLabelFrameParms (LABELFRAMEPARMS &FrameParms) const
bool GetLines (POLYLINELIST &PolyLineList) const
bool GetMesh (MESH &Mesh) const
bool GetPlaneConic (PLANECONIC &Conic) const
bool GetPoints (POLYLINE &PointArray) const
bool GetRegion (REGION2D &Region, bool Validate=false) const
bool GetSubRegion (SUBREGION2D &SubRegion, bool Validate=false) const
bool GetTextElement (POLYLINELIST &PolyLineList, MISTRING &text, TEXTSTYLE &style, LABELFRAMEPARMS *FrameParms=0) const
SCREENUNIT GetWidthUnits () const
double GetZValue () const
bool IsBaselineFit () const
bool IsBaselineSplineFit () const
bool IsClipUnderSet () const
bool IsInsertion () const
bool IsLine () const
bool IsPlaneConic () const
bool IsPoint () const
bool IsPointInside (const DPOINT2D &pt) const
bool IsPolygon () const
bool IsText () const
bool IsValid () const
CADELEMENToperator= (const CADELEMENT &rhs)
void SetBaselineFit (bool value)
void SetBaselineSplineFit (bool value)
void SetBox (const BOX &Box)
void SetClipUnder (bool value)
void SetDatabaseIndex (INT32 index)
bool SetElementFromGML (const MISTRING &GMLElement, MILIST< std::pair< MISTRING, MISTRING > > &AttribList)
void SetElementStyle (const POLYSTYLE &polystyle)
void SetElementStyle (const LINESTYLE &linestyle)
void SetElementStyle (const POINTSTYLE &pointstyle)
void SetElementStyle (const TEXTSTYLE &textstyle)
void SetInsert (const INSERT &Insert)
void SetLines (const POLYLINELIST &PolyLineList, DIMENSION dim=DIMENSION_2D)
void SetMesh (const MESH &Mesh)
void SetPlaneConic (const PLANECONIC &Conic)
void SetPoint (const DPOINT3D &point, DIMENSION dim=DIMENSION_2D)
void SetPoints (const POLYLINE &PointArray, DIMENSION dim=DIMENSION_2D)
void SetPolyLine (const POLYLINE &PolyLine, DIMENSION dim=DIMENSION_2D)
void SetRegion (const REGION2D &Region, DIMENSION dim=DIMENSION_2D)
void SetSubRegion (const SUBREGION2D &SubRegion, DIMENSION dim=DIMENSION_2D)
void SetTextElement (const POLYLINELIST &PolyLineList, const MISTRING &text, const TEXTSTYLE &style, const LABELFRAMEPARMS *FrameParms=0, DIMENSION dim=DIMENSION_2D)
void SetWidthUnits (SCREENUNIT WidthUnits)
void SetZValue (double zvalue)
bool TestElement (const REGION2D &Region, TESTCRITERIA TestMode) const

Static Public Member Functions

static TEXTID GetElementTypeTextID (TYPE CadType)

Detailed Description

CAD Element Definition This class is used to define and use a CAD object element.


Member Enumeration Documentation

Enumeration of the different CAD element types in use.

Enumerator:
TYPE_Insert 
TYPE_Point 
TYPE_Circle 
TYPE_Arc 
TYPE_ArcChord 
TYPE_Text 
TYPE_Line 
TYPE_RotationBox 
TYPE_Polygon 
TYPE_Mesh 
TYPE_Ellipse 
TYPE_EllipticalArc 
TYPE_ArcWedge 
TYPE_EllipticalArcWedge 
TYPE_EllipticalArcChord 
TYPE_MultiLine 
TYPE_MultiPoint 
TYPE_MultiPolygon 
TYPE_LAST 

Constructor & Destructor Documentation

RVC::CADELEMENT::CADELEMENT (  ) 

Default Constructor.

RVC::CADELEMENT::CADELEMENT ( const CADELEMENT rhs  ) 

Copy Constructor.

RVC::CADELEMENT::~CADELEMENT (  ) 

Destructor.


Member Function Documentation

void RVC::CADELEMENT::Clear (  ) 

Clear the element.

double RVC::CADELEMENT::ComputeDistanceFrom ( const DPOINT2D point  )  const

Compute the closest distance from an element to the point given NOTE: Does not compute distance from a TYPE_Insert element.

bool RVC::CADELEMENT::ComputeExtents ( DRECT3D Extents,
const RVC::STYLE StyleObj = 0 
) const

Compute the extents of this element NOTE: Does not compute extents from a TYPE_Insert element, use ComputeInsertExtents().

Returns:
'True' if the extents can be calculated, 'false' if not
bool RVC::CADELEMENT::ComputeInsertBorder ( const CAD CadObj,
POLYLINE Border 
) const

Compute the border polygon (rotated box) of the inserted CAD block defined by this element.

Returns:
'True' if the element is a TYPE_Insert, 'false' if not
bool RVC::CADELEMENT::ComputeInsertExtents ( const CAD CadObj,
DRECT3D Extents 
) const

Compute the extents of the inserted CAD block defined by this element.

Returns:
'True' if the element is a TYPE_Insert, 'false' if not
void RVC::CADELEMENT::ConvertForward ( const TRANS3D t3d  ) 

Convert point coordinates using 3D perspective transformation.

ERRVALUE RVC::CADELEMENT::ConvertForward ( const TRANS2D_MAPGEN tmg  ) 

Convert point coordinates using generic transformation.

void RVC::CADELEMENT::ConvertForward ( const TRANS2D_AFFINE taf  ) 

Convert point coordinates using affine transformation.

ERRVALUE RVC::CADELEMENT::ConvertForwardDense ( const TRANS2D_MAPGEN tmg  ) 

Convert point coordinates using generic transformation with densification.

void RVC::CADELEMENT::ConvertInverse ( const TRANS3D t3d  ) 

Convert point coordinates using 3D perspective transformation.

ERRVALUE RVC::CADELEMENT::ConvertInverse ( const TRANS2D_MAPGEN tmg  ) 

Convert point coordinates using generic transformation.

void RVC::CADELEMENT::ConvertInverse ( const TRANS2D_AFFINE taf  ) 

Convert point coordinates using affine transformation.

ERRVALUE RVC::CADELEMENT::ConvertInverseDense ( const TRANS2D_MAPGEN tmg  ) 

Convert point coordinates using generic transformation with densification.

ERRVALUE RVC::CADELEMENT::DrawElement ( DRAW Draw,
const TRANS2D_AFFINE BlockToCAD,
double  MinChordDist = 0.0,
DIMENSION  dim = DIMENSION_2D 
)

'Draw' the element using the "DRAW" interface class passed in This method takes the individual elements and does a transformation to a well known construct to simplify handling of multiple data types.

See RVC::CADELEMENT::DRAW class for the primitives that the CADELEMENT class is transformed to. NOTE: Does not 'draw' from an TYPE_Insert element

Parameters:
BlockToCAD Affine transformation from inserted block to CAD object coordinates
MinChordDist Default is to use 5 of the Radius length
ELEMTYPE RVC::CADELEMENT::GetApproximateElementType (  )  const

Get the approximate element type.

Returns:
ELEMTYPE_Point, ELEMTYPE_Line, ELEMTYPE_Polygon, ELEMTYPE_Label, or ELEMTYPE_Empty if cannot be represented
bool RVC::CADELEMENT::GetBox ( BOX Box  )  const

Get the TYPE_RotationBox from this.

Returns:
'True' if the element is a TYPE_RotationBox, 'false' if not
INT32 RVC::CADELEMENT::GetDatabaseIndex (  )  const

Get the database index for this element.

Returns:
'-1' if no database element index exists for this element, >=0 for valid database element index
bool RVC::CADELEMENT::GetElementStyle ( POLYSTYLE polystyle  )  const

Get the POLYSTYLE for this type.

Returns:
'true' if the method is able to set the element style based on its element type, 'false' if not
bool RVC::CADELEMENT::GetElementStyle ( LINESTYLE linestyle  )  const

Get the LINESTYLE for this type.

Returns:
'true' if the method is able to set the element style based on its element type, 'false' if not
bool RVC::CADELEMENT::GetElementStyle ( POINTSTYLE pointstyle  )  const

Get the POINTSTYLE for this type.

Returns:
'true' if the method is able to set the element style based on its element type, 'false' if not
bool RVC::CADELEMENT::GetElementStyle ( TEXTSTYLE textstyle  )  const

Get the TEXTSTYLE for this type.

Returns:
'true' if the method is able to set the element style based on its element type, 'false' if not
TYPE RVC::CADELEMENT::GetElementType (  )  const

Get the CADELEMENT::TYPE designation for this.

Returns:
CADELEMENT::TYPE
static TEXTID RVC::CADELEMENT::GetElementTypeTextID ( TYPE  CadType  )  [static]

Get the TEXTID for the CADELEMENT::TYPE specified.

bool RVC::CADELEMENT::GetGMLElement ( MISTRING GMLElement,
const MILIST< std::pair< MISTRING, MISTRING > > &  AttribList 
)

Get the GML element string based on 'this'.

Returns:
'True' if the element can be converted, 'false' if not and the 'GMLElement' will be empty
Parameters:
AttribList List of attributes to add to the element definition (first -> name, second -> value)
bool RVC::CADELEMENT::GetInsert ( INSERT Insert  )  const

Get the TYPE_Insert from this.

Returns:
'True' if the element is a TYPE_Insert, 'false' if not
bool RVC::CADELEMENT::GetLabelFrameParms ( LABELFRAMEPARMS FrameParms  )  const

Get the Text Label frame parms information from this.

Returns:
'True' if the element is a TYPE_Text type, 'false' if not
bool RVC::CADELEMENT::GetLines ( POLYLINELIST PolyLineList  )  const

Get the line primitives from this.

Returns:
'True' if the element is made up of a list of POLYLINE's, 'false' if not
bool RVC::CADELEMENT::GetMesh ( MESH Mesh  )  const

Get the TYPE_Mesh from this.

Returns:
'True' if the element is a TYPE_Mesh, 'false' if not
bool RVC::CADELEMENT::GetPlaneConic ( PLANECONIC Conic  )  const

Get the PLANECONIC representation from this.

Returns:
'True' if the element is a PLANECONIC type, 'false' if not
bool RVC::CADELEMENT::GetPoints ( POLYLINE PointArray  )  const

Get the point primitives from this.

Returns:
'True' if the element is made up of one or more points, 'false' if not
bool RVC::CADELEMENT::GetRegion ( REGION2D Region,
bool  Validate = false 
) const

Get the REGION2D representation from this.

Returns:
'True' if the element is a REGION2D type, 'false' if not
bool RVC::CADELEMENT::GetSubRegion ( SUBREGION2D SubRegion,
bool  Validate = false 
) const

Get the SUBREGION2D representation from this.

Returns:
'True' if the element is a SUBREGION2D type, 'false' if not
bool RVC::CADELEMENT::GetTextElement ( POLYLINELIST PolyLineList,
MISTRING text,
TEXTSTYLE style,
LABELFRAMEPARMS FrameParms = 0 
) const

Get the Text element information from this.

Returns:
'True' if the element is a TYPE_Text type, 'false' if not
Parameters:
PolyLineList First line is the baseline, the rest are leader lines
SCREENUNIT RVC::CADELEMENT::GetWidthUnits (  )  const

Get the units of width.

double RVC::CADELEMENT::GetZValue (  )  const

Get the Z value assiociated with this element.

bool RVC::CADELEMENT::IsBaselineFit (  )  const

Does the label follow the baseline?

Returns:
'True' if label follows baseline
bool RVC::CADELEMENT::IsBaselineSplineFit (  )  const

Does the label follow the splined baseline?

Returns:
'True' if label follows the splined baseline
bool RVC::CADELEMENT::IsClipUnderSet (  )  const

Clip vector features under the label when rendering.

Returns:
'True' if features under the label needs to be clipped
bool RVC::CADELEMENT::IsInsertion (  )  const

Is the element an insertion element?

Returns:
'True' if the element is a TYPE_Insert, 'false' if not
bool RVC::CADELEMENT::IsLine (  )  const

Can the element be represented by open lines?

Returns:
'True' if the element can be represented by open lines, 'false' if not
bool RVC::CADELEMENT::IsPlaneConic (  )  const

Can the element be represented by a PLANECONIC.

Returns:
'True' if the element can be represented by a PLANECONIC, 'false' if not
bool RVC::CADELEMENT::IsPoint (  )  const

Can the element be represented by one or more points?

Returns:
'True' if the element can be represented by one or more points, 'false' if not
bool RVC::CADELEMENT::IsPointInside ( const DPOINT2D pt  )  const

Is the point inside the element?

Returns:
'True' if the element is a polygon (IsPolygon() == true) and the point is inside it, 'false' if not
bool RVC::CADELEMENT::IsPolygon (  )  const

Can the element be represented by closed lines?

Returns:
'True' if the element can be represented by closed lines, 'false' if not
bool RVC::CADELEMENT::IsText (  )  const

Is the element a text element?

Returns:
'True' if the element is a TYPE_Text, 'false' if not
bool RVC::CADELEMENT::IsValid (  )  const

Is the element valid? Does 'this' represent a CAD element.

Returns:
'True' if 'this' is a valid CAD element, 'false' if not
CADELEMENT& RVC::CADELEMENT::operator= ( const CADELEMENT rhs  ) 

Assignment Operator.

void RVC::CADELEMENT::SetBaselineFit ( bool  value  ) 

Set the label to follow the baseline.

void RVC::CADELEMENT::SetBaselineSplineFit ( bool  value  ) 

Set the label to follow the splined baseline.

void RVC::CADELEMENT::SetBox ( const BOX Box  ) 

Set the TYPE_RotationBox from 'Box'.

void RVC::CADELEMENT::SetClipUnder ( bool  value  ) 

Set the label clip under flag.

void RVC::CADELEMENT::SetDatabaseIndex ( INT32  index  ) 

Set the database index for this element: '-1' if no database element index exists for this element, >=0 for valid database element index.

bool RVC::CADELEMENT::SetElementFromGML ( const MISTRING GMLElement,
MILIST< std::pair< MISTRING, MISTRING > > &  AttribList 
)

Set 'this' based on the GML element which MUST derive from gml:AbstractGeometryType.

Returns:
'True' if the element can be converted, 'false' if not
Parameters:
AttribList List of attributes not used in 'this' (first -> name, second -> value)
void RVC::CADELEMENT::SetElementStyle ( const POLYSTYLE polystyle  ) 

Set the POLYSTYLE for this type.

void RVC::CADELEMENT::SetElementStyle ( const LINESTYLE linestyle  ) 

Set the LINESTYLE for this type.

void RVC::CADELEMENT::SetElementStyle ( const POINTSTYLE pointstyle  ) 

Set the POINTSTYLE for this type.

void RVC::CADELEMENT::SetElementStyle ( const TEXTSTYLE textstyle  ) 

Set the TEXTSTYLE for this type.

void RVC::CADELEMENT::SetInsert ( const INSERT Insert  ) 

Set the TYPE_Insert from 'Insert'.

void RVC::CADELEMENT::SetLines ( const POLYLINELIST PolyLineList,
DIMENSION  dim = DIMENSION_2D 
)

Set the element type and the data based on 'PolyLineList'.

void RVC::CADELEMENT::SetMesh ( const MESH Mesh  ) 

Set the TYPE_Mesh from 'Mesh'.

void RVC::CADELEMENT::SetPlaneConic ( const PLANECONIC Conic  ) 

Set the element type and data based on 'Conic'.

void RVC::CADELEMENT::SetPoint ( const DPOINT3D point,
DIMENSION  dim = DIMENSION_2D 
)

Set the element type and data based on 'point'.

void RVC::CADELEMENT::SetPoints ( const POLYLINE PointArray,
DIMENSION  dim = DIMENSION_2D 
)

Set the element type and data based on 'PointArray'.

void RVC::CADELEMENT::SetPolyLine ( const POLYLINE PolyLine,
DIMENSION  dim = DIMENSION_2D 
)

Set the element type and data based on 'PolyLine'.

void RVC::CADELEMENT::SetRegion ( const REGION2D Region,
DIMENSION  dim = DIMENSION_2D 
)

Set the element type and data based on 'Region'.

void RVC::CADELEMENT::SetSubRegion ( const SUBREGION2D SubRegion,
DIMENSION  dim = DIMENSION_2D 
)

Set the element type and data based on 'SubRegion'.

void RVC::CADELEMENT::SetTextElement ( const POLYLINELIST PolyLineList,
const MISTRING text,
const TEXTSTYLE style,
const LABELFRAMEPARMS FrameParms = 0,
DIMENSION  dim = DIMENSION_2D 
)

Set the TYPE_Text from the information passed in.

Parameters:
PolyLineList First line is the baseline, the rest are leader lines
void RVC::CADELEMENT::SetWidthUnits ( SCREENUNIT  WidthUnits  ) 

Set the units of width.

void RVC::CADELEMENT::SetZValue ( double  zvalue  ) 

Set the Z value assiociated with this element.

bool RVC::CADELEMENT::TestElement ( const REGION2D Region,
TESTCRITERIA  TestMode 
) const

Test this to see if it passes the TEXTCRITERIA given using the REGION2D passed in NOTE: Cannot test a TYPE_Insert element.

Returns:
'True' if the element met the criteria, 'false' if not

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

Generated on Sun Oct 7 21:36:44 2012 for TNTsdk 2012 by  doxygen 1.6.1