NDEVR
API Documentation
SelectionEffect.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Model.h>
4#include <NDEVR/ApplicationOption.h>
5#include <NDEVR/Scene.h>
6namespace NDEVR
7{
14 class NDEVR_DESIGN_API SelectionEffect
15 {
16 public:
23 virtual void applySelectionEffects() = 0;
24
30 virtual void removeSelectionEffects() = 0;
31 };
32
37 class NDEVR_DESIGN_API DefaultSelectionEffect : public SelectionEffect
38 {
39 public:
48
53
60 void applySelectionEffects() override;
61
65 void removeSelectionEffects() override;
66
74 void setUseGrips(bool use_grips);
75
82 void setUseVertexHighlights(bool use);
83
85 private:
95 void _setupBoundingBox(const Buffer<Model>& targets, bool attach, DesignObjectLookup* lookup);
96
105 void _setupVertexHighlighting(const Buffer<Model>& targets, bool use_highlighting, DesignObjectLookup* lookup);
106 private:
107 bool m_use_grips;
108 bool m_use_vertex_highlights;
109 DesignObjectLookup* m_lookup;
110 BasicResourceListener* m_snap_update_listener;
111 };
112}
The default object to store data of any type that should persist through sessions of the application.
Simple version of ResourceListener which allows for a simple function callback that will be executed ...
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
void setUseGrips(bool use_grips)
Enables or disables grip handles on selected models.
void removeSelectionEffects() override
Removes all bounding box and grip effects from the scene.
void applySelectionEffects() override
Applies bounding box (and optionally grip) effects to all currently selected models.
DefaultSelectionEffect(DesignObjectLookup *lookup)
Constructs a DefaultSelectionEffect tied to the given design object lookup.
~DefaultSelectionEffect()
Destroys the DefaultSelectionEffect and cleans up the grip mode listener.
static ApplicationOption< BitFlag > grip_mode
Application-wide option controlling which grip modes are active.
void setUseVertexHighlights(bool use)
Enables or disables vertex highlighting on selected models.
A core class where all Design Objects including models, materials, and geometries are stored.
Applies certain effects to a model that has been selected.
virtual void applySelectionEffects()=0
Applies visual selection effects to the currently selected models.
virtual void removeSelectionEffects()=0
Removes all visual selection effects from previously selected models.
The primary namespace for the NDEVR SDK.