Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
PongGame Class Reference

Classes

struct  PlayerContext
 

Public Member Functions

 PongGame ()
 

Private Member Functions

void makeBallMarker ()
 
void makeFieldMarker ()
 
void makePaddleMarkers ()
 
void normalizeVel ()
 
void processPaddleFeedback (unsigned player, const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
 
bool reflect (float &pos, float last_pos, float limit, float &t)
 
void reset ()
 
void setPaddlePos (unsigned player, float pos)
 
void spinOnce ()
 
void updateBall ()
 
void updateScore ()
 

Private Attributes

float ball_dir_x_
 
float ball_dir_y_
 
float ball_pos_x_
 
float ball_pos_y_
 
InteractiveMarker field_marker_
 
ros::Timer game_loop_timer_
 
float last_ball_pos_x_
 
float last_ball_pos_y_
 
std::vector< PlayerContextplayer_contexts_
 
interactive_markers::InteractiveMarkerServer server_
 
float speed_
 

Detailed Description

Definition at line 50 of file pong.cpp.

Constructor & Destructor Documentation

PongGame::PongGame ( )
inline

Definition at line 54 of file pong.cpp.

Member Function Documentation

void PongGame::makeBallMarker ( )
inlineprivate

Definition at line 436 of file pong.cpp.

void PongGame::makeFieldMarker ( )
inlineprivate

Definition at line 312 of file pong.cpp.

void PongGame::makePaddleMarkers ( )
inlineprivate

Definition at line 357 of file pong.cpp.

void PongGame::normalizeVel ( )
inlineprivate

Definition at line 239 of file pong.cpp.

void PongGame::processPaddleFeedback ( unsigned  player,
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &  feedback 
)
inlineprivate

Definition at line 205 of file pong.cpp.

bool PongGame::reflect ( float &  pos,
float  last_pos,
float  limit,
float &  t 
)
inlineprivate

Definition at line 250 of file pong.cpp.

void PongGame::reset ( )
inlineprivate

Definition at line 228 of file pong.cpp.

void PongGame::setPaddlePos ( unsigned  player,
float  pos 
)
inlineprivate

Definition at line 177 of file pong.cpp.

void PongGame::spinOnce ( )
inlineprivate

Definition at line 75 of file pong.cpp.

void PongGame::updateBall ( )
inlineprivate

Definition at line 266 of file pong.cpp.

void PongGame::updateScore ( )
inlineprivate

Definition at line 275 of file pong.cpp.

Member Data Documentation

float PongGame::ball_dir_x_
private

Definition at line 490 of file pong.cpp.

float PongGame::ball_dir_y_
private

Definition at line 491 of file pong.cpp.

float PongGame::ball_pos_x_
private

Definition at line 487 of file pong.cpp.

float PongGame::ball_pos_y_
private

Definition at line 488 of file pong.cpp.

InteractiveMarker PongGame::field_marker_
private

Definition at line 472 of file pong.cpp.

ros::Timer PongGame::game_loop_timer_
private

Definition at line 470 of file pong.cpp.

float PongGame::last_ball_pos_x_
private

Definition at line 484 of file pong.cpp.

float PongGame::last_ball_pos_y_
private

Definition at line 485 of file pong.cpp.

std::vector<PlayerContext> PongGame::player_contexts_
private

Definition at line 482 of file pong.cpp.

Definition at line 468 of file pong.cpp.

float PongGame::speed_
private

Definition at line 492 of file pong.cpp.


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


interactive_marker_tutorials
Author(s): David Gossow
autogenerated on Fri Feb 1 2019 03:33:34