NDEVR
API Documentation
GeometryMaker

A controller for creating basic geometry with the mouse such as polylines, circles, or spheres TODO: Allow existing models to be used here. More...

Inheritance diagram for GeometryMaker:
[legend]
Collaboration diagram for GeometryMaker:
[legend]

Classes

struct  GeoStructure
 Holds the structural definition points used during interactive geometry creation, including center, normal, edge, corner, and plane constraint points. More...

Public Types

enum  GeometryCreateMode : uint04 {
  e_no_creation , e_draw_points , e_draw_lines , e_draw_polyline ,
  e_draw_spline , e_draw_triangles , e_draw_circle , e_draw_conic_arc ,
  e_draw_oval , e_draw_square , e_draw_rectangle , e_draw_polygon ,
  e_draw_sphere , e_draw_cylinder , e_draw_cone , e_draw_box ,
  e_create_mode_size
}
 Internal key input handler for geometry creation shortcuts. More...
enum  GeometrySpecMode : uint04 {
  e_center , e_edge , e_corner , e_orient ,
  e_normal , e_on_plane , e_spec_mode_size
}
 Enumerates the specification modes that control how geometry dimensions are defined relative to user input points (e.g., from center, from edge, from corner). More...
Public Types inherited from SnapController
enum  LockMode {
  e_lock_ignore_snap , e_lock_to_nearest_snap , e_lock_if_no_snap , e_only_allow_snap ,
  e_ignore
}
 Controls how axis/plane locking interacts with snapping behavior. More...
enum  PointsDrawMode {
  e_points , e_triangle , e_lines , e_line_fan ,
  e_polyline
}
 Determines how snapped points are drawn or connected visually in the viewport. More...

Public Member Functions

 GeometryMaker (DesignObjectLookup *manager)
 Constructs a GeometryMaker attached to the given design object lookup.
virtual void addPoint (const SnapPoint &point) override
 Adds a snap point as the next input point for the geometry being created.
virtual void begin () override
 Begins the geometry creation session, initializing state and enabling input handling.
void calculateSolid (Geometry &mesh)
 Calculates and applies solid mesh properties to the given geometry.
virtual void cancel () override
 Cancels the current geometry creation session, discarding any in-progress geometry.
const Buffer< UUID > & createdModels ()
 Returns the buffer of UUIDs for all models created during this session.
void createNewModel ()
 Creates a new empty model to hold the next piece of geometry being drawn.
const ModelcurrentModel () const
 Returns the model currently being created or edited.
uint04 currentStep () const
 Returns the current step index in the multi-step geometry creation process.
void deleteAllCreatedModels ()
 Deletes all models that were created during this geometry creation session.
virtual bool editingCurrentModel () const
 Checks whether the maker is currently editing (modifying) an existing model.
virtual void finish () override
 Finishes the current geometry creation session and finalizes all pending geometry.
TranslatedString getHint () const
 Returns a translated hint string describing the next expected user action.
bool hasCommandLock ()
 Checks whether this maker currently holds the command lock.
void lockMovement (bool lock_movement)
 Sets whether cursor movement is locked (prevented from updating the preview).
const UUIDmaterial () const
 Returns the UUID of the default material applied to newly created geometry.
bool movementLocked () const
 Checks whether cursor movement is currently locked.
uint04 numberOfSteps () const
 Returns the total number of steps required for the current geometry creation mode.
const UUIDrootModel () const
 Returns the UUID of the root model under which new geometry models are created.
void setAutoWind (bool auto_wind_shapes)
 Sets whether created shapes should be automatically wound (vertex order corrected).
void setGenerateNormals (bool generate_normals)
 Sets whether surface normals should be automatically generated for created geometry.
void setIsTouch (bool touch_mode)
 Sets whether the maker is operating in touch input mode.
void setRootModel (UUID model, UUID material=Constant< UUID >::Invalid)
 Sets the root model and optional material under which new geometry will be created.
void setSpecMode (const Buffer< GeometrySpecMode > &spec_mode)
 Sets the specification mode sequence that controls how geometry dimensions are defined.
const Buffer< GeometrySpecMode > & specMode ()
 Returns the current specification mode sequence.
bool tryCommandLock ()
 Attempts to acquire the command lock for exclusive geometry editing.
virtual void updateLocation (const Vertex< 3, fltp08 > &location, bool is_select, Camera *camera) override
 Updates the preview geometry location based on current cursor position.
Public Member Functions inherited from SnapController
 SnapController (DesignObjectLookup *manager)
 Constructs a SnapController associated with the given DesignObjectLookup.
void clearSnapSelection ()
 Clears all currently accumulated snap selection points and resets the visual state.
Vertex< 3, fltp08currentLocation () const
 Returns the current snap location in 3D space.
Vertex< 3, fltp08lastPoint () const
 Returns the most recent snap location.
const Buffer< SnapPoint > & lastSnapPoints () const
 Returns the buffer of snap points from the most recent snap calculation.
void lockAxis (uint01 axis, fltp08 lock)
 Locks a specific axis to a fixed coordinate value.
uint04 pointCount () const
 Returns the number of points currently recorded by the snap controller.
const Buffer< Vertex< 3, fltp08 > > & points () const
 Returns the buffer of all accumulated snap points.
SelectionMode selectionMode () const
 Returns the current selection mode.
void setCustomSnapManager (const ConstPointer< SnapsManager > &snap_manager)
 Sets a custom snap manager to override the default snapping behavior.
virtual void setFinishedCallback (const std::function< void(bool is_accepted)> &callback)
 Sets a callback invoked when the snap operation finishes.
void setLocation (const Vertex< 3, fltp08 > &location, bool is_click=false, Camera *camera=nullptr)
 Sets the current snap location, optionally registering it as a click.
void setLockLine (const LineSegment< 3, fltp08 > &line)
 Sets a line segment to constrain snap positions along.
void setLockMode (LockMode mode)
 Sets the lock mode that controls how axis/plane locking interacts with snapping.
void setLockPlane (const Plane< 3, fltp08 > &plane)
 Sets a plane to constrain snap positions onto.
void setPointsDrawMode (PointsDrawMode mode)
 Sets the visual draw mode for how accumulated points are rendered.
void setSelectionMode (SelectionMode mode)
 Sets the selection mode used during snap interaction.
void setShowLengthLabels (bool show)
 Sets whether length labels are displayed along guide lines.
void setShowPointLabels (bool show)
 Sets whether coordinate labels are displayed at snap points.
virtual void setUpdateCallback (const std::function< void()> &callback)
 Sets a callback invoked whenever the snap location or state is updated.

Public Attributes

Resource< GeometryCreateModecreate_mode
 Resource binding for the active geometry creation mode.
Public Attributes inherited from SnapController
Resource< SnapPointcurrent_snap_point
 The currently active snap point resource, updated as the mouse moves.

Protected Member Functions

void createRootModel ()
 Creates the root model container if one does not already exist.
void onSelect (Camera *camera)
 Handles a selection (click) action during geometry creation.
virtual bool processKeyEvent (const KeyEvent &event, DesignObjectLookup *lookup, Camera *camera) override
 Processes a keyboard event during geometry creation.
virtual bool processMouseEvent (MouseControllerEvent &event, SelectionInfo &info) override
 Processes a mouse controller event during geometry creation.
void processResizeEvent (const GeoStructure &spec, Model &model, Camera *camera)
 Processes a resize event to update geometry dimensions from the given specification.
virtual void setupSelectionInfo (const MouseEvent &event, Camera *camera, SelectionInfo &info) override
 Sets up selection info from a mouse event for snap and geometry picking.
void updatePrimitive (const Vertex< 3, fltp08 > &world_location)
 Updates the in-progress geometry primitive based on the current world location.
Protected Member Functions inherited from SnapController
void addGuideLineModel ()
 Adds a guide line model to the scene for visual feedback.
void addGuidePlaneModel ()
 Adds a guide plane model to the scene for visual feedback.
void addGuidePointModel ()
 Adds a guide point model to the scene for visual feedback.
virtual void addPoint (const Vertex< 3, fltp08 > &point)
 Adds a 3D point to the accumulated points buffer.
void calcLockLineLocation (SnapPoint &point, const SelectionInfo &info)
 Calculates the constrained snap point position along a lock line.
void calcLockPlaneLocation (SnapPoint &point, const SelectionInfo &info)
 Calculates the constrained snap point position on a lock plane.
SnapPoint calcSnapPoint (const SelectionInfo &info, DesignObjectLookup *lookup)
 Calculates the best snap point for the current selection context.
void drawDefaultGuideLines (const SnapPoint &point)
 Draws the default set of guide lines based on the current snap point context.
void drawDefaultGuidePlane (const SnapPoint &point)
 Draws the default guide plane based on the current snap point context.
UUID lineMaterial (const SnapPoint &point)
 Returns the material UUID appropriate for the given snap point's guide line type.
UUID pointMaterial (const SnapPoint &point)
 Returns the material UUID appropriate for the given snap point type.
bool processMouseSelection (MouseControllerEvent &event)
 Processes a mouse event for object selection (non-snap interaction).
bool processMouseSnap (MouseControllerEvent &event, SelectionInfo &info)
 Processes a mouse event specifically for snapping logic.
void processUserInput ()
 Processes any pending user text input for dimension locking.
void setGuideLine (uint04 index, const Vertex< 3, fltp08 > &p1, const Vector< 3, fltp08 > &p2, const UUID &material)
 Sets the start position, direction, and material of a guide line at the given index.
void setGuideLineVisible (bool visible)
 Sets the visibility of all guide lines.
void setGuideLineVisible (uint04 index, bool visible)
 Sets the visibility of a specific guide line by index.
void setGuidePlane (uint04 index, const Vector< 3, fltp08 > &normal, const Vertex< 3, fltp08 > &location, fltp08 radius)
 Sets the orientation, position, and size of a guide plane at the given index.
void setGuidePlaneVisible (bool visible)
 Sets the visibility of all guide planes.
void setGuidePlaneVisible (uint04 index, bool visible)
 Sets the visibility of a specific guide plane by index.
void setGuidePoint (uint04 index, const Vertex< 3, fltp08 > &p1, const UUID &material)
 Sets the position and material of a guide point at the given index.
void setGuidePointVisible (bool visible)
 Sets the visibility of all guide points.
void setGuidePointVisible (uint04 index, bool visible)
 Sets the visibility of a specific guide point by index.
Model setupGuideModel ()
 Creates and returns a Model configured as a guide visual element.
void updateRecentGeometry (const SnapPoint &point)
 Updates the recent geometry cache with the latest snap point for extending/snapping to nearby geometry in future operations.

Static Protected Member Functions

static Vector< 3, Angle< fltp08 > > getOrientation (const Vector< 3, fltp08 > &lookat, const Vector< 3, fltp08 > &up)
 Computes Euler orientation angles from a look-at direction and up vector.

Protected Attributes

bool m_auto_wind_shapes
 Whether to automatically correct vertex winding order.
CommandLockObject m_command_lock
 Lock object for exclusive command access during creation.
Buffer< UUIDm_created_models
 All model UUIDs created during this session.
Model m_current_model
 The model currently being created or edited.
UUID m_default_material
 UUID of the default material for new geometry.
Plane< 3, fltp08m_draw_plane
 The plane on which 2D geometry is drawn.
bool m_generate_normals
 Whether to automatically generate surface normals.
bool m_is_moving
 Whether the cursor is currently in a drag/move state.
bool m_is_touch_mode
 Whether touch-optimized interaction is active.
bool m_lock_movement
 Whether cursor movement updates are suppressed.
uint04 m_num_created [e_create_mode_size] = { 0,0,0,0,0,0,0,0,0,0,0,0,0 }
 Count of models created per creation mode.
uint04 m_num_roots_created = 0
 Number of root model containers created.
UUID m_root_model
 UUID of the parent model for created geometry.
Buffer< GeometrySpecModem_spec_mode
 Ordered sequence of spec modes for multi-step creation.
Protected Attributes inherited from SnapController
UUID m_blue_line_material = Constant<UUID>::Invalid
 Material for Z-axis (blue) guide lines.
UUID m_center_point_material = Constant<UUID>::Invalid
 Material for snap points at center points.
UUID m_current_line_material = Constant<UUID>::Invalid
 Material UUID for the current guide line being drawn.
ConstPointer< SnapsManagerm_custom_snap_manager
 Optional custom snap manager overriding default snap behavior.
UUID m_edge_point_material = Constant<UUID>::Invalid
 Material for snap points on edges.
UUID m_end_point_material = Constant<UUID>::Invalid
 Material for snap points at endpoints.
UUID m_extend_line_material = Constant<UUID>::Invalid
 Material for extension guide lines.
std::function< void(bool is_accepted)> m_finished_callback
 Callback invoked when the snap operation finishes.
UUID m_free_line_material = Constant<UUID>::Invalid
 Material for free (unconstrained) guide lines.
UUID m_free_point_material = Constant<UUID>::Invalid
 Material for free (unconstrained) snap points.
UUID m_green_line_material = Constant<UUID>::Invalid
 Material for Y-axis (green) guide lines.
Buffer< UUIDm_guide_line_material
 Materials assigned to each guide line.
Buffer< UUIDm_guide_line_model
 UUIDs of individual guide line models.
UUID m_guide_model = Constant<UUID>::Invalid
 UUID of the root guide model in the scene.
Buffer< UUIDm_guide_plane_material
 Materials assigned to each guide plane.
Buffer< UUIDm_guide_plane_model
 UUIDs of individual guide plane models.
Buffer< UUIDm_guide_point_material
 Materials assigned to each guide point.
Buffer< UUIDm_guide_point_model
 UUIDs of individual guide point models.
bool m_is_active
 Whether the snap controller is currently active.
bool m_is_horizontal_locked = false
 Whether horizontal axis locking is currently active.
bool m_is_using_lock_plane = false
 Whether a lock plane is currently in use for constraining.
bool m_is_vertical_locked = false
 Whether vertical axis locking is currently active.
Cameram_last_camera = nullptr
 The camera used in the last event processing.
Buffer< std::pair< UUID, uint04 > > m_last_lines
 Recently snapped line geometry (UUID and vertex index pairs).
DesignObjectLookupm_last_lookup = nullptr
 The DesignObjectLookup used in the last event processing.
Buffer< std::pair< UUID, uint04 > > m_last_meshes
 Recently snapped mesh geometry (UUID and face index pairs).
MouseEvent m_last_mouse_event
 The most recently processed mouse event.
Buffer< std::pair< UUID, uint04 > > m_last_points
 Recently snapped point geometry (UUID and vertex index pairs).
UUID m_last_selection_camera = Constant<UUID>::Invalid
 UUID of the camera used in the last selection operation.
Buffer< SnapPointm_last_snap_points
 The most recently computed set of candidate snap points.
Buffer< UUIDm_line_guide_text
 UUIDs of text labels attached to guide lines.
UUID m_line_mesh = Constant<UUID>::Invalid
 UUID of the mesh used for guide lines.
Vertex< 3, fltp08m_location
 The current snap location in 3D space.
Vertex< 3, fltp08m_lock_axis
 Per-axis lock values (NaN or invalid means unlocked).
LineSegment< 3, fltp08m_lock_line
 The line segment used for line-lock constraining.
Vertex< 3, fltp08m_lock_location
 The reference location used for lock calculations.
LockMode m_lock_mode
 The active lock mode controlling snap-lock interaction.
Plane< 3, fltp08m_lock_plane
 The plane used for plane-lock constraining.
UUID m_locked_line_material = Constant<UUID>::Invalid
 Material for locked/constrained guide lines.
DesignObjectLookupm_manager
 The DesignObjectLookup this controller operates on.
UUID m_mid_point_material = Constant<UUID>::Invalid
 Material for snap points at midpoints.
UUID m_on_face_point_material = Constant<UUID>::Invalid
 Material for snap points on faces.
SnapPoint m_original_snap
 The original snap point before lock adjustments.
UUID m_perpendicular_line_material = Constant<UUID>::Invalid
 Material for perpendicular guide lines.
UUID m_plane_mesh = Constant<UUID>::Invalid
 UUID of the mesh used for guide planes.
PointsDrawMode m_point_draw_mode
 The current draw mode for accumulated points.
Buffer< UUIDm_point_guide_text
 UUIDs of text labels attached to guide points.
UUID m_point_material = Constant<UUID>::Invalid
 Material for generic snap points.
UUID m_point_mesh = Constant<UUID>::Invalid
 UUID of the mesh used for guide points.
Buffer< Vertex< 3, fltp08 > > m_points
 Accumulated 3D snap points from user clicks.
UUID m_red_line_material = Constant<UUID>::Invalid
 Material for X-axis (red) guide lines.
SelectionMode m_selection_mode
 The current selection mode used during interaction.
bool m_show_length_label
 Whether length labels are displayed on guide lines.
bool m_show_location_label
 Whether coordinate labels are displayed at snap points.
UUID m_tangent_line_material = Constant<UUID>::Invalid
 Material for tangent guide lines.
std::function< void()> m_update_callback
 Callback invoked when the snap state is updated.
EditDimensionLockInformation m_user_edit
 Current user dimension lock edit state.

Detailed Description

A controller for creating basic geometry with the mouse such as polylines, circles, or spheres TODO: Allow existing models to be used here.


Definition at line 43 of file GeometryMaker.h.

Member Enumeration Documentation

◆ GeometryCreateMode

Internal key input handler for geometry creation shortcuts.


Enumerates the types of geometry primitives that can be created interactively.

Enumerator
e_no_creation 

No geometry creation active.

e_draw_points 

Draw individual point vertices.

e_draw_lines 

Draw discrete line segments.

e_draw_polyline 

Draw a connected polyline.

e_draw_spline 

Draw a smooth spline curve.

e_draw_triangles 

Draw individual triangles.

e_draw_circle 

Draw a circle.

e_draw_conic_arc 

Draw a conic arc segment.

e_draw_oval 

Draw an oval (ellipse).

e_draw_square 

Draw a square (equal-sided rectangle).

e_draw_rectangle 

Draw a rectangle.

e_draw_polygon 

Draw a regular polygon.

e_draw_sphere 

Draw a 3D sphere.

e_draw_cylinder 

Draw a 3D cylinder.

e_draw_cone 

Draw a 3D cone.

e_draw_box 

Draw a 3D box.

e_create_mode_size 

Total number of creation modes (used for array sizing).

Definition at line 50 of file GeometryMaker.h.

◆ GeometrySpecMode

Enumerates the specification modes that control how geometry dimensions are defined relative to user input points (e.g., from center, from edge, from corner).


Enumerator
e_center 

Define geometry outward from a center point.

e_edge 

Define geometry from an edge midpoint.

e_corner 

Define geometry from a corner point.

e_orient 

Specify orientation of the geometry.

e_normal 

Specify the surface normal direction.

e_on_plane 

Constrain geometry creation to a plane.

e_spec_mode_size 

Total number of spec modes (used for array sizing).

Definition at line 75 of file GeometryMaker.h.

Constructor & Destructor Documentation

◆ GeometryMaker()

GeometryMaker::GeometryMaker ( DesignObjectLookup * manager)

Constructs a GeometryMaker attached to the given design object lookup.


Parameters
[in]managerThe design object lookup that manages models and geometry

Member Function Documentation

◆ addPoint()

virtual void GeometryMaker::addPoint ( const SnapPoint & point)
overridevirtual

Adds a snap point as the next input point for the geometry being created.


Parameters
[in]pointThe snap point to add

Reimplemented from SnapController.

◆ begin()

virtual void GeometryMaker::begin ( )
overridevirtual

Begins the geometry creation session, initializing state and enabling input handling.


Reimplemented from SnapController.

◆ calculateSolid()

void GeometryMaker::calculateSolid ( Geometry & mesh)

Calculates and applies solid mesh properties to the given geometry.


Parameters
[in]meshThe geometry to process as a solid

◆ cancel()

virtual void GeometryMaker::cancel ( )
overridevirtual

Cancels the current geometry creation session, discarding any in-progress geometry.


Reimplemented from SnapController.

◆ createdModels()

const Buffer< UUID > & GeometryMaker::createdModels ( )
inline

Returns the buffer of UUIDs for all models created during this session.


Returns
A const reference to the buffer of created model UUIDs

Definition at line 232 of file GeometryMaker.h.

References m_created_models.

◆ createNewModel()

void GeometryMaker::createNewModel ( )

Creates a new empty model to hold the next piece of geometry being drawn.


◆ createRootModel()

void GeometryMaker::createRootModel ( )
protected

Creates the root model container if one does not already exist.


◆ currentModel()

const Model & GeometryMaker::currentModel ( ) const
inline

Returns the model currently being created or edited.


Returns
A const reference to the current model

Definition at line 148 of file GeometryMaker.h.

References m_current_model.

◆ currentStep()

uint04 GeometryMaker::currentStep ( ) const

Returns the current step index in the multi-step geometry creation process.


Returns
The zero-based index of the current creation step

◆ deleteAllCreatedModels()

void GeometryMaker::deleteAllCreatedModels ( )

Deletes all models that were created during this geometry creation session.


◆ editingCurrentModel()

virtual bool GeometryMaker::editingCurrentModel ( ) const
virtual

Checks whether the maker is currently editing (modifying) an existing model.


Returns
True if an existing model is being edited, false otherwise

◆ finish()

virtual void GeometryMaker::finish ( )
overridevirtual

Finishes the current geometry creation session and finalizes all pending geometry.


Reimplemented from SnapController.

◆ getHint()

TranslatedString GeometryMaker::getHint ( ) const

Returns a translated hint string describing the next expected user action.


Returns
A TranslatedString containing the user-facing hint

◆ getOrientation()

Vector< 3, Angle< fltp08 > > GeometryMaker::getOrientation ( const Vector< 3, fltp08 > & lookat,
const Vector< 3, fltp08 > & up )
staticprotected

Computes Euler orientation angles from a look-at direction and up vector.


Parameters
[in]lookatThe forward direction vector
[in]upThe up direction vector
Returns
A 3D vector of Euler angles representing the orientation

◆ hasCommandLock()

bool GeometryMaker::hasCommandLock ( )

Checks whether this maker currently holds the command lock.


Returns
True if the command lock is held

◆ lockMovement()

void GeometryMaker::lockMovement ( bool lock_movement)
inline

Sets whether cursor movement is locked (prevented from updating the preview).


Parameters
[in]lock_movementTrue to lock movement

Definition at line 208 of file GeometryMaker.h.

References m_lock_movement.

◆ material()

const UUID & GeometryMaker::material ( ) const
inline

Returns the UUID of the default material applied to newly created geometry.


Returns
A const reference to the default material UUID

Definition at line 136 of file GeometryMaker.h.

References m_default_material.

Referenced by setRootModel().

◆ movementLocked()

bool GeometryMaker::movementLocked ( ) const
inline

Checks whether cursor movement is currently locked.


Returns
True if movement is locked

Definition at line 214 of file GeometryMaker.h.

References m_lock_movement.

◆ numberOfSteps()

uint04 GeometryMaker::numberOfSteps ( ) const

Returns the total number of steps required for the current geometry creation mode.


Returns
The total number of steps

◆ onSelect()

void GeometryMaker::onSelect ( Camera * camera)
protected

Handles a selection (click) action during geometry creation.


Parameters
[in]cameraThe active camera at the time of selection

◆ processKeyEvent()

virtual bool GeometryMaker::processKeyEvent ( const KeyEvent & event,
DesignObjectLookup * lookup,
Camera * camera )
overrideprotectedvirtual

Processes a keyboard event during geometry creation.


Parameters
[in]eventThe key event to process
[in]lookupThe design object lookup for model access
[in]cameraThe active camera
Returns
True if the event was consumed

Reimplemented from SnapController.

◆ processMouseEvent()

virtual bool GeometryMaker::processMouseEvent ( MouseControllerEvent & event,
SelectionInfo & info )
overrideprotectedvirtual

Processes a mouse controller event during geometry creation.


Parameters
[in]eventThe mouse controller event to process
[in]infoThe selection info context
Returns
True if the event was consumed

Reimplemented from SnapController.

◆ processResizeEvent()

void GeometryMaker::processResizeEvent ( const GeoStructure & spec,
Model & model,
Camera * camera )
protected

Processes a resize event to update geometry dimensions from the given specification.


Parameters
[in]specThe geometry structure containing dimension specification points
[in]modelThe model to resize
[in]cameraThe active camera for view-dependent sizing

◆ rootModel()

const UUID & GeometryMaker::rootModel ( ) const
inline

Returns the UUID of the root model under which new geometry models are created.


Returns
A const reference to the root model UUID

Definition at line 142 of file GeometryMaker.h.

References m_root_model.

◆ setAutoWind()

void GeometryMaker::setAutoWind ( bool auto_wind_shapes)

Sets whether created shapes should be automatically wound (vertex order corrected).


Parameters
[in]auto_wind_shapesTrue to enable automatic winding

◆ setGenerateNormals()

void GeometryMaker::setGenerateNormals ( bool generate_normals)

Sets whether surface normals should be automatically generated for created geometry.


Parameters
[in]generate_normalsTrue to enable automatic normal generation

◆ setIsTouch()

void GeometryMaker::setIsTouch ( bool touch_mode)

Sets whether the maker is operating in touch input mode.


Parameters
[in]touch_modeTrue to enable touch-optimized interaction

◆ setRootModel()

void GeometryMaker::setRootModel ( UUID model,
UUID material = ConstantUUID >::Invalid )

Sets the root model and optional material under which new geometry will be created.


Parameters
[in]modelThe UUID of the root model
[in]materialThe UUID of the material to apply (defaults to Invalid for no material)

References material().

◆ setSpecMode()

void GeometryMaker::setSpecMode ( const Buffer< GeometrySpecMode > & spec_mode)
inline

Sets the specification mode sequence that controls how geometry dimensions are defined.


Parameters
[in]spec_modeThe ordered buffer of spec modes for each creation step

Definition at line 238 of file GeometryMaker.h.

References m_spec_mode.

◆ setupSelectionInfo()

virtual void GeometryMaker::setupSelectionInfo ( const MouseEvent & event,
Camera * camera,
SelectionInfo & info )
overrideprotectedvirtual

Sets up selection info from a mouse event for snap and geometry picking.


Parameters
[in]eventThe mouse event to process
[in]cameraThe active camera
[in]infoThe selection info structure to populate

Reimplemented from SnapController.

◆ specMode()

const Buffer< GeometrySpecMode > & GeometryMaker::specMode ( )
inline

Returns the current specification mode sequence.


Returns
A const reference to the buffer of spec modes

Definition at line 244 of file GeometryMaker.h.

References m_spec_mode.

◆ tryCommandLock()

bool GeometryMaker::tryCommandLock ( )

Attempts to acquire the command lock for exclusive geometry editing.


Returns
True if the command lock was successfully acquired

◆ updateLocation()

virtual void GeometryMaker::updateLocation ( const Vertex< 3, fltp08 > & location,
bool is_select,
Camera * camera )
overridevirtual

Updates the preview geometry location based on current cursor position.


Parameters
[in]locationThe current 3D world-space cursor position
[in]is_selectWhether the update is part of a selection action
[in]cameraThe active camera for view-dependent calculations

Reimplemented from SnapController.

◆ updatePrimitive()

void GeometryMaker::updatePrimitive ( const Vertex< 3, fltp08 > & world_location)
protected

Updates the in-progress geometry primitive based on the current world location.


Parameters
[in]world_locationThe 3D world-space position to use for the update

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