00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00023 #ifndef INCLUDE_3D_FACE_H
00024 #define INCLUDE_3D_FACE_H
00025 
00026 #include "3d.h"
00027 #include "texture.h"
00028 #include "curve.h"
00029 #include "material.h"
00030 #include "layout.h"
00031 #include "text3d.h"
00032 
00033 typedef Layout<GLdouble> LayoutDouble;
00046 class Face
00047 {
00048 public:
00049         
00050         Recorder childRecorder; 
00051         int idFace,idControl;   
00052         BOOL noPicking;                 
00053         BOOL view;                              
00054         BOOL blending;              
00055         MyString name;                  
00056         Text3D *text;                   
00057         Material material;              
00058         Texture *texture;               
00059         Curve curve;                    
00060         float line; 
00061         Material lineMaterial;  
00062         BOOL antialias;                 
00063         BOOL fog;                               
00064 
00065         
00066         Point2D<LayoutDouble> size;             
00067         Point2D<int> center;                    
00068         Point3D<LayoutDouble> position; 
00069         Point3D<GLdouble> scale;                
00070         Point3D<GLdouble> angle;                
00071         Point2D<GLdouble> computeSize;  
00072         Point2D<GLdouble> computeCenter;
00073         Point3D<GLdouble> computePosition;
00074         double ratioXY;                                 
00075 
00076 public:
00077         Face();
00078         ~Face();
00079         void Set (char *name,int idControl,int idFace,BOOL view);
00080         BOOL ConfigDynamicLayout(Face *father,double xCenter,double yCenter,double xSize,double ySize);
00081         void ConfigStaticLayout(double xCenter,double yCenter,double zCenter,double xSize,double ySize);
00082         void ConfigCenter(int xCenter,int yCenter);
00083         void Move(double x,double y,double z);
00084         void MoveTo(double x,double y,double z);
00085         void MovingInside();
00086         void Zero();
00087         void operator=(Face &source);
00088         void Draw(BOOL onPicking);
00089         void GetCorners(Point3D<double> *corners);
00090         void ComputeLayout();
00091 
00092 };
00093 
00094 typedef MyTreeNode<Face> FaceNode; 
00095 
00096 #endif