1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: TemplateCTrackKeyFramerTCB< CKeyT, T > class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"> <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>CTrackKeyFramerTCB< CKeyT, T > Class Template Reference</h1><code>#include <<a class="el" href="a06566.html">track_tcb.h</a>></code>
<p>
<p>Inheritance diagram for CTrackKeyFramerTCB< CKeyT, T >:
<p><center><img src="a03581.png" usemap="#CTrackKeyFramerTCB< CKeyT, T >_map" border="0" alt=""></center>
<map name="CTrackKeyFramerTCB< CKeyT, T >_map">
<area href="a03471.html" alt="CTCBTools< CKeyT, T, TMapTimeCKey >" shape="rect" coords="0,0,251,24">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template<class CKeyT, class T><br>
class CTrackKeyFramerTCB< CKeyT, T ></h3>
ITrack implementation for TCB keyframer.<p>
<dl compact><dt><b>Author:</b></dt><dd>Cyril 'Hulud' Corvazier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00202">202</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual const IAnimatedValue & </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBa0">getValue</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">From ITrack. <a href="#CTrackKeyFramerTCBa0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef CKeyT::TValueType </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBx0">TKeyValueType</a></td></tr>
<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">From ITrackKeyFramer</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBz1013_0">compile</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">compile (precalc). <a href="#CTrackKeyFramerTCBz1013_0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBz1013_1">evalKey</a> (const CKeyT *previous, const CKeyT *next, TAnimationTime datePrevious, TAnimationTime dateNext, TAnimationTime date)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">evalKey (runtime). <a href="#CTrackKeyFramerTCBz1013_1"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef TMapTimeCKey::iterator </td><td class="memItemRight" valign=bottom><a class="el" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4y0">TMapTimeCKeyIterator</a></td></tr>
<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d0">compileTCBEase</a> (TMapTimeCKey &mapKey, bool loopMode)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">compute TCB ease information. <a href="#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBd1">computeFirstKey</a> (CKeyT &keyFirst, CKeyT &keyAfter)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d1">computeHermiteBasis</a> (float d, float hb[4])</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBd3">computeLastKey</a> (CKeyT &keyLast, CKeyT &keyBefore)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d2">computeTCBFactors</a> (const CKeyT &key, float timeBefore, float time, float timeAfter, float rangeDelta, bool firstKey, bool endKey, bool isLoop, float &ksm, float &ksp, float &kdm, float &kdp)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBd5">computeTCBKey</a> (CKeyT &keyBefore, CKeyT &key, CKeyT &keyAfter, float timeBefore, float time, float timeAfter, float rangeDelta, bool firstKey, bool endKey, bool isLoop)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBd6">computeTCBKeyLinear</a> (CKeyT &key0, CKeyT &key1)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d4">ease</a> (const CKeyT *key, float d)</td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>CAnimatedValueBlendable< T > </td><td class="memItemRight" valign=bottom><a class="el" href="a03581.html#CTrackKeyFramerTCBr0">_Value</a></td></tr>
</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="CTrackKeyFramerTCBx0" doxytag="CTrackKeyFramerTCB::TKeyValueType" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> typedef CKeyT::TValueType <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::<a class="el" href="a03581.html#CTrackKeyFramerTCBx0">TKeyValueType</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00215">215</a> of file <a class="el" href="a06566.html">track_tcb.h</a>. </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4y0" doxytag="CTrackKeyFramerTCB::TMapTimeCKeyIterator" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T, class TMapTimeCKey> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> typedef TMapTimeCKey::iterator <a class="el" href="a03471.html">CTCBTools</a>< CKeyT, T, TMapTimeCKey >::<a class="el" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4y0">TMapTimeCKeyIterator</a><code> [protected, inherited]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00051">51</a> of file <a class="el" href="a06566.html">track_tcb.h</a>. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="CTrackKeyFramerTCBz1013_0" doxytag="CTrackKeyFramerTCB::compile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> virtual void <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::compile </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, protected, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
compile (precalc).
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00253">253</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
References <a class="el" href="a06566.html#l00056">CTCBTools< CKeyT, T, TMapTimeCKey >::compileTCBEase()</a>, <a class="el" href="a06566.html#l00359">CTrackKeyFramerTCB< CKeyT, T >::computeFirstKey()</a>, <a class="el" href="a06566.html#l00367">CTrackKeyFramerTCB< CKeyT, T >::computeLastKey()</a>, <a class="el" href="a06566.html#l00326">CTrackKeyFramerTCB< CKeyT, T >::computeTCBKey()</a>, <a class="el" href="a06566.html#l00346">CTrackKeyFramerTCB< CKeyT, T >::computeTCBKeyLinear()</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
<p>
<div class="fragment"><pre>00254 {
00255 ITrackKeyFramer<CKeyT>::compile();
00256
00257 <span class="comment">// Ease Precompute.</span>
00258 <a class="code" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d0">compileTCBEase</a>(_MapKey, getLoopMode());
00259
00260
00261 <span class="comment">// Tangents Precompute.</span>
00262 <a class="code" href="a04558.html#a14">sint</a> nKeys= _MapKey.size();
00263 <span class="keywordflow">if</span>(nKeys<=1)
00264 <span class="keywordflow">return</span>;
00265
00266 <span class="keyword">typename</span> std::map<TAnimationTime, CKeyT>::iterator it= _MapKey.begin(); <span class="comment">// first key.</span>
00267 <span class="keyword">typename</span> std::map<TAnimationTime, CKeyT>::iterator itNext= it; itNext++; <span class="comment">// second key.</span>
00268 <span class="keyword">typename</span> std::map<TAnimationTime, CKeyT>::iterator itPrev= _MapKey.end(); itPrev--; <span class="comment">// last key.</span>
00269
00270 <span class="keywordflow">if</span>(nKeys==2 && !getLoopMode())
00271 {
00272 <a class="code" href="a03581.html#CTrackKeyFramerTCBd6">computeTCBKeyLinear</a>( it->second, itNext->second );
00273 }
00274 <span class="keywordflow">else</span>
00275 {
00276 <span class="comment">// rangeDelta is the length of effective Range - length of LastKey-FirstKey.</span>
00277 <span class="comment">// NB: if RangeLock, rangeDelta==0.</span>
00278 <span class="keywordtype">float</span> rangeDelta;
00279 <span class="comment">// NB: _RangeDelta has just been compiled in ITrackKeyFramer<CKeyT>::compile().</span>
00280 rangeDelta= getCompiledRangeDelta();
00281
00282 <span class="comment">// Compute all middle keys.</span>
00283 <span class="keywordflow">for</span>(;it!=_MapKey.end();)
00284 {
00285 <span class="comment">// Do the first key and the last key only in LoopMode.</span>
00286 <span class="comment">// NB: we are the last if itNext==_MapKey.begin().</span>
00287 <span class="keywordflow">if</span>(getLoopMode() || (it!=_MapKey.begin() && itNext!=_MapKey.begin()) )
00288 {
00289 <a class="code" href="a03581.html#CTrackKeyFramerTCBd5">computeTCBKey</a>(itPrev->second, it->second, itNext->second,
00290 itPrev->first, it->first, itNext->first, rangeDelta,
00291 it==_MapKey.begin(), itNext==_MapKey.begin(), getLoopMode());
00292 }
00293
00294 <span class="comment">// Next key!!</span>
00295 itPrev= it;
00296 it++;
00297 itNext++;
00298 <span class="comment">// loop.</span>
00299 <span class="keywordflow">if</span>(itNext==_MapKey.end())
00300 itNext= _MapKey.begin();
00301 }
00302
00303 <span class="comment">// In not loop mode, compute first and last key, AFTER middle keys computed.</span>
00304 <span class="keywordflow">if</span>(!getLoopMode())
00305 {
00306 <span class="keyword">typename</span> std::map<TAnimationTime, CKeyT>::iterator it0= _MapKey.begin(); <span class="comment">// first key.</span>
00307 <span class="keyword">typename</span> std::map<TAnimationTime, CKeyT>::iterator it1= it0; it1++; <span class="comment">// second key.</span>
00308 <span class="keyword">typename</span> std::map<TAnimationTime, CKeyT>::iterator itLast= _MapKey.end();itLast--; <span class="comment">// last key.</span>
00309 <span class="keyword">typename</span> std::map<TAnimationTime, CKeyT>::iterator itLastPrev= itLast;itLastPrev--; <span class="comment">// prev of last key.</span>
00310
00311 <a class="code" href="a03581.html#CTrackKeyFramerTCBd1">computeFirstKey</a>(it0->second, it1->second);
00312 <a class="code" href="a03581.html#CTrackKeyFramerTCBd3">computeLastKey</a>(itLast->second, itLastPrev->second);
00313 }
00314 }
00315 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d0" doxytag="CTrackKeyFramerTCB::compileTCBEase" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T, class TMapTimeCKey> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a03471.html">CTCBTools</a>< CKeyT, T, TMapTimeCKey >::compileTCBEase </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">TMapTimeCKey & </td>
<td class="mdname" nowrap> <em>mapKey</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>loopMode</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, protected, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
compute TCB ease information.
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00056">56</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
Referenced by <a class="el" href="a06566.html#l00430">CTrackKeyFramerTCB< CKeyTCBQuat, NLMISC::CAngleAxis >::compile()</a>, and <a class="el" href="a06566.html#l00253">CTrackKeyFramerTCB< CKeyT, T >::compile()</a>.
<p>
<div class="fragment"><pre>00057 {
00058 <a class="code" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4y0">TMapTimeCKeyIterator</a> it= mapKey.begin();
00059 <span class="keywordflow">for</span>(;it!=mapKey.end();it++)
00060 {
00061 <a class="code" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4y0">TMapTimeCKeyIterator</a> next= it;
00062 next++;
00063
00064 <span class="comment">// loop mgt. must compute ease from last to first (usefull if _RangeLock is false).</span>
00065 <span class="keywordflow">if</span>(next==mapKey.end() && loopMode && mapKey.size()>1)
00066 next= mapKey.begin();
00067
00068 <span class="comment">// Ease Precompute.</span>
00069 <span class="comment">//=================</span>
00070 CKeyT &key= it->second;
00071 <span class="keywordflow">if</span>(next!=mapKey.end())
00072 {
00073 <span class="keywordtype">float</span> e0= it->second.EaseFrom;
00074 <span class="keywordtype">float</span> e1= next->second.EaseTo;
00075 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a626">s</a> = e0 + e1;
00076
00077 <span class="comment">// "normalize".</span>
00078 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a626">s</a> > 1.0f)
00079 {
00080 e0 = e0/<a class="code" href="a04223.html#a626">s</a>;
00081 e1 = e1/<a class="code" href="a04223.html#a626">s</a>;
00082 }
00083
00084 <span class="comment">// precalc ease factors.</span>
00085 key.Ease0= e0;
00086 key.Ease1= e1;
00087 key.EaseK= 1/(2.0f - e0 - e1);
00088 <span class="keywordflow">if</span>(e0)
00089 key.EaseKOverEase0= key.EaseK / e0;
00090 <span class="keywordflow">if</span>(e1)
00091 key.EaseKOverEase1= key.EaseK / e1;
00092 }
00093 <span class="keywordflow">else</span>
00094 {
00095 <span class="comment">// force ease() to just return d (see ease()).</span>
00096 key.EaseK = 0.5f;
00097 }
00098
00099 }
00100 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCBd1" doxytag="CTrackKeyFramerTCB::computeFirstKey" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::computeFirstKey </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">CKeyT & </td>
<td class="mdname" nowrap> <em>keyFirst</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>CKeyT & </td>
<td class="mdname" nowrap> <em>keyAfter</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00359">359</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
Referenced by <a class="el" href="a06566.html#l00253">CTrackKeyFramerTCB< CKeyT, T >::compile()</a>.
<p>
<div class="fragment"><pre>00360 {
00361 <span class="keywordtype">float</span> tm;
00362 tm = 0.5f * (1.0f - keyFirst.Tension);
00363 keyFirst.TanFrom= tm * ((keyAfter.Value - keyFirst.Value) * 3.0f - keyAfter.TanTo);
00364 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d1" doxytag="CTrackKeyFramerTCB::computeHermiteBasis" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T, class TMapTimeCKey> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a03471.html">CTCBTools</a>< CKeyT, T, TMapTimeCKey >::computeHermiteBasis </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">float </td>
<td class="mdname" nowrap> <em>d</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>hb</em>[4]</td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, protected, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00121">121</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
Referenced by <a class="el" href="a06566.html#l00223">CTrackKeyFramerTCB< CKeyT, T >::evalKey()</a>.
<p>
<div class="fragment"><pre>00122 {
00123 <span class="keywordtype">float</span> d2,d3,a;
00124
00125 d2 = d*d;
00126 d3 = d2*d;
00127 a = 3.0f*d2 - 2.0f*d3;
00128 hb[0] = 1.0f - a;
00129 hb[1] = a;
00130 hb[2] = d3 - 2.0f*d2 + d;
00131 hb[3] = d3 - d2;
00132 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCBd3" doxytag="CTrackKeyFramerTCB::computeLastKey" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::computeLastKey </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">CKeyT & </td>
<td class="mdname" nowrap> <em>keyLast</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>CKeyT & </td>
<td class="mdname" nowrap> <em>keyBefore</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00367">367</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
Referenced by <a class="el" href="a06566.html#l00253">CTrackKeyFramerTCB< CKeyT, T >::compile()</a>.
<p>
<div class="fragment"><pre>00368 {
00369 <span class="keywordtype">float</span> tm;
00370 tm = 0.5f * (1.0f - keyLast.Tension);
00371 keyLast.TanTo= tm * ((keyLast.Value - keyBefore.Value) * 3.0f - keyBefore.TanFrom);
00372 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d2" doxytag="CTrackKeyFramerTCB::computeTCBFactors" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T, class TMapTimeCKey> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a03471.html">CTCBTools</a>< CKeyT, T, TMapTimeCKey >::computeTCBFactors </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const CKeyT & </td>
<td class="mdname" nowrap> <em>key</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>timeBefore</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>time</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>timeAfter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>rangeDelta</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>firstKey</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>endKey</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>isLoop</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float & </td>
<td class="mdname" nowrap> <em>ksm</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float & </td>
<td class="mdname" nowrap> <em>ksp</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float & </td>
<td class="mdname" nowrap> <em>kdm</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float & </td>
<td class="mdname" nowrap> <em>kdp</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, protected, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00136">136</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
Referenced by <a class="el" href="a06566.html#l00520">CTrackKeyFramerTCB< CKeyTCBQuat, NLMISC::CAngleAxis >::computeTCBKey()</a>, and <a class="el" href="a06566.html#l00326">CTrackKeyFramerTCB< CKeyT, T >::computeTCBKey()</a>.
<p>
<div class="fragment"><pre>00138 {
00139 <span class="keywordtype">float</span> fp,fn;
00140
00141 <span class="keywordflow">if</span>(isLoop || (!firstKey && !endKey))
00142 {
00143 <span class="keywordtype">float</span> dtm;
00144 <span class="comment">// Compute Time deltas.</span>
00145 <span class="keywordflow">if</span> (firstKey)
00146 {
00147 dtm = 0.5f * (rangeDelta + timeAfter - time);
00148 fp = rangeDelta / dtm;
00149 fn = (timeAfter - time) / dtm;
00150 }
00151 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (endKey)
00152 {
00153 dtm = 0.5f * (rangeDelta + time - timeBefore);
00154 fp = rangeDelta / dtm;
00155 fn = (time - timeBefore) / dtm;
00156 }
00157 <span class="keywordflow">else</span>
00158 {
00159 dtm = 0.5f * (timeAfter - timeBefore);
00160 fp = (time - timeBefore) / dtm;
00161 fn = (timeAfter - time) / dtm;
00162 }
00163 <span class="keywordtype">float</span> c= (<span class="keywordtype">float</span>)fabs( key.Continuity );
00164 fp = fp + c - c * fp;
00165 fn = fn + c - c * fn;
00166 }
00167 <span class="keywordflow">else</span>
00168 {
00169 <span class="comment">// firstkey and lastkey of not loop track.</span>
00170 fp = 1.0f;
00171 fn = 1.0f;
00172 }
00173
00174 <span class="comment">// Compute tangents factors.</span>
00175 <span class="keywordtype">float</span> tm,cm,cp,bm,bp,tmcm,tmcp;
00176
00177 cm = 1.0f - key.Continuity;
00178 tm = 0.5f * ( 1.0f - key.Tension );
00179 cp = 2.0f - cm;
00180 bm = 1.0f - key.Bias;
00181 bp = 2.0f - bm;
00182 tmcm = tm*cm; tmcp = tm*cp;
00183
00184 <span class="comment">// tgts factors.</span>
00185 ksm = tmcm*bp*fp; ksp = tmcp*bm*fp;
00186 kdm = tmcp*bp*fn; kdp = tmcm*bm*fn;
00187
00188 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCBd5" doxytag="CTrackKeyFramerTCB::computeTCBKey" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::computeTCBKey </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">CKeyT & </td>
<td class="mdname" nowrap> <em>keyBefore</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>CKeyT & </td>
<td class="mdname" nowrap> <em>key</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>CKeyT & </td>
<td class="mdname" nowrap> <em>keyAfter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>timeBefore</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>time</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>timeAfter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>rangeDelta</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>firstKey</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>endKey</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>isLoop</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00326">326</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
References <a class="el" href="a06566.html#l00136">CTCBTools< CKeyT, T, TMapTimeCKey >::computeTCBFactors()</a>.
<p>
Referenced by <a class="el" href="a06566.html#l00430">CTrackKeyFramerTCB< CKeyTCBQuat, NLMISC::CAngleAxis >::compile()</a>, and <a class="el" href="a06566.html#l00253">CTrackKeyFramerTCB< CKeyT, T >::compile()</a>.
<p>
<div class="fragment"><pre>00328 {
00329 <span class="keywordtype">float</span> ksm,ksp,kdm,kdp;
00330
00331 <span class="comment">// compute tangents factors.</span>
00332 <a class="code" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d2">computeTCBFactors</a>(key, timeBefore, time, timeAfter, rangeDelta, firstKey, endKey, isLoop, ksm,ksp,kdm,kdp);
00333
00334 <span class="comment">// Delta.</span>
00335 <a class="code" href="a03581.html#CTrackKeyFramerTCBx0">TKeyValueType</a> delm, delp;
00336 delm = key.Value - keyBefore.Value;
00337 delp = keyAfter.Value - key.Value;
00338
00339 <span class="comment">// Tangents.</span>
00340 key.TanTo = delm*ksm + delp*ksp;
00341 key.TanFrom= delm*kdm + delp*kdp;
00342
00343 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCBd6" doxytag="CTrackKeyFramerTCB::computeTCBKeyLinear" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::computeTCBKeyLinear </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">CKeyT & </td>
<td class="mdname" nowrap> <em>key0</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>CKeyT & </td>
<td class="mdname" nowrap> <em>key1</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00346">346</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
Referenced by <a class="el" href="a06566.html#l00253">CTrackKeyFramerTCB< CKeyT, T >::compile()</a>.
<p>
<div class="fragment"><pre>00347 {
00348 <span class="keywordtype">float</span> f0, f1;
00349 <a class="code" href="a03581.html#CTrackKeyFramerTCBx0">TKeyValueType</a> dv;
00350
00351 f0 = 1.0f - key0.Tension;
00352 f1 = 1.0f - key1.Tension;
00353 dv = key1.Value - key0.Value;
00354 key0.TanFrom= dv * f0;
00355 key1.TanTo= dv * f1;
00356 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d4" doxytag="CTrackKeyFramerTCB::ease" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T, class TMapTimeCKey> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> float <a class="el" href="a03471.html">CTCBTools</a>< CKeyT, T, TMapTimeCKey >::ease </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const CKeyT * </td>
<td class="mdname" nowrap> <em>key</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>d</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, protected, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00103">103</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
Referenced by <a class="el" href="a06566.html#l00401">CTrackKeyFramerTCB< CKeyTCBQuat, NLMISC::CAngleAxis >::evalKey()</a>, and <a class="el" href="a06566.html#l00223">CTrackKeyFramerTCB< CKeyT, T >::evalKey()</a>.
<p>
<div class="fragment"><pre>00104 {
00105 <span class="keywordflow">if</span> (d==0.0f || d==1.0f) <span class="keywordflow">return</span> d;
00106 <span class="comment">// k==0.5f <=> e0+e1 == 0.</span>
00107 <span class="keywordflow">if</span> (key->EaseK == 0.5f) <span class="keywordflow">return</span> d;
00108
00109 <span class="keywordflow">if</span> (d < key->Ease0)
00110 <span class="keywordflow">return</span> key->EaseKOverEase0 * d*d;
00111 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (d < 1.0f - key->Ease1)
00112 <span class="keywordflow">return</span> key->EaseK * (2.0f*d - key->Ease0);
00113 <span class="keywordflow">else</span>
00114 {
00115 d = 1.0f - d;
00116 <span class="keywordflow">return</span> 1.0f - key->EaseKOverEase1 * d*d;
00117 }
00118 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCBz1013_1" doxytag="CTrackKeyFramerTCB::evalKey" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> virtual void <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::evalKey </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const CKeyT * </td>
<td class="mdname" nowrap> <em>previous</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const CKeyT * </td>
<td class="mdname" nowrap> <em>next</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>TAnimationTime </td>
<td class="mdname" nowrap> <em>datePrevious</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>TAnimationTime </td>
<td class="mdname" nowrap> <em>dateNext</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>TAnimationTime </td>
<td class="mdname" nowrap> <em>date</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, protected, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
evalKey (runtime).
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00223">223</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06566.html#l00121">CTCBTools< CKeyT, T, TMapTimeCKey >::computeHermiteBasis()</a>, and <a class="el" href="a06566.html#l00103">CTCBTools< CKeyT, T, TMapTimeCKey >::ease()</a>.
<p>
<div class="fragment"><pre>00226 {
00227 <span class="keywordflow">if</span>(previous && next)
00228 {
00229 <span class="comment">// lerp from previous to cur.</span>
00230 date-= datePrevious;
00231 date*= previous->OODeltaTime;
00232 <a class="code" href="a05378.html#a374">NLMISC::clamp</a>(date, 0,1);
00233
00234 date = <a class="code" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d4">ease</a>(previous, date);
00235
00236 <span class="keywordtype">float</span> hb[4];
00237 <a class="code" href="a03471.html#CTrackKeyFramerTCB_3_01CKeyTCBQuat_00_01NLMISC_1_1CAngleAxis_01_4d1">computeHermiteBasis</a>(date, hb);
00238 <a class="code" href="a05363.html#a540">copyToValue</a>(<a class="code" href="a03581.html#CTrackKeyFramerTCBr0">_Value</a>.Value,
00239 previous->Value*hb[0] + next->Value*hb[1] +
00240 previous->TanFrom*hb[2] + next->TanTo*hb[3]);
00241 }
00242 <span class="keywordflow">else</span>
00243 {
00244 <span class="keywordflow">if</span> (previous)
00245 <a class="code" href="a05363.html#a540">copyToValue</a>(<a class="code" href="a03581.html#CTrackKeyFramerTCBr0">_Value</a>.Value, previous->Value);
00246 <span class="keywordflow">else</span>
00247 <span class="keywordflow">if</span> (next)
00248 <a class="code" href="a05363.html#a540">copyToValue</a>(<a class="code" href="a03581.html#CTrackKeyFramerTCBr0">_Value</a>.Value, next->Value);
00249 }
00250 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="CTrackKeyFramerTCBa0" doxytag="CTrackKeyFramerTCB::getValue" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> virtual const IAnimatedValue& <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::getValue </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
From ITrack.
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00207">207</a> of file <a class="el" href="a06566.html">track_tcb.h</a>.
<p>
<div class="fragment"><pre>00208 {
00209 <span class="keywordflow">return</span> <a class="code" href="a03581.html#CTrackKeyFramerTCBr0">_Value</a>;
00210 }
</pre></div> </td>
</tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="CTrackKeyFramerTCBr0" doxytag="CTrackKeyFramerTCB::_Value" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class CKeyT, class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> CAnimatedValueBlendable<T> <a class="el" href="a03581.html">CTrackKeyFramerTCB</a>< CKeyT, T >::<a class="el" href="a03581.html#CTrackKeyFramerTCBr0">_Value</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06566.html#l00322">322</a> of file <a class="el" href="a06566.html">track_tcb.h</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a06566.html">track_tcb.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:43:54 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.6 </small></address>
</body>
</html>
|