RoboidControl for Arduino
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Passer::RoboidControl::Placement Class Reference

A plament is used to specify where a Thing is placed on the Roboid. More...

#include <Placement.h>

Public Member Functions

 Placement (Thing *thing, Vector3 position=Vector3::zero, float horizontalDirection=0.0F, float verticalAngle=0.0F)
 Placement of a Thing on a Roboid.
 
 Placement (Thing *thing, float horizontalDirection, float verticalDirection=0.0F)
 Placement of a Thing on a Roboid without position.
 
 Placement ()
 Default constructor with a zero placement.
 

Public Attributes

Placementparent = nullptr
 The parent placement in the Roboid hierarchy.
 
Placement ** children = nullptr
 An array of children of this placement in the Roboid hierarchy.
 
unsigned int childCount = 0
 The number of children of this placemet in the Roboid hierarchy.
 
Thingthing
 The Thing which is placed.
 
Vector3 position
 The position of the Thing in carthesian coordinates.
 
float horizontalDirection
 The angle or direction of the Thing in the horizontal plane.
 
float verticalDirection
 The angle or direction of the Thing in the vertical plane.
 

Detailed Description

A plament is used to specify where a Thing is placed on the Roboid.

It is not always necessary to exactly specify the position and orientation of a Thing. You can use a simple constructor in that case:

Thing* thing = new Thing();
A plament is used to specify where a Thing is placed on the Roboid.
Definition Placement.h:38
Thing * thing
The Thing which is placed.
Definition Placement.h:74
Placement()
Default constructor with a zero placement.
Definition Placement.cpp:3
A thing is a functional component on a robot.
Definition Thing.h:7

The thing can be placed using carthesian coordinates in meters, while the orientation is specified with the horizontal and vertical direction. Whenö both horizontal and vertical direction are zero, the Thing is aligned with the parent thing in the hierarchy. When there is no parent, the thing is directed such that it is looking forward.

Thing* thing = new Thing();
Placement p = Placement(thing, Vector3(-0.04F, 0.0F, 0.06F), 0.0F, 0.0F);
A 3-dimensional vector.
Definition Vector3.h:35

In the example above, the thing is placed 4 cm to the left and 6 cm to the front relative to the parent. The orientation is the same as the parent. The second line can be simplified, as the default angles are zero and a Vector2 position can be used which is a placement in the horizontal plane:

Placement p = Placement(thing, Vector2(-0.04F, 0.06F));
A 2-dimensional vector.
Definition Vector2.h:31

Constructor & Destructor Documentation

◆ Placement() [1/3]

Passer::RoboidControl::Placement::Placement ( Thing thing,
Vector3  position = Vector3::zero,
float  horizontalDirection = 0.0F,
float  verticalAngle = 0.0F 
)

Placement of a Thing on a Roboid.

Parameters
thingThe Thing which is placed
positionThe position of the Thing in carthesian coordinates
horizontalDirectionThe horizontal direction angle of the Thing. Negative angles are to the left.
verticalAngleThe vertical direction angle of the Thing. Negative angles are downward.

◆ Placement() [2/3]

Placement::Placement ( Thing thing,
float  horizontalDirection,
float  verticalDirection = 0.0F 
)

Placement of a Thing on a Roboid without position.

Parameters
thingThe Thing which is place
horizontalDirectionThe horizontal direction angle of the Thing. Negative angles are to the left.
verticalDirectionThe vertical direction angle of the Thing. Negative angles are downward.

◆ Placement() [3/3]

Placement::Placement ( )

Default constructor with a zero placement.

Member Data Documentation

◆ parent

Placement* Passer::RoboidControl::Placement::parent = nullptr

The parent placement in the Roboid hierarchy.

Remarks
Reserved for future use

◆ children

Placement** Passer::RoboidControl::Placement::children = nullptr

An array of children of this placement in the Roboid hierarchy.

Remarks
Reserved for future use

◆ childCount

unsigned int Passer::RoboidControl::Placement::childCount = 0

The number of children of this placemet in the Roboid hierarchy.

Remarks
Reserved for future use

◆ thing

Thing* Passer::RoboidControl::Placement::thing

The Thing which is placed.

◆ position

Vector3 Passer::RoboidControl::Placement::position

The position of the Thing in carthesian coordinates.

◆ horizontalDirection

float Passer::RoboidControl::Placement::horizontalDirection

The angle or direction of the Thing in the horizontal plane.

◆ verticalDirection

float Passer::RoboidControl::Placement::verticalDirection

The angle or direction of the Thing in the vertical plane.


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