VizKit
3.3.7
|
Dimensionless asset that contains texture, boxing information, and optional animations. More...
#include <VisualAsset.h>
Public Member Functions | |
VisualAsset () | |
The constructor. | |
~VisualAsset () | |
The destructor. | |
VisualAsset (const VisualAsset &other) | |
Copy constructor. | |
VisualAsset & | operator= (const VisualAsset &other) |
Assignment operator. | |
bool | operator< (const VisualAsset &other) const |
Less than operator. | |
bool | operator== (const VisualAsset &other) const |
Equality operator. | |
bool | operator!= (const VisualAsset &other) const |
Inequality operator. | |
virtual VisualAsset * | clone (void) const |
Copies the current VisualAsset and returns a pointer to a new VisualAsset. | |
VisualStageBox * | getBox (void) const |
Returns the stage box of the asset. | |
void | setCamera (const VisualCamera &cameraRef) |
Sets the dimensions and direction of the camera view. | |
VisualCamera & | getCamera (void) const |
Returns the camera of the asset. | |
VisualStagePosition | getPosition (void) const |
Returns the position of the asset's stage box. | |
void | setPosition (const VisualStagePosition &aPosition) |
Sets the position of the asset's stage box. | |
void | updateCoords (void) |
Updates the coords of the assets. | |
void | setImage (const VisualImage &anImage) |
Sets the image of the asset. | |
bool | hasImage (void) const |
Answers the question whether the asset has image data. | |
VisualImage * | getImage (void) const |
Returns the image data of the asset. | |
void | removeImage (void) |
Removes the image of the asset. | |
void | draw (const VisualItemIdentifier &vertexChainName) const |
Draws the asset. | |
void | draw (void) const |
Draws the asset. | |
void | clear (void) |
Clears the asset. | |
void | setScaleFactor (double aScaleFactor) |
Sets the scale value. | |
double | getScaleFactor (void) const |
Returns the current scale factor. | |
void | setOpacityValue (double anOpacityValue) |
Sets the opacity value (alpha value). | |
double | getOpacityValue (void) const |
Returns the current opacity value (alpha value). | |
void | setRotationAngle (double aRotationAngle) |
Sets the rotation angle value. | |
double | getRotationAngle (void) const |
Returns the current rotation angle value. | |
void | setDebugMode (bool requestedDebugMode) |
Sets the debug mode. | |
bool | getDebugMode (void) |
Returns the current debug mode. | |
void | addAnimation (VisualAnimationComponent &anAnimation) |
Adds an animation to the asset. | |
void | removeAnimations (AnimatedProperty anAnimatedProperty=kUndefinedAnimatedProperty) |
Clears all currently running animations. | |
const VisualAnimationComponent *const | getAnimation (const AnimatedProperty &anAnimatedProperty) const |
Returns the VisualAnimation where the animated property matches. | |
double | getCurrentAnimationValueOfProperty (const AnimatedProperty &anAnimatedProperty) const |
Returns the current animation value of a property which can be animated. | |
double | getCurrentAnimationValueForAnimatedLocation (const VisualStagePosition &startPosition, const VisualStagePosition &stopPosition) const |
Returns the current animation value of an animated VisualStagePosition. | |
void | updateLocation (double currPosition) |
Updates the location for an animation. | |
void | setStartValueVisualStagePosition (const VisualStagePosition &position) |
Sets the start position as it is used for an animation of the VisualStagePosition property of the asset's VisualStageBox. | |
void | setStopValueVisualStagePosition (const VisualStagePosition &position) |
Sets the start position as it is used for an animation of the VisualStagePosition property of the asset's VisualStageBox. | |
Static Public Member Functions | |
static void | animateOpacity (double currentPosition, void *userData) |
Callback function that is called during animation. | |
static void | animateRotation (double currentPosition, void *userData) |
Callback function that is called during animation. | |
static void | animateScaleFactor (double currentPosition, void *userData) |
Callback function that is called during animation. | |
static void | animateLocation (double currentPosition, void *userData) |
Callback function that is called during animation. | |
Private Member Functions | |
void | init (void) |
Initializes the VisualAsset. | |
void | copy (const VisualAsset &other) |
Copy method for assignment operator and copy constructor. | |
void | doDraw (const VertexChain &aVertexChain) const |
Draws a vertex chain (including texture data if available). | |
void | drawBoxOutline (void) const |
Draws the outline of the stage box. | |
Private Attributes | |
VisualImage * | image |
The image of the asset. | |
VisualCamera * | camera |
The camera of the asset. | |
VisualStageBox * | stageBox |
The stage box of the asset. | |
VisualItemIdentifier * | defaultVertexChainIdentifier |
The identifier of the default vertex chain. | |
double | rotationAngle |
The current rotation angle. | |
double | opacityValue |
The current opacity value (alpha value). | |
double | scaleFactor |
The current scale factor value. | |
VisualStagePosition | startValueVisualStagePosition |
The start value of an animation of the VisualStagePosition property. | |
VisualStagePosition | stopValueVisualStagePosition |
The stop value of an animation of the VisualStagePosition property. |
Dimensionless asset that contains texture, boxing information, and optional animations.
The constructor.
The destructor.
VisualAsset::VisualAsset | ( | const VisualAsset & | other | ) |
Copy constructor.
other | Reference to another VisualAsset. |
void VisualAsset::addAnimation | ( | VisualAnimationComponent & | anAnimation | ) |
Adds an animation to the asset.
anAnimation | Reference to an animation. |
void VisualAsset::animateLocation | ( | double | currentPosition, |
void * | userData | ||
) | [static] |
Callback function that is called during animation.
currentPosition | The current position of the animation. |
userData | Pointer to VisualAsset instance. |
void VisualAsset::animateOpacity | ( | double | currentPosition, |
void * | userData | ||
) | [static] |
Callback function that is called during animation.
currentPosition | The current position of the animation. |
userData | Pointer to VisualAsset instance. |
void VisualAsset::animateRotation | ( | double | currentPosition, |
void * | userData | ||
) | [static] |
Callback function that is called during animation.
currentPosition | The current position of the animation. |
userData | Pointer to VisualAsset instance. |
void VisualAsset::animateScaleFactor | ( | double | currentPosition, |
void * | userData | ||
) | [static] |
Callback function that is called during animation.
currentPosition | The current position of the animation. |
userData | Pointer to VisualAsset instance. |
void VisualAsset::clear | ( | void | ) |
Clears the asset.
VisualAsset * VisualAsset::clone | ( | void | ) | const [virtual] |
Copies the current VisualAsset and returns a pointer to a new VisualAsset.
Implements VizKit::VisualObject.
void VisualAsset::copy | ( | const VisualAsset & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
other | Another VisualAsset. |
void VisualAsset::doDraw | ( | const VertexChain & | aVertexChain | ) | const [private] |
Draws a vertex chain (including texture data if available).
aVertexChain | Vertex chain to draw. |
void VisualAsset::draw | ( | const VisualItemIdentifier & | vertexChainName | ) | const |
Draws the asset.
vertexChainName | The identifier of the VertexChain to draw. |
void VisualAsset::draw | ( | void | ) | const |
Draws the asset.
void VisualAsset::drawBoxOutline | ( | void | ) | const [private] |
Draws the outline of the stage box.
const VisualAnimationComponent *const VisualAsset::getAnimation | ( | const AnimatedProperty & | anAnimatedProperty | ) | const |
Returns the VisualAnimation where the animated property matches.
anAnimatedProperty | Parameter that specifies the animated property of the animation. |
VisualStageBox * VisualAsset::getBox | ( | void | ) | const |
Returns the stage box of the asset.
The stage box is the bounding box.
VisualCamera & VisualAsset::getCamera | ( | void | ) | const |
Returns the camera of the asset.
double VisualAsset::getCurrentAnimationValueForAnimatedLocation | ( | const VisualStagePosition & | startPosition, |
const VisualStagePosition & | stopPosition | ||
) | const |
Returns the current animation value of an animated VisualStagePosition.
startPosition | The start position. |
stopPosition | The stop position. |
double VisualAsset::getCurrentAnimationValueOfProperty | ( | const AnimatedProperty & | anAnimatedProperty | ) | const |
Returns the current animation value of a property which can be animated.
anAnimatedProperty | Parameter that specifies the queried property of the animation. |
bool VisualAsset::getDebugMode | ( | void | ) |
Returns the current debug mode.
VisualImage * VisualAsset::getImage | ( | void | ) | const |
Returns the image data of the asset.
double VisualAsset::getOpacityValue | ( | void | ) | const |
Returns the current opacity value (alpha value).
VisualStagePosition VisualAsset::getPosition | ( | void | ) | const |
Returns the position of the asset's stage box.
double VisualAsset::getRotationAngle | ( | void | ) | const |
Returns the current rotation angle value.
double VisualAsset::getScaleFactor | ( | void | ) | const |
Returns the current scale factor.
bool VisualAsset::hasImage | ( | void | ) | const |
Answers the question whether the asset has image data.
void VisualAsset::init | ( | void | ) | [private] |
Initializes the VisualAsset.
bool VisualAsset::operator!= | ( | const VisualAsset & | other | ) | const |
Inequality operator.
other | Another VisualAsset. |
bool VisualAsset::operator< | ( | const VisualAsset & | other | ) | const |
Less than operator.
other | Another VisualAsset. |
VisualAsset & VisualAsset::operator= | ( | const VisualAsset & | other | ) |
Assignment operator.
other | Reference to another VisualAsset. |
bool VisualAsset::operator== | ( | const VisualAsset & | other | ) | const |
Equality operator.
other | Another VisualAsset. |
void VisualAsset::removeAnimations | ( | AnimatedProperty | anAnimatedProperty = kUndefinedAnimatedProperty | ) |
Clears all currently running animations.
anAnimatedProperty | Optional parameter that specifies the animated property of the animations. With default argument kUndefinedAnimatedProperty, all animations are removed. |
void VisualAsset::removeImage | ( | void | ) |
Removes the image of the asset.
void VisualAsset::setCamera | ( | const VisualCamera & | cameraRef | ) |
Sets the dimensions and direction of the camera view.
cameraRef | Camera whose dimensions and direction should be used by asset. |
void VisualAsset::setDebugMode | ( | bool | requestedDebugMode | ) |
Sets the debug mode.
requestedDebugMode | The debug mode. True turns debug mode on, false turns it off. |
void VisualAsset::setImage | ( | const VisualImage & | anImage | ) |
Sets the image of the asset.
anImage | Reference to the image. |
void VisualAsset::setOpacityValue | ( | double | anOpacityValue | ) |
Sets the opacity value (alpha value).
anOpacityValue | The opacity value (alpha value). |
void VisualAsset::setPosition | ( | const VisualStagePosition & | aPosition | ) |
Sets the position of the asset's stage box.
aPosition | The requested position of the asset's stage box. |
void VisualAsset::setRotationAngle | ( | double | aRotationAngle | ) |
Sets the rotation angle value.
aRotationAngle | The requested rotation angle. |
void VisualAsset::setScaleFactor | ( | double | aScaleFactor | ) |
Sets the scale value.
aScaleFactor | The factor by which the size of the asset should be multiplied when rendered. |
void VisualAsset::setStartValueVisualStagePosition | ( | const VisualStagePosition & | position | ) |
Sets the start position as it is used for an animation of the VisualStagePosition property of the asset's VisualStageBox.
position | The start position. |
void VisualAsset::setStopValueVisualStagePosition | ( | const VisualStagePosition & | position | ) |
Sets the start position as it is used for an animation of the VisualStagePosition property of the asset's VisualStageBox.
position | The start position. |
void VisualAsset::updateCoords | ( | void | ) |
Updates the coords of the assets.
void VisualAsset::updateLocation | ( | double | currPosition | ) |
Updates the location for an animation.
currPosition | The current position of the animation. |
VisualCamera* VizKit::VisualAsset::camera [private] |
The camera of the asset.
The identifier of the default vertex chain.
VisualImage* VizKit::VisualAsset::image [private] |
The image of the asset.
double VizKit::VisualAsset::opacityValue [private] |
The current opacity value (alpha value).
double VizKit::VisualAsset::rotationAngle [private] |
The current rotation angle.
double VizKit::VisualAsset::scaleFactor [private] |
The current scale factor value.
VisualStageBox* VizKit::VisualAsset::stageBox [private] |
The stage box of the asset.
The start value of an animation of the VisualStagePosition property.
The stop value of an animation of the VisualStagePosition property.