Classes | Public Member Functions | Private Member Functions | Private Attributes
PongGame Class Reference

List of all members.

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 48 of file pong.cpp.


Constructor & Destructor Documentation

PongGame::PongGame ( ) [inline]

Definition at line 52 of file pong.cpp.


Member Function Documentation

void PongGame::makeBallMarker ( ) [inline, private]

Definition at line 433 of file pong.cpp.

void PongGame::makeFieldMarker ( ) [inline, private]

Definition at line 310 of file pong.cpp.

void PongGame::makePaddleMarkers ( ) [inline, private]

Definition at line 355 of file pong.cpp.

void PongGame::normalizeVel ( ) [inline, private]

Definition at line 237 of file pong.cpp.

void PongGame::processPaddleFeedback ( unsigned  player,
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &  feedback 
) [inline, private]

Definition at line 203 of file pong.cpp.

bool PongGame::reflect ( float &  pos,
float  last_pos,
float  limit,
float &  t 
) [inline, private]

Definition at line 248 of file pong.cpp.

void PongGame::reset ( ) [inline, private]

Definition at line 226 of file pong.cpp.

void PongGame::setPaddlePos ( unsigned  player,
float  pos 
) [inline, private]

Definition at line 175 of file pong.cpp.

void PongGame::spinOnce ( ) [inline, private]

Definition at line 73 of file pong.cpp.

void PongGame::updateBall ( ) [inline, private]

Definition at line 264 of file pong.cpp.

void PongGame::updateScore ( ) [inline, private]

Definition at line 273 of file pong.cpp.


Member Data Documentation

float PongGame::ball_dir_x_ [private]

Definition at line 486 of file pong.cpp.

float PongGame::ball_dir_y_ [private]

Definition at line 487 of file pong.cpp.

float PongGame::ball_pos_x_ [private]

Definition at line 483 of file pong.cpp.

float PongGame::ball_pos_y_ [private]

Definition at line 484 of file pong.cpp.

InteractiveMarker PongGame::field_marker_ [private]

Definition at line 468 of file pong.cpp.

Definition at line 466 of file pong.cpp.

float PongGame::last_ball_pos_x_ [private]

Definition at line 480 of file pong.cpp.

float PongGame::last_ball_pos_y_ [private]

Definition at line 481 of file pong.cpp.

Definition at line 478 of file pong.cpp.

Definition at line 464 of file pong.cpp.

float PongGame::speed_ [private]

Definition at line 488 of file pong.cpp.


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


interactive_marker_tutorials
Author(s): David Gossow
autogenerated on Sat Dec 28 2013 17:47:29