NDEVR
API Documentation
PrimitiveVertexEditor

Allows the user to adjust properties for a particular Geometry Vertex node. More...

Collaboration diagram for PrimitiveVertexEditor:
[legend]

Public Member Functions

 PrimitiveVertexEditor (QWidget *parent=nullptr)
 Constructs a vertex editor widget.
Vertex< 3, fltp08location () const
 Gets the current 3D location of the vertex from the UI.
void setVertex (DesignObjectLookup *lookup, Model parent, Geometry geo, uint04 vertex_index)
 Sets the vertex to edit by specifying its geometry and index.
Model setVertexVisualModel (const Vertex< 3, fltp08 > &location)
 Creates or updates a visual indicator model at the vertex location.

Static Public Member Functions

static Model HideVertexVisualModel (DesignObjectLookup *lookup, UUID id=UUID::CreateUUID("PrimitiveLineSegmentEditor"))
 Hides the visual indicator model in the given lookup.
static Model SetVertexVisualModel (const Vertex< 3, fltp08 > &location, DesignObjectLookup *lookup, UUID id=UUID::CreateUUID("PrimitiveLineSegmentEditor"))
 Creates or updates a visual indicator model at the given location in the lookup.

Protected Member Functions

Buffer< Vector< 2, uint04 > > findAttachedLineSegments () const
 Finds all line segments attached to this vertex.
void init ()
 Initializes the UI elements and connects signals.
void showSegmentEditor (Vector< 2, uint04 > segment, PopupInfo info)
 Shows a line segment editor for the given segment.
void updateFromUI ()
 Writes the current UI values back to the geometry vertex.
void updateFromVertex ()
 Updates the UI fields from the current vertex data.

Protected Attributes

Geometry m_geometry
 The geometry containing the vertex.
DesignObjectLookupm_lookup
 The design object lookup for resolving references.
Model m_parent
 The parent model containing the geometry.
PointWidgetm_point_widget
 The point widget for editing the vertex position.
QVBoxLayout * m_segment_layout = new QVBoxLayout()
 Layout for the attached segment buttons.
Buffer< Button * > m_segments_buttons
 Buttons for opening editors of attached line segments.
uint04 m_vertex_index = Constant<uint04>::Invalid
 The index of the vertex being edited.

Detailed Description

Allows the user to adjust properties for a particular Geometry Vertex node.


Definition at line 14 of file PrimitiveVertexEditor.h.

Constructor & Destructor Documentation

◆ PrimitiveVertexEditor()

PrimitiveVertexEditor::PrimitiveVertexEditor ( QWidget * parent = nullptr)

Constructs a vertex editor widget.

Parameters
[in]parentThe parent widget.

Member Function Documentation

◆ findAttachedLineSegments()

Buffer< Vector< 2, uint04 > > PrimitiveVertexEditor::findAttachedLineSegments ( ) const
protected

Finds all line segments attached to this vertex.

Returns
A buffer of vertex index pairs for attached segments.

◆ HideVertexVisualModel()

Model PrimitiveVertexEditor::HideVertexVisualModel ( DesignObjectLookup * lookup,
UUID id = UUID::CreateUUID("PrimitiveLineSegmentEditor") )
static

Hides the visual indicator model in the given lookup.

Parameters
[in]lookupThe design object lookup containing the visual model.
[in]idThe UUID of the visual model to hide.
Returns
The hidden visual model.

References UUID::CreateUUID().

◆ location()

Vertex< 3, fltp08 > PrimitiveVertexEditor::location ( ) const

Gets the current 3D location of the vertex from the UI.

Returns
The vertex position in 3D space.

Referenced by SetVertexVisualModel(), and setVertexVisualModel().

◆ setVertex()

void PrimitiveVertexEditor::setVertex ( DesignObjectLookup * lookup,
Model parent,
Geometry geo,
uint04 vertex_index )

Sets the vertex to edit by specifying its geometry and index.

Parameters
[in]lookupThe design object lookup for resolving references.
[in]parentThe parent model containing the geometry.
[in]geoThe geometry containing the vertex.
[in]vertex_indexThe index of the vertex within the geometry.

◆ SetVertexVisualModel()

Model PrimitiveVertexEditor::SetVertexVisualModel ( const Vertex< 3, fltp08 > & location,
DesignObjectLookup * lookup,
UUID id = UUID::CreateUUID("PrimitiveLineSegmentEditor") )
static

Creates or updates a visual indicator model at the given location in the lookup.

Parameters
[in]locationThe 3D position for the visual model.
[in]lookupThe design object lookup to place the visual model in.
[in]idThe UUID to assign to the visual model.
Returns
The visual indicator model.

References UUID::CreateUUID(), and location().

◆ setVertexVisualModel()

Model PrimitiveVertexEditor::setVertexVisualModel ( const Vertex< 3, fltp08 > & location)

Creates or updates a visual indicator model at the vertex location.

Parameters
[in]locationThe 3D position for the visual model.
Returns
The visual indicator model.

References location().

◆ showSegmentEditor()

void PrimitiveVertexEditor::showSegmentEditor ( Vector< 2, uint04 > segment,
PopupInfo info )
protected

Shows a line segment editor for the given segment.

Parameters
[in]segmentThe vertex index pair defining the line segment.
[in]infoPopup positioning information for the editor dialog.

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