34#include <NDEVR/SnapPoint.h>
35#include <NDEVR/LineSegment.h>
36#include <NDEVR/Triangle.h>
37#include <NDEVR/Dictionary.h>
38#include <NDEVR/UUID.h>
39#include <NDEVR/Buffer.h>
The equivelent of std::vector but with a bit more control.
A core class where all Design Objects including models, materials, and geometries are stored.
A hash-based key-value store, useful for quick associative lookups.
Responsible for turning a user interaction into a selection within a DesignObjectLookup.
Contains information about a particular point of interest created from a user mouse interaction.
SnapLocationType
Defines the type of geometric feature that was snapped to.
void getSnapLinePoint(SnapPoint ¤t, const DesignObjectLookup *manager, const SelectionInfo &info, const SnapPoint &last, const Buffer< std::pair< UUID, uint04 > > &locations_of_interest, bool use_worldspace) const
Finds the best snap point constrained to a line, updating an existing SnapPoint in place.
Dictionary< SnapPoint::SnapLocationType, fltp08 > m_sensitivity
Maps each snap type to its sensitivity distance threshold.
void getSnapPoint(SnapPoint ¤t, const DesignObjectLookup *manager, const SelectionInfo &info, bool use_worldspace) const
Finds the best snap point, updating an existing SnapPoint in place.
bool checkLine(const SelectionInfo &info, const LineSegment< 3, fltp08 > &seg, bool infinite_length, SnapPoint &closest_snap, SnapPoint::SnapLocationType line_snap, SnapPoint::SnapLocationType edge_snap, UUID id, uint04 index, bool is_smooth) const
Checks whether a line segment qualifies as a snap candidate and updates the closest snap if so.
void setSnapEnabled(SnapPoint::SnapLocationType snap, bool use_snap)
Enables or disables a specific snap location type.
static StringView SnapIcon(SnapPoint::SnapLocationType snap_type)
Returns the icon name associated with a snap location type.
bool isSnapEnabled(SnapPoint::SnapLocationType snap) const
Checks whether a specific snap location type is currently enabled.
void setAllEnabled(bool use_snap)
Enables or disables all snap location types at once.
bool checkTriangle(const SelectionInfo &info, const Triangle< 3, fltp08 > &tri, SnapPoint &closest_snap, UUID id, uint04 index, bool is_smooth) const
Checks whether a triangle qualifies as a snap candidate and updates the closest snap if so.
SnapPoint getSnapLinePoint(const DesignObjectLookup *manager, const SelectionInfo &info, const SnapPoint &last, const Buffer< std::pair< UUID, uint04 > > &locations_of_interest, bool use_worldspace) const
Finds the best snap point constrained to a line from a previous snap point.
void setSensitivity(SnapPoint::SnapLocationType type, fltp08 sensitivity)
Sets the sensitivity radius for a specific snap location type.
Dictionary< SnapPoint::SnapLocationType, bool > m_enabled_snaps
Maps each snap type to its enabled/disabled state.
Dictionary< SnapPoint::SnapLocationType, uint04 > m_priority
Maps each snap type to its priority for conflict resolution.
void setPriority(SnapPoint::SnapLocationType type, uint04 priority)
Sets the priority for a specific snap location type.
SnapsManager()
Constructs a SnapsManager with default snap settings.
bool checkVertex(SnapPoint::SnapLocationType snap, const SelectionInfo &info, const Vertex< 3, fltp08 > &point, SnapPoint &closest_snap, UUID id, uint04 index) const
Checks whether a vertex qualifies as a snap candidate and updates the closest snap if so.
SnapPoint getSnapPoint(const DesignObjectLookup *manager, const SelectionInfo &info, bool use_worldspace) const
Finds the best snap point for the given selection info.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
A three-vertex polygon representing a triangle in N-dimensional space.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
A point in N-dimensional space, used primarily for spatial location information.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.