API Documentation
Loading...
Searching...
No Matches
SelectionEffect.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Model.h>
4namespace NDEVR
5{
6 class DesignObjectLookup;
7
8 /**--------------------------------------------------------------------------------------------------
9 \brief Applies certain effects to a model that has been selected
10 **/
12 {
13 public:
14 virtual void applySelectionEffect(Model& model, DesignObjectLookup* lookup) = 0;
15 virtual void removeSelectionEffect(Model& model, DesignObjectLookup* lookup) = 0;
16 };
17
18 /**--------------------------------------------------------------------------------------------------
19 \brief The default behavior for selection, which is to create a bounding box around an object
20 **/
22 {
23 public:
25 void applySelectionEffect(Model& model, DesignObjectLookup* lookup) override;
26 void removeSelectionEffect(Model& model, DesignObjectLookup* lookup) override;
27 void setUseGrips(bool use_grips);
28 void setUseVertexHighlights(bool use);
29 private:
30 void _setupBoundingBox(Model& target, bool attach, DesignObjectLookup* lookup);
31 void _setupVertexHighlighting(Model& target, bool use_highlighting, DesignObjectLookup* lookup);
32 private:
33 bool m_use_grips;
34 bool m_use_vertex_hightlights;
35 Dictionary<UUID, UUID> m_bounding_box;
36 Dictionary<UUID, UUID> m_grips_box;
37 Buffer<Model> selected_models;
38 };
39}
#define NDEVR_DESIGN_API
Definition DLLInfo.h:55
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
The default behavior for selection, which is to create a bounding box around an object.
Definition SelectionEffect.h:22
void setUseGrips(bool use_grips)
void applySelectionEffect(Model &model, DesignObjectLookup *lookup) override
void setUseVertexHighlights(bool use)
void removeSelectionEffect(Model &model, DesignObjectLookup *lookup) override
A core class where all Design Objects including models, materials, and geometries are stored....
Definition DesignObjectLookup.h:65
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
Applies certain effects to a model that has been selected.
Definition SelectionEffect.h:12
virtual void removeSelectionEffect(Model &model, DesignObjectLookup *lookup)=0
virtual void applySelectionEffect(Model &model, DesignObjectLookup *lookup)=0
Definition ACIColor.h:37