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{
36 /**--------------------------------------------------------------------------------------------------
37 \brief The type of a range sensor.
38 **/
45 /**--------------------------------------------------------------------------------------------------
46 \brief A RangeSensor is a Device that determines the distance of a target at a certian orientaton.
47 Usually based on LiDAR or photogrametry.
48 **/
50 {
51 Q_OBJECT
52 public:
53 RangeSensor(const Model& name, ProgressInfo* log, QObject* parent = nullptr);
54 RangeSensor(const Angle<fltp08>& fov, const Model& name, ProgressInfo* log, QObject* parent = nullptr);
55 RangeSensor(const Vector<2, Angle<fltp08>>& fov, const Model& name, ProgressInfo* log, QObject* parent = nullptr);
56 virtual bool activated() const { return m_is_activated; };
57 [[nodiscard]] virtual fltp08 intensity() const { return m_intensity; }
58 [[nodiscard]] virtual fltp08 distance() const { return m_distance; }
59 [[nodiscard]] virtual bool lowVisibilityMode() const { return m_low_visibility_mode; }
60 virtual void setLowVisibilityMode(bool low_visibility) { m_low_visibility_mode = low_visibility; }
61 [[nodiscard]] virtual bool supportsLowVisibilityMode() const { return false; }
62 virtual void setIntensity(fltp08 intensity) { m_intensity = intensity; }
63 virtual void setDistance(fltp08 distance) { m_distance = distance; }
64 [[nodiscard]] virtual bool supportsSetActivated() const { return false; }
65 virtual void setActivated(bool is_active) { m_is_activated = is_active; }
66 virtual void createModel(const RGBColor& color);
67 virtual void createLineModel(const RGBColor& color);
68 virtual void createFanModel(const RGBColor& color);
69 virtual void updateModel();
70 virtual void createMaterial(const RGBColor& color);
71 RangeSensorType rangeSensorType() { return m_type; }
72 virtual void measureDistance() {}
73 protected:
74 void init();
75 protected:
82 };
83}
#define HARDWARE_API
Definition DLLInfo.h:56
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:540
A root class which describes some physical object, such as a Motor, Sensor, or Connection....
Definition Device.h:52
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
A RangeSensor is a Device that determines the distance of a target at a certian orientaton....
Definition RangeSensor.h:50
virtual fltp08 distance() const
Definition RangeSensor.h:58
fltp08 m_distance
Definition RangeSensor.h:78
virtual void setIntensity(fltp08 intensity)
Definition RangeSensor.h:62
virtual void updateModel()
RangeSensor(const Angle< fltp08 > &fov, const Model &name, ProgressInfo *log, QObject *parent=nullptr)
virtual void setDistance(fltp08 distance)
Definition RangeSensor.h:63
Vector< 2, Angle< fltp08 > > m_fov
Definition RangeSensor.h:76
bool m_low_visibility_mode
Definition RangeSensor.h:81
virtual void createLineModel(const RGBColor &color)
virtual void setActivated(bool is_active)
Definition RangeSensor.h:65
RangeSensorType m_type
Definition RangeSensor.h:79
virtual fltp08 intensity() const
Definition RangeSensor.h:57
virtual bool activated() const
Definition RangeSensor.h:56
bool m_is_activated
Definition RangeSensor.h:80
RangeSensor(const Model &name, ProgressInfo *log, QObject *parent=nullptr)
virtual bool supportsSetActivated() const
Definition RangeSensor.h:64
RangeSensor(const Vector< 2, Angle< fltp08 > > &fov, const Model &name, ProgressInfo *log, QObject *parent=nullptr)
virtual bool supportsLowVisibilityMode() const
Definition RangeSensor.h:61
virtual void createModel(const RGBColor &color)
fltp08 m_intensity
Definition RangeSensor.h:77
virtual bool lowVisibilityMode() const
Definition RangeSensor.h:59
virtual void createMaterial(const RGBColor &color)
virtual void setLowVisibilityMode(bool low_visibility)
Definition RangeSensor.h:60
RangeSensorType rangeSensorType()
Definition RangeSensor.h:71
virtual void createFanModel(const RGBColor &color)
virtual void measureDistance()
Definition RangeSensor.h:72
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
Definition ACIColor.h:37
constexpr t_type distance(const t_vertex &vertex, const LineSegment< t_dims, t_type, t_vertex > &line)
Definition Distance.hpp:171
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
RangeSensorType
The type of a range sensor.
Definition RangeSensor.h:40
@ e_line
Definition RangeSensor.h:41
@ e_3d_fan
Definition RangeSensor.h:43
@ e_2d_fan
Definition RangeSensor.h:42