![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
PURE class for PUT (position, up and target) vectors. More...
PURE class for PUT (position, up and target) vectors.
PURE uses the left-handed Cartesian coordinate system. This means the XZ plane is horizontal, the XY and and YZ planes are vertical, a positive X value means right, a positive Y value means up, and a positive Z value means forward.
Definition at line 26 of file PurePosUpTarget.h.
#include <PurePosUpTarget.h>
Public Member Functions | |
PurePosUpTarget () | |
Initializes the position vector to [0,0,0], the up vector to [0,1,0] and the target vector to [0,0,1]. | |
PurePosUpTarget (const PurePosUpTarget &cm) | |
PurePosUpTarget (const PureVector &pos, const PureVector &target, const PureVector &up) | |
Initializes the position, up and target vectors with the given vectors. | |
PureVector & | getPosVec () |
Gets Position vector. | |
const PureVector & | getPosVec () const |
Gets Position vector. | |
PureVector & | getTargetVec () |
Gets Target vector. | |
const PureVector & | getTargetVec () const |
Gets Target vector. | |
PureVector & | getUpVec () |
Gets Up vector. | |
const PureVector & | getUpVec () const |
Gets Up vector. | |
void | Move (TPureFloat amount) |
Moves forward or backward by the specified amount based on current direction. | |
void | Strafe (TPureFloat amount) |
Moves horizontally by the specified amount based on current direction. | |
void | Elevate (TPureFloat amount) |
Changes Y-position by the specified amount. | |
void | SetRotation (TPureFloat x, TPureFloat y, TPureFloat z) |
Sets direction. | |
TPureBool | operator== (const PurePosUpTarget &clr) const |
Equals to operator. | |
TPureBool | operator!= (const PurePosUpTarget &clr) const |
Not equals to operator. | |
PurePosUpTarget & | operator= (const PurePosUpTarget &vec) |
Assignment operator. | |
Private Attributes | |
PureVector | vPos |
PureVector | vTarget |
PureVector | vUp |
Position (eye), target (focus or view), up vectors. | |
PurePosUpTarget::PurePosUpTarget | ( | ) |
Initializes the position vector to [0,0,0], the up vector to [0,1,0] and the target vector to [0,0,1].
Definition at line 21 of file PurePosUpTarget.cpp.
PurePosUpTarget::PurePosUpTarget | ( | const PurePosUpTarget & | cm | ) |
Definition at line 28 of file PurePosUpTarget.cpp.
PurePosUpTarget::PurePosUpTarget | ( | const PureVector & | pos, |
const PureVector & | target, | ||
const PureVector & | up ) |
Initializes the position, up and target vectors with the given vectors.
Definition at line 38 of file PurePosUpTarget.cpp.
void PurePosUpTarget::Elevate | ( | TPureFloat | amount | ) |
Changes Y-position by the specified amount.
Definition at line 141 of file PurePosUpTarget.cpp.
PureVector & PurePosUpTarget::getPosVec | ( | ) |
Gets Position vector.
By default it is (0,0,0). We are looking from the Position vector to the Target vector. Changing the Position vector will result in changing the pitch and/or the yaw i.e. rotation along the X- and/or the Y-axis. If you don't want to change pitch and yaw, apply the same change to the Target vector as well: use the Move()/Strafe()/Elevate() functions.
Definition at line 52 of file PurePosUpTarget.cpp.
const PureVector & PurePosUpTarget::getPosVec | ( | ) | const |
Gets Position vector.
By default it is (0,0,0). We are looking from the Position vector to the Target vector. Changing the Position vector will result in changing the pitch and/or the yaw i.e. rotation along the X- and/or the Y-axis. If you don't want to change pitch and yaw, apply the same change to the Target vector as well: use the Move()/Strafe()/Elevate() functions.
Definition at line 64 of file PurePosUpTarget.cpp.
PureVector & PurePosUpTarget::getTargetVec | ( | ) |
Gets Target vector.
We are looking from the Position vector to the Target vector. By default it is (0,0,1) which means 0 degrees pitch and yaw together with the default (0,0,0) Position vector. Changing the Target vector will result in changing the pitch and/or the yaw i.e. rotation along the X- and/or the Y-axis. If you don't want to change pitch and yaw, apply the same change to the Position vector as well: use the Move()/Strafe()/Elevate() functions.
Definition at line 76 of file PurePosUpTarget.cpp.
const PureVector & PurePosUpTarget::getTargetVec | ( | ) | const |
Gets Target vector.
We are looking from the Position vector to the Target vector. By default it is (0,0,1) which means 0 degrees pitch and yaw together with the default (0,0,0) Position vector. Changing the Target vector will result in changing the pitch and/or the yaw i.e. rotation along the X- and/or the Y-axis. If you don't want to change pitch and yaw, apply the same change to the Position vector as well: use the Move()/Strafe()/Elevate() functions.
Definition at line 88 of file PurePosUpTarget.cpp.
PureVector & PurePosUpTarget::getUpVec | ( | ) |
Gets Up vector.
By default it is (0,1,0) meaning 0 degrees roll. Changing the Up vector results in rotation along the Z axis.
Definition at line 98 of file PurePosUpTarget.cpp.
const PureVector & PurePosUpTarget::getUpVec | ( | ) | const |
Gets Up vector.
By default it is (0,1,0) meaning 0 degrees roll. Changing the Up vector results in rotation along the Z axis.
Definition at line 108 of file PurePosUpTarget.cpp.
void PurePosUpTarget::Move | ( | TPureFloat | amount | ) |
Moves forward or backward by the specified amount based on current direction.
Definition at line 116 of file PurePosUpTarget.cpp.
TPureBool PurePosUpTarget::operator!= | ( | const PurePosUpTarget & | clr | ) | const |
Not equals to operator.
Definition at line 183 of file PurePosUpTarget.cpp.
PurePosUpTarget & PurePosUpTarget::operator= | ( | const PurePosUpTarget & | vec | ) |
Assignment operator.
Definition at line 192 of file PurePosUpTarget.cpp.
TPureBool PurePosUpTarget::operator== | ( | const PurePosUpTarget & | clr | ) | const |
Equals to operator.
Definition at line 174 of file PurePosUpTarget.cpp.
void PurePosUpTarget::SetRotation | ( | TPureFloat | x, |
TPureFloat | y, | ||
TPureFloat | z ) |
Sets direction.
Definition at line 150 of file PurePosUpTarget.cpp.
void PurePosUpTarget::Strafe | ( | TPureFloat | amount | ) |
Moves horizontally by the specified amount based on current direction.
Definition at line 127 of file PurePosUpTarget.cpp.
|
private |
Definition at line 67 of file PurePosUpTarget.h.
|
private |
Definition at line 67 of file PurePosUpTarget.h.
|
private |
Position (eye), target (focus or view), up vectors.
Definition at line 67 of file PurePosUpTarget.h.