source: golgotha/src/maxtool/sdk_inc/keyreduc.h @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1/**********************************************************************
2 *<
3        FILE: keyreduc.h
4
5        DESCRIPTION:  Key reduction
6
7        CREATED BY: Rolf Berteig
8
9        HISTORY: created 9/30/95
10
11 *>     Copyright (c) 1994, All Rights Reserved.
12 **********************************************************************/
13
14#ifndef __KEYREDUC__
15#define __KEYREDUC__
16
17#define DEFULAT_KEYREDUCE_THRESHOLD             (0.5f)
18
19// Values returned from Progress
20#define KEYREDUCE_ABORT         -1              // Stops processing and undoes any key reduction
21#define KEYREDUCE_STOP          0               // Stops processing, but keeps any reduction done so far
22#define KEYREDUCE_CONTINUE      1               // Keeps going.
23
24// A callback so progress can be made during key reduction
25class KeyReduceStatus {
26        public:
27                // Called once before reduction starts. 'total' is the number
28                // reduction canidate keys.
29                virtual void Init(int total)=0;
30
31                // Called every now and again. 'p' is the number of keys
32                // processed. So % done is p/total * 100.               
33                virtual int Progress(int p)=0;
34        };
35
36// Attempts to delete keys that lie within the given time range.
37// The controller will be sampled within the range in 'step' size
38// increments. After the key reduction, the controller's values
39// at each step are gauranteed to be withen 'threshold' distance
40// from their original values.
41//
42CoreExport int ApplyKeyReduction(
43                Control *cont,Interval range,float thresh,TimeValue step,
44                KeyReduceStatus *status);
45
46
47#endif  //__KEYREDUC__
48
Note: See TracBrowser for help on using the repository browser.