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-2014 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : G.TALLEC (May 2007) 00022 **=======================================================================*/ 00023 00024 #ifndef _SB_PROJECTION_COORDINATES 00025 #define _SB_PROJECTION_COORDINATES 00026 00027 #include <Inventor/SbLinear.h> 00028 #include <Inventor/SbString.h> 00029 00030 #include <Inventor/STL/vector> 00031 00032 #if defined(_WIN32) 00033 #pragma warning ( push ) 00034 #pragma warning ( disable: 4251 ) 00035 #endif 00036 00037 class SoNode; 00038 class SoProjection; 00039 00060 class SbProjectionCoordinates 00061 { 00062 public: 00063 00067 SbProjectionCoordinates( SoProjection *projection ); 00068 00072 SbProjectionCoordinates(); 00073 00077 ~SbProjectionCoordinates(); 00078 00083 SbVec3f *getCoordinates(){return m_projCoords;} 00084 00088 void setProjection( SoProjection *projection){ m_projection = projection;} 00089 00093 void resetCache(SoNode *node); 00094 00098 void initCoordinates(SoNode *node,int size); 00099 00103 SbBool cacheIsValid(SoNode *node); 00104 00105 private: 00106 00110 void init(); 00111 00115 int m_maxSize; 00116 00120 int m_size; 00121 00125 SbVec3f *m_projCoords; 00126 00130 SoProjection *m_projection; 00131 00132 private: 00136 uint64_t m_nodeId; 00137 00141 uint64_t m_projNodeId; 00142 }; 00143 00144 #if defined(_WIN32) 00145 #pragma warning ( pop ) 00146 #endif 00147 00148 #endif /* _SB_PROJECTION_ */ 00149 00150