wavelength 1.0.0
Loading...
Searching...
No Matches
tnlpath.h
Go to the documentation of this file.
1#pragma once
2
3#include "math/interpolator.h"
4#include "math/transform.h"
5#include "rnd/rndtransanim.h"
6
13class TnlPath {
14public:
16 class Segment {
17 public:
20 Reset();
21 }
22
29 void Reset();
30
43 void Xfm(float flTick, float flTime, Transform *pXfm) const;
44
46 int mLoop;
48 float mOffset;
49 float mLoopStart;
50 float mLoopEnd;
51 };
52
60
74 void Set(RndTransAnim *pAnim,
75 int bLoop,
76 int bUseTime,
77 float flStart,
78 float flFrame,
79 float flLoopStart,
80 float flLoopEnd);
81
96 void BlendTo(RndTransAnim *pAnim,
97 int bLoop,
98 int bUseTime,
99 float flLength,
100 float flStart,
101 float flFrame,
102 float flLoopStart,
103 float flLoopEnd);
104
114 void Xfm(float flTick, float flTime, Transform *pXfm);
115
117
124 const Segment &GetSegment(int nSegment) const {
125 return mSegments[nSegment];
126 }
127
128private:
129 Segment mSegments[2];
130
132 LinearInterpolator mBlend;
133};
Straight-line interpolator.
Definition interpolator.h:99
Animation of a transformable's local transform by rotation, translation, and scale keys.
Definition rndtransanim.h:20
One transform animation of the path, 0x18 bytes.
Definition tnlpath.h:16
float mLoopStart
Definition tnlpath.h:49
RndTransAnim * mAnim
Definition tnlpath.h:45
void Reset()
Clear the segment.
int mLoop
Definition tnlpath.h:46
void Xfm(float flTick, float flTime, Transform *pXfm) const
Work out the transform of the segment.
float mOffset
Definition tnlpath.h:48
Segment()
Construct a clear segment.
Definition tnlpath.h:19
float mLoopEnd
Definition tnlpath.h:50
int mUseTime
Definition tnlpath.h:47
const Segment & GetSegment(int nSegment) const
The segment that is blended out, then the segment in use.
Definition tnlpath.h:124
void Set(RndTransAnim *pAnim, int bLoop, int bUseTime, float flStart, float flFrame, float flLoopStart, float flLoopEnd)
Replace the animation at once.
void BlendTo(RndTransAnim *pAnim, int bLoop, int bUseTime, float flLength, float flStart, float flFrame, float flLoopStart, float flLoopEnd)
Blend from the animation in use to a new one.
TnlPath()
Construct a path with no animation.
void Xfm(float flTick, float flTime, Transform *pXfm)
Work out the transform of the path.
Two points that fix a line or a segment.
Definition plane.h:39
Affine transform stored as three basis rows and a translation row.
Definition transform.h:18