Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

primitive.h

Go to the documentation of this file.
00001 /* ***********************************************************************************
00002         Writer:         Sebastien Bloc
00003         Copyright:      2003-2004
00004         eMail:          sebastien.bloc@free.fr
00005         URL:            http://mignonsoft.free.fr
00006 
00007         This program is free software; you can redistribute it and/or
00008         modify it under the terms of the GNU General Public License
00009         as published by the Free Software Foundation; either version 2
00010         of the License, or (at your option) any later version.
00011 
00012         This program is distributed in the hope that it will be useful,
00013         but WITHOUT ANY WARRANTY; without even the implied warranty of
00014         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015         GNU General Public License for more details.
00016         http://www.gnu.org/copyleft/gpl.html
00017 *********************************************************************************** */
00018 
00023 #ifndef INCLUDE_3D_PRIMITIVE_H
00024 #define INCLUDE_3D_PRIMITIVE_H
00025 
00026 #include "3d.h"
00027 #include "layout.h"
00028 #include "face.h"
00029 #include "control.h"
00030 
00035 class Primitive
00036 {
00037 private:
00038         MyStack<FaceNode *> stack;
00039         FaceNode * AddBox (char *name,int idControl,BOOL isDynamic,GLdouble *depth,BOOL viewBack);      
00040         void GetCornersRecursive(FaceNode *faceNode,BOOL isObjective,Point3D<double> *points);
00041 
00042 public:
00043         MyTree<Face> tree;
00044 
00045         Primitive();
00046         ~Primitive();
00047         void Push();                    
00048         void Pop();                             
00049         FaceNode * Peek();              
00050 
00051         FaceNode * GoTo(int childNumber);
00052         FaceNode * GoTo(FaceNode *node);
00053         FaceNode * GoToParent();
00054 
00055         void ViewDebug(FaceNode *node=NULL);
00056         BOOL Draw(BOOL isPicking);
00057         BOOL Draw(FaceNode *node,BOOL isPicking);
00058         FaceNode * Find(int idControl,int idFace,FaceNode *node=NULL);
00059         void BeginContainer(int idControl,double xConstCenter,double xPercentCenter,double yConstCenter,double yPercentCenter,double xConstSize,double xPercentSize,double yConstSize,double yPercentSize); // debut du conteneur
00060         void EndContainer(); // fin du conteneur
00061         FaceNode * AddFace (char *name,int idControl,int idFace,BOOL view);
00062         FaceNode * AddFace (char *name,int idControl,int idFace,BOOL view,double xConstCenter,double xPercentCenter,double yConstCenter,double yPercentCenter,double zConstCenter,double xConstSize,double xPercentSize,double yConstSize,double yPercentSize);
00063         FaceNode * AddBox (char *name,int idControl,GLdouble depth,BOOL viewBack);   // creation avec depth static
00064         FaceNode * AddBox (char *name,int idControl,GLdouble *depth,BOOL viewBack);  // creation avec depth dynamic
00065         Point2D<double> GetLocalPos(FaceNode *faceNode,Point2D<double> absolutePos);
00066         void GetCorners(FaceNode *faceNode,Point3D<double> *points);
00067         void ComputeLayout(FaceNode *faceNode);
00068         BOOL ReOrderForBlending(FaceNode *faceNode);
00069         void ReOrderForBlending();
00070 
00071 
00072 };
00073 
00074 #endif

Generated on Fri Aug 20 19:19:49 2004 for 3d Controls by doxygen 1.3.6