aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/slot_dlg_cpp-source.html
blob: 6efba3106347a9ef39150710ea1e2e2163fb4583 (plain)
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
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
	<TITLE>nevrax.org : docs</TITLE>
	<LINK REL=stylesheet TYPE="text/css" HREF="/inc/css/nevrax.css">
	<link href="doxygen.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY MARGINHEIGHT="0" MARGINWIDTH="0">

<!-- uplinks -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0>
 <TR>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=140 BGCOLOR=#dddddd><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
        <TD><IMG  width=6 height=14  SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
 </TR>
</TABLE> 

<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 WIDTH=100%>
 <TR><TD  BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG  SRC="/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
</TABLE>

<!-- main table -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 height=100%>
 <TR>
	<TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
	<TD WIDTH=140   BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

		<!------ Begin Box ------>
		<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0  cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
		<FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td  colspan=2 bgcolor=#FFFFFF>
		<TABLE cellspacing=0 cellpadding=1 border=0>
			<tr><td ALIGN=middle><a  class='linkbox' href="/news/" TITLE="Rubrique news"><img width=13 height=15  hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a  class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11  hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a  class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16  hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a  class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17  hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a  class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16  hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a  class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img  width=18 height=12   hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a  class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
		</TABLE>
		</TD></TR></TABLE></TD></TR></TABLE>
		<!------ End Box  ------>

	</TD>
	<TD WIDTH=15><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
	<TD ALIGN=left valign=top><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

<!-- title -->
<TABLE  background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG  SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
&nbsp;

<!-- block -->
<TABLE  bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="/inc/img/reddots.gif"></TD>
	<TD><B>Documentation</B></TD>
	<TD ALIGN=RIGHT>&nbsp;</td>
</tr></table>
<!-- Generated by Doxygen 1.2.2 on Tue May 29 22:01:20 2001 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
<hr><h1>slot_dlg.cpp</h1><a href="slot_dlg_cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.
</font>00008 <font class="comment"> *
</font>00009 <font class="comment"> * This file is part of NEVRAX NEL.
</font>00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify
</font>00011 <font class="comment"> * it under the terms of the GNU General Public License as published by
</font>00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)
</font>00013 <font class="comment"> * any later version.
</font>00014 <font class="comment">
</font>00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but
</font>00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of
</font>00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
</font>00018 <font class="comment"> * General Public License for more details.
</font>00019 <font class="comment">
</font>00020 <font class="comment"> * You should have received a copy of the GNU General Public License
</font>00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the
</font>00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
</font>00023 <font class="comment"> * MA 02111-1307, USA.
</font>00024 <font class="comment"> */</font>
00025 
00026 <font class="preprocessor">#include "<a class="code" href="plugin_max_nel_export_std_afx_h.html">std_afx.h</a>"</font>
00027 <font class="preprocessor">#include "<a class="code" href="object_viewer_h.html">object_viewer.h</a>"</font>
00028 <font class="preprocessor">#include "<a class="code" href="select_string_h.html">select_string.h</a>"</font>
00029 <font class="preprocessor">#include "<a class="code" href="slot_dlg_h.html">slot_dlg.h</a>"</font>
00030 <font class="preprocessor">#include &lt;<a class="code" href="common_h.html">nel/misc/common.h</a>&gt;</font>
00031 
00032 <font class="preprocessor">#ifdef _DEBUG
</font>00033 <font class="preprocessor"></font><font class="preprocessor">#define new DEBUG_NEW
</font>00034 <font class="preprocessor"></font><font class="preprocessor">#undef THIS_FILE
</font>00035 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">char</font> THIS_FILE[] = __FILE__;
00036 <font class="preprocessor">#endif
</font>00037 <font class="preprocessor"></font>
<a name="l00038"></a><a class="code" href="slot_dlg_cpp.html#a0">00038</a> <font class="preprocessor">#define DELTA_BLEND 0.1f
</font><a name="l00039"></a><a class="code" href="slot_dlg_cpp.html#a1">00039</a> <font class="preprocessor"></font><font class="preprocessor">#define DELTA_TIME (getTimeIncrement ())
</font><a name="l00040"></a><a class="code" href="slot_dlg_cpp.html#a2">00040</a> <font class="preprocessor"></font><font class="preprocessor">#define DELTA_MUL 0.1f
</font>00041 <font class="preprocessor"></font>
00042 <font class="keyword">using</font> <font class="keyword">namespace</font> NLMISC;
00043 <font class="keyword">using</font> <font class="keyword">namespace</font> NL3D;
00044 
00046 <font class="comment">// CSlotDlg dialog</font>
00047 
00048 
<a name="l00049"></a><a class="code" href="class_CSlotDlg.html#a0">00049</a> <a class="code" href="class_CSlotDlg.html#a0">CSlotDlg::CSlotDlg</a>(<a class="code" href="class_CWnd.html">CWnd</a>* pParent <font class="comment">/*=NULL*/</font>)
00050         : <a class="code" href="class_CDialog.html">CDialog</a>(<a class="code" href="class_CSlotDlg.html">CSlotDlg</a>::IDD, pParent)
00051 {
00052         <font class="comment">//{{AFX_DATA_INIT(CSlotDlg)</font>
00053         EndBlend = 1.0f;
00054         Smoothness = 0.0f;
00055         SpeedFactor = 1.0f;
00056         StartBlend = 1.0f;
00057         ClampMode = 0;
00058         SkeletonWeightInverted = FALSE;
00059         Offset = 0;
00060         StartTime = 0;
00061         EndTime = 0;
00062         StartAnimTime=0.f;
00063         EndAnimTime=1.f;
00064         enable = TRUE;
00065         <font class="comment">//}}AFX_DATA_INIT</font>
00066         AnimationSet=NULL;
00067         Animation=NULL;
00068         SkeletonWeightTemplate=NULL;
00069         MainDlg=NULL;
00070 }
00071 
<a name="l00072"></a><a class="code" href="class_CSlotDlg.html#a1">00072</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#a1">CSlotDlg::init</a> (uint id, <a class="code" href="class_NL3D__CAnimationSet.html">NL3D::CAnimationSet</a>* animationSet, <a class="code" href="class_CObjectViewer.html">CObjectViewer</a>* mainDlg)<font class="keyword">
</font>00073 <font class="keyword"></font>{
00074         AnimationSet=animationSet;
00075         Id=id;
00076         MainDlg=mainDlg;
00077 }
00078 
<a name="l00079"></a><a class="code" href="class_CSlotDlg.html#b0">00079</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b0">CSlotDlg::DoDataExchange</a>(CDataExchange* pDX)<font class="keyword">
</font>00080 <font class="keyword"></font>{
00081         CDialog::DoDataExchange(pDX);
00082         <font class="comment">//{{AFX_DATA_MAP(CSlotDlg)</font>
00083         DDX_Control(pDX, IDC_INVERT_SKELETON_WEIGHT, InvertSkeletonWeightCtrl);
00084         DDX_Control(pDX, IDC_ALIGN_BLEND, AlignBlendCtrl);
00085         DDX_Control(pDX, IDC_CLAMP, ClampCtrl);
00086         DDX_Control(pDX, IDC_SCROLLBAR, ScrollBarCtrl);
00087         DDX_Control(pDX, IDC_OFFSET_SPIN, OffsetSpinCtrl);
00088         DDX_Control(pDX, IDC_OFFSET, OffsetCtrl);
00089         DDX_Control(pDX, IDC_START_TIME_SPIN, StartTimeSpinCtrl);
00090         DDX_Control(pDX, IDC_START_BLEND_SPIN, StartBlendSpinCtrl);
00091         DDX_Control(pDX, IDC_SPEED_FACTOR_SPIN, SpeedFactorSpinCtrl);
00092         DDX_Control(pDX, IDC_SMOOTHNESS_SPIN, SmoothnessSpinCtrl);
00093         DDX_Control(pDX, IDC_END_TIME_SPIN, EndTimeSpinCtrl);
00094         DDX_Control(pDX, IDC_END_BLEND_SPIN, EndBlendSpinCtrl);
00095         DDX_Control(pDX, IDC_START_TIME, StartTimeCtrl);
00096         DDX_Control(pDX, IDC_START_BLEND, StartBlendCtrl);
00097         DDX_Control(pDX, IDC_SPEED_FACTOR, SpeddFactorCtrl);
00098         DDX_Control(pDX, IDC_SMOOTHNESS, SmoothnessCtrl);
00099         DDX_Control(pDX, IDC_END_TIME, EndTimeCtrl);
00100         DDX_Control(pDX, IDC_END_BLEND, EndBlendCtrl);
00101         DDX_Text(pDX, IDC_END_BLEND, EndBlend);
00102         DDX_Text(pDX, IDC_SMOOTHNESS, Smoothness);
00103         DDV_MinMaxFloat(pDX, Smoothness, 0.f, 1.f);
00104         DDX_Text(pDX, IDC_SPEED_FACTOR, SpeedFactor);
00105         DDV_MinMaxFloat(pDX, SpeedFactor, 1.e-002f, 100.f);
00106         DDX_Text(pDX, IDC_START_BLEND, StartBlend);
00107         DDV_MinMaxFloat(pDX, StartBlend, 0.f, 1.f);
00108         DDX_Radio(pDX, IDC_CLAMP, ClampMode);
00109         DDX_Check(pDX, IDC_INVERT_SKELETON_WEIGHT, SkeletonWeightInverted);
00110         DDX_Text(pDX, IDC_OFFSET, Offset);
00111         DDX_Text(pDX, IDC_START_TIME, StartTime);
00112         DDX_Text(pDX, IDC_END_TIME, EndTime);
00113         DDX_Check(pDX, IDC_ENABLE, enable);
00114         <font class="comment">//}}AFX_DATA_MAP</font>
00115 }
00116 
00117 
00118 <a class="code" href="ViewColumn_cpp.html#a1">BEGIN_MESSAGE_MAP</a>(<a class="code" href="class_CSlotDlg.html">CSlotDlg</a>, <a class="code" href="class_CDialog.html">CDialog</a>)
00119         <font class="comment">//{{AFX_MSG_MAP(CSlotDlg)</font>
00120         ON_WM_PAINT()
00121         ON_NOTIFY(UDN_DELTAPOS, IDC_END_BLEND_SPIN, OnDeltaposEndBlendSpin)
00122         ON_NOTIFY(UDN_DELTAPOS, IDC_END_TIME_SPIN, OnDeltaposEndTimeSpin)
00123         ON_NOTIFY(UDN_DELTAPOS, IDC_SMOOTHNESS_SPIN, OnDeltaposSmoothnessSpin)
00124         ON_NOTIFY(UDN_DELTAPOS, IDC_SPEED_FACTOR_SPIN, OnDeltaposSpeedFactorSpin)
00125         ON_NOTIFY(UDN_DELTAPOS, IDC_START_BLEND_SPIN, OnDeltaposStartBlendSpin)
00126         ON_NOTIFY(UDN_DELTAPOS, IDC_START_TIME_SPIN, OnDeltaposStartTimeSpin)
00127         ON_EN_CHANGE(IDC_END_BLEND, OnChangeEndBlend)
00128         ON_EN_CHANGE(IDC_END_TIME, OnChangeEndTime)
00129         ON_EN_CHANGE(IDC_SMOOTHNESS, OnChangeSmoothness)
00130         ON_EN_CHANGE(IDC_SPEED_FACTOR, OnChangeSpeedFactor)
00131         ON_EN_CHANGE(IDC_START_BLEND, OnChangeStartBlend)
00132         ON_EN_CHANGE(IDC_START_TIME, OnChangeStartTime)
00133         ON_BN_CLICKED(IDC_SET_ANIMATION, OnSetAnimation)
00134         ON_BN_CLICKED(IDC_SET_SKELETON, OnSetSkeleton)
00135         ON_EN_CHANGE(IDC_OFFSET, OnChangeOffset)
00136         ON_NOTIFY(UDN_DELTAPOS, IDC_OFFSET_SPIN, OnDeltaposOffsetSpin)
00137         ON_WM_HSCROLL()
00138         ON_BN_CLICKED(IDC_CLAMP, OnClamp)
00139         ON_BN_CLICKED(IDC_REPEAT, OnRepeat)
00140         ON_BN_CLICKED(IDC_DISABLE, OnDisable)
00141         ON_BN_CLICKED(IDC_ALIGN_BLEND, OnAlignBlend)
00142         ON_WM_DESTROY()
00143         <font class="comment">//}}AFX_MSG_MAP</font>
00144 END_MESSAGE_MAP()
00145 
00147 <font class="comment">// CSlotDlg message handlers</font>
00148 
00149 BOOL <a class="code" href="class_CSlotDlg.html#b1">CSlotDlg::OnInitDialog</a>()<font class="keyword"> 
</font>00150 <font class="keyword"></font>{
00151         CDialog::OnInitDialog();
00152         
00153         <font class="comment">// Init the blend window</font>
00154         <a class="code" href="class_CSlotDlg.html#a5">setWindowName</a> ();
00155         
00156         <font class="keywordflow">return</font> TRUE;  <font class="comment">// return TRUE unless you set the focus to a control</font>
00157                       <font class="comment">// EXCEPTION: OCX Property Pages should return FALSE</font>
00158 }
00159 
00160 <font class="comment">// ***************************************************************************</font>
00161 
<a name="l00162"></a><a class="code" href="class_CSlotDlg.html#b2">00162</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b2">CSlotDlg::OnPaint</a>()<font class="keyword"> 
</font>00163 <font class="keyword"></font>{
00164         <font class="comment">//CPaintDC dc(this); // device context for painting</font>
00165         PAINTSTRUCT paint;
00166         CDC* pDc=BeginPaint(&amp;paint);
00167         
00168         <font class="comment">// TODO: Add your message handler code here</font>
00169         <font class="comment">// Draw the blend</font>
00170         RECT rect;
00171         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;rect);
00172         ScreenToClient (&amp;rect);
00173         Blend.<a class="code" href="class_CBlendWnd.html#a1">OnPaint</a> (rect, pDc, StartBlend, EndBlend, (<font class="keywordtype">float</font>)StartTime, (<font class="keywordtype">float</font>)EndTime, 
00174                 Smoothness, StartAnimTime, EndAnimTime, !<a class="code" href="class_CSlotDlg.html#a4">isEmpty</a>());
00175         
00176         <font class="comment">// Do not call CDialog::OnPaint() for painting messages</font>
00177         EndPaint(&amp;paint);
00178 }
00179 
00180 <font class="comment">// ***************************************************************************</font>
00181 
<a name="l00182"></a><a class="code" href="class_CSlotDlg.html#b3">00182</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b3">CSlotDlg::OnDeltaposEndBlendSpin</a>(NMHDR* pNMHDR, LRESULT* pResult)<font class="keyword"> 
</font>00183 <font class="keyword"></font>{
00184         NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00185         <font class="comment">// TODO: Add your control notification handler code here</font>
00186         
00187         *pResult = 0;
00188 
00189         UpdateData ();
00190 
00191         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&lt;0)
00192                 EndBlend+=DELTA_BLEND;
00193         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&gt;0)
00194                 EndBlend-=DELTA_BLEND;
00195         clamp (EndBlend, 0.f, 1.f);
00196 
00197         UpdateData (FALSE);
00198 
00199         RECT bar;
00200         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00201         ScreenToClient (&amp;bar);
00202         InvalidateRect (&amp;bar);
00203 }
00204 
00205 <font class="comment">// ***************************************************************************</font>
00206 
<a name="l00207"></a><a class="code" href="class_CSlotDlg.html#b4">00207</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b4">CSlotDlg::OnDeltaposEndTimeSpin</a>(NMHDR* pNMHDR, LRESULT* pResult)<font class="keyword"> 
</font>00208 <font class="keyword"></font>{
00209         NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00210         <font class="comment">// TODO: Add your control notification handler code here</font>
00211         
00212         *pResult = 0;
00213 
00214         UpdateData ();
00215 
00216         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&lt;0)
00217                 EndTime++;
00218         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&gt;0)
00219                 EndTime--;
00220         clamp (EndTime, (<font class="keywordtype">int</font>)StartAnimTime, (<font class="keywordtype">int</font>)EndAnimTime);
00221         <font class="keywordflow">if</font> (EndTime&lt;StartTime)
00222                 StartTime=EndTime;
00223 
00224         UpdateData (FALSE);
00225 
00226         RECT bar;
00227         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00228         ScreenToClient (&amp;bar);
00229         InvalidateRect (&amp;bar);
00230 }
00231 
00232 <font class="comment">// ***************************************************************************</font>
00233 
<a name="l00234"></a><a class="code" href="class_CSlotDlg.html#b5">00234</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b5">CSlotDlg::OnDeltaposSmoothnessSpin</a>(NMHDR* pNMHDR, LRESULT* pResult)<font class="keyword"> 
</font>00235 <font class="keyword"></font>{
00236         NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00237         <font class="comment">// TODO: Add your control notification handler code here</font>
00238         
00239         *pResult = 0;
00240 
00241         UpdateData ();
00242 
00243         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&lt;0)
00244                 Smoothness+=DELTA_BLEND;
00245         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&gt;0)
00246                 Smoothness-=DELTA_BLEND;
00247         clamp (Smoothness, 0.f, 1.f);
00248 
00249         UpdateData (FALSE);
00250 
00251         RECT bar;
00252         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00253         ScreenToClient (&amp;bar);
00254         InvalidateRect (&amp;bar);
00255 }
00256 
00257 <font class="comment">// ***************************************************************************</font>
00258 
<a name="l00259"></a><a class="code" href="class_CSlotDlg.html#b6">00259</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b6">CSlotDlg::OnDeltaposSpeedFactorSpin</a>(NMHDR* pNMHDR, LRESULT* pResult)<font class="keyword"> 
</font>00260 <font class="keyword"></font>{
00261         NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00262         <font class="comment">// TODO: Add your control notification handler code here</font>
00263         
00264         *pResult = 0;
00265 
00266         UpdateData ();
00267 
00268         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&lt;0)
00269                 SpeedFactor+=DELTA_MUL;
00270         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&gt;0)
00271                 SpeedFactor-=DELTA_MUL;
00272         clamp (SpeedFactor, 0.01f, 100.f);
00273 
00274         UpdateData (FALSE);
00275 
00276         <a class="code" href="class_CSlotDlg.html#a6">validateTime</a> ();
00277         <a class="code" href="class_CSlotDlg.html#a7">updateScrollBar</a> ();
00278 
00279         RECT bar;
00280         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00281         ScreenToClient (&amp;bar);
00282         InvalidateRect (&amp;bar);
00283 }
00284 
00285 <font class="comment">// ***************************************************************************</font>
00286 
<a name="l00287"></a><a class="code" href="class_CSlotDlg.html#b7">00287</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b7">CSlotDlg::OnDeltaposStartBlendSpin</a>(NMHDR* pNMHDR, LRESULT* pResult)<font class="keyword"> 
</font>00288 <font class="keyword"></font>{
00289         NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00290         <font class="comment">// TODO: Add your control notification handler code here</font>
00291         
00292         *pResult = 0;
00293 
00294         UpdateData ();
00295 
00296         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&lt;0)
00297                 StartBlend+=DELTA_BLEND;
00298         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&gt;0)
00299                 StartBlend-=DELTA_BLEND;
00300         clamp (StartBlend, 0.f, 1.f);
00301 
00302         UpdateData (FALSE);
00303         
00304         RECT bar;
00305         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00306         ScreenToClient (&amp;bar);
00307         InvalidateRect (&amp;bar);
00308 }
00309 
00310 <font class="comment">// ***************************************************************************</font>
00311 
<a name="l00312"></a><a class="code" href="class_CSlotDlg.html#b8">00312</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b8">CSlotDlg::OnDeltaposStartTimeSpin</a>(NMHDR* pNMHDR, LRESULT* pResult)<font class="keyword"> 
</font>00313 <font class="keyword"></font>{
00314         NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00315         <font class="comment">// TODO: Add your control notification handler code here</font>
00316         
00317         *pResult = 0;
00318 
00319         UpdateData ();
00320 
00321         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&lt;0)
00322                 StartTime++;
00323         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&gt;0)
00324                 StartTime--;
00325         clamp (StartTime, (<font class="keywordtype">int</font>)StartAnimTime, (<font class="keywordtype">int</font>)EndAnimTime);
00326         <font class="keywordflow">if</font> (EndTime&lt;StartTime)
00327                 EndTime=StartTime;
00328 
00329         UpdateData (FALSE);
00330         
00331         RECT bar;
00332         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00333         ScreenToClient (&amp;bar);
00334         InvalidateRect (&amp;bar);
00335 }
00336 
00337 <font class="comment">// ***************************************************************************</font>
00338 
<a name="l00339"></a><a class="code" href="class_CSlotDlg.html#b9">00339</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b9">CSlotDlg::OnChangeEndBlend</a>()<font class="keyword"> 
</font>00340 <font class="keyword"></font>{
00341         <font class="comment">// TODO: If this is a RICHEDIT control, the control will not</font>
00342         <font class="comment">// send this notification unless you override the CDialog::OnInitDialog()</font>
00343         <font class="comment">// function and call CRichEditCtrl().SetEventMask()</font>
00344         <font class="comment">// with the ENM_CHANGE flag ORed into the mask.</font>
00345         
00346         <font class="comment">// TODO: Add your control notification handler code here</font>
00347         UpdateData ();
00348 
00349         clamp (EndBlend, 0.f, 1.f);
00350 
00351         UpdateData (FALSE);
00352 
00353         RECT bar;
00354         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00355         ScreenToClient (&amp;bar);
00356         InvalidateRect (&amp;bar);
00357 }
00358 
00359 <font class="comment">// ***************************************************************************</font>
00360 
<a name="l00361"></a><a class="code" href="class_CSlotDlg.html#b10">00361</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b10">CSlotDlg::OnChangeEndTime</a>()<font class="keyword"> 
</font>00362 <font class="keyword"></font>{
00363         <font class="comment">// TODO: If this is a RICHEDIT control, the control will not</font>
00364         <font class="comment">// send this notification unless you override the CDialog::OnInitDialog()</font>
00365         <font class="comment">// function and call CRichEditCtrl().SetEventMask()</font>
00366         <font class="comment">// with the ENM_CHANGE flag ORed into the mask.</font>
00367         
00368         <font class="comment">// TODO: Add your control notification handler code here</font>
00369         UpdateData ();
00370 
00371         clamp (EndTime, (<font class="keywordtype">int</font>)StartAnimTime, (<font class="keywordtype">int</font>)EndAnimTime);
00372         <font class="keywordflow">if</font> (EndTime&lt;StartTime)
00373                 StartTime=EndTime;
00374 
00375         UpdateData (FALSE);
00376 
00377         RECT bar;
00378         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00379         ScreenToClient (&amp;bar);
00380         InvalidateRect (&amp;bar);
00381 }
00382 
00383 <font class="comment">// ***************************************************************************</font>
00384 
<a name="l00385"></a><a class="code" href="class_CSlotDlg.html#b11">00385</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b11">CSlotDlg::OnChangeSmoothness</a>()<font class="keyword"> 
</font>00386 <font class="keyword"></font>{
00387         <font class="comment">// TODO: If this is a RICHEDIT control, the control will not</font>
00388         <font class="comment">// send this notification unless you override the CDialog::OnInitDialog()</font>
00389         <font class="comment">// function and call CRichEditCtrl().SetEventMask()</font>
00390         <font class="comment">// with the ENM_CHANGE flag ORed into the mask.</font>
00391         
00392         <font class="comment">// TODO: Add your control notification handler code here</font>
00393         UpdateData ();
00394 
00395         clamp (Smoothness, 0.f, 1.f);
00396 
00397         UpdateData (FALSE);
00398 
00399         RECT bar;
00400         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00401         ScreenToClient (&amp;bar);
00402         InvalidateRect (&amp;bar);
00403 }
00404 
00405 <font class="comment">// ***************************************************************************</font>
00406 
<a name="l00407"></a><a class="code" href="class_CSlotDlg.html#b12">00407</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b12">CSlotDlg::OnChangeSpeedFactor</a>()<font class="keyword"> 
</font>00408 <font class="keyword"></font>{
00409         <font class="comment">// TODO: If this is a RICHEDIT control, the control will not</font>
00410         <font class="comment">// send this notification unless you override the CDialog::OnInitDialog()</font>
00411         <font class="comment">// function and call CRichEditCtrl().SetEventMask()</font>
00412         <font class="comment">// with the ENM_CHANGE flag ORed into the mask.</font>
00413         
00414         <font class="comment">// TODO: Add your control notification handler code here</font>
00415         UpdateData ();
00416 
00417         clamp (SpeedFactor, 0.01f, 100.f);
00418 
00419         UpdateData (FALSE);
00420         <a class="code" href="class_CSlotDlg.html#a6">validateTime</a> ();
00421         <a class="code" href="class_CSlotDlg.html#a7">updateScrollBar</a> ();
00422 }
00423 
00424 <font class="comment">// ***************************************************************************</font>
00425 
<a name="l00426"></a><a class="code" href="class_CSlotDlg.html#b13">00426</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b13">CSlotDlg::OnChangeStartBlend</a>()<font class="keyword"> 
</font>00427 <font class="keyword"></font>{
00428         <font class="comment">// TODO: If this is a RICHEDIT control, the control will not</font>
00429         <font class="comment">// send this notification unless you override the CDialog::OnInitDialog()</font>
00430         <font class="comment">// function and call CRichEditCtrl().SetEventMask()</font>
00431         <font class="comment">// with the ENM_CHANGE flag ORed into the mask.</font>
00432         
00433         <font class="comment">// TODO: Add your control notification handler code here</font>
00434         UpdateData ();
00435 
00436         clamp (StartBlend, 0.f, 1.f);
00437 
00438         UpdateData (FALSE);
00439 
00440         RECT bar;
00441         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00442         ScreenToClient (&amp;bar);
00443         InvalidateRect (&amp;bar);
00444 }
00445 
00446 <font class="comment">// ***************************************************************************</font>
00447 
<a name="l00448"></a><a class="code" href="class_CSlotDlg.html#b14">00448</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b14">CSlotDlg::OnChangeStartTime</a>()<font class="keyword"> 
</font>00449 <font class="keyword"></font>{
00450         <font class="comment">// TODO: If this is a RICHEDIT control, the control will not</font>
00451         <font class="comment">// send this notification unless you override the CDialog::OnInitDialog()</font>
00452         <font class="comment">// function and call CRichEditCtrl().SetEventMask()</font>
00453         <font class="comment">// with the ENM_CHANGE flag ORed into the mask.</font>
00454         
00455         <font class="comment">// TODO: Add your control notification handler code here</font>
00456         UpdateData ();
00457 
00458         clamp (StartTime, (<font class="keywordtype">int</font>)StartAnimTime, (<font class="keywordtype">int</font>)EndAnimTime);
00459         <font class="keywordflow">if</font> (EndTime&lt;StartTime)
00460                 EndTime=StartTime;
00461 
00462         UpdateData (FALSE);
00463 
00464         RECT bar;
00465         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00466         ScreenToClient (&amp;bar);
00467         InvalidateRect (&amp;bar);
00468         
00469 }
00470 
00471 <font class="comment">// ***************************************************************************</font>
00472 
<a name="l00473"></a><a class="code" href="class_CSlotDlg.html#b15">00473</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b15">CSlotDlg::OnSetAnimation</a>()<font class="keyword"> 
</font>00474 <font class="keyword"></font>{
00475         <font class="comment">// List of string</font>
00476         std::vector&lt;std::string&gt; vectString;
00477 
00478         <font class="comment">// Build a list of string</font>
00479         <font class="keywordflow">for</font> (uint a=0; a&lt;AnimationSet-&gt;getNumAnimation (); a++)
00480                 vectString.push_back (AnimationSet-&gt;<a class="code" href="class_NL3D__CAnimationSet.html#a5">getAnimationName</a> (a));
00481 
00482         <font class="comment">// Select a string</font>
00483         <a class="code" href="class_CSelectString.html">CSelectString</a> select (vectString, <font class="stringliteral">"Select your animation"</font>, <font class="keyword">this</font>);
00484         <font class="keywordflow">if</font> (select.DoModal ()==IDOK)
00485         {
00486                 <font class="comment">// Set the animation</font>
00487                 <font class="keywordflow">if</font> (select.Selection!=-1)
00488                 {
00489                         <a class="code" href="class_CSlotDlg.html#a2">setAnimation</a> (select.Selection, AnimationSet-&gt;<a class="code" href="class_NL3D__CAnimationSet.html#a6">getAnimation</a> (select.Selection), vectString[select.Selection].c_str());
00490                         <a class="code" href="class_CSlotDlg.html#a6">validateTime</a> ();
00491                         <a class="code" href="class_CSlotDlg.html#a7">updateScrollBar</a> ();
00492                 }
00493                 <font class="keywordflow">else</font>
00494                         <a class="code" href="class_CSlotDlg.html#a2">setAnimation</a> (0, NULL, NULL);
00495 
00496                 <a class="code" href="class_CSlotDlg.html#a5">setWindowName</a> ();
00497                 Invalidate ();
00498         }
00499 }
00500 
00501 <font class="comment">// ***************************************************************************</font>
00502 
<a name="l00503"></a><a class="code" href="class_CSlotDlg.html#b16">00503</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b16">CSlotDlg::OnSetSkeleton</a>()<font class="keyword"> 
</font>00504 <font class="keyword"></font>{
00505         <font class="comment">// List of string</font>
00506         std::vector&lt;std::string&gt; vectString;
00507 
00508         <font class="comment">// Build a list of string</font>
00509         <font class="keywordflow">for</font> (uint s=0; s&lt;AnimationSet-&gt;getNumSkeletonWeight (); s++)
00510                 vectString.push_back (AnimationSet-&gt;<a class="code" href="class_NL3D__CAnimationSet.html#a10">getSkeletonWeightName</a> (s));
00511 
00512         <font class="comment">// Select a string</font>
00513         <a class="code" href="class_CSelectString.html">CSelectString</a> select (vectString, <font class="stringliteral">"Select your skeleton weight template"</font>, <font class="keyword">this</font>);
00514         <font class="keywordflow">if</font> (select.DoModal ()==IDOK)
00515         {
00516                 <font class="comment">// Set the animation</font>
00517                 <font class="keywordflow">if</font> (select.Selection!=-1)
00518                         <a class="code" href="class_CSlotDlg.html#a3">setSkeletonTemplateWeight</a> (select.Selection, AnimationSet-&gt;<a class="code" href="class_NL3D__CAnimationSet.html#a11">getSkeletonWeight</a> (select.Selection), vectString[select.Selection].c_str());
00519                 <font class="keywordflow">else</font>
00520                         <a class="code" href="class_CSlotDlg.html#a3">setSkeletonTemplateWeight</a> (0, NULL, <font class="stringliteral">""</font>);
00521 
00522                 <a class="code" href="class_CSlotDlg.html#a5">setWindowName</a> ();
00523                 Invalidate ();
00524         }
00525 }
00526 
00527 <font class="comment">// ***************************************************************************</font>
00528 
<a name="l00529"></a><a class="code" href="class_CSlotDlg.html#a5">00529</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#a5">CSlotDlg::setWindowName</a> ()<font class="keyword">
</font>00530 <font class="keyword"></font>{
00531         <font class="keywordtype">char</font> tmp[512];
00532         _snprintf (tmp, 512, <font class="stringliteral">"Slot %d : "</font>, Id);
00533         <font class="keywordflow">if</font> (<a class="code" href="class_CSlotDlg.html#a4">isEmpty</a>())
00534                 strcat (tmp, <font class="stringliteral">"empty"</font>);
00535         <font class="keywordflow">else</font>
00536                 strcat (tmp, AnimationName.c_str());
00537 
00538         <font class="keywordflow">if</font> (SkeletonWeightTemplate)     
00539         {
00540                 strcat (tmp, <font class="stringliteral">" ("</font>);
00541                 strcat (tmp, SkeletonName.c_str());
00542                 strcat (tmp, <font class="stringliteral">")"</font>);
00543         }
00544 
00545         GetDlgItem (IDC_SLOT_NAME)-&gt;SetWindowText (tmp);
00546 }
00547 
00548 <font class="comment">// ***************************************************************************</font>
00549 
<a name="l00550"></a><a class="code" href="class_CSlotDlg.html#b17">00550</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b17">CSlotDlg::OnChangeOffset</a>()<font class="keyword"> 
</font>00551 <font class="keyword"></font>{
00552         <font class="comment">// TODO: If this is a RICHEDIT control, the control will not</font>
00553         <font class="comment">// send this notification unless you override the CDialog::OnInitDialog()</font>
00554         <font class="comment">// function and call CRichEditCtrl().SetEventMask()</font>
00555         <font class="comment">// with the ENM_CHANGE flag ORed into the mask.</font>
00556         
00557         <font class="comment">// TODO: Add your control notification handler code here</font>
00558         <a class="code" href="class_CSlotDlg.html#a6">validateTime</a> ();
00559         <a class="code" href="class_CSlotDlg.html#a7">updateScrollBar</a> ();
00560 }
00561 
00562 <font class="comment">// ***************************************************************************</font>
00563 
<a name="l00564"></a><a class="code" href="class_CSlotDlg.html#b18">00564</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b18">CSlotDlg::OnDeltaposOffsetSpin</a>(NMHDR* pNMHDR, LRESULT* pResult)<font class="keyword"> 
</font>00565 <font class="keyword"></font>{
00566         NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
00567         <font class="comment">// TODO: Add your control notification handler code here</font>
00568 
00569         UpdateData ();
00570         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&lt;0)
00571                 Offset++;
00572         <font class="keywordflow">if</font> (pNMUpDown-&gt;iDelta&gt;0)
00573                 Offset--;
00574         UpdateData (FALSE);
00575         <a class="code" href="class_CSlotDlg.html#a6">validateTime</a> ();
00576         <a class="code" href="class_CSlotDlg.html#a7">updateScrollBar</a> ();
00577 
00578         *pResult = 0;
00579 }
00580 
00581 <font class="comment">// ***************************************************************************</font>
00582 
<a name="l00583"></a><a class="code" href="class_CSlotDlg.html#a6">00583</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#a6">CSlotDlg::validateTime</a> ()<font class="keyword">
</font>00584 <font class="keyword"></font>{
00585         <font class="keywordtype">bool</font> reinit=<font class="keyword">false</font>;
00586         <font class="keywordflow">if</font> ((<font class="keywordtype">float</font>)Offset&lt;StartAnimTime)
00587         {
00588                 StartAnimTime=(<font class="keywordtype">float</font>)Offset;
00589                 reinit=<font class="keyword">true</font>;
00590         }
00591         <font class="keywordflow">if</font> ((<font class="keywordtype">float</font>)Offset+AnimationLength/SpeedFactor&gt;EndAnimTime)
00592         {
00593                 EndAnimTime=(<font class="keywordtype">float</font>)Offset+AnimationLength/SpeedFactor;
00594                 reinit=<font class="keyword">true</font>;
00595         }
00596         <font class="keywordflow">if</font> (reinit)
00597                 MainDlg-&gt;<a class="code" href="class_CObjectViewer.html#a12">setAnimTime</a> (StartAnimTime, EndAnimTime);
00598 }
00599 
00600 <font class="comment">// ***************************************************************************</font>
00601 
<a name="l00602"></a><a class="code" href="class_CSlotDlg.html#a7">00602</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#a7">CSlotDlg::updateScrollBar</a> ()<font class="keyword">
</font>00603 <font class="keyword"></font>{
00604         <font class="comment">// Scroll info</font>
00605         SCROLLINFO info;
00606         memset (&amp;info, 0, <font class="keyword">sizeof</font> (info));
00607 
00608         <font class="comment">// Fill the infos</font>
00609         info.fMask=SIF_ALL;
00610         info.nMin=0;
00611         info.nMax=10000;
00612         <font class="keywordflow">if</font> (fabs(EndAnimTime-StartAnimTime)&lt;0.00001f)
00613         {
00614                 info.nPage=1;
00615                 info.nPos=0;
00616         }
00617         <font class="keywordflow">else</font>
00618         {
00619                 info.nPage=(<font class="keywordtype">int</font>)(10000.f*(AnimationLength/SpeedFactor)/(EndAnimTime-StartAnimTime));
00620                 info.nPos=(<font class="keywordtype">int</font>)(10000.f*((<font class="keywordtype">float</font>)Offset-StartAnimTime)/(EndAnimTime-StartAnimTime));
00621         }
00622 
00623         <font class="comment">// Set scrollbar infos</font>
00624         ScrollBarCtrl.SetScrollInfo (&amp;info, TRUE);
00625 
00626         <font class="comment">// Invalidate blend bar</font>
00627         RECT bar;
00628         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00629         ScreenToClient (&amp;bar);
00630         InvalidateRect (&amp;bar);
00631 }
00632 
00633 <font class="comment">// ***************************************************************************</font>
00634 
<a name="l00635"></a><a class="code" href="class_CSlotDlg.html#b19">00635</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b19">CSlotDlg::OnHScroll</a>(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)<font class="keyword"> 
</font>00636 <font class="keyword"></font>{
00637         <font class="comment">// TODO: Add your message handler code here and/or call default</font>
00638         <font class="keywordflow">if</font> (pScrollBar==GetDlgItem (IDC_SCROLLBAR))
00639         {
00640                 <font class="comment">// Only drag and drop</font>
00641                 <font class="keywordflow">if</font> (nSBCode==SB_THUMBTRACK)
00642                 {
00643                         <font class="keywordtype">int</font> DeltaOffset=Offset;
00644                         UpdateData ();
00645                         Offset=(<font class="keywordtype">int</font>)((EndAnimTime-StartAnimTime)*(<font class="keywordtype">float</font>)nPos/10000.f+StartAnimTime);
00646                         DeltaOffset=Offset-DeltaOffset;
00647                         StartTime+=DeltaOffset;
00648                         EndTime+=DeltaOffset;
00649                         UpdateData (FALSE);
00650                         <a class="code" href="class_CSlotDlg.html#a7">updateScrollBar</a> ();
00651                 }
00652         }
00653         CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
00654 }
00655 
00656 <font class="comment">// ***************************************************************************</font>
00657 
<a name="l00658"></a><a class="code" href="class_CSlotDlg.html#a8">00658</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#a8">CSlotDlg::setAnimTime</a> (<font class="keywordtype">float</font> animStart, <font class="keywordtype">float</font> animEnd)<font class="keyword">
</font>00659 <font class="keyword"></font>{
00660         StartAnimTime=animStart;
00661         EndAnimTime=animEnd;
00662         <a class="code" href="class_CSlotDlg.html#a7">updateScrollBar</a> ();
00663         <a class="code" href="class_CSlotDlg.html#a13">computeLength</a> ();
00664 }
00665 
00666 <font class="comment">// ***************************************************************************</font>
00667 
<a name="l00668"></a><a class="code" href="class_CSlotDlg.html#a9">00668</a> <font class="keywordtype">float</font> <a class="code" href="class_CSlotDlg.html#a9">CSlotDlg::getTimeIncrement</a> ()<font class="keyword">
</font>00669 <font class="keyword"></font>{
00670         <font class="keywordflow">return</font> (EndAnimTime-StartAnimTime)/100.f;
00671 }
00672 
00673 <font class="comment">// ***************************************************************************</font>
00674 
<a name="l00675"></a><a class="code" href="class_CSlotDlg.html#b20">00675</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b20">CSlotDlg::OnClamp</a>()<font class="keyword"> 
</font>00676 <font class="keyword"></font>{
00677         <font class="comment">// TODO: Add your control notification handler code here</font>
00678         
00679 }
00680 
00681 <font class="comment">// ***************************************************************************</font>
00682 
<a name="l00683"></a><a class="code" href="class_CSlotDlg.html#b21">00683</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b21">CSlotDlg::OnRepeat</a>()<font class="keyword"> 
</font>00684 <font class="keyword"></font>{
00685         <font class="comment">// TODO: Add your control notification handler code here</font>
00686         
00687 }
00688 
00689 <font class="comment">// ***************************************************************************</font>
00690 
<a name="l00691"></a><a class="code" href="class_CSlotDlg.html#b22">00691</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b22">CSlotDlg::OnDisable</a>()<font class="keyword"> 
</font>00692 <font class="keyword"></font>{
00693         <font class="comment">// TODO: Add your control notification handler code here</font>
00694         
00695 }
00696 
00697 <font class="comment">// ***************************************************************************</font>
00698 
<a name="l00699"></a><a class="code" href="class_CSlotDlg.html#b23">00699</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b23">CSlotDlg::OnAlignBlend</a>()<font class="keyword"> 
</font>00700 <font class="keyword"></font>{
00701         <font class="comment">// Refresh data</font>
00702         UpdateData ();
00703 
00704         <font class="comment">// Change some of them</font>
00705         StartTime=Offset;
00706         EndTime=(<font class="keywordtype">int</font>)((<font class="keywordtype">float</font>)Offset+AnimationLength/SpeedFactor);
00707 
00708         <font class="comment">// Invalidate UI</font>
00709         UpdateData (FALSE);
00710 
00711         <font class="comment">// Invalidate blend bar</font>
00712         RECT bar;
00713         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00714         ScreenToClient (&amp;bar);
00715         InvalidateRect (&amp;bar);
00716 }
00717 
00718 <font class="comment">// ***************************************************************************</font>
00719 
<a name="l00720"></a><a class="code" href="class_CSlotDlg.html#a2">00720</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#a2">CSlotDlg::setAnimation</a> (uint animationId, <a class="code" href="class_NL3D__CAnimation.html">NL3D::CAnimation</a> *animation, <font class="keyword">const</font> <font class="keywordtype">char</font>* name)<font class="keyword">
</font>00721 <font class="keyword"></font>{
00722         Animation=animation;
00723         AnimationId=animationId;
00724         <font class="keywordflow">if</font> (animation)
00725         {
00726                 <a class="code" href="debug_h.html#a6">nlassert</a> (name);
00727                 AnimationName=name;
00728                 <a class="code" href="class_CSlotDlg.html#a13">computeLength</a> ();
00729         }
00730         OffsetCtrl.EnableWindow (Animation!=NULL);
00731         StartTimeCtrl.EnableWindow (Animation!=NULL);
00732         StartBlendCtrl.EnableWindow (Animation!=NULL);
00733         SpeddFactorCtrl.EnableWindow (Animation!=NULL);
00734         SmoothnessCtrl.EnableWindow (Animation!=NULL);
00735         EndTimeCtrl.EnableWindow (Animation!=NULL);
00736         EndBlendCtrl.EnableWindow (Animation!=NULL);
00737         OffsetSpinCtrl.EnableWindow (Animation!=NULL);
00738         StartTimeSpinCtrl.EnableWindow (Animation!=NULL);
00739         StartBlendSpinCtrl.EnableWindow (Animation!=NULL);
00740         SpeedFactorSpinCtrl.EnableWindow (Animation!=NULL);
00741         SmoothnessSpinCtrl.EnableWindow (Animation!=NULL);
00742         EndTimeSpinCtrl.EnableWindow (Animation!=NULL);
00743         EndBlendSpinCtrl.EnableWindow (Animation!=NULL);
00744         ScrollBarCtrl.EnableWindow (Animation!=NULL);
00745         AlignBlendCtrl.EnableWindow (Animation!=NULL);
00746         InvertSkeletonWeightCtrl.EnableWindow (Animation!=NULL);
00747         GetDlgItem (IDC_CLAMP)-&gt;EnableWindow (Animation!=NULL);
00748         GetDlgItem (IDC_REPEAT)-&gt;EnableWindow (Animation!=NULL);
00749         GetDlgItem (IDC_DISABLE)-&gt;EnableWindow (Animation!=NULL);
00750         <a class="code" href="class_CSlotDlg.html#a5">setWindowName</a> ();
00751 
00752         <font class="comment">// Invalidate blend bar</font>
00753         RECT bar;
00754         GetDlgItem (IDC_DOOMY_BLEND)-&gt;GetWindowRect (&amp;bar);
00755         ScreenToClient (&amp;bar);
00756         InvalidateRect (&amp;bar);
00757 }
00758 
00759 <font class="comment">// ***************************************************************************</font>
00760 
<a name="l00761"></a><a class="code" href="class_CSlotDlg.html#a10">00761</a> <font class="keywordtype">float</font> <a class="code" href="class_CSlotDlg.html#a10">CSlotDlg::getTimeOffset</a> ()<font class="keyword">
</font>00762 <font class="keyword"></font>{
00763         <font class="keywordflow">return</font> (<font class="keywordtype">float</font>)Offset/MainDlg-&gt;<a class="code" href="class_CObjectViewer.html#a15">getFrameRate</a> ();
00764 }
00765 
00766 <font class="comment">// ***************************************************************************</font>
00767 
<a name="l00768"></a><a class="code" href="class_CSlotDlg.html#a11">00768</a> <font class="keywordtype">float</font> <a class="code" href="class_CSlotDlg.html#a11">CSlotDlg::getStartTime</a> ()<font class="keyword">
</font>00769 <font class="keyword"></font>{
00770         <font class="keywordflow">return</font> (<font class="keywordtype">float</font>)StartTime/MainDlg-&gt;<a class="code" href="class_CObjectViewer.html#a15">getFrameRate</a> ();
00771 }
00772 
00773 <font class="comment">// ***************************************************************************</font>
00774 
<a name="l00775"></a><a class="code" href="class_CSlotDlg.html#a12">00775</a> <font class="keywordtype">float</font> <a class="code" href="class_CSlotDlg.html#a12">CSlotDlg::getEndTime</a> ()<font class="keyword">
</font>00776 <font class="keyword"></font>{
00777         <font class="keywordflow">return</font> (<font class="keywordtype">float</font>)EndTime/MainDlg-&gt;<a class="code" href="class_CObjectViewer.html#a15">getFrameRate</a> ();
00778 }
00779 
00780 <font class="comment">// ***************************************************************************</font>
00781 
<a name="l00782"></a><a class="code" href="class_CSlotDlg.html#a13">00782</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#a13">CSlotDlg::computeLength</a> ()<font class="keyword">
</font>00783 <font class="keyword"></font>{
00784         <font class="keywordflow">if</font> (Animation)
00785                 AnimationLength=(Animation-&gt;<a class="code" href="class_NL3D__CAnimation.html#a6">getEndTime</a>()-Animation-&gt;<a class="code" href="class_NL3D__CAnimation.html#a5">getBeginTime</a>())*MainDlg-&gt;<a class="code" href="class_CObjectViewer.html#a15">getFrameRate</a>();
00786 }
00787 
00788 <font class="comment">// ***************************************************************************</font>
00789 
00790 
<a name="l00791"></a><a class="code" href="class_CSlotDlg.html#b24">00791</a> <font class="keywordtype">void</font> <a class="code" href="class_CSlotDlg.html#b24">CSlotDlg::OnDestroy</a>()<font class="keyword"> 
</font>00792 <font class="keyword"></font>{
00793         <font class="comment">// TODO: Add your message handler code here</font>
00794         CDialog::OnDestroy();
00795 }
</div></pre>

<!-- footer -->
<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
</TD>
<TD WIDTH=15><IMG  SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>