NDEVR
API Documentation

Contains information about a particular point of interest created from a user mouse interaction. More...

Collaboration diagram for SnapPoint:
[legend]

Public Types

enum  SnapLocationType {
  e_no_snap , e_point , e_edge , e_endpoint ,
  e_midpoint , e_center , e_model_node , e_perpendicular ,
  e_extension , e_tangent , e_parallel , e_normal ,
  e_on_face , e_x , e_y , e_z ,
  e_snap_type_size
}
 Defines the type of geometric feature that was snapped to. More...

Public Member Functions

 SnapPoint ()
 Constructs a SnapPoint with all fields set to invalid/default values.
bool operator== (const SnapPoint &point) const
 Compares two SnapPoints for equality based on location, model ID, and snap type.

Public Attributes

Buffer< SnapLocationTypeall_types
 All snap types that apply to this point (e.g., a midpoint may also be on an edge).
fltp08 closest_snap_distance
 The screen-space or world-space distance from the cursor to this snap point.
UUID geometry_id
 The UUID of the specific geometry object that was snapped to.
Matrix< fltp08geometry_transform
 The world transform matrix of the geometry at the time of snapping.
uint04 index_id
 The index within the geometry (e.g., face or primitive index).
bool is_smooth = false
 Whether the snapped surface or edge is smooth (e.g., part of a curved surface).
UUID layer_id
 The UUID of the layer containing the snapped geometry.
Vertex< 3, fltp08location
 The 3D world-space position of the snap point.
SnapLocationType location_type
 The primary snap type that was matched.
UUID model_id
 The UUID of the model containing the snapped geometry.
LineSegment< 3, fltp08preferred_line
 A preferred reference line associated with this snap (e.g., the edge snapped to). [Note: possible typo for "preferred"].
uint04 vertex_id
 The vertex index within the geometry that was snapped to.

Detailed Description

Contains information about a particular point of interest created from a user mouse interaction.


See also
SnapsManager, SnapController

Definition at line 45 of file SnapPoint.h.

Member Enumeration Documentation

◆ SnapLocationType

Defines the type of geometric feature that was snapped to.

Enumerator
e_no_snap 

No snap was found.

e_point 

Snapped to a generic point.

e_edge 

Snapped to an edge of geometry.

e_endpoint 

Snapped to an endpoint of a line segment or edge.

e_midpoint 

Snapped to the midpoint of an edge.

e_center 

Snapped to the center of a circle, arc, or polygon.

e_model_node 

Snapped to a model node origin.

e_perpendicular 

Snapped to a point forming a perpendicular with a reference line.

e_extension 

Snapped along the extension of an edge beyond its endpoints.

e_tangent 

Snapped to a tangent point on a curve.

e_parallel 

Snapped along a direction parallel to a reference edge.

e_normal 

Snapped along the surface normal direction.

e_on_face 

Snapped to a point on a face or surface.

e_x 

Snapped along the X axis.

e_y 

Snapped along the Y axis.

e_z 

Snapped along the Z axis.

e_snap_type_size 

The number of snap location types (used for sizing arrays).

Definition at line 51 of file SnapPoint.h.

Member Function Documentation

◆ operator==()

bool SnapPoint::operator== ( const SnapPoint & point) const
inline

Compares two SnapPoints for equality based on location, model ID, and snap type.

Parameters
[in]pointThe SnapPoint to compare against.
Returns
True if both points have the same location, model_id, and location_type.

Definition at line 96 of file SnapPoint.h.

References SnapPoint(), location, location_type, and model_id.


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