Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

545 lines
28 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. ///////////////////////////////////////////////////////////////////////
  3. // SpeedTreeRT.h
  4. //
  5. // *** INTERACTIVE DATA VISUALIZATION (IDV) PROPRIETARY INFORMATION ***
  6. //
  7. // This software is supplied under the terms of a license agreement or
  8. // nondisclosure agreement with Interactive Data Visualization and may
  9. // not be copied or disclosed except in accordance with the terms of
  10. // that agreement.
  11. //
  12. // Copyright (c) 2003-2005 IDV, Inc.
  13. // All Rights Reserved.
  14. //
  15. // IDV, Inc.
  16. // http://www.idvinc.com
  17. //
  18. // Release version 1.8.0
  19. #pragma once
  20. // storage-class specification
  21. #if (defined(WIN32) || defined(XENON)) && defined(SPEEDTREE_DLL_EXPORTS)
  22. #define ST_STORAGE_CLASS __declspec(dllexport)
  23. #else
  24. #define ST_STORAGE_CLASS
  25. #endif
  26. // Macintosh export control
  27. #ifdef __APPLE__
  28. #pragma export on
  29. #endif
  30. // specify calling convention
  31. #if defined(WIN32) || defined(XENON)
  32. #define CALL_CONV __cdecl
  33. #else
  34. #define CALL_CONV
  35. #endif
  36. // forward references
  37. class CIndexedGeometry;
  38. class CTreeEngine;
  39. class CLeafGeometry;
  40. class CLightingEngine;
  41. class CWindEngine;
  42. class CTreeFileAccess;
  43. class CSimpleBillboard;
  44. class CFrondEngine;
  45. struct STreeInstanceData;
  46. struct SInstanceList;
  47. struct SEmbeddedTexCoords;
  48. struct SCollisionObjects;
  49. class CProjectedShadow;
  50. ///////////////////////////////////////////////////////////////////////
  51. // class SpeedTreeRT
  52. //
  53. // In an effort to make the SpeedTreeRT.h header file dependency free
  54. // and easy to include into almost any project, a number of steps have
  55. // been taken:
  56. //
  57. // 1. No external header files need to be included by SpeedTreeRT.h
  58. // or by the application before including it.
  59. //
  60. // 2. Most of the implementation of the class is hidden by pointers
  61. // to the major sections of the library (the internal classes
  62. // can then just be forward-referenced)
  63. //
  64. // 3. Where possible, basic C++ datatypes are used to define the
  65. // member functions' parameters.
  66. //
  67. // Because almost all of the implementation details are hidden, none of
  68. // the functions for CSpeedTreeRT are inlined. However, inlined functions
  69. // were copiously used within the library.
  70. class ST_STORAGE_CLASS CSpeedTreeRT
  71. {
  72. public:
  73. ///////////////////////////////////////////////////////////////////////
  74. // Enumerations
  75. enum EWindMethod
  76. {
  77. WIND_GPU, WIND_CPU, WIND_NONE
  78. };
  79. enum ELodMethod
  80. {
  81. LOD_POP, LOD_SMOOTH, LOD_NONE = 3
  82. };
  83. enum ELightingMethod
  84. {
  85. LIGHT_DYNAMIC, LIGHT_STATIC
  86. };
  87. enum EStaticLightingStyle
  88. {
  89. SLS_BASIC, SLS_USE_LIGHT_SOURCES, SLS_SIMULATE_SHADOWS
  90. };
  91. enum ECollisionObjectType
  92. {
  93. CO_SPHERE, CO_CYLINDER, CO_BOX
  94. };
  95. ///////////////////////////////////////////////////////////////////////
  96. // SGeometry bit vectors
  97. //
  98. // Passed into GetGeometry() in order to mask out unneeded geometric elements
  99. #define SpeedTree_BranchGeometry (1 << 0)
  100. #define SpeedTree_FrondGeometry (1 << 1)
  101. #define SpeedTree_LeafGeometry (1 << 2)
  102. #define SpeedTree_BillboardGeometry (1 << 3)
  103. #define SpeedTree_SimpleBillboardOverride (1 << 4)
  104. #define SpeedTree_Nearest360Override (1 << 5)
  105. #define SpeedTree_AllGeometry (SpeedTree_BranchGeometry + SpeedTree_FrondGeometry + SpeedTree_LeafGeometry + SpeedTree_BillboardGeometry)
  106. ///////////////////////////////////////////////////////////////////////
  107. // struct SGeometry declaration
  108. struct ST_STORAGE_CLASS SGeometry
  109. {
  110. SGeometry( );
  111. ~SGeometry( );
  112. ///////////////////////////////////////////////////////////////////////
  113. // struct SGeometry::SIndexed declaration
  114. struct ST_STORAGE_CLASS SIndexed
  115. {
  116. SIndexed( );
  117. ~SIndexed( );
  118. // these values change depending on the active discrete LOD level
  119. int m_nDiscreteLodLevel; // range: [0, GetNumBranch/FrondLodLevels( ) - 1], -1 if inactive
  120. unsigned short m_usNumStrips; // total number of strips in current LOD
  121. const unsigned short* m_pStripLengths; // lengths of strips in current LOD (m_usNumStrips in length)
  122. const unsigned short** m_pStrips; // triangle strip indices (m_usNumStrips in length)
  123. // these values are shared across all discete LOD levels
  124. unsigned short m_usVertexCount; // total vertex count in tables, referenced by all LOD levels
  125. const unsigned int* m_pColors; // RGBA values for each leaf - static lighting only (m_usVertexCount in length)
  126. const float* m_pNormals; // normals for each vertex (3 * m_usVertexCount in length)
  127. const float* m_pBinormals; // binormals (bump mapping) for each vertex (3 * m_usVertexCount in length)
  128. const float* m_pTangents; // tangents (bump mapping) for each vertex (3 * m_usVertexCount in length)
  129. const float* m_pCoords; // coordinates for each vertex (3 * m_usVertexCount in length)
  130. const float* m_pTexCoords0; // 1st layer (s,t) texcoords for each vertex (2 * m_usVertexCount in length)
  131. const float* m_pTexCoords1; // 2nd layer (s,t) texcoords for each vertex (2 * m_usVertexCount in length)
  132. const float* m_pWindWeights; // values from from 0.0 for rigid to 1.0 for flexible (m_usVertexCount in length)
  133. const unsigned char* m_pWindMatrixIndices; // table of wind matrix indices (m_usVertexCount in length)
  134. };
  135. ///////////////////////////////////////////////////////////////////////
  136. // struct SGeometry::SLeaf declaration
  137. struct ST_STORAGE_CLASS SLeaf
  138. {
  139. SLeaf( );
  140. ~SLeaf( );
  141. // active LOD level data
  142. bool m_bIsActive; // flag indicating visibility
  143. float m_fAlphaTestValue; // 0.0 to 255.0 alpha testing value, used for fading
  144. int m_nDiscreteLodLevel; // range: [0, GetNumLeafLodLevels( ) - 1]
  145. unsigned short m_usLeafCount; // number of leaves stored in this structure
  146. // tables for referencing the leaf cluster table
  147. const unsigned char* m_pLeafMapIndices; // references which leaf texture map used for each leaf (m_usLeafCount in length)
  148. const unsigned char* m_pLeafClusterIndices; // references which leaf cluster used for each leaf (m_usLeafCount in length)
  149. const float* m_pCenterCoords; // (x,y,z) values for the centers of leaf clusters (3 * m_usLeafCount in length)
  150. const float** m_pLeafMapTexCoords; // table of unique leaf cluster texcoords (m_usLeafCount in length) - each entry
  151. // points to 4 pairs of (s,t) texcoords stored in one contiguous array
  152. const float** m_pLeafMapCoords; // table of unique leaf cluster coordinates (m_usLeafCount in length) - each entry
  153. // points to 4 sets of (x,y,z,0) coordinates stored in one contiguous array
  154. // remaining vertex attributes
  155. const unsigned int* m_pColors; // RGBA values for each leaf (m_usLeafCount in length)
  156. const float* m_pNormals; // normals for each leaf (3 * m_usLeafCount in length)
  157. const float* m_pBinormals; // binormals (bump mapping) for each leaf (3 * m_usLeafCount in length)
  158. const float* m_pTangents; // tangents (bump mapping) for each leaf (3 * m_usLeafCount in length)
  159. const float* m_pWindWeights; // values from from 0.0 for rigid to 1.0 for flexible (m_usLeafCount in length)
  160. const unsigned char* m_pWindMatrixIndices; // table of wind matrix indices (m_usLeafCount in length)
  161. };
  162. ///////////////////////////////////////////////////////////////////////
  163. // struct SGeometry::SBillboard declaration
  164. struct ST_STORAGE_CLASS SBillboard
  165. {
  166. SBillboard( );
  167. ~SBillboard( );
  168. bool m_bIsActive; // flag indicating visibility
  169. const float* m_pTexCoords; // 4 pairs of (s,t) texcoords stored in one contiguous array
  170. const float* m_pCoords; // 4 sets of (x,y,z) coordindates stored in one contiguous array
  171. float m_fAlphaTestValue; // 0.0 to 255.0 alpha testing value, used for fading
  172. };
  173. ///////////////////////////////////////////////////////////////////////
  174. // branch geometry
  175. SIndexed m_sBranches; // holds the branch vertices and index buffers for all
  176. // of the discrete LOD levels
  177. float m_fBranchAlphaTestValue; // 0.0 to 255.0 alpha testing value, used for fading
  178. ///////////////////////////////////////////////////////////////////////
  179. // frond geometry
  180. SIndexed m_sFronds; // holds the frond vertices and index buffers for all
  181. // of the discrete LOD levels
  182. float m_fFrondAlphaTestValue; // 0.0 to 255.0 alpha testing value, used for fading
  183. ///////////////////////////////////////////////////////////////////////
  184. // leaf geometry
  185. SLeaf m_sLeaves0; // holds the primary leaf geometry, alpha fades into
  186. SLeaf m_sLeaves1; // m_sLeaves1 during LOD transitions
  187. ///////////////////////////////////////////////////////////////////////
  188. // billboard geometry
  189. SBillboard m_sBillboard0; // holds the main simple billboard geometry, alpha fades
  190. SBillboard m_sBillboard1; // into m_sBillboard1 in 360 degree mode
  191. SBillboard m_sHorizontalBillboard; // optional horizontal billboard used for aerial views
  192. };
  193. ///////////////////////////////////////////////////////////////////////
  194. // struct SGeometry::STextures declaration
  195. struct ST_STORAGE_CLASS STextures
  196. {
  197. STextures( );
  198. ~STextures( );
  199. // branches
  200. const char* m_pBranchTextureFilename; // null-terminated string
  201. // leaves
  202. unsigned int m_uiLeafTextureCount; // the number of char* elements in m_pLeafTextureFilenames
  203. const char** m_pLeafTextureFilenames; // array of null-terminated strings m_uiLeafTextureCount in size
  204. // fronds
  205. unsigned int m_uiFrondTextureCount; // the number of char* elements in m_pFrondTextureFilenames
  206. const char** m_pFrondTextureFilenames; // array of null-terminated strings m_uiFrondTextureCount in size
  207. // composite
  208. const char* m_pCompositeFilename; // null-terminated string
  209. // self-shadow
  210. const char* m_pSelfShadowFilename; // null-terminated string
  211. };
  212. ///////////////////////////////////////////////////////////////////////
  213. // Constructor/Destructor
  214. CSpeedTreeRT( );
  215. ~CSpeedTreeRT( );
  216. ///////////////////////////////////////////////////////////////////////
  217. // Specifying a tree model
  218. bool Compute(const float* pTransform = 0, unsigned int nSeed = 1, bool bCompositeStrips = true);
  219. CSpeedTreeRT* Clone(float x = 0.0f, float y = 0.0f, float z = 0.0f, unsigned int nSeed = 0) const;
  220. const CSpeedTreeRT* InstanceOf(void) const;
  221. CSpeedTreeRT* MakeInstance(void);
  222. void DeleteTransientData(void);
  223. bool LoadTree(const char* pFilename);
  224. bool LoadTree(const unsigned char* pBlock, unsigned int nNumBytes);
  225. unsigned char* SaveTree(unsigned int& nNumBytes, bool bSaveLeaves = false) const;
  226. void GetTreeSize(float& fSize, float& fVariance) const;
  227. void SetTreeSize(float fNewSize, float fNewVariance = 0.0f);
  228. unsigned int GetSeed(void) const;
  229. const float* GetTreePosition(void) const;
  230. void SetTreePosition(float x, float y, float z);
  231. void SetLeafTargetAlphaMask(unsigned char ucMask = 0x54);
  232. ///////////////////////////////////////////////////////////////////////
  233. // Lighting
  234. // lighting style
  235. ELightingMethod GetBranchLightingMethod(void) const;
  236. void SetBranchLightingMethod(ELightingMethod eMethod);
  237. ELightingMethod GetLeafLightingMethod(void) const;
  238. void SetLeafLightingMethod(ELightingMethod eMethod);
  239. ELightingMethod GetFrondLightingMethod(void) const;
  240. void SetFrondLightingMethod(ELightingMethod eMethod);
  241. EStaticLightingStyle GetStaticLightingStyle(void) const;
  242. void SetStaticLightingStyle(EStaticLightingStyle eStyle);
  243. float GetLeafLightingAdjustment( ) const;
  244. void SetLeafLightingAdjustment(float fScalar);
  245. // global lighting state
  246. static bool CALL_CONV GetLightState(unsigned int nLightIndex);
  247. static void CALL_CONV SetLightState(unsigned int nLightIndex, bool bLightOn);
  248. static const float* CALL_CONV GetLightAttributes(unsigned int nLightIndex);
  249. static void CALL_CONV SetLightAttributes(unsigned int nLightIndex, const float* pLightAttributes);
  250. // branch material
  251. const float* GetBranchMaterial(void) const;
  252. void SetBranchMaterial(const float* pMaterial);
  253. // leaf material
  254. const float* GetLeafMaterial(void) const;
  255. void SetLeafMaterial(const float* pMaterial);
  256. // frond material
  257. const float* GetFrondMaterial(void) const;
  258. void SetFrondMaterial(const float* pMaterial);
  259. ///////////////////////////////////////////////////////////////////////
  260. // Camera
  261. static void CALL_CONV GetCamera(float* pPosition, float* pDirection);
  262. static void CALL_CONV SetCamera(const float* pPosition, const float* pDirection);
  263. ///////////////////////////////////////////////////////////////////////
  264. // Wind
  265. static void CALL_CONV SetTime(float fTime);
  266. void ComputeWindEffects(bool bBranches, bool bLeaves, bool bFronds = true);
  267. void ResetLeafWindState(void);
  268. bool GetLeafRockingState(void) const;
  269. void SetLeafRockingState(bool bFlag);
  270. void SetNumLeafRockingGroups(unsigned int nRockingGroups);
  271. EWindMethod GetLeafWindMethod(void) const;
  272. void SetLeafWindMethod(EWindMethod eMethod);
  273. EWindMethod GetBranchWindMethod(void) const;
  274. void SetBranchWindMethod(EWindMethod eMethod);
  275. EWindMethod GetFrondWindMethod(void) const;
  276. void SetFrondWindMethod(EWindMethod eMethod);
  277. float GetWindStrength(void) const;
  278. float SetWindStrength(float fNewStrength, float fOldStrength = -1.0f, float fFrequencyTimeOffset = -1.0f);
  279. void SetWindStrengthAndLeafAngles(float fNewStrength, const float* pRockAngles = 0, const float* pRustleAngles = 0, unsigned int uiNumRockAngles = 0);
  280. static void CALL_CONV SetNumWindMatrices(int nNumMatrices);
  281. static void CALL_CONV SetWindMatrix(unsigned int nMatrixIndex, const float* pMatrix);
  282. void GetLocalMatrices(unsigned int& nStartingIndex, unsigned int& nMatrixSpan);
  283. void SetLocalMatrices(unsigned int nStartingMatrix, unsigned int nMatrixSpan);
  284. ///////////////////////////////////////////////////////////////////////
  285. // LOD
  286. void ComputeLodLevel(void);
  287. float GetLodLevel(void) const;
  288. void SetLodLevel(float fLodLevel);
  289. static void CALL_CONV SetDropToBillboard(bool bFlag);
  290. void GetLodLimits(float& fNear, float& fFar) const;
  291. void SetLodLimits(float fNear, float fFar);
  292. short GetDiscreteBranchLodLevel(float fLodLevel = -1.0f) const;
  293. unsigned short GetDiscreteLeafLodLevel(float fLodLevel = -1.0f) const;
  294. short GetDiscreteFrondLodLevel(float fLodLevel = -1.0f) const;
  295. unsigned short GetNumBranchLodLevels(void) const;
  296. unsigned short GetNumLeafLodLevels(void) const;
  297. unsigned short GetNumFrondLodLevels(void) const;
  298. static void CALL_CONV SetHorzBillboardFadeAngles(float fStart, float fEnd); // in degrees
  299. static void CALL_CONV GetHorzBillboardFadeAngles(float& fStart, float& fEnd); // in degrees
  300. ///////////////////////////////////////////////////////////////////////
  301. // Geometry
  302. void DeleteBranchGeometry(void);
  303. void DeleteFrondGeometry(void);
  304. void DeleteLeafGeometry(void);
  305. unsigned char* GetFrondGeometryMapIndexes(int nLodLevel) const;
  306. const float* GetLeafBillboardTable(unsigned int& nEntryCount) const;
  307. const float* GetLeafLodSizeAdjustments(void);
  308. void GetGeometry(SGeometry& sGeometry, unsigned int uiBitVector = SpeedTree_AllGeometry, short sOverrideBranchLodValue = -1, short sOverrideFrondLodValue = -1, short sOverrideLeafLodValue = -1);
  309. ///////////////////////////////////////////////////////////////////////
  310. // Textures
  311. void GetTextures(STextures& sTextures) const;
  312. void SetLeafTextureCoords(unsigned int nLeafMapIndex, const float* pTexCoords);
  313. void SetFrondTextureCoords(unsigned int nFrondMapIndex, const float* pTexCoords);
  314. static bool CALL_CONV GetTextureFlip(void);
  315. static void CALL_CONV SetTextureFlip(bool bFlag);
  316. void SetBranchTextureFilename(const char* pFilename);
  317. void SetLeafTextureFilename(unsigned int nLeafMapIndex, const char* pFilename);
  318. void SetFrondTextureFilename(unsigned int nFrondMapIndex, const char* pFilename);
  319. ///////////////////////////////////////////////////////////////////////
  320. // Statistics & information
  321. static bool CALL_CONV Authorize(const char* pKey);
  322. static bool CALL_CONV IsAuthorized(void);
  323. static const char* CALL_CONV GetCurrentError(void);
  324. static void CALL_CONV ResetError(void);
  325. static const char* CALL_CONV Version(void);
  326. void GetBoundingBox(float* pBounds) const;
  327. unsigned int GetLeafTriangleCount(float fLodLevel = -1.0f);
  328. unsigned int GetBranchTriangleCount(float fLodLevel = -1.0f);
  329. unsigned int GetFrondTriangleCount(float fLodLevel = -1.0f);
  330. ///////////////////////////////////////////////////////////////////////
  331. // Collision objects
  332. unsigned int GetCollisionObjectCount(void);
  333. void GetCollisionObject(unsigned int nIndex, ECollisionObjectType& eType, float* pPosition, float* pDimensions);
  334. ///////////////////////////////////////////////////////////////////////
  335. // User Data
  336. const char* GetUserData(void) const;
  337. private:
  338. CSpeedTreeRT(const CSpeedTreeRT* pOrig);
  339. void ComputeLeafStaticLighting(void);
  340. void ComputeSelfShadowTexCoords(void);
  341. static void CALL_CONV NotifyAllTreesOfEvent(int nMessage);
  342. static void CALL_CONV SetError(const char* pError);
  343. ///////////////////////////////////////////////////////////////////////
  344. // File I/O
  345. void ParseLodInfo(CTreeFileAccess* pFile);
  346. void ParseWindInfo(CTreeFileAccess* pFile);
  347. void ParseTextureCoordInfo(CTreeFileAccess* pFile);
  348. void ParseCollisionObjects(CTreeFileAccess* pFile);
  349. void SaveTextureCoords(CTreeFileAccess* pFile) const;
  350. void SaveCollisionObjects(CTreeFileAccess* pFile) const;
  351. void ParseShadowProjectionInfo(CTreeFileAccess* pFile);
  352. void SaveUserData(CTreeFileAccess* pFile) const;
  353. void ParseUserData(CTreeFileAccess* pFile);
  354. void SaveSupplementalTexCoordInfo(CTreeFileAccess* pFile) const;
  355. void ParseSupplementalTexCoordInfo(CTreeFileAccess* pFile);
  356. static char* CALL_CONV CopyUserData(const char* pData);
  357. ///////////////////////////////////////////////////////////////////////
  358. // Geometry
  359. void GetBranchGeometry(SGeometry& sGeometry, short sOverrideLodValue = -1);
  360. void GetFrondGeometry(SGeometry& sGeometry, short sOverrideLodValue = -1);
  361. void GetLeafGeometry(SGeometry& sGeometry, short sOverrideLodValue = -1);
  362. void Get360BillboardGeometry(SGeometry& sGeometry, unsigned int uiBitVector);
  363. void GetSimpleBillboardGeometry(SGeometry& sGeometry);
  364. static void CALL_CONV GetTransitionValues(float fLodLevel, unsigned short usLodCount, float fOverlapRadius,
  365. float fTransitionFactor, float fCurveExponent, float fTargetAlphaValue,
  366. float& fHighValue, float& fLowValue, short& sHighLod, short& sLowLod);
  367. void SetupHorizontalBillboard(void);
  368. float ComputeLodCurve(float fStart, float fEnd, float fPercent, bool bConcaveUp);
  369. ///////////////////////////////////////////////////////////////////////
  370. // Member variables
  371. // general
  372. CTreeEngine* m_pEngine; // core tree-generating engine
  373. CIndexedGeometry* m_pBranchGeometry; // abstraction mechanism for branch geometry
  374. CLeafGeometry* m_pLeafGeometry; // abstraction mechanism for leaf geometry
  375. CLightingEngine* m_pLightingEngine; // engine for computing static/dynamic lighting data
  376. CWindEngine* m_pWindEngine; // engine for computing CPU/GPU wind effects
  377. CSimpleBillboard* m_pSimpleBillboard;
  378. // leaf lod
  379. ELodMethod m_eLeafLodMethod; // which leaf wind method is currently being used
  380. float m_fLeafLodTransitionRadius; // determines how much blending occurs between two separate leaf LOD levels
  381. float m_fLeafLodCurveExponent; // exponent value used in the leaf LOD blending equation
  382. float m_fLeafSizeIncreaseFactor; // value that controls how much larger leaf clusters get as LOD decreases
  383. float m_fLeafTransitionFactor; // value that controls the intersection point of SMOOTH_1 transitions
  384. float* m_pLeafLodSizeFactors; // array, GetNumLeafLodLevels()'s in size, containing leaf LOD scale factors
  385. // instancing & ref counting
  386. unsigned int* m_pInstanceRefCount; // single value shared among instances - number of active instances
  387. STreeInstanceData* m_pInstanceData; // if instance, differntiating data is stored here
  388. SInstanceList* m_pInstanceList; // each tree contains a list of its instances
  389. static unsigned int m_uiAllRefCount; // single value shared by all CSpeedTreeRT instances
  390. // other
  391. int m_nFrondLevel; // from SpeedTreeCAD - branch level where fronds begin
  392. float* m_pTreeSizes; // contains all tree extents, including billboard sizes
  393. unsigned char m_ucTargetAlphaValue; // value used for leaf alpha mask function
  394. bool m_bTreeComputed; // some operations are not valid once the geometry has been computed
  395. int m_nBranchWindLevel; // from SpeedTreeCAD - branch level where wind effects are active
  396. // texture coords
  397. SEmbeddedTexCoords* m_pEmbeddedTexCoords; // embedded leaf and billboard texture coords
  398. static bool m_bTextureFlip; // used to flip coordinates for DirectX, Gamebryo, etc.
  399. // shadow projection
  400. CProjectedShadow* m_pProjectedShadow; // self-shadow projection
  401. // billboard
  402. static bool m_bDropToBillboard; // flag specifying if last LOD will be simple single billboard
  403. // collision objects
  404. SCollisionObjects* m_pCollisionObjects; // collision objects
  405. // fronds
  406. CFrondEngine* m_pFrondEngine; // engine for computing fronds based on branch geometry
  407. CIndexedGeometry* m_pFrondGeometry; // abstraction mechanism for frond geometry
  408. unsigned short m_usNumFrondLodLevels; // place to store LOD count after m_pFrondGeometry is deleted
  409. // user data
  410. char* m_pUserData; // user specified data
  411. // horizontal billboard
  412. bool m_b360Billboard; // indicates that a 360 degree billboard sequence is present
  413. bool m_bHorizontalBillboard; // indicates that a horizontal billboard is present in the embedded tex coords
  414. float m_afHorizontalCoords[12]; // vertices of the horizontal billboard
  415. static float m_fHorizontalFadeStartAngle;// in degrees
  416. static float m_fHorizontalFadeEndAngle; // in degrees
  417. static float m_fHorizontalFadeValue;
  418. };
  419. // Macintosh export control
  420. #ifdef __APPLE__
  421. #pragma export off
  422. #endif