NDEVR
API Documentation
PrimitiveLineSegmentEditor

Shown when user is editing lines, to assist them in adjusting the line in 3D space. More...

Collaboration diagram for PrimitiveLineSegmentEditor:
[legend]

Public Member Functions

 PrimitiveLineSegmentEditor (QWidget *parent=nullptr)
 Constructs a line segment editor widget.
LineSegment< 3, fltp08getSegment () const
 Gets the current line segment from the UI values.
void onSegmentUpdatedSignal ()
 Emitted when the segment is modified by the user.
void setEndPoint (Vertex< 3, fltp08 > vector)
 Sets the end point of the line segment.
void setPoint (uint01 index, Vertex< 3, fltp08 > vector)
 Sets one of the two segment endpoints by index.
void setReferenceIndex (uint04 index)
 Sets which endpoint is treated as the reference (fixed) point.
void setSegment (DesignObjectLookup *lookup, Model parent, Geometry geo, Vector< 2, uint04 > vertex_index)
 Sets the line segment to edit by specifying its geometry and vertex indices.
void updateFromSegment ()
 Updates the UI fields from the current segment geometry data.

Protected Member Functions

void init ()
 Initializes the UI elements and connects signals.

Protected Attributes

Geometry m_geometry
 The geometry containing the line segment.
DesignObjectLookupm_lookup
 The design object lookup for resolving references.
Model m_parent
 The parent model containing the geometry.
Vector< 2, uint04m_vertex_index = Vector<2, uint04>(Constant<uint04>::Invalid)
 The vertex indices of the segment endpoints.
Ui::PrimitiveLineSegmentEditorUI * ui
 The auto-generated UI form.

Detailed Description

Shown when user is editing lines, to assist them in adjusting the line in 3D space.


Definition at line 17 of file PrimitiveLineSegmentEditor.h.

Constructor & Destructor Documentation

◆ PrimitiveLineSegmentEditor()

PrimitiveLineSegmentEditor::PrimitiveLineSegmentEditor ( QWidget * parent = nullptr)

Constructs a line segment editor widget.

Parameters
[in]parentThe parent widget.

Member Function Documentation

◆ getSegment()

LineSegment< 3, fltp08 > PrimitiveLineSegmentEditor::getSegment ( ) const

Gets the current line segment from the UI values.

Returns
The 3D line segment defined by the current editor state.

◆ setEndPoint()

void PrimitiveLineSegmentEditor::setEndPoint ( Vertex< 3, fltp08 > vector)

Sets the end point of the line segment.

Parameters
[in]vectorThe new endpoint position.

◆ setPoint()

void PrimitiveLineSegmentEditor::setPoint ( uint01 index,
Vertex< 3, fltp08 > vector )

Sets one of the two segment endpoints by index.

Parameters
[in]indexThe endpoint index (0 or 1).
[in]vectorThe new position for the endpoint.

◆ setReferenceIndex()

void PrimitiveLineSegmentEditor::setReferenceIndex ( uint04 index)

Sets which endpoint is treated as the reference (fixed) point.

Parameters
[in]indexThe vertex index to use as the reference point.

◆ setSegment()

void PrimitiveLineSegmentEditor::setSegment ( DesignObjectLookup * lookup,
Model parent,
Geometry geo,
Vector< 2, uint04 > vertex_index )

Sets the line segment to edit by specifying its geometry and vertex indices.

Parameters
[in]lookupThe design object lookup for resolving references.
[in]parentThe parent model containing the geometry.
[in]geoThe geometry containing the line segment.
[in]vertex_indexThe pair of vertex indices defining the segment endpoints.

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