gusimplewhiteboard
guWhiteboard::ParticlePosition Class Reference

Provides a C++ wrapper around wb_particle_position. More...

#include <ParticlePosition.hpp>

Inheritance diagram for guWhiteboard::ParticlePosition:
Collaboration diagram for guWhiteboard::ParticlePosition:

Public Member Functions

 ParticlePosition (struct wb_point2d t_position=wb_point2d(), int16_t t_headingInDegrees=0, float t_confidence=0.0f)
 Create a new ParticlePosition. More...
 
 ParticlePosition (const ParticlePosition &t_other)
 Copy Constructor. More...
 
 ParticlePosition (const struct wb_particle_position &t_other)
 Copy Constructor. More...
 
ParticlePositionoperator= (const ParticlePosition &t_other)
 Copy Assignment Operator. More...
 
ParticlePositionoperator= (const struct wb_particle_position &t_other)
 Copy Assignment Operator. More...
 
bool operator== (const ParticlePosition &t_other) const
 
bool operator!= (const ParticlePosition &t_other) const
 
bool operator== (const wb_particle_position &t_other) const
 
bool operator!= (const wb_particle_position &t_other) const
 
Point2Dposition ()
 
const Point2Dposition () const
 
void set_position (const Point2D &t_newValue)
 
int16_t & headingInDegrees ()
 
const int16_t & headingInDegrees () const
 
void set_headingInDegrees (const int16_t &t_newValue)
 
float & confidence ()
 
const float & confidence () const
 
void set_confidence (const float &t_newValue)
 
 ParticlePosition (const std::string &t_str)
 String Constructor. More...
 
std::string description ()
 
std::string to_string ()
 
void from_string (const std::string &t_str)
 

Additional Inherited Members

- Public Attributes inherited from wb_particle_position
struct wb_point2d position
 position in the soccer field, The origin (0,0) us the center of the soccer field, larger Y is along the soccer field towards the oponetns goaa, smaller Y is back towards our on goal. More...
 
int16_t headingInDegrees
 90 degrees is looking ahead into the oponetns goal. More...
 
float confidence
 degre of certaintity that this a reliable locaiton where the robot is, should be between 0 and 1 More...
 

Detailed Description

Provides a C++ wrapper around wb_particle_position.

Definition at line 86 of file ParticlePosition.hpp.

Constructor & Destructor Documentation

◆ ParticlePosition() [1/4]

guWhiteboard::ParticlePosition::ParticlePosition ( struct wb_point2d  t_position = wb_point2d(),
int16_t  t_headingInDegrees = 0,
float  t_confidence = 0.0f 
)
inline

Create a new ParticlePosition.

Definition at line 104 of file ParticlePosition.hpp.

Referenced by operator==().

◆ ParticlePosition() [2/4]

guWhiteboard::ParticlePosition::ParticlePosition ( const ParticlePosition t_other)
inline

Copy Constructor.

Definition at line 111 of file ParticlePosition.hpp.

References confidence(), headingInDegrees(), and position().

◆ ParticlePosition() [3/4]

guWhiteboard::ParticlePosition::ParticlePosition ( const struct wb_particle_position t_other)
inline

◆ ParticlePosition() [4/4]

guWhiteboard::ParticlePosition::ParticlePosition ( const std::string &  t_str)
inline

String Constructor.

Definition at line 209 of file ParticlePosition.hpp.

References from_string().

Member Function Documentation

◆ confidence() [1/2]

float & guWhiteboard::ParticlePosition::confidence ( )
inline

◆ confidence() [2/2]

const float & guWhiteboard::ParticlePosition::confidence ( ) const
inline

Definition at line 195 of file ParticlePosition.hpp.

References wb_particle_position::confidence.

◆ description()

std::string guWhiteboard::ParticlePosition::description ( )
inline

◆ from_string()

void guWhiteboard::ParticlePosition::from_string ( const std::string &  t_str)
inline

◆ headingInDegrees() [1/2]

int16_t & guWhiteboard::ParticlePosition::headingInDegrees ( )
inline

◆ headingInDegrees() [2/2]

const int16_t & guWhiteboard::ParticlePosition::headingInDegrees ( ) const
inline

Definition at line 180 of file ParticlePosition.hpp.

References wb_particle_position::headingInDegrees.

◆ operator!=() [1/2]

bool guWhiteboard::ParticlePosition::operator!= ( const ParticlePosition t_other) const
inline

Definition at line 145 of file ParticlePosition.hpp.

◆ operator!=() [2/2]

bool guWhiteboard::ParticlePosition::operator!= ( const wb_particle_position t_other) const
inline

Definition at line 155 of file ParticlePosition.hpp.

◆ operator=() [1/2]

ParticlePosition & guWhiteboard::ParticlePosition::operator= ( const ParticlePosition t_other)
inline

Copy Assignment Operator.

Definition at line 125 of file ParticlePosition.hpp.

References confidence(), headingInDegrees(), and position().

◆ operator=() [2/2]

ParticlePosition & guWhiteboard::ParticlePosition::operator= ( const struct wb_particle_position t_other)
inline

◆ operator==() [1/2]

bool guWhiteboard::ParticlePosition::operator== ( const ParticlePosition t_other) const
inline

Definition at line 138 of file ParticlePosition.hpp.

References confidence(), headingInDegrees(), and position().

◆ operator==() [2/2]

bool guWhiteboard::ParticlePosition::operator== ( const wb_particle_position t_other) const
inline

Definition at line 150 of file ParticlePosition.hpp.

References ParticlePosition().

◆ position() [1/2]

Point2D & guWhiteboard::ParticlePosition::position ( )
inline

◆ position() [2/2]

const Point2D & guWhiteboard::ParticlePosition::position ( ) const
inline

Definition at line 165 of file ParticlePosition.hpp.

References wb_particle_position::position.

◆ set_confidence()

void guWhiteboard::ParticlePosition::set_confidence ( const float &  t_newValue)
inline

Definition at line 200 of file ParticlePosition.hpp.

References wb_particle_position::confidence.

Referenced by from_string().

◆ set_headingInDegrees()

void guWhiteboard::ParticlePosition::set_headingInDegrees ( const int16_t &  t_newValue)
inline

Definition at line 185 of file ParticlePosition.hpp.

References wb_particle_position::headingInDegrees.

Referenced by from_string().

◆ set_position()

void guWhiteboard::ParticlePosition::set_position ( const Point2D t_newValue)
inline

Definition at line 170 of file ParticlePosition.hpp.

References wb_particle_position::position.

Referenced by from_string().

◆ to_string()

std::string guWhiteboard::ParticlePosition::to_string ( )
inline

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