Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::Cursor Class Reference

The Cursor is an non-visual object that contains a the XYZ values that are modified by a InputReader. More...

#include <OgreCursor.h>

Inheritance diagram for Ogre::Cursor:

Ogre::MouseMotionTarget Ogre::MouseTarget Ogre::PositionTarget Ogre::PositionTarget Ogre::EventTarget List of all members.

Public Methods

 Cursor ()
 ~Cursor ()
void addToX (Real val)
 add relative amount to X. More...

void addToY (Real val)
 add relative amount to Y. More...

void addToZ (Real val)
 add relative amount to Z. More...

void processEvent (InputEvent *e)
 process the mouse events that are for any listeners to the cursor. More...

Real getX () const
 get the current X position of the cursor 0 left, 1 right. More...

Real getY () const
 get the current Y position of the cursor 0 top, 1 bottom. More...

Real getZ () const
 get the current Z position of the cursor 0 none, 1 full. More...

Real getLeft (void) const
 Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right). More...

Real getTop (void) const
 Gets the top of this element in relation to the screen (where 0 = top, 1.0 = bottom). More...

PositionTargetgetPositionTargetParent ()
 The parent of the cursor is NULL as it's position is absolute in the window. More...

void processMouseMotionEvent (MouseEvent *e)
void addMouseMotionListener (MouseMotionListener *l)
void removeMouseMotionListener (MouseMotionListener *l)
void processMouseEvent (MouseEvent *e)
void addMouseListener (MouseListener *l)
void removeMouseListener (MouseListener *l)

Protected Methods

Real limit (Real val, Real low, Real high)
 inline function to clip a value to its low and high limits. More...


Protected Attributes

Real mMouseX
 Cursor position. More...

Real mMouseY
 Cursor position. More...

Real mMouseZ
 Cursor position. More...

Real mXLowLimit
 Cursor limits 0-1. More...

Real mXHighLimit
 Cursor limits 0-1. More...

Real mYLowLimit
 Cursor limits 0-1. More...

Real mYHighLimit
 Cursor limits 0-1. More...

Real mZLowLimit
 Cursor limits 0-1. More...

Real mZHighLimit
 Cursor limits 0-1. More...

Real mScale
 Scale the cursor movements. More...

MouseMotionListenermMouseMotionListener
MouseListenermMouseListener

Detailed Description

The Cursor is an non-visual object that contains a the XYZ values that are modified by a InputReader.

Remarks:
An InputReader creates and contains a Cursor object that it uses when it is set to buffered input (using the EventQueue).
To get a graphical representation of the cursor, a CursorGuiElement is used, which is a MouseMotionListener to the Cursor.


Constructor & Destructor Documentation

Ogre::Cursor::Cursor  
 

Ogre::Cursor::~Cursor  
 


Member Function Documentation

void Ogre::MouseTarget::addMouseListener MouseListener   l [inherited]
 

void Ogre::MouseMotionTarget::addMouseMotionListener MouseMotionListener   l [inherited]
 

void Ogre::Cursor::addToX Real    val
 

add relative amount to X.

void Ogre::Cursor::addToY Real    val
 

add relative amount to Y.

void Ogre::Cursor::addToZ Real    val
 

add relative amount to Z.

Real Ogre::Cursor::getLeft void    const [virtual]
 

Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right).

Implements Ogre::PositionTarget.

PositionTarget * Ogre::Cursor::getPositionTargetParent   [virtual]
 

The parent of the cursor is NULL as it's position is absolute in the window.

Implements Ogre::PositionTarget.

Real Ogre::Cursor::getTop void    const [virtual]
 

Gets the top of this element in relation to the screen (where 0 = top, 1.0 = bottom).

Implements Ogre::PositionTarget.

Real Ogre::Cursor::getX   const
 

get the current X position of the cursor 0 left, 1 right.

Real Ogre::Cursor::getY   const
 

get the current Y position of the cursor 0 top, 1 bottom.

Real Ogre::Cursor::getZ   const
 

get the current Z position of the cursor 0 none, 1 full.

Real Ogre::Cursor::limit Real    val,
Real    low,
Real    high
[inline, protected]
 

inline function to clip a value to its low and high limits.

void Ogre::Cursor::processEvent InputEvent   e [virtual]
 

process the mouse events that are for any listeners to the cursor.

Implements Ogre::EventTarget.

void Ogre::MouseTarget::processMouseEvent MouseEvent   e [inherited]
 

void Ogre::MouseMotionTarget::processMouseMotionEvent MouseEvent   e [inherited]
 

void Ogre::MouseTarget::removeMouseListener MouseListener   l [inherited]
 

void Ogre::MouseMotionTarget::removeMouseMotionListener MouseMotionListener   l [inherited]
 


Member Data Documentation

MouseListener* Ogre::MouseTarget::mMouseListener [protected, inherited]
 

MouseMotionListener* Ogre::MouseMotionTarget::mMouseMotionListener [protected, inherited]
 

Real Ogre::Cursor::mMouseX [protected]
 

Cursor position.

Real Ogre::Cursor::mMouseY [protected]
 

Cursor position.

Real Ogre::Cursor::mMouseZ [protected]
 

Cursor position.

Real Ogre::Cursor::mScale [protected]
 

Scale the cursor movements.

Initially set at 1 (no scaling). The scaling effects all axis, XYZ

Real Ogre::Cursor::mXHighLimit [protected]
 

Cursor limits 0-1.

Real Ogre::Cursor::mXLowLimit [protected]
 

Cursor limits 0-1.

Real Ogre::Cursor::mYHighLimit [protected]
 

Cursor limits 0-1.

Real Ogre::Cursor::mYLowLimit [protected]
 

Cursor limits 0-1.

Real Ogre::Cursor::mZHighLimit [protected]
 

Cursor limits 0-1.

Real Ogre::Cursor::mZLowLimit [protected]
 

Cursor limits 0-1.

Copyright © 2002 by The OGRE Team