TUIO::TuioPoint Class Reference

#include <TuioPoint.h>

Inheritance diagram for TUIO::TuioPoint:

TUIO::TuioContainer TUIO::TuioCursor TUIO::TuioObject

List of all members.

Public Member Functions

 TuioPoint (float xp, float yp)
 TuioPoint (TuioTime ttime, float xp, float yp)
 TuioPoint (TuioPoint *tpoint)
 ~TuioPoint ()
void update (TuioPoint *tpoint)
void update (float xp, float yp)
void update (TuioTime ttime, float xp, float yp)
float getX ()
float getY ()
float getDistance (float xp, float yp)
float getDistance (TuioPoint *tpoint)
float getAngle (float xp, float yp)
float getAngle (TuioPoint *tpoint)
float getAngleDegrees (float xp, float yp)
float getAngleDegrees (TuioPoint *tpoint)
int getScreenX (int width)
int getScreenY (int height)
TuioTime getTuioTime ()

Protected Attributes

float xpos
float ypos
TuioTime currentTime


Detailed Description

The TuioPoint class on the one hand is a simple container and utility class to handle TUIO positions in general, on the other hand the TuioPoint is the base class for the TuioCursor and TuioObject classes.

Author:
Martin Kaltenbrunner
Version:
1.4

Constructor & Destructor Documentation

TUIO::TuioPoint::TuioPoint ( float  xp,
float  yp 
) [inline]

The default constructor takes no arguments and sets its coordinate attributes to zero and its time stamp to the current session time.

TUIO::TuioPoint::TuioPoint ( TuioTime  ttime,
float  xp,
float  yp 
) [inline]

This constructor takes a TuioTime object and two floating point coordinate arguments and sets its coordinate attributes to these values and its time stamp to the provided TUIO time object.

Parameters:
ttime the TuioTime to assign
xp the X coordinate to assign
yp the Y coordinate to assign

TUIO::TuioPoint::TuioPoint ( TuioPoint tpoint  )  [inline]

This constructor takes a TuioPoint argument and sets its coordinate attributes to the coordinates of the provided TuioPoint and its time stamp to the current session time.

Parameters:
tpoint the TuioPoint to assign

TUIO::TuioPoint::~TuioPoint (  )  [inline]

The destructor is doing nothing in particular.


Member Function Documentation

void TUIO::TuioPoint::update ( TuioPoint tpoint  )  [inline]

Takes a TuioPoint argument and updates its coordinate attributes to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.

Parameters:
tpoint the TuioPoint to assign

void TUIO::TuioPoint::update ( float  xp,
float  yp 
) [inline]

Takes two floating point coordinate arguments and updates its coordinate attributes to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.

Parameters:
xp the X coordinate to assign
yp the Y coordinate to assign

void TUIO::TuioPoint::update ( TuioTime  ttime,
float  xp,
float  yp 
) [inline]

Takes a TuioTime object and two floating point coordinate arguments and updates its coordinate attributes to the coordinates of the provided TuioPoint and its time stamp to the provided TUIO time object.

Parameters:
ttime the TuioTime to assign
xp the X coordinate to assign
yp the Y coordinate to assign

Reimplemented in TUIO::TuioContainer.

float TUIO::TuioPoint::getX (  )  [inline]

Returns the X coordinate of this TuioPoint.

Returns:
the X coordinate of this TuioPoint

float TUIO::TuioPoint::getY (  )  [inline]

Returns the Y coordinate of this TuioPoint.

Returns:
the Y coordinate of this TuioPoint

float TUIO::TuioPoint::getDistance ( float  xp,
float  yp 
) [inline]

Returns the distance to the provided coordinates

Parameters:
xp the X coordinate of the distant point
yp the Y coordinate of the distant point
Returns:
the distance to the provided coordinates

float TUIO::TuioPoint::getDistance ( TuioPoint tpoint  )  [inline]

Returns the distance to the provided TuioPoint

Parameters:
tpoint the distant TuioPoint
Returns:
the distance to the provided TuioPoint

float TUIO::TuioPoint::getAngle ( float  xp,
float  yp 
) [inline]

Returns the angle to the provided coordinates

Parameters:
xp the X coordinate of the distant point
yp the Y coordinate of the distant point
Returns:
the angle to the provided coordinates

float TUIO::TuioPoint::getAngle ( TuioPoint tpoint  )  [inline]

Returns the angle to the provided TuioPoint

Parameters:
tpoint the distant TuioPoint
Returns:
the angle to the provided TuioPoint

float TUIO::TuioPoint::getAngleDegrees ( float  xp,
float  yp 
) [inline]

Returns the angle in degrees to the provided coordinates

Parameters:
xp the X coordinate of the distant point
yp the Y coordinate of the distant point
Returns:
the angle in degrees to the provided TuioPoint

float TUIO::TuioPoint::getAngleDegrees ( TuioPoint tpoint  )  [inline]

Returns the angle in degrees to the provided TuioPoint

Parameters:
tpoint the distant TuioPoint
Returns:
the angle in degrees to the provided TuioPoint

int TUIO::TuioPoint::getScreenX ( int  width  )  [inline]

Returns the X coordinate in pixels relative to the provided screen width.

Parameters:
width the screen width
Returns:
the X coordinate of this TuioPoint in pixels relative to the provided screen width

int TUIO::TuioPoint::getScreenY ( int  height  )  [inline]

Returns the Y coordinate in pixels relative to the provided screen height.

Parameters:
height the screen height
Returns:
the Y coordinate of this TuioPoint in pixels relative to the provided screen height

TuioTime TUIO::TuioPoint::getTuioTime (  )  [inline]

Returns current time stamp of this TuioPoint as TuioTime

Returns:
the time stamp of this TuioPoint as TuioTime


Member Data Documentation

float TUIO::TuioPoint::xpos [protected]

X coordinate, representated as a floating point value in a range of 0..1

float TUIO::TuioPoint::ypos [protected]

X coordinate, representated as a floating point value in a range of 0..1

The time stamp of the last update represented as TuioTime (time since session start)


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

Generated on Thu Mar 12 00:21:51 2009 for TUIO C++ Developer API by  doxygen 1.5.6