Gizmo3D

gzBillboard.h

Go to the documentation of this file.
00001 //*****************************************************************************
00002 // File         : gzBillboard.h
00003 // Module       : 
00004 // Description  : Class definition of the gzBillboard class
00005 // Author       : Anders Modén      
00006 // Product      : Gizmo3D 2.1.1
00007 //      
00008 // Copyright © 2003- Saab Training Systems AB, Sweden
00009 //          
00010 // NOTE:    Gizmo3D is a high performance 3D Scene Graph and effect visualisation 
00011 //          C++ toolkit for Linux, Mac OS X, Windows (Win32) and IRIX® for  
00012 //          usage in Game or VisSim development.
00013 //
00014 //
00015 // Revision History...                          
00016 //                                  
00017 // Who  Date    Description                     
00018 //                                  
00019 // AMO  990511  Created file    
00020 //
00021 //******************************************************************************
00022 #ifndef __GZ_BILLBOARD_H__
00023 #define __GZ_BILLBOARD_H__
00024 
00030 #include "gzTransform.h"
00031 
00032 typedef enum {  GZ_BILLBOARD_AXIS ,                 
00033                 GZ_BILLBOARD_POINT_AXIS ,           
00034                 GZ_BILLBOARD_POINT_CAMERA_UP ,      
00035                 GZ_BILLBOARD_POINT_CAMERA_ORTHO     
00036 } gzBillboardType;
00037 
00038 //******************************************************************************
00039 // Class    : gzBillboard
00040 //                                  
00041 // Purpose  : -
00042 //                                  
00043 // Notes    : - 
00044 //                                  
00045 // Revision History...                          
00046 //                                  
00047 // Who  Date    Description                     
00048 //                                  
00049 // AMO  990511  Created 
00050 //                                  
00051 //******************************************************************************
00052 class gzBillboard : public gzTransform
00053 {
00054 public:
00056 
00063     GZ_GRAPH_EXPORT gzBillboard(const gzString &name=GZ_EMPTY_STRING);
00064 
00066     GZ_GRAPH_EXPORT virtual ~gzBillboard(){};
00067 
00068     GZ_DECLARE_TYPE_INTERFACE_EXPORT(GZ_GRAPH_EXPORT);  // typed interface
00069 
00070     // ---------- Common graph functions --------------------------------
00071 
00073 
00076     GZ_GRAPH_EXPORT virtual gzVoid updateNode();
00077 
00078     // ---------- Clone interface ---------------------------------------
00080     GZ_GRAPH_EXPORT virtual gzReference* clone() const;
00081 
00082     // ---------- billboard commands -------------------------------------
00083 
00085     GZ_GRAPH_EXPORT gzVoid setAxis(gzVec3 axis);
00086 
00088 
00091     GZ_GRAPH_EXPORT gzVoid setType(gzBillboardType type);
00092 
00093     //Aligns billboard orthogonal to the viewer center z axis.
00101     GZ_GRAPH_EXPORT gzVoid usePlanarBillboard(gzBool on);
00102 
00103     // ---------- Action Interface --------------------------------------
00104 
00105     GZ_GRAPH_EXPORT virtual gzVoid preTraverseAction( gzTraverseAction *actionclass , gzContext *context);
00106 
00107 protected:
00108 
00109     GZ_GRAPH_EXPORT gzVoid calculateBillboardTransform(gzContext *context,gzBool force=FALSE);
00110 
00111 private:
00112 
00113     gzBillboardType     m_type:3;
00114     gzBool              m_usePlanarBillboard:1;
00115 
00116     gzVec3              m_upAxis;
00117     gzVec3              m_lastCalc_e;
00118 
00119 };
00120 
00121 #endif

Documentation for Gizmo3D generated at Wed Feb 20 11:54:03 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond