33#include <NDEVR/Model.h>
50 class NDEVR_DESIGN_API GripsModel :
public Model
59 , e_vertex_offset_grips
61 , e_model_horizontal_offset_grips
62 , e_model_vertical_offset_grips
63 , e_model_rotate_grips
71 GripsModel(
const Model& model);
78 bool processSelection(
const SelectionInfo& info)
const;
87 void processSnapPoint(SnapPoint& point, DesignObjectLookup* lookup, SelectionInfo& info,
const void* lock_ptr)
const;
96 GripMode processGripSelection(
const SnapPoint& point,
const void* lock_ptr);
105 GripMode processGripClicked(
const SnapPoint& point, ModelEditController& controller,
const void* lock_ptr);
112 static UUID CursorID();
118 static constexpr StringView TypeName() {
return "grips_model"; }
124 Model target()
const;
130 void attachTo(
const Model& model);
142 void setToDefaultGrips(
const void* lock =
nullptr);
148 void setToHighlight(
const void* lock =
nullptr);
155 void setColor(
const RGBColor& color,
const void* lock =
nullptr);
162 Ray<3, fltp08> getIndexNormal(uint04 index);
169 Ray<3, fltp08> getIndexTangent(uint04 index);
176 static RGBColor GripColor(GripMode mode);
182 BitFlag activeGripFlag()
const;
189 void setActiveGripFlag(BitFlag flag,
const void* lock_ptr =
nullptr);
197 void _setActiveGripFlag(BitFlag flag,
const void* lock_ptr =
nullptr);
202 void setupBoundsModel();
207 void setupDiagonalExpandGrips();
212 void setupExpandGrips();
217 void setupRotationGrips();
223 void setupOffsetGrips(
bool horizontal);
228 void setupVertexGrips();
234 void hideAllGrips(
const void* lock_ptr)
const;
241 void showGrip(uint04 index,
const void* lock_ptr)
const;
244 Model m_bounds_model;
245 Model m_diagonal_expand_grips;
246 Model m_expand_grips;
247 Model m_rotation_grips;
248 Model m_horizontal_offset_grips;
249 Model m_vertical_offset_grips;
251 static const constexpr uint04 rotate_segs = 128;
A core class where all Design Objects including models, materials, and geometries are stored.
Takes user input in order to modify a model in real-time.
A core class that represents a node on model hierarchy.
Contains information about a particular point of interest created from a user mouse interaction.
The primary namespace for the NDEVR SDK.
@ BitFlag
Per-vertex bit flags (selected, hidden, etc.).
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...