eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EVectorModel Class Reference

Represents a EShape hierarchy with a single root. This hierarchy can be retrieved from files in different file formats. More...

#include <eVision/EasyGauge/EVectorModel.h>

Collaboration diagram for eVision::EVectorModel:

Public Member Functions

 EVectorModel ()
 Constructs an EVectorModel context.
 EVectorModel (const eVision::EVectorModel &other)
 Constructs an EVectorModel context.
virtual ~EVectorModel () throw ()
eVision::EVectorModel & operator= (const eVision::EVectorModel &other)
 Assignment operator, copies another EVectorModel instance to this one.
eVision::Legacy::EFrameShape & GetRoot ()
 Gets the root of the hierarchy.
float GetScale () const
 Gets the scale of the model.
eVision::EPoint GetCenter () const
 Gets the center of the model.
void SetScale (float scale)
 Sets the scale of the model.
void SetCenter (const eVision::EPoint &center)
 Sets the center of the model.
void GetVectorModelExtremas (float &xmin, float &ymin, float &xmax, float &ymax, bool inSensorCoordinates)
 Retrieves the coordinate extrema of the vector model.
void GetVectorModelExtremas (float &xmin, float &ymin, float &xmax, float &ymax)
 Retrieves the coordinate extrema of the vector model.
void GetVectorModelExtremas (eVision::EFloatRange &xRange, eVision::EFloatRange &yRange, bool inSensorCoordinates)
 Retrieves the coordinate extrema of the vector model.
void GetVectorModelExtremas (eVision::EFloatRange &xRange, eVision::EFloatRange &yRange)
 Retrieves the coordinate extrema of the vector model.
void EnableDrawArea (int32_t drawWindowWidth, int32_t drawWindowHeight)
 Enables the drawing of the EVectorModel with a specific zoom and pan. Default: false.
void DisableDrawArea ()
 Disables the custom drawing of the EVectorModel with a specific zoom and pan.
void Load (const std::string &filePath)
 Loads a Shape.The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Loads a Shape.The given ESerializer must have been created for reading.
void Save (eVision::ESerializer *serializer)
 Saves a Shape.The given ESerializer must have been created for writing.
void Save (const std::string &filePath)
 Saves a Shape.The given ESerializer must have been created for writing.
void Draw (eVision::EDrawAdapter *graphicContext) const
 Draws a graphical representation of the hierarchy.
void Draw (HDC graphicContext) const
 Draws a graphical representation of the hierarchy.
void Draw (HDC graphicContext, const eVision::ERGBColor &color) const
 Draws a graphical representation of the hierarchy.
void DrawWithCurrentPen (HDC graphicContext) const
 Draws a graphical representation of the hierarchy.
void LoadDXF (const std::string &fileName, float scale)
 Loads an EVectorModel from an ascii DXF file. We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.
void LoadDXF (const std::string &fileName)
 Loads an EVectorModel from an ascii DXF file. We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.
void LoadDXF (const std::string &fileName, float scale, const eVision::EPoint &origin)
 Loads an EVectorModel from an ascii DXF file. We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.
 EVectorModel (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Represents a EShape hierarchy with a single root. This hierarchy can be retrieved from files in different file formats.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EVectorModel() [1/3]

eVision::EVectorModel::EVectorModel ( )

Constructs an EVectorModel context.

◆ EVectorModel() [2/3]

eVision::EVectorModel::EVectorModel ( const eVision::EVectorModel & other)

Constructs an EVectorModel context.

Parameters
otherother EVectorModel to copy into this one.

◆ ~EVectorModel()

eVision::EVectorModel::~EVectorModel ( )
throw ( )
virtual

◆ EVectorModel() [3/3]

eVision::EVectorModel::EVectorModel ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ DisableDrawArea()

void eVision::EVectorModel::DisableDrawArea ( )

Disables the custom drawing of the EVectorModel with a specific zoom and pan.

◆ Draw() [1/3]

void eVision::EVectorModel::Draw ( eVision::EDrawAdapter * graphicContext) const

Draws a graphical representation of the hierarchy.

Parameters
graphicContextHandle of the device context on which to draw.

◆ Draw() [2/3]

void eVision::EVectorModel::Draw ( HDC graphicContext) const

Draws a graphical representation of the hierarchy.

Parameters
graphicContextHandle of the device context on which to draw.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [3/3]

void eVision::EVectorModel::Draw ( HDC graphicContext,
const eVision::ERGBColor & color ) const

Draws a graphical representation of the hierarchy.

Parameters
graphicContextHandle of the device context on which to draw.
colorThe color to draw with.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ DrawWithCurrentPen()

void eVision::EVectorModel::DrawWithCurrentPen ( HDC graphicContext) const

Draws a graphical representation of the hierarchy.

Parameters
graphicContextHandle of the device context on which to draw.
Deprecated

Use the overload of EVectorModel::Draw taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ EnableDrawArea()

void eVision::EVectorModel::EnableDrawArea ( int32_t drawWindowWidth,
int32_t drawWindowHeight )

Enables the drawing of the EVectorModel with a specific zoom and pan. Default: false.

Parameters
drawWindowWidthThe width of the window that the EVectorModel is drawn into
drawWindowHeightThe height of the window that the EVectorModel is drawn into

◆ GetCenter()

eVision::EPoint eVision::EVectorModel::GetCenter ( ) const

Gets the center of the model.

◆ GetRoot()

eVision::Legacy::EFrameShape & eVision::EVectorModel::GetRoot ( )

Gets the root of the hierarchy.

◆ GetScale()

float eVision::EVectorModel::GetScale ( ) const

Gets the scale of the model.

◆ GetVectorModelExtremas() [1/4]

void eVision::EVectorModel::GetVectorModelExtremas ( eVision::EFloatRange & xRange,
eVision::EFloatRange & yRange )

Retrieves the coordinate extrema of the vector model.

Parameters
xRangeThe range along the X axis.
yRangeThe range along the Y axis.

An exception is thrown if the hierarchy is empty

◆ GetVectorModelExtremas() [2/4]

void eVision::EVectorModel::GetVectorModelExtremas ( eVision::EFloatRange & xRange,
eVision::EFloatRange & yRange,
bool inSensorCoordinates )

Retrieves the coordinate extrema of the vector model.

Parameters
xRangeThe range along the X axis.
yRangeThe range along the Y axis.
inSensorCoordinatesSpecifies whether the extrema are retrieved in sensor coordinates. Default: false

An exception is thrown if the hierarchy is empty

◆ GetVectorModelExtremas() [3/4]

void eVision::EVectorModel::GetVectorModelExtremas ( float & xmin,
float & ymin,
float & xmax,
float & ymax )

Retrieves the coordinate extrema of the vector model.

Parameters
xminThe X minimum of EVectorModel.
yminThe Y minimum of EVectorModel.
xmaxThe X maximum of EVectorModel.
ymaxThe Y maximum of EVectorModel.

An exception is thrown if the hierarchy is empty

Deprecated
Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ GetVectorModelExtremas() [4/4]

void eVision::EVectorModel::GetVectorModelExtremas ( float & xmin,
float & ymin,
float & xmax,
float & ymax,
bool inSensorCoordinates )

Retrieves the coordinate extrema of the vector model.

Parameters
xminThe X minimum of EVectorModel.
yminThe Y minimum of EVectorModel.
xmaxThe X maximum of EVectorModel.
ymaxThe Y maximum of EVectorModel.
inSensorCoordinatesSpecifies whether the extrema are retrieved in sensor coordinates. Default: false

An exception is thrown if the hierarchy is empty

Deprecated
Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ Load() [1/2]

void eVision::EVectorModel::Load ( const std::string & filePath)

Loads a Shape.The given ESerializer must have been created for reading.

Parameters
filePathThe file path.

◆ Load() [2/2]

void eVision::EVectorModel::Load ( eVision::ESerializer * serializer)

Loads a Shape.The given ESerializer must have been created for reading.

Parameters
serializerPointer to the ESerializer created for reading.

◆ LoadDXF() [1/3]

void eVision::EVectorModel::LoadDXF ( const std::string & fileName)

Loads an EVectorModel from an ascii DXF file. We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.

Parameters
fileNameThe name of the dxf file.

◆ LoadDXF() [2/3]

void eVision::EVectorModel::LoadDXF ( const std::string & fileName,
float scale )

Loads an EVectorModel from an ascii DXF file. We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.

Parameters
fileNameThe name of the dxf file.
scaleThe scale of the vector model, defaults to 1.

◆ LoadDXF() [3/3]

void eVision::EVectorModel::LoadDXF ( const std::string & fileName,
float scale,
const eVision::EPoint & origin )

Loads an EVectorModel from an ascii DXF file. We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.

Parameters
fileNameThe name of the dxf file.
scaleThe scale of the vector model, defaults to 1.
originThe origin of the EVectorModel in the dxf's coordinates. If not specified, we try to parse the origin from the UCSORG field in the dxf headers. Otherwise, origin is (0, 0).

◆ operator=()

eVision::EVectorModel & eVision::EVectorModel::operator= ( const eVision::EVectorModel & other)

Assignment operator, copies another EVectorModel instance to this one.

Parameters
otherThe EVectorModel instance to copy from.

◆ Save() [1/2]

void eVision::EVectorModel::Save ( const std::string & filePath)

Saves a Shape.The given ESerializer must have been created for writing.

Parameters
filePathThe file path.

◆ Save() [2/2]

void eVision::EVectorModel::Save ( eVision::ESerializer * serializer)

Saves a Shape.The given ESerializer must have been created for writing.

Parameters
serializerPointer to the ESerializer created for writing.

◆ SetCenter()

void eVision::EVectorModel::SetCenter ( const eVision::EPoint & center)

Sets the center of the model.

Parameters
centerThe EPoint to set the center to.

◆ SetScale()

void eVision::EVectorModel::SetScale ( float scale)

Sets the scale of the model.

Parameters
scaleThe scale to set.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EVectorModel::wrappedClass_