Roomba Controller Dashboard 1
A GUI and TCP client application that is used to control a Roomba for Computer Engineering 2880 @ Iowa State
Loading...
Searching...
No Matches
Pillar Class Reference

#include <Pillar.hpp>

Public Member Functions

 Pillar ()
 
 Pillar (const Pose2D &position, double radius)
 
 Pillar (double x, double y, double heading, double radius)
 
 Pillar (double x, double y, double radius)
 
Pose2DgetPose ()
 
double getX ()
 
double getY ()
 
double getRadius () const
 
void setRadius (double newRadius)
 
void setPosition (const Pose2D &newPosition)
 

Static Public Member Functions

static Pillar parseFromStream (std::istringstream &stream)
 

Protected Attributes

Pose2D position
 
double radius
 

Detailed Description

A Pillar is a cyclinder on the field. It has both a position and a radius.

Definition at line 14 of file Pillar.hpp.

Constructor & Destructor Documentation

◆ Pillar() [1/4]

Pillar::Pillar ( )

Constructs a new pillar object

Definition at line 7 of file Pillar.cpp.

◆ Pillar() [2/4]

Pillar::Pillar ( const Pose2D & position,
double radius )

Makes a new pillar with given position and radius

Parameters
positionthe position of the pillar on the field
radiusthe radius of the pillar on the field

Definition at line 18 of file Pillar.cpp.

◆ Pillar() [3/4]

Pillar::Pillar ( double x,
double y,
double heading,
double radius )

Constructs a new pillar from components

Parameters
xcomponent of position
ycomponent of position
headingcomponent of position
radiusof the pillar

Definition at line 12 of file Pillar.cpp.

◆ Pillar() [4/4]

Pillar::Pillar ( double x,
double y,
double radius )

Constructs a new pillar from components. ignores heading

Parameters
xthe x component of the position
ythe y component of the position
radiusthe radius of the pillar

Definition at line 23 of file Pillar.cpp.

Member Function Documentation

◆ getPose()

Pose2D & Pillar::getPose ( )

Gets a reference to the position of the pillar. If Pose2D functions are called on that reference it will effect this pillars position

Returns
the position of the pillar

Definition at line 29 of file Pillar.cpp.

◆ getRadius()

double Pillar::getRadius ( ) const
Returns
the radius of the pillar

Definition at line 41 of file Pillar.cpp.

◆ getX()

double Pillar::getX ( )
Returns
The X compoenent of the position

Definition at line 33 of file Pillar.cpp.

◆ getY()

double Pillar::getY ( )
Returns
The y component of the positoon

Definition at line 37 of file Pillar.cpp.

◆ parseFromStream()

Pillar Pillar::parseFromStream ( std::istringstream & stream)
static

Makes a pillar from a given string stream. Formatted as: X Y theta R

Parameters
streamthe stream in which to parse the pillar from
Returns
the pillar from the data in the stream

Definition at line 50 of file Pillar.cpp.

◆ setPosition()

void Pillar::setPosition ( const Pose2D & newPosition)

Sets the position of the pillar

Parameters
newPositionthe new position to set to

Definition at line 58 of file Pillar.cpp.

◆ setRadius()

void Pillar::setRadius ( double newRadius)

Sets the radius of the pillar

Parameters
newRadiusthe radius to set to

Definition at line 45 of file Pillar.cpp.

Member Data Documentation

◆ position

Pose2D Pillar::position
protected

Pose to handle position and related math

Definition at line 19 of file Pillar.hpp.

◆ radius

double Pillar::radius
protected

The radius of the pillar

Definition at line 24 of file Pillar.hpp.


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