API Documentation
Loading...
Searching...
No Matches
RangeSensor.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Hardware
28File: RangeSensor
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/Device.h>
34namespace NDEVR
35{
43 {
44 Q_OBJECT
45 public:
46 RangeSensor(const Model& name, ProgressInfo* log, QObject* parent = nullptr);
47 RangeSensor(const Angle<fltp08>& fov, const Model& name, ProgressInfo* log, QObject* parent = nullptr);
48 RangeSensor(const Vector<2, Angle<fltp08>>& fov, const Model& name, ProgressInfo* log, QObject* parent = nullptr);
49 virtual bool activated() const { return m_is_activated; };
50 [[nodiscard]] virtual fltp08 intensity() const { return m_intensity; }
51 [[nodiscard]] virtual fltp08 distance() const { return m_distance; }
52 [[nodiscard]] virtual bool lowVisibilityMode() const { return m_low_visibility_mode; }
53 virtual void setLowVisibilityMode(bool low_visibility) { m_low_visibility_mode = low_visibility; }
54 [[nodiscard]] virtual bool supportsLowVisibilityMode() const { return false; }
55 virtual void setIntensity(fltp08 intensity) { m_intensity = intensity; }
56 virtual void setDistance(fltp08 distance) { m_distance = distance; }
57 [[nodiscard]] virtual bool supportsSetActivated() const { return false; }
58 virtual void setActivated(bool is_active) { m_is_activated = is_active; }
59 virtual void createModel(const RGBColor& color);
60 virtual void createLineModel(const RGBColor& color);
61 virtual void createFanModel(const RGBColor& color);
62 virtual void updateModel();
63 virtual void createMaterial(const RGBColor& color);
64 RangeSensorType rangeSensorType() { return m_type; }
65 virtual void measureDistance() {}
66 protected:
67 void init();
68 protected:
75 };
76}
#define HARDWARE_API
Definition DLLInfo.h:74
Stores an angle in an optimized format.
Definition StringStream.h:352
Definition Device.h:48
Definition Model.h:54
Definition ProgressInfo.hpp:43
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
Definition RangeSensor.h:43
virtual fltp08 distance() const
Definition RangeSensor.h:51
fltp08 m_distance
Definition RangeSensor.h:71
virtual void setIntensity(fltp08 intensity)
Definition RangeSensor.h:55
virtual void setDistance(fltp08 distance)
Definition RangeSensor.h:56
Vector< 2, Angle< fltp08 > > m_fov
Definition RangeSensor.h:69
bool m_low_visibility_mode
Definition RangeSensor.h:74
virtual void setActivated(bool is_active)
Definition RangeSensor.h:58
RangeSensorType m_type
Definition RangeSensor.h:72
virtual fltp08 intensity() const
Definition RangeSensor.h:50
virtual bool activated() const
Definition RangeSensor.h:49
bool m_is_activated
Definition RangeSensor.h:73
virtual bool supportsSetActivated() const
Definition RangeSensor.h:57
virtual bool supportsLowVisibilityMode() const
Definition RangeSensor.h:54
fltp08 m_intensity
Definition RangeSensor.h:70
virtual bool lowVisibilityMode() const
Definition RangeSensor.h:52
virtual void setLowVisibilityMode(bool low_visibility)
Definition RangeSensor.h:53
RangeSensorType rangeSensorType()
Definition RangeSensor.h:64
virtual void measureDistance()
Definition RangeSensor.h:65
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
Definition ACIColor.h:37
constexpr t_type distance(const t_vertex &vertex, const LineSegment< t_dims, t_type, t_vertex > &line)
Definition Distance.hpp:250
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
RangeSensorType
Definition RangeSensor.h:37
@ e_line
Definition RangeSensor.h:38
@ e_3d_fan
Definition RangeSensor.h:40
@ e_2d_fan
Definition RangeSensor.h:39