API Documentation
Loading...
Searching...
No Matches
ModelTileContainer.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#if NDEVR_MODEL_TILE_CONTAINER
4#include <NDEVR/Model.h>
5#include <NDEVR/ModelTiler.h>
6#include <NDEVR/INIInterface.h>
7namespace NDEVR
8{
9 /**--------------------------------------------------------------------------------------------------
10 \brief Where tiling should begin along a given line
11 *-----------------------------------------------------------------------------------------------**/
12 enum PlacementAlignment
13 {
15 , e_min
16 , e_max
17 };
18 class JSONNode;
19
20 /**--------------------------------------------------------------------------------------------------
21 \brief Options for adjusting a Model that is tiled along a polyline or surface.
22 *-----------------------------------------------------------------------------------------------**/
23 class NDEVR_DESIGN_API ModelTileOptions : public INIInterface
24 {
25 public:
26 ModelTileOptions();
27 void setDefaultRelativeToLength();
28 fltp08 horizontal_offset = 0.0;
29 fltp08 vertical_offset = 0.0;
30 fltp08 spacing = 1.0;
31 Angle<fltp08> inclination_offset = Angle<fltp08>(0);
32 Angle<fltp08> heading_offset = Angle<fltp08>(0);
33 Vector<3, fltp08> size = Constant<Vector<3, fltp08>>::Invalid;
34 PlacementAlignment placement_alignment_vert = e_min;
35 PlacementAlignment placement_alignment_horz = e_center;
36 bool path_heading = true;
37 bool path_inclination = true;
38 bool relative_to_length = false;
39 public:
40 virtual void getINI(INIFactory& factory) override;
41 JSONNode toJSON() const;
42 void fromJSON(const JSONNode& node);
43 ModelTiler::TileOptions convert(const Model& model_to_tile);
44 };
45
46 /**--------------------------------------------------------------------------------------------------
47 \brief A container for a series of models tiled along a given polyline or surface.
48 *-----------------------------------------------------------------------------------------------**/
49 class NDEVR_DESIGN_API ModelTileContainer : public Model
50 {
51 public:
52 ModelTileContainer(const Model& model);
53 void setOptions(const ModelTileOptions& options);
54 void update();
55 static constexpr const char* TypeName() { return "model_tile_container"; }
56 protected:
57 void init();
58 };
59}
60#endif
#define NDEVR_DESIGN_API
Definition DLLInfo.h:77
Definition ACIColor.h:37
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:146