v2.0.0
Loading...
Searching...
No Matches
sensortreeitem.cpp
Go to the documentation of this file.
1//=============================================================================================================
35
36//=============================================================================================================
37// INCLUDES
38//=============================================================================================================
39
40#include "sensortreeitem.h"
41
42SensorTreeItem::SensorTreeItem(const QString& text, const QVector3D& pos, const QColor& color, float scale, int type)
43 : AbstractTreeItem(text, type)
44 , m_pos(pos)
45 , m_scale(scale)
46{
48}
49
50QVector3D SensorTreeItem::position() const
51{
52 return m_pos;
53}
54
56{
57 return m_scale;
58}
59
60void SensorTreeItem::setOrientation(const QMatrix4x4 &orient)
61{
62 m_orientation = orient;
63 m_hasOrientation = true;
64}
65
66const QMatrix4x4& SensorTreeItem::orientation() const
67{
68 return m_orientation;
69}
70
72{
73 return m_hasOrientation;
74}
SensorTreeItem class declaration.
QColor color() const
AbstractTreeItem(const QString &text="", int type=AbstractItem)
void setColor(const QColor &color)
int type() const override
SensorTreeItem(const QString &text, const QVector3D &pos, const QColor &color, float scale, int type=AbstractTreeItem::SensorItem)
bool hasOrientation() const
QVector3D position() const
void setOrientation(const QMatrix4x4 &orient)
float scale() const
const QMatrix4x4 & orientation() const