WallSegmentItem Class Reference

2D representation of a wall. More...

#include <WallSegmentItem.hh>

Inherits SegmentItem.

Signals

void ColorChanged (const common::Color &_color)
 Qt signal emitted when the editor item's 3D color has changed. More...
 
void DepthChanged (const double _depth)
 Qt signal emitted when the editor item depth has changed. More...
 
void HeightChanged (const double _height)
 Qt signal emitted when the editor item height has changed. More...
 
void ItemDeleted ()
 Qt signal emitted when the editor item is being deleted. More...
 
void LevelChanged (const int _level)
 Qt signal emitted when the editor item's level has changed. More...
 
void PoseChanged (const double _x, const double _y, const double _z, const double _roll, const double _pitch, const double _yaw)
 Qt signal emitted when the editor item pose has changed. More...
 
void PoseOriginTransformed (const double _x, const double _y, const double _z, const double _roll, const double _pitch, const double _yaw)
 Qt signal emitted when the editor item pose origin has changed. More...
 
void PositionChanged (const double _x, const double _y, const double _z)
 Qt signal emitted when the editor item position has changed. More...
 
void PosXChanged (const double _posX)
 Qt signal emitted when the editor item's X position has changed. More...
 
void PosYChanged (const double _posY)
 Qt signal emitted when the editor item's Y position has changed. More...
 
void PosZChanged (const double _posZ)
 Qt signal emitted when the editor item's Z position has changed. More...
 
void RotationChanged (const double _roll, const double _pitch, const double _yaw)
 Qt signal emitted when the editor item rotation has changed. More...
 
void SizeChanged (const double _width, const double _depth, const double _height)
 Qt signal emitted when the editor item size has changed. More...
 
void TextureChanged (const std::string &_texture)
 Qt signal emitted when the editor item's 3D texture has changed. More...
 
void TransparencyChanged (const float _transparency)
 Qt signal emitted when the editor item's 3D transparency has changed. More...
 
void WidthChanged (const double _width)
 Qt signal emitted when the editor item width has changed. More...
 
void YawChanged (const double _yaw)
 Qt signal emitted when the editor item yaw rotation has changed. More...
 

Public Member Functions

 WallSegmentItem (const ignition::math::Vector2d &_start, const ignition::math::Vector2d &_end, const double _height)
 Constructor param[in] _start Start position of the item in pixel coordinates. More...
 
 ~WallSegmentItem ()
 Destructor. More...
 
WallSegmentItemClone () const
 Clone the wall segment item. More...
 
virtual common::Color Color3d () const
 Get the associated 3D visual's color. More...
 
ignition::math::Vector2d EndPoint () const
 Get the end point of the segment. More...
 
std::vector< GrabberHandle * > Grabbers () const
 Get the grabber handles. More...
 
double Height () const
 Get the height of the wall segment item. More...
 
virtual std::string ItemType () const
 Get the type of the editor item. More...
 
int Level () const
 Get the level in which this building item is located. More...
 
double LevelBaseHeight () const
 Get the base height of this level relative to the ground plane. More...
 
virtual std::string Name () const
 Get the name of the editor item. More...
 
double Scale () const
 Get the scale of the segment item. More...
 
ignition::math::Vector3d ScenePosition () const
 Get the scene position of editor item. More...
 
double SceneRotation () const
 Get the scene rotation of the editor item. More...
 
void SegmentChanged ()
 Emit segment changed Qt signals. More...
 
void Set3dTransparency (const float _transparency)
 Set the transparency of the associated 3D visual. More...
 
void SetColor (const common::Color &_color)
 Set the color of the segment item. More...
 
void SetColor3d (const common::Color &_color)
 Set the associated 3D visual's color. More...
 
void SetEndPoint (const ignition::math::Vector2d &_end)
 Set the end point of the segment. More...
 
void SetHeight (const double _height)
 Set the height of the wall segment item. More...
 
void SetHighlighted (const bool _highlighted)
 Set whether this item should be highlighted or not. More...
 
void SetLevel (const int _level)
 Set the level of this building item. More...
 
void SetLevelBaseHeight (const double _height)
 Set the base height of this level relative to the ground plane. More...
 
void SetLine (const ignition::math::Vector2d &_start, const ignition::math::Vector2d &_end)
 Set the segment's line. More...
 
virtual void SetName (const std::string &_name)
 Set the name of this editor item. More...
 
void SetScale (const double _scale)
 Set the scale of the segment item. More...
 
void SetStartPoint (const ignition::math::Vector2d &_start)
 Set the start point of the segment. More...
 
void SetTexture3d (const std::string &_texture)
 Set the associated 3D visual's texture. More...
 
void SetThickness (const double _thickness)
 Set the thickness of the segment item on the 2d view. More...
 
void ShowHandles (const bool _show)
 Show the grabber handles of the segment item. More...
 
ignition::math::Vector3d Size () const
 Get the size of the item in pixels. More...
 
ignition::math::Vector2d StartPoint () const
 Get the start point of the segment. More...
 
virtual std::string Texture3d () const
 Get the associated 3D visual's texture. More...
 
double Thickness () const
 Get the thickness of the segment item. More...
 
void Update ()
 Update by emitting Qt signals. More...
 
void UpdateInspector ()
 Update inspector with current values. More...
 
void WallSegmentChanged ()
 Emit wall segment changed Qt signals. More...
 
int ZValueIdle () const
 Get the z value of this item when in idle state. More...
 
int ZValueSelected () const
 Get the z value of this item when in selected state. More...
 

Static Public Attributes

static const double SnapAngle
 Angle to snap in degrees. More...
 
static const double SnapLength
 Length to snap in meters. More...
 

Protected Member Functions

void SegmentUpdated ()
 Update wall segment when segment updated. More...
 
void UpdateLinkedGrabbers (GrabberHandle *_grabber, const ignition::math::Vector2d &_pos)
 Update the position of all grabbers linked to the given one. More...
 

Protected Attributes

std::string editorType
 Type of editor item. More...
 
std::vector< GrabberHandle * > grabbers
 A list of grabber handles for this item. More...
 
bool highlighted
 Flag to indicate whether this item is currently highlighted or not. More...
 
double itemScale
 Scale for converting from pixel to metric units. More...
 
int level
 Level that this item is on. More...
 
double levelBaseHeight
 Vertical distance from the building's base to the base of the level this editor is in. More...
 
std::string name
 Name of editor item. More...
 
common::Color visual3dColor
 Color of the associated 3D visual. More...
 
std::string visual3dTexture
 Texture of the associated 3D visual. More...
 
float visual3dTransparency
 Transparency of the associated 3D visual. More...
 
int zValueIdle
 Z ordering of the rect item when idle (unselected.) More...
 
int zValueSelected
 Z ordering of the rect item when selected. More...
 

Detailed Description

2D representation of a wall.

Constructor & Destructor Documentation

WallSegmentItem ( const ignition::math::Vector2d &  _start,
const ignition::math::Vector2d &  _end,
const double  _height 
)

Constructor param[in] _start Start position of the item in pixel coordinates.

param[in] _end End position of the item in pixel coordinates. param[in] _height Height of the wall segment in meters.

Destructor.

Member Function Documentation

WallSegmentItem* Clone ( ) const

Clone the wall segment item.

Returns
A pointer to a copy of the wall segment item.
virtual common::Color Color3d ( ) const
virtualinherited

Get the associated 3D visual's color.

Returns
Color of the 3D visual.
void ColorChanged ( const common::Color _color)
signalinherited

Qt signal emitted when the editor item's 3D color has changed.

Parameters
[in]_colorColor.
void DepthChanged ( const double  _depth)
signalinherited

Qt signal emitted when the editor item depth has changed.

Parameters
[in]_depthDepth of item in pixels.
ignition::math::Vector2d EndPoint ( ) const
inherited

Get the end point of the segment.

Returns
End point of the segment in pixel coordinates.
std::vector<GrabberHandle *> Grabbers ( ) const
inherited

Get the grabber handles.

Returns
Vector of grabber pointers.
double Height ( ) const

Get the height of the wall segment item.

Returns
Height of the wall segment item in pixels.
void HeightChanged ( const double  _height)
signalinherited

Qt signal emitted when the editor item height has changed.

Parameters
[in]_heightHeight of item in pixels.
void ItemDeleted ( )
signalinherited

Qt signal emitted when the editor item is being deleted.

virtual std::string ItemType ( ) const
virtualinherited

Get the type of the editor item.

Returns
Type of the item.
int Level ( ) const
inherited

Get the level in which this building item is located.

double LevelBaseHeight ( ) const
inherited

Get the base height of this level relative to the ground plane.

void LevelChanged ( const int  _level)
signalinherited

Qt signal emitted when the editor item's level has changed.

Parameters
[in]_levelLevel.
virtual std::string Name ( ) const
virtualinherited

Get the name of the editor item.

Returns
Name of the item.
void PoseChanged ( const double  _x,
const double  _y,
const double  _z,
const double  _roll,
const double  _pitch,
const double  _yaw 
)
signalinherited

Qt signal emitted when the editor item pose has changed.

Parameters
[in]_xX position of item in pixels.
[in]_yY position of item in pixels.
[in]_zZ position of item in pixels.
[in]_rollRoll rotation of item in degrees.
[in]_pitchPitch rotation of item in degrees.
[in]_yawYaw rotation of item in degrees.
void PoseOriginTransformed ( const double  _x,
const double  _y,
const double  _z,
const double  _roll,
const double  _pitch,
const double  _yaw 
)
signalinherited

Qt signal emitted when the editor item pose origin has changed.

Parameters
[in]_xX position of item in pixels.
[in]_yY position of item in pixels.
[in]_zZ position of item in pixels.
[in]_rollRoll rotation of item in degrees.
[in]_pitchPitch rotation of item in degrees.
[in]_yawYaw rotation of item in degrees.
void PositionChanged ( const double  _x,
const double  _y,
const double  _z 
)
signalinherited

Qt signal emitted when the editor item position has changed.

Parameters
[in]_xX position of item in pixels.
[in]_yY position of item in pixels.
[in]_zZ position of item in pixels.
void PosXChanged ( const double  _posX)
signalinherited

Qt signal emitted when the editor item's X position has changed.

Parameters
[in]_xX position of item in pixels.
void PosYChanged ( const double  _posY)
signalinherited

Qt signal emitted when the editor item's Y position has changed.

Parameters
[in]_yY position of item in pixels.
void PosZChanged ( const double  _posZ)
signalinherited

Qt signal emitted when the editor item's Z position has changed.

Parameters
[in]_zZ position of item in pixels.
void RotationChanged ( const double  _roll,
const double  _pitch,
const double  _yaw 
)
signalinherited

Qt signal emitted when the editor item rotation has changed.

Parameters
[in]_rollRoll rotation of item in degrees.
[in]_pitchPitch rotation of item in degrees.
[in]_yawYaw rotation of item in degrees.
double Scale ( ) const
inherited

Get the scale of the segment item.

Returns
Scale of the segment item in px/m.
ignition::math::Vector3d ScenePosition ( ) const
virtualinherited

Get the scene position of editor item.

Returns
Scene position in pixel coordinates.

Reimplemented from EditorItem.

double SceneRotation ( ) const
virtualinherited

Get the scene rotation of the editor item.

Returns
Scene rotation in degrees.

Reimplemented from EditorItem.

void SegmentChanged ( )
inherited

Emit segment changed Qt signals.

void SegmentUpdated ( )
protectedvirtual

Update wall segment when segment updated.

Reimplemented from SegmentItem.

void Set3dTransparency ( const float  _transparency)
inherited

Set the transparency of the associated 3D visual.

Parameters
[in]_transparencyTransparency.
void SetColor ( const common::Color _color)
inherited

Set the color of the segment item.

Parameters
[in]_colorColor.
void SetColor3d ( const common::Color _color)
inherited

Set the associated 3D visual's color.

Parameters
[in]_colorColor.
void SetEndPoint ( const ignition::math::Vector2d &  _end)
inherited

Set the end point of the segment.

Parameters
[in]_endEnd point of the segment in pixel coordinates.
void SetHeight ( const double  _height)

Set the height of the wall segment item.

param[in] _height Height of the wall segment item in pixels.

void SetHighlighted ( const bool  _highlighted)
virtual

Set whether this item should be highlighted or not.

Parameters
[in]_highlightedTrue for highlighted.

Reimplemented from EditorItem.

void SetLevel ( const int  _level)
inherited

Set the level of this building item.

Parameters
[in]_levelLevel number.
void SetLevelBaseHeight ( const double  _height)
inherited

Set the base height of this level relative to the ground plane.

Parameters
[in]_heightBase height.
void SetLine ( const ignition::math::Vector2d &  _start,
const ignition::math::Vector2d &  _end 
)
inherited

Set the segment's line.

Parameters
[in]_startStart position of the line in pixel coordinates.
[in]_endEnd position of the line in pixel coordinates.
virtual void SetName ( const std::string &  _name)
virtualinherited

Set the name of this editor item.

Parameters
[in]_nameName to set the editor item to.
void SetScale ( const double  _scale)
inherited

Set the scale of the segment item.

param[in] _scale Scale of the segment item in px/m.

void SetStartPoint ( const ignition::math::Vector2d &  _start)
inherited

Set the start point of the segment.

Parameters
[in]_startStart point of the segment in pixel coordinates.
void SetTexture3d ( const std::string &  _texture)
inherited

Set the associated 3D visual's texture.

Parameters
[in]_textureTexture.
void SetThickness ( const double  _thickness)
inherited

Set the thickness of the segment item on the 2d view.

Parameters
[in]_thicknessThickness in pixels.
void ShowHandles ( const bool  _show)
inherited

Show the grabber handles of the segment item.

Parameters
[in]_showTrue to draw the handles, and false to hide them.
ignition::math::Vector3d Size ( ) const
virtualinherited

Get the size of the item in pixels.

Returns
Size in pixels.

Reimplemented from EditorItem.

void SizeChanged ( const double  _width,
const double  _depth,
const double  _height 
)
signalinherited

Qt signal emitted when the editor item size has changed.

Parameters
[in]_widthWidth of item in pixels.
[in]_depthDepth of item in pixels.
[in]_heightHeight of item in pixels.
ignition::math::Vector2d StartPoint ( ) const
inherited

Get the start point of the segment.

Returns
Start point of the segment in pixel coordinates.
virtual std::string Texture3d ( ) const
virtualinherited

Get the associated 3D visual's texture.

Returns
Texture of the 3D visual.
void TextureChanged ( const std::string &  _texture)
signalinherited

Qt signal emitted when the editor item's 3D texture has changed.

Parameters
[in]_textureTexture.
double Thickness ( ) const
inherited

Get the thickness of the segment item.

Returns
Thickness in pixels.
void TransparencyChanged ( const float  _transparency)
signalinherited

Qt signal emitted when the editor item's 3D transparency has changed.

Parameters
[in]_transparencyTransparency.
void Update ( )

Update by emitting Qt signals.

void UpdateInspector ( )

Update inspector with current values.

void UpdateLinkedGrabbers ( GrabberHandle _grabber,
const ignition::math::Vector2d &  _pos 
)
protectedinherited

Update the position of all grabbers linked to the given one.

Parameters
[in]_grabberOriginal grabber.
[in]_posNew position.
void WallSegmentChanged ( )

Emit wall segment changed Qt signals.

void WidthChanged ( const double  _width)
signalinherited

Qt signal emitted when the editor item width has changed.

Parameters
[in]_widthWidth of item in pixels.
void YawChanged ( const double  _yaw)
signalinherited

Qt signal emitted when the editor item yaw rotation has changed.

Parameters
[in]_yawYaw rotation of item in degrees.
int ZValueIdle ( ) const
inherited

Get the z value of this item when in idle state.

Returns
Z value.
int ZValueSelected ( ) const
inherited

Get the z value of this item when in selected state.

Returns
Z value.

Member Data Documentation

std::string editorType
protectedinherited

Type of editor item.

std::vector<GrabberHandle *> grabbers
protectedinherited

A list of grabber handles for this item.

One grabber for each endpoint.

bool highlighted
protectedinherited

Flag to indicate whether this item is currently highlighted or not.

double itemScale
protectedinherited

Scale for converting from pixel to metric units.

int level
protectedinherited

Level that this item is on.

double levelBaseHeight
protectedinherited

Vertical distance from the building's base to the base of the level this editor is in.

std::string name
protectedinherited

Name of editor item.

const double SnapAngle
staticinherited

Angle to snap in degrees.

const double SnapLength
staticinherited

Length to snap in meters.

common::Color visual3dColor
protectedinherited

Color of the associated 3D visual.

std::string visual3dTexture
protectedinherited

Texture of the associated 3D visual.

float visual3dTransparency
protectedinherited

Transparency of the associated 3D visual.

int zValueIdle
protectedinherited

Z ordering of the rect item when idle (unselected.)

int zValueSelected
protectedinherited

Z ordering of the rect item when selected.


The documentation for this class was generated from the following file: