The LightRay class describes the lightrays sent into Scene. Because LightRays are sent into Scene right after creation, they are more lines but rays. Rays are organized as a tree, a ray owns all of its successors(). Most of the game logic is still done within LightRay::update().
More...
#include <lightray.h>
|
| LightRay (QObject *parent=0) |
|
virtual | ~LightRay () |
|
virtual void | update (int timeDifference) |
| Updates our game. The player will be moved. More...
|
|
QVector3D | normalizedOrthogonalVector () const |
| Calculates a normalized vector that is orthogonal to direction(). More...
|
|
QVector3D | calculateColor () |
| calculateSuccessorColor calculates the successor color based on its normalized direction The color values are approximately in the range between 0.1 and 0.8 More...
|
|
The LightRay class describes the lightrays sent into Scene. Because LightRays are sent into Scene right after creation, they are more lines but rays. Rays are organized as a tree, a ray owns all of its successors(). Most of the game logic is still done within LightRay::update().
LightRay::LightRay |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
QVector3D LightRay::calculateColor |
( |
| ) |
|
calculateSuccessorColor calculates the successor color based on its normalized direction The color values are approximately in the range between 0.1 and 0.8
- Returns
- The calculated color
void LightRay::calculateSuccessors |
( |
| ) |
|
|
protected |
const QVector3D& LightRay::color |
( |
| ) |
const |
|
slot |
void LightRay::colorChanged |
( |
| ) |
|
|
signal |
const QVector3D& LightRay::direction |
( |
| ) |
const |
|
slot |
const QVector3D& LightRay::endPosition |
( |
| ) |
const |
|
slot |
void LightRay::endPositionChanged |
( |
| ) |
|
|
signal |
bool LightRay::isPlayerBeforeCollisionPoint |
( |
| ) |
|
|
protected |
bool LightRay::isStatic |
( |
| ) |
const |
|
slot |
const QVector3D& LightRay::normalizedDirection |
( |
| ) |
const |
|
slot |
QVector3D LightRay::normalizedOrthogonalVector |
( |
| ) |
const |
Calculates a normalized vector that is orthogonal to direction().
- Returns
Player* LightRay::player |
( |
| ) |
const |
|
slot |
void LightRay::playerChanged |
( |
| ) |
|
|
signal |
Scene* LightRay::scene |
( |
| ) |
const |
|
slot |
void LightRay::sceneChanged |
( |
| ) |
|
|
signal |
LightRay * LightRay::selectedSuccessor |
( |
| ) |
|
|
slot |
Returns the ray the player should move on after reaching end of current ray. In case no successors exists they will be calculated using calculateSuccessors()
- Returns
void LightRay::setColor |
( |
const QVector3D & |
color | ) |
|
|
slot |
void LightRay::setEndPosition |
( |
const QVector3D & |
position | ) |
|
|
slot |
void LightRay::setPlayer |
( |
Player * |
attachedPlayer | ) |
|
|
slot |
void LightRay::setScene |
( |
Scene * |
owningScene | ) |
|
|
slot |
void LightRay::setSelectedSuccessor |
( |
LightRay * |
successor | ) |
|
|
slot |
void LightRay::setStartPosition |
( |
const QVector3D & |
position | ) |
|
|
slot |
void LightRay::setStatic |
( |
| ) |
|
|
slot |
const QVector3D& LightRay::startPosition |
( |
| ) |
const |
|
slot |
void LightRay::startPositionChanged |
( |
| ) |
|
|
signal |
void LightRay::update |
( |
int |
timeDifference | ) |
|
|
virtual |
Updates our game. The player will be moved.
- Parameters
-
timeDifference | Time since last update in milliseconds. |
Reimplemented in GameLostRay.
bool LightRay::m_isStatic |
|
protected |
The documentation for this class was generated from the following files: