00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM yyyy) 00022 ** Modified by : David Beilloin (Nov 2009) 00023 **=======================================================================*/ 00024 00025 00026 #ifndef _SO_VRMLBILLBOARD_ 00027 #define _SO_VRMLBILLBOARD_ 00028 00029 #include <Inventor/fields/SoSFBool.h> 00030 #include <Inventor/fields/SoSFEnum.h> 00031 #include <Inventor/fields/SoSFVec3f.h> 00032 #include <Inventor/fields/SoSFNode.h> 00033 #include <Inventor/nodes/SoNode.h> 00034 #include <Inventor/VRMLnodes/SoVRMLGroup.h> 00035 00036 00037 #if defined(OIV_IGNORE_VRML_DEPRECATED) 00038 #include <SoDeprecationRules.h> 00039 #pragma push_macro("SoDEPRECATED_CLASS") 00040 #pragma push_macro("SoDEPRECATED_TYPEDEF") 00041 #undef SoDEPRECATED_CLASS 00042 #undef SoDEPRECATED_TYPEDEF 00043 #define SoDEPRECATED_CLASS(x,y) 00044 #define SoDEPRECATED_TYPEDEF(x,y) 00045 #endif 00046 00048 // 00049 // Class: SoVRMLBillboard 00050 // 00051 // VRMLGroup group node: state is saved before traversing children 00052 // and restored afterwards. 00053 // 00055 00056 #include <Inventor/fields/SoSFBitMask.h> 00057 class SoDEPRECATED SoVRMLBillboard : public SoVRMLGroup { 00184 00185 SO_NODE_HEADER(SoVRMLBillboard); 00186 00187 00188 public: 00192 SoSFVec3f axisOfRotation; 00193 00211 SoSFBool useSphereBBox; 00212 00216 SoVRMLBillboard(); 00217 00218 // Constructor that takes approximate number of children 00219 SoVRMLBillboard(int nChildren); 00220 00221 private: 00222 // Implement actions 00223 virtual void doAction(SoAction *action); 00224 virtual void callback(SoCallbackAction *action); 00225 virtual void GLRender(SoGLRenderAction *action); 00226 virtual void getBoundingBox(SoGetBoundingBoxAction *action); 00227 virtual void rayPick(SoRayPickAction *action); 00228 00229 // These methods make render traversal faster by implementing 00230 // different rendering paths corresponding to different action 00231 // path codes. 00232 virtual void GLRenderBelowPath(SoGLRenderAction *action); 00233 virtual void GLRenderInPath(SoGLRenderAction *action); 00234 virtual void GLRenderOffPath(SoGLRenderAction *action); 00235 00236 private: 00237 static void initClass(); 00238 static void exitClass(); 00239 00240 private: 00241 00242 virtual ~SoVRMLBillboard(); 00243 00244 private: 00245 // call by constructor 00246 void commonConstructor(const int nChildren); 00247 00248 void align(SoState *state, const bool flag=true); 00249 }; 00250 00251 00252 00253 #if defined(OIV_IGNORE_VRML_DEPRECATED) 00254 #pragma pop_macro("SoDEPRECATED_TYPEDEF") 00255 #pragma pop_macro("SoDEPRECATED_CLASS") 00256 #endif 00257 00258 #endif /* _SO_VRMLBILLBOARD_ */ 00259