wavelength 1.0.0
Loading...
Searching...
No Matches
gfxutil.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "math/key.h"
6#include "math/vector2.h"
7#include "math/vector3.h"
8#include "rnd/rndanimatable.h"
9#include "rnd/rndmesh.h"
10#include "rnd/rndparticlesys.h"
12#include "rnd/rndview.h"
13#include "script/dataarray.h"
14
15// Helpers the display shares between its effects. The names are inferred.
16
25void DetachView(RndView *pParent, RndView *pChild);
26
35void AttachView(RndView *pParent, RndView *pChild);
36
48void SetFilterScale(RndAnimatable *pAnim, float fScale);
49
58void Rotate(Vector2 *pPoint, float fAngle);
59
72void BuildTrackArc(std::vector<Vector2> *pPoints, DataArray *pConfig);
73
82void ResetXfmTree(RndTransformable *pRoot, bool bReset);
83
94
103void ScaleTransKeys(const char *pszName, float fScale);
104
113void ScaleKeys(std::vector<Key<Vector3>> &keys, float fScale);
114
118struct FloatKey {
119 float mValue;
120 float mFrame;
121};
122
132void LoadFloatKeys(DataArray *pData, std::vector<FloatKey> *pKeys);
133
144void InterpBasis(const float *pFrom, const float *pTo, float *pOut, float fBlend);
145
155
164void ScaleParticles(RndParticleSys *pSys, float fScale);
165
174void ScaleParticleTree(RndTransformable *pRoot, float fScale);
Reference-counted array of script data nodes.
Definition dataarray.h:20
Mix-in for an object driven by a frame.
Definition rndanimatable.h:16
ZMode
How drawing reads and writes depth.
Definition rndmesh.h:34
ZFunc
The depth comparison.
Definition rndmesh.h:43
Emitter that spawns, moves, and fades a population of particles.
Definition rndparticlesys.h:69
Mix-in for an object with a local transform and a world transform derived from its parent's.
Definition rndtransformable.h:17
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
void SetFilterScale(RndAnimatable *pAnim, float fScale)
Change the rate of the scale-offset filter in the first slot of an animation, keeping the filtered fr...
void ScaleParticleTree(RndTransformable *pRoot, float fScale)
Scale every particle system of a transform tree with ScaleParticles().
void LoadFloatKeys(DataArray *pData, std::vector< FloatKey > *pKeys)
Read a curve of (value frame) pairs from a script array, replacing the keys and sorting them by frame...
void Rotate(Vector2 *pPoint, float fAngle)
Turn a point about the origin.
void SetZModeTree(RndTransformable *pRoot, RndMesh::ZMode zMode, RndMesh::ZFunc zFunc)
Set the depth test of every mesh under a transform, recursively.
void BuildTrackArc(std::vector< Vector2 > *pPoints, DataArray *pConfig)
Place the cross section points of the tracks along an arc that is symmetric about the Y axis.
void InterpBasis(const float *pFrom, const float *pTo, float *pOut, float fBlend)
Blend the rotations of two transforms through quaternions.
void ScaleParticles(RndParticleSys *pSys, float fScale)
Scale the size and the force of the particles of a particle system.
void ResetXfmTree(RndTransformable *pRoot, bool bReset)
Give every transform under a transform the identity as its local transform.
void ClearMeshSpheres(RndTransformable *pRoot)
Give every mesh under a transform a bounding sphere at the origin of radius 0, the mark of a mesh wit...
void ScaleKeys(std::vector< Key< Vector3 > > &keys, float fScale)
Scale the values of position keys.
void DetachView(RndView *pParent, RndView *pChild)
Take a view out of the draws, the animations, the transforms, and the collisions of another.
void AttachView(RndView *pParent, RndView *pChild)
Add a view to the draws, the animations, and the transforms of another.
void ScaleTransKeys(const char *pszName, float fScale)
Scale the translation keys of a transform animation.
One key of a curve of floats, sorted by frame.
Definition gfxutil.h:118
float mValue
Definition gfxutil.h:119
float mFrame
Definition gfxutil.h:120
One keyframe of an animation channel, a value at a frame.
Definition key.h:21
Two-component vector, used for texture coordinates.
Definition vector2.h:12