API Documentation
Loading...
Searching...
No Matches
LineOfSight.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/Scan.h>
3#if NDEVR_LINE_OF_SITE
4#include <NDEVR/DesignObjectLookup.h>
5namespace NDEVR
6{
7 /**--------------------------------------------------------------------------------------------------
8 \brief Used to setup a LineOfSight Model.
9 **/
10 struct LineOfSightArgs
11 {
12 Vertex<3, fltp08> origin = Vertex<3, fltp08>(0.0);
13 Bounds<1, fltp08> distance_bounds = Bounds<1, fltp08>(0.0, 500.0);
14 Bounds<2, Angle<sint04>> bounds = Bounds<2, Angle<sint04>>(Vector<2, Angle<sint04>>(Angle(0)), Vector<2, Angle<sint04>>(Angle<sint04>(DEGREES, 360.0), Angle<sint04>(DEGREES, 180.0)));
15 Vector<2, Angle<sint04>> separation = Vector<2, Angle<sint04>>(Angle<sint04>(DEGREES, 0.5));
16 Buffer<Model> points_to_intersect;
17 Buffer<Model> lines_to_intersect;
18 Buffer<Model> meshes_to_intersect;
19 DesignObjectLookup* lookup = nullptr;
20 ProgressInfo* log = nullptr;
21 };
22
23 /**--------------------------------------------------------------------------------------------------
24 \brief A Model which represents everything that is visible from a certain vantage point.
25 **/
26 class NDEVR_DESIGN_API LineOfSight : public Scan
27 {
28 public:
29 LineOfSight()
30 : Scan()
31 {}
32 LineOfSight(const Model& parent);
33 static const char* TypeName()
34 {
35 return "line_of_sight";
36 }
37 LineOfSightArgs currentArgs() const;
38 Model losLayer() const;
39 void createLineOfSite(LineOfSightArgs& args);
40 void clearMesh();
41 bool intersects(SelectionInfo& info, const LineOfSightArgs& args);
42 void intersectMeshes(LineOfSightArgs& args);
43 };
44}
45#endif
#define NDEVR_DESIGN_API
Definition DLLInfo.h:55
Definition ACIColor.h:37