HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GP_CorrectionFrame.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: Domain pasting Library (C++)
7  *
8  * COMMENTS: Transformation frame with correction.
9  *
10  */
11 
12 #ifndef __GP_CorrectionFrame_h__
13 #define __GP_CorrectionFrame_h__
14 
15 #include "GP_API.h"
16 #include "GP_Xform.h"
17 #include "GP_Frame.h"
18 
19 class GP_FrameHierarchy;
20 
21 
23 {
24  friend class GP_FrameHierarchy;
25 
26 public:
27  // Class c-tors and d-tor.
28  GP_CorrectionFrame(void);
29  GP_CorrectionFrame(const GP_XformHandle &handle);
30  GP_CorrectionFrame(const GP_Frame &frame,
31  const GP_XformHandle &handle, int history);
33  virtual ~GP_CorrectionFrame(void);
34 
35  // Deep copy from source frame. Assume the frame is a correction frame.
36  virtual void copyFrom(const GP_Frame &src);
37 
38  // Change the transformation and reset the correction xform to identity:
39  virtual void changeXform(const GP_XformHandle &handle);
40 
41  // Query the history flag:
42  int hasHistory(void) const { return myHistoryFlag; }
43 
44  // Query or set the correction transformation:
45  const GP_XformHandle &correction(void) const { return myCorrection; }
46 
47 
48 protected:
49  // Set the history flag:
50  void eraseHistory (void) { myHistoryFlag = 0; }
51  void createHistory(void) { myHistoryFlag = 1; }
52 
53  // Set the correction transformation:
54  void correction(const GP_XformHandle &xf) { myCorrection = xf; }
55 
56 
57 private:
58  GP_XformHandle myCorrection; // computed upon insertion in hierarchy
59  int myHistoryFlag; // 1 if affected by parent xformation
60 };
61 
62 #endif
#define GP_API
Definition: GP_API.h:10
int hasHistory(void) const
virtual void copyFrom(const GP_Frame &src)
const GP_XformHandle & correction(void) const
virtual void changeXform(const GP_XformHandle &handle)
void correction(const GP_XformHandle &xf)
GLenum src
Definition: glcorearb.h:1792