Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.40 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "../math/QAngle.hpp"
  4. #include "../misc/Studio.hpp"
  5. #include "IEngineTrace.hpp" //Has some structs we need here
  6.  
  7. class CPhysCollide;
  8. class CUtlBuffer;
  9. class IClientRenderable;
  10. class CStudioHdr;
  11. struct virtualmodel_t;
  12.  
  13. enum RenderableTranslucencyType_t
  14. {
  15. RENDERABLE_IS_OPAQUE = 0,
  16. RENDERABLE_IS_TRANSLUCENT,
  17. RENDERABLE_IS_TWO_PASS, // has both translucent and opaque sub-partsa
  18. };
  19.  
  20. class IVModelInfo
  21. {
  22. public:
  23. virtual ~IVModelInfo(void) {}
  24. virtual const model_t* GetModel(int modelindex) const = 0;
  25. virtual int GetModelIndex(const char *name) const = 0;
  26. virtual const char* GetModelName(const model_t *model) const = 0;
  27. virtual vcollide_t* GetVCollide(const model_t *model) const = 0;
  28. virtual vcollide_t* GetVCollide(int modelindex) const = 0;
  29. virtual void GetModelBounds(const model_t *model, Vector& mins, Vector& maxs) const = 0;
  30. virtual void GetModelRenderBounds(const model_t *model, Vector& mins, Vector& maxs) const = 0;
  31. virtual int GetModelFrameCount(const model_t *model) const = 0;
  32. virtual int GetModelType(const model_t *model) const = 0;
  33. virtual void* GetModelExtraData(const model_t *model) = 0;
  34. virtual bool ModelHasMaterialProxy(const model_t *model) const = 0;
  35. virtual bool IsTranslucent(model_t const* model) const = 0;
  36. virtual bool IsTranslucentTwoPass(const model_t *model) const = 0;
  37. virtual void Unused0() {};
  38. virtual void UNUSED() = 0;
  39. virtual void UNUSE11D() = 0;
  40. virtual RenderableTranslucencyType_t ComputeTranslucencyType(const model_t *model, int nSkin, int nBody) = 0;
  41. virtual int GetModelMaterialCount(const model_t* model) const = 0;
  42. virtual void GetModelMaterials(const model_t *model, int count, IMaterial** ppMaterial) = 0;
  43. virtual bool IsModelVertexLit(const model_t *model) const = 0;
  44. virtual const char* GetModelKeyValueText(const model_t *model) = 0;
  45. virtual bool GetModelKeyValue(const model_t *model, CUtlBuffer &buf) = 0;
  46. virtual float GetModelRadius(const model_t *model) = 0;
  47. virtual CStudioHdr* GetStudioHdr(MDLHandle_t handle) = 0;
  48. virtual const studiohdr_t* FindModel(const studiohdr_t *pStudioHdr, void **cache, const char *modelname) const = 0;
  49. virtual const studiohdr_t* FindModel(void *cache) const = 0;
  50. virtual virtualmodel_t* GetVirtualModel(const studiohdr_t *pStudioHdr) const = 0;
  51. virtual uint8_t* GetAnimBlock(const studiohdr_t *pStudioHdr, int iBlock) const = 0;
  52. virtual void GetModelMaterialColorAndLighting(const model_t *model, Vector const& origin, QAngle const& angles, trace_t* pTrace, Vector& lighting, Vector& matColor) = 0;
  53. virtual void GetIlluminationPoint(const model_t *model, IClientRenderable *pRenderable, Vector const& origin, QAngle const& angles, Vector* pLightingCenter) = 0;
  54. virtual int GetModelContents(int modelIndex) const = 0;
  55. virtual studiohdr_t* GetStudiomodel(const model_t *mod) = 0;
  56. virtual int GetModelSpriteWidth(const model_t *model) const = 0;
  57. virtual int GetModelSpriteHeight(const model_t *model) const = 0;
  58. virtual void SetLevelScreenFadeRange(float flMinSize, float flMaxSize) = 0;
  59. virtual void GetLevelScreenFadeRange(float *pMinArea, float *pMaxArea) const = 0;
  60. virtual void SetViewScreenFadeRange(float flMinSize, float flMaxSize) = 0;
  61. virtual unsigned char ComputeLevelScreenFade(const Vector &vecAbsOrigin, float flRadius, float flFadeScale) const = 0;
  62. virtual unsigned char ComputeViewScreenFade(const Vector &vecAbsOrigin, float flRadius, float flFadeScale) const = 0;
  63. virtual int GetAutoplayList(const studiohdr_t *pStudioHdr, unsigned short **pAutoplayList) const = 0;
  64. virtual CPhysCollide* GetCollideForVirtualTerrain(int index) = 0;
  65. virtual bool IsUsingFBTexture(const model_t *model, int nSkin, int nBody, IClientRenderable* *pClientRenderable) const = 0;
  66. virtual const model_t* FindOrLoadModel(const char *name) const = 0;
  67. virtual MDLHandle_t GetCacheHandle(const model_t *model) const = 0;
  68. virtual int GetBrushModelPlaneCount(const model_t *model) const = 0;
  69. virtual void GetBrushModelPlane(const model_t *model, int nIndex, cplane_t &plane, Vector *pOrigin) const = 0;
  70. virtual int GetSurfacepropsForVirtualTerrain(int index) = 0;
  71. virtual bool UsesEnvCubemap(const model_t *model) const = 0;
  72. virtual bool UsesStaticLighting(const model_t *model) const = 0;
  73. };
  74.  
  75. class IVModelInfoClient : public IVModelInfo
  76. {
  77. public:
  78. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement