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-2021 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : FEI (Mar 2015) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SO_BILLBOARD_H_ 00026 #define _SO_BILLBOARD_H_ 00027 00028 #include <Inventor/fields/SoSFBool.h> 00029 #include <Inventor/fields/SoSFEnum.h> 00030 #include <Inventor/fields/SoSFVec3f.h> 00031 #include <Inventor/fields/SoSFNode.h> 00032 #include <Inventor/fields/SoSFBitMask.h> 00033 #include <Inventor/nodes/SoSeparator.h> 00034 #include <Inventor/nodes/SoMatrixTransform.h> 00035 00037 namespace inventor 00038 { 00039 namespace node 00040 { 00041 class SoBillboardTransform; 00042 } 00043 } 00118 class SoBillboard : public SoSeparator 00119 { 00120 SO_NODE_HEADER(SoBillboard); 00121 00122 public: 00126 SoSFVec3f axisOfRotation; 00127 00138 SoSFBool useSphereBBox; 00139 00143 SoBillboard(); 00144 00146 SoBillboard(int nChildren); 00147 00148 private: 00149 // Implement actions 00150 virtual void doAction(SoAction *action); 00151 virtual void callback(SoCallbackAction *action); 00152 virtual void GLRender(SoGLRenderAction *action); 00153 virtual void getBoundingBox(SoGetBoundingBoxAction *action); 00154 virtual void rayPick(SoRayPickAction *action); 00155 00156 private: 00157 static void initClass(); 00158 static void exitClass(); 00159 00160 private: 00161 00162 // Destructor. 00163 virtual ~SoBillboard(); 00164 00165 private: 00166 // call by constructor 00167 void commonConstructor(const int nChildren); 00168 00169 inventor::node::SoBillboardTransform* m_billboardTransform; 00170 00171 // OIV_BILLBOARD_EXTRA_BBOX environment variable status 00172 static bool s_extraBboxActivated; 00173 }; 00174 00175 #endif /* _SO_BILLBOARD_H_ */ 00176