struct STerrainInfo { int nHeightMapSize_InUnits; int nUnitSize_InMeters; int nSectorSize_InMeters; int nSectorsTableSize_InSectors; float fHeightmapZRatio; float fOceanWaterLevel; struct STerrainChunkHeader { int8 nVersion; int8 nDummy; int8 nFlags; int8 nFlags2; int32 nChunkSize; STerrainInfo TerrainInfo; struct SVisAreaManChunkHeader { int8 nVersion; int8 nDummy; int8 nFlags; int8 nFlags2; int nChunkSize; int nVisAreasNum; int nPortalsNum; int nOcclAreasNum; struct SOcTreeNodeChunk { int16 nChunkVersion; int16 ucChildsMask; AABB nodeBox; int32 nObjectsBlockSize; struct IGetLayerIdAtCallback { }; struct IVoxTerrain { }; struct SHotUpdateInfo { uint32 nHeigtmap; uint32 nObjTypeMask; const uint8* pVisibleLayerMask; const uint16* pLayerIdTranslation; AABB areaBox; struct ITerrain { struct SExportInfo { bool bHeigtmap; bool bObjects; AABB areaBox; }; }; struct ISegmentsManager { enum ESegmentLoadFlags { slfTerrain = BIT(1), slfVisArea = BIT(2), slfEntity = BIT(3), slfNavigation = BIT(4), slfAll = slfTerrain|slfVisArea|slfEntity|slfNavigation }; }; struct IVisAreaCallback { }; struct IVisAreaManager { }; struct IMergedMeshesManager { struct SInstanceSector { DynArraydata; string id; }; }; struct ITimeOfDay { enum ETimeOfDayParamID { PARAM_HDR_DYNAMIC_POWER_FACTOR, PARAM_TERRAIN_OCCL_MULTIPLIER, PARAM_GI_MULTIPLIER, PARAM_SUN_COLOR, PARAM_SUN_COLOR_MULTIPLIER, PARAM_SUN_SPECULAR_MULTIPLIER, PARAM_FOG_COLOR, PARAM_FOG_COLOR_MULTIPLIER, PARAM_VOLFOG_HEIGHT, PARAM_VOLFOG_DENSITY, PARAM_FOG_COLOR2, PARAM_FOG_COLOR2_MULTIPLIER, PARAM_VOLFOG_HEIGHT2, PARAM_VOLFOG_DENSITY2, PARAM_VOLFOG_HEIGHT_OFFSET, PARAM_FOG_RADIAL_COLOR, PARAM_FOG_RADIAL_COLOR_MULTIPLIER, PARAM_VOLFOG_RADIAL_SIZE, PARAM_VOLFOG_RADIAL_LOBE, PARAM_VOLFOG_FINAL_DENSITY_CLAMP, PARAM_VOLFOG_GLOBAL_DENSITY, PARAM_VOLFOG_RAMP_START, PARAM_VOLFOG_RAMP_END, PARAM_VOLFOG_RAMP_INFLUENCE, PARAM_VOLFOG_SHADOW_DARKENING, PARAM_VOLFOG_SHADOW_DARKENING_SUN, PARAM_VOLFOG_SHADOW_DARKENING_AMBIENT, PARAM_VOLFOG_SHADOW_RANGE, PARAM_SKYLIGHT_SUN_INTENSITY, PARAM_SKYLIGHT_SUN_INTENSITY_MULTIPLIER, PARAM_SKYLIGHT_KM, PARAM_SKYLIGHT_KR, PARAM_SKYLIGHT_G, PARAM_SKYLIGHT_WAVELENGTH_R, PARAM_SKYLIGHT_WAVELENGTH_G, PARAM_SKYLIGHT_WAVELENGTH_B, PARAM_NIGHSKY_HORIZON_COLOR, PARAM_NIGHSKY_HORIZON_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_COLOR, PARAM_NIGHSKY_ZENITH_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_SHIFT, PARAM_NIGHSKY_START_INTENSITY, PARAM_NIGHSKY_MOON_COLOR, PARAM_NIGHSKY_MOON_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_SCALE, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_OUTERCORONA_SCALE, PARAM_CLOUDSHADING_SUNLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SKYLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_INFLUENCE, PARAM_SUN_SHAFTS_VISIBILITY, PARAM_SUN_RAYS_VISIBILITY, PARAM_SUN_RAYS_ATTENUATION, PARAM_SUN_RAYS_SUNCOLORINFLUENCE, PARAM_SUN_RAYS_CUSTOMCOLOR, PARAM_OCEANFOG_COLOR, PARAM_OCEANFOG_COLOR_MULTIPLIER, PARAM_OCEANFOG_DENSITY, PARAM_SKYBOX_MULTIPLIER, PARAM_HDR_FILMCURVE_SHOULDER_SCALE, PARAM_HDR_FILMCURVE_LINEAR_SCALE, PARAM_HDR_FILMCURVE_TOE_SCALE, PARAM_HDR_FILMCURVE_WHITEPOINT, PARAM_HDR_COLORGRADING_COLOR_SATURATION, PARAM_HDR_COLORGRADING_COLOR_BALANCE, PARAM_HDR_EYEADAPTATION_SCENEKEY, PARAM_HDR_EYEADAPTATION_MIN_EXPOSURE, PARAM_HDR_EYEADAPTATION_MAX_EXPOSURE, PARAM_HDR_BLOOM_AMOUNT, PARAM_COLORGRADING_FILTERS_GRAIN, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_COLOR, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_DENSITY, PARAM_COLORGRADING_DOF_FOCUSRANGE, PARAM_COLORGRADING_DOF_BLURAMOUNT, PARAM_SHADOWSC0_BIAS, PARAM_SHADOWSC0_SLOPE_BIAS, PARAM_SHADOWSC1_BIAS, PARAM_SHADOWSC1_SLOPE_BIAS, PARAM_SHADOWSC2_BIAS, PARAM_SHADOWSC2_SLOPE_BIAS, PARAM_SHADOWSC3_BIAS, PARAM_SHADOWSC3_SLOPE_BIAS, PARAM_SHADOWSC4_BIAS, PARAM_SHADOWSC4_SLOPE_BIAS, PARAM_SHADOWSC5_BIAS, PARAM_SHADOWSC5_SLOPE_BIAS, PARAM_SHADOWSC6_BIAS, PARAM_SHADOWSC6_SLOPE_BIAS, PARAM_SHADOWSC7_BIAS, PARAM_SHADOWSC7_SLOPE_BIAS, PARAM_SHADOW_JITTERING, PARAM_TOTAL }; enum EVariableType { TYPE_FLOAT, TYPE_COLOR }; struct SVariableInfo { const char * name; const char * displayName; const char * group; int nParamId; EVariableType type; float fValue[3]; ISplineInterpolator* pInterpolator; unsigned int bSelected : 1; }; struct SAdvancedInfo { float fStartTime; float fEndTime; float fAnimSpeed; }; struct SEnvironmentInfo { bool bSunLinkedToTOD; float sunRotationLatitude; float sunRotationLongitude; }; const int NETSER_FORCESET = BIT(0); const int NETSER_COMPENSATELAG = BIT(1); const int NETSER_STATICPROPS = BIT(2); }; struct ITimeOfDayUpdateCallback { }; struct IFoliage { enum EFoliageFlags { FLAG_FROZEN = 1 }; }; struct SSkyLightRenderParams { const int skyDomeTextureWidth = 64; const int skyDomeTextureHeight = 32; const int skyDomeTextureSize = 64 * 32; const int skyDomeTextureWidthBy8 = 8; const int skyDomeTextureWidthBy4Log = 4; const int skyDomeTextureHeightBy2Log = 4; _smart_ptr m_pSkyDomeMesh; uint32 dummy0; uint32 dummy1; const void* m_pSkyDomeTextureDataMie; const void* m_pSkyDomeTextureDataRayleigh; size_t m_skyDomeTexturePitch; int m_skyDomeTextureTimeStamp; int pad; Vec4 m_partialMieInScatteringConst; Vec4 m_partialRayleighInScatteringConst; Vec4 m_sunDirection; Vec4 m_phaseFunctionConsts; Vec4 m_hazeColor; Vec4 m_hazeColorMieNoPremul; Vec4 m_hazeColorRayleighNoPremul; Vec3 m_skyColorTop; Vec3 m_skyColorNorth; Vec3 m_skyColorEast; Vec3 m_skyColorSouth; Vec3 m_skyColorWest; }; struct sRAEColdData { Vec4 m_RAEPortalInfos[96]; }; struct SVisAreaInfo { float fHeight; Vec3 vAmbientColor; bool bAffectedByOutLights; bool bIgnoreSkyColor; bool bSkyOnly; float fViewDistRatio; bool bDoubleSide; bool bUseDeepness; bool bUseInIndoors; bool bOceanIsVisible; bool bIgnoreGI; }; struct SDebugFPSInfo { float fAverageFPS; float fMinFPS; float fMaxFPS; }; struct SRainParams { Matrix44 matOccTrans; Matrix44 matOccTransRender; Quat qRainRotation; AABB areaAABB; Vec3 vWorldPos; Vec3 vColor; float fAmount; float fCurrentAmount; float fRadius; float fFakeGlossiness; float fFakeReflectionAmount; float fDiffuseDarkening; float fRainDropsAmount; float fRainDropsSpeed; float fRainDropsLighting; float fMistAmount; float fMistHeight; float fPuddlesAmount; float fPuddlesMaskAmount; float fPuddlesRippleAmount; float fSplashesAmount; int nUpdateFrameID; bool bApplyOcclusion; bool bIgnoreVisareas; bool bDisableOcclusion; }; struct SSnowParams { Vec3 m_vWorldPos; float m_fRadius; float m_fSnowAmount; float m_fFrostAmount; float m_fSurfaceFreezing; int m_nSnowFlakeCount; float m_fSnowFlakeSize; float m_fSnowFallBrightness; float m_fSnowFallGravityScale; float m_fSnowFallWindScale; float m_fSnowFallTurbulence; float m_fSnowFallTurbulenceFreq; }; struct IScreenshotCallback { }; class IStreamedObjectListener; struct SLightVolume { struct SLightData { Vec4 vPos; Vec4 vColor; Vec4 vParams; }; }; struct I3DEngine : public IProcess { struct SObjectsStreamingStatus { int nReady; int nInProgress; int nTotal; int nActive; int nAllocatedBytes; int nMemRequired; int nMeshPoolSize; }; struct SStremaingBandwidthData { float fBandwidthActual; float fBandwidthRequested; }; enum eStreamingSubsystem { eStreamingSubsystem_Textures, eStreamingSubsystem_Objects, eStreamingSubsystem_Audio }; enum EChunkFileFormat { eChunkFileFormat_0x745, eChunkFileFormat_0x746 }; }; enum EFileTypes { eTerrainTextureFile = 100 }; struct SCommonFileHeader { char signature[4]; uint8 file_type; uint8 flags; uint16 version; struct STerrainTextureFileHeader_old { uint16 nSectorSizeMeters; uint16 nLodsNum; uint16 nLayerCount; uint16 nReserved; struct STerrainTextureFileHeader { uint16 nLayerCount; uint16 dwFlags; float fBrMultiplier; struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; }; }; }; }; }; }; }; }; };
I3DEngine.h
struct STerrainChunkHeader { int8 nVersion; int8 nDummy; int8 nFlags; int8 nFlags2; int32 nChunkSize; STerrainInfo TerrainInfo; struct SVisAreaManChunkHeader { int8 nVersion; int8 nDummy; int8 nFlags; int8 nFlags2; int nChunkSize; int nVisAreasNum; int nPortalsNum; int nOcclAreasNum; struct SOcTreeNodeChunk { int16 nChunkVersion; int16 ucChildsMask; AABB nodeBox; int32 nObjectsBlockSize; struct IGetLayerIdAtCallback { }; struct IVoxTerrain { }; struct SHotUpdateInfo { uint32 nHeigtmap; uint32 nObjTypeMask; const uint8* pVisibleLayerMask; const uint16* pLayerIdTranslation; AABB areaBox; struct ITerrain { struct SExportInfo { bool bHeigtmap; bool bObjects; AABB areaBox; }; }; struct ISegmentsManager { enum ESegmentLoadFlags { slfTerrain = BIT(1), slfVisArea = BIT(2), slfEntity = BIT(3), slfNavigation = BIT(4), slfAll = slfTerrain|slfVisArea|slfEntity|slfNavigation }; }; struct IVisAreaCallback { }; struct IVisAreaManager { }; struct IMergedMeshesManager { struct SInstanceSector { DynArraydata; string id; }; }; struct ITimeOfDay { enum ETimeOfDayParamID { PARAM_HDR_DYNAMIC_POWER_FACTOR, PARAM_TERRAIN_OCCL_MULTIPLIER, PARAM_GI_MULTIPLIER, PARAM_SUN_COLOR, PARAM_SUN_COLOR_MULTIPLIER, PARAM_SUN_SPECULAR_MULTIPLIER, PARAM_FOG_COLOR, PARAM_FOG_COLOR_MULTIPLIER, PARAM_VOLFOG_HEIGHT, PARAM_VOLFOG_DENSITY, PARAM_FOG_COLOR2, PARAM_FOG_COLOR2_MULTIPLIER, PARAM_VOLFOG_HEIGHT2, PARAM_VOLFOG_DENSITY2, PARAM_VOLFOG_HEIGHT_OFFSET, PARAM_FOG_RADIAL_COLOR, PARAM_FOG_RADIAL_COLOR_MULTIPLIER, PARAM_VOLFOG_RADIAL_SIZE, PARAM_VOLFOG_RADIAL_LOBE, PARAM_VOLFOG_FINAL_DENSITY_CLAMP, PARAM_VOLFOG_GLOBAL_DENSITY, PARAM_VOLFOG_RAMP_START, PARAM_VOLFOG_RAMP_END, PARAM_VOLFOG_RAMP_INFLUENCE, PARAM_VOLFOG_SHADOW_DARKENING, PARAM_VOLFOG_SHADOW_DARKENING_SUN, PARAM_VOLFOG_SHADOW_DARKENING_AMBIENT, PARAM_VOLFOG_SHADOW_RANGE, PARAM_SKYLIGHT_SUN_INTENSITY, PARAM_SKYLIGHT_SUN_INTENSITY_MULTIPLIER, PARAM_SKYLIGHT_KM, PARAM_SKYLIGHT_KR, PARAM_SKYLIGHT_G, PARAM_SKYLIGHT_WAVELENGTH_R, PARAM_SKYLIGHT_WAVELENGTH_G, PARAM_SKYLIGHT_WAVELENGTH_B, PARAM_NIGHSKY_HORIZON_COLOR, PARAM_NIGHSKY_HORIZON_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_COLOR, PARAM_NIGHSKY_ZENITH_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_SHIFT, PARAM_NIGHSKY_START_INTENSITY, PARAM_NIGHSKY_MOON_COLOR, PARAM_NIGHSKY_MOON_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_SCALE, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_OUTERCORONA_SCALE, PARAM_CLOUDSHADING_SUNLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SKYLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_INFLUENCE, PARAM_SUN_SHAFTS_VISIBILITY, PARAM_SUN_RAYS_VISIBILITY, PARAM_SUN_RAYS_ATTENUATION, PARAM_SUN_RAYS_SUNCOLORINFLUENCE, PARAM_SUN_RAYS_CUSTOMCOLOR, PARAM_OCEANFOG_COLOR, PARAM_OCEANFOG_COLOR_MULTIPLIER, PARAM_OCEANFOG_DENSITY, PARAM_SKYBOX_MULTIPLIER, PARAM_HDR_FILMCURVE_SHOULDER_SCALE, PARAM_HDR_FILMCURVE_LINEAR_SCALE, PARAM_HDR_FILMCURVE_TOE_SCALE, PARAM_HDR_FILMCURVE_WHITEPOINT, PARAM_HDR_COLORGRADING_COLOR_SATURATION, PARAM_HDR_COLORGRADING_COLOR_BALANCE, PARAM_HDR_EYEADAPTATION_SCENEKEY, PARAM_HDR_EYEADAPTATION_MIN_EXPOSURE, PARAM_HDR_EYEADAPTATION_MAX_EXPOSURE, PARAM_HDR_BLOOM_AMOUNT, PARAM_COLORGRADING_FILTERS_GRAIN, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_COLOR, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_DENSITY, PARAM_COLORGRADING_DOF_FOCUSRANGE, PARAM_COLORGRADING_DOF_BLURAMOUNT, PARAM_SHADOWSC0_BIAS, PARAM_SHADOWSC0_SLOPE_BIAS, PARAM_SHADOWSC1_BIAS, PARAM_SHADOWSC1_SLOPE_BIAS, PARAM_SHADOWSC2_BIAS, PARAM_SHADOWSC2_SLOPE_BIAS, PARAM_SHADOWSC3_BIAS, PARAM_SHADOWSC3_SLOPE_BIAS, PARAM_SHADOWSC4_BIAS, PARAM_SHADOWSC4_SLOPE_BIAS, PARAM_SHADOWSC5_BIAS, PARAM_SHADOWSC5_SLOPE_BIAS, PARAM_SHADOWSC6_BIAS, PARAM_SHADOWSC6_SLOPE_BIAS, PARAM_SHADOWSC7_BIAS, PARAM_SHADOWSC7_SLOPE_BIAS, PARAM_SHADOW_JITTERING, PARAM_TOTAL }; enum EVariableType { TYPE_FLOAT, TYPE_COLOR }; struct SVariableInfo { const char * name; const char * displayName; const char * group; int nParamId; EVariableType type; float fValue[3]; ISplineInterpolator* pInterpolator; unsigned int bSelected : 1; }; struct SAdvancedInfo { float fStartTime; float fEndTime; float fAnimSpeed; }; struct SEnvironmentInfo { bool bSunLinkedToTOD; float sunRotationLatitude; float sunRotationLongitude; }; const int NETSER_FORCESET = BIT(0); const int NETSER_COMPENSATELAG = BIT(1); const int NETSER_STATICPROPS = BIT(2); }; struct ITimeOfDayUpdateCallback { }; struct IFoliage { enum EFoliageFlags { FLAG_FROZEN = 1 }; }; struct SSkyLightRenderParams { const int skyDomeTextureWidth = 64; const int skyDomeTextureHeight = 32; const int skyDomeTextureSize = 64 * 32; const int skyDomeTextureWidthBy8 = 8; const int skyDomeTextureWidthBy4Log = 4; const int skyDomeTextureHeightBy2Log = 4; _smart_ptr m_pSkyDomeMesh; uint32 dummy0; uint32 dummy1; const void* m_pSkyDomeTextureDataMie; const void* m_pSkyDomeTextureDataRayleigh; size_t m_skyDomeTexturePitch; int m_skyDomeTextureTimeStamp; int pad; Vec4 m_partialMieInScatteringConst; Vec4 m_partialRayleighInScatteringConst; Vec4 m_sunDirection; Vec4 m_phaseFunctionConsts; Vec4 m_hazeColor; Vec4 m_hazeColorMieNoPremul; Vec4 m_hazeColorRayleighNoPremul; Vec3 m_skyColorTop; Vec3 m_skyColorNorth; Vec3 m_skyColorEast; Vec3 m_skyColorSouth; Vec3 m_skyColorWest; }; struct sRAEColdData { Vec4 m_RAEPortalInfos[96]; }; struct SVisAreaInfo { float fHeight; Vec3 vAmbientColor; bool bAffectedByOutLights; bool bIgnoreSkyColor; bool bSkyOnly; float fViewDistRatio; bool bDoubleSide; bool bUseDeepness; bool bUseInIndoors; bool bOceanIsVisible; bool bIgnoreGI; }; struct SDebugFPSInfo { float fAverageFPS; float fMinFPS; float fMaxFPS; }; struct SRainParams { Matrix44 matOccTrans; Matrix44 matOccTransRender; Quat qRainRotation; AABB areaAABB; Vec3 vWorldPos; Vec3 vColor; float fAmount; float fCurrentAmount; float fRadius; float fFakeGlossiness; float fFakeReflectionAmount; float fDiffuseDarkening; float fRainDropsAmount; float fRainDropsSpeed; float fRainDropsLighting; float fMistAmount; float fMistHeight; float fPuddlesAmount; float fPuddlesMaskAmount; float fPuddlesRippleAmount; float fSplashesAmount; int nUpdateFrameID; bool bApplyOcclusion; bool bIgnoreVisareas; bool bDisableOcclusion; }; struct SSnowParams { Vec3 m_vWorldPos; float m_fRadius; float m_fSnowAmount; float m_fFrostAmount; float m_fSurfaceFreezing; int m_nSnowFlakeCount; float m_fSnowFlakeSize; float m_fSnowFallBrightness; float m_fSnowFallGravityScale; float m_fSnowFallWindScale; float m_fSnowFallTurbulence; float m_fSnowFallTurbulenceFreq; }; struct IScreenshotCallback { }; class IStreamedObjectListener; struct SLightVolume { struct SLightData { Vec4 vPos; Vec4 vColor; Vec4 vParams; }; }; struct I3DEngine : public IProcess { struct SObjectsStreamingStatus { int nReady; int nInProgress; int nTotal; int nActive; int nAllocatedBytes; int nMemRequired; int nMeshPoolSize; }; struct SStremaingBandwidthData { float fBandwidthActual; float fBandwidthRequested; }; enum eStreamingSubsystem { eStreamingSubsystem_Textures, eStreamingSubsystem_Objects, eStreamingSubsystem_Audio }; enum EChunkFileFormat { eChunkFileFormat_0x745, eChunkFileFormat_0x746 }; }; enum EFileTypes { eTerrainTextureFile = 100 }; struct SCommonFileHeader { char signature[4]; uint8 file_type; uint8 flags; uint16 version; struct STerrainTextureFileHeader_old { uint16 nSectorSizeMeters; uint16 nLodsNum; uint16 nLayerCount; uint16 nReserved; struct STerrainTextureFileHeader { uint16 nLayerCount; uint16 dwFlags; float fBrMultiplier; struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; }; }; }; }; }; }; }; };
I3DEngine.h
struct SVisAreaManChunkHeader { int8 nVersion; int8 nDummy; int8 nFlags; int8 nFlags2; int nChunkSize; int nVisAreasNum; int nPortalsNum; int nOcclAreasNum; struct SOcTreeNodeChunk { int16 nChunkVersion; int16 ucChildsMask; AABB nodeBox; int32 nObjectsBlockSize; struct IGetLayerIdAtCallback { }; struct IVoxTerrain { }; struct SHotUpdateInfo { uint32 nHeigtmap; uint32 nObjTypeMask; const uint8* pVisibleLayerMask; const uint16* pLayerIdTranslation; AABB areaBox; struct ITerrain { struct SExportInfo { bool bHeigtmap; bool bObjects; AABB areaBox; }; }; struct ISegmentsManager { enum ESegmentLoadFlags { slfTerrain = BIT(1), slfVisArea = BIT(2), slfEntity = BIT(3), slfNavigation = BIT(4), slfAll = slfTerrain|slfVisArea|slfEntity|slfNavigation }; }; struct IVisAreaCallback { }; struct IVisAreaManager { }; struct IMergedMeshesManager { struct SInstanceSector { DynArraydata; string id; }; }; struct ITimeOfDay { enum ETimeOfDayParamID { PARAM_HDR_DYNAMIC_POWER_FACTOR, PARAM_TERRAIN_OCCL_MULTIPLIER, PARAM_GI_MULTIPLIER, PARAM_SUN_COLOR, PARAM_SUN_COLOR_MULTIPLIER, PARAM_SUN_SPECULAR_MULTIPLIER, PARAM_FOG_COLOR, PARAM_FOG_COLOR_MULTIPLIER, PARAM_VOLFOG_HEIGHT, PARAM_VOLFOG_DENSITY, PARAM_FOG_COLOR2, PARAM_FOG_COLOR2_MULTIPLIER, PARAM_VOLFOG_HEIGHT2, PARAM_VOLFOG_DENSITY2, PARAM_VOLFOG_HEIGHT_OFFSET, PARAM_FOG_RADIAL_COLOR, PARAM_FOG_RADIAL_COLOR_MULTIPLIER, PARAM_VOLFOG_RADIAL_SIZE, PARAM_VOLFOG_RADIAL_LOBE, PARAM_VOLFOG_FINAL_DENSITY_CLAMP, PARAM_VOLFOG_GLOBAL_DENSITY, PARAM_VOLFOG_RAMP_START, PARAM_VOLFOG_RAMP_END, PARAM_VOLFOG_RAMP_INFLUENCE, PARAM_VOLFOG_SHADOW_DARKENING, PARAM_VOLFOG_SHADOW_DARKENING_SUN, PARAM_VOLFOG_SHADOW_DARKENING_AMBIENT, PARAM_VOLFOG_SHADOW_RANGE, PARAM_SKYLIGHT_SUN_INTENSITY, PARAM_SKYLIGHT_SUN_INTENSITY_MULTIPLIER, PARAM_SKYLIGHT_KM, PARAM_SKYLIGHT_KR, PARAM_SKYLIGHT_G, PARAM_SKYLIGHT_WAVELENGTH_R, PARAM_SKYLIGHT_WAVELENGTH_G, PARAM_SKYLIGHT_WAVELENGTH_B, PARAM_NIGHSKY_HORIZON_COLOR, PARAM_NIGHSKY_HORIZON_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_COLOR, PARAM_NIGHSKY_ZENITH_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_SHIFT, PARAM_NIGHSKY_START_INTENSITY, PARAM_NIGHSKY_MOON_COLOR, PARAM_NIGHSKY_MOON_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_SCALE, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_OUTERCORONA_SCALE, PARAM_CLOUDSHADING_SUNLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SKYLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_INFLUENCE, PARAM_SUN_SHAFTS_VISIBILITY, PARAM_SUN_RAYS_VISIBILITY, PARAM_SUN_RAYS_ATTENUATION, PARAM_SUN_RAYS_SUNCOLORINFLUENCE, PARAM_SUN_RAYS_CUSTOMCOLOR, PARAM_OCEANFOG_COLOR, PARAM_OCEANFOG_COLOR_MULTIPLIER, PARAM_OCEANFOG_DENSITY, PARAM_SKYBOX_MULTIPLIER, PARAM_HDR_FILMCURVE_SHOULDER_SCALE, PARAM_HDR_FILMCURVE_LINEAR_SCALE, PARAM_HDR_FILMCURVE_TOE_SCALE, PARAM_HDR_FILMCURVE_WHITEPOINT, PARAM_HDR_COLORGRADING_COLOR_SATURATION, PARAM_HDR_COLORGRADING_COLOR_BALANCE, PARAM_HDR_EYEADAPTATION_SCENEKEY, PARAM_HDR_EYEADAPTATION_MIN_EXPOSURE, PARAM_HDR_EYEADAPTATION_MAX_EXPOSURE, PARAM_HDR_BLOOM_AMOUNT, PARAM_COLORGRADING_FILTERS_GRAIN, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_COLOR, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_DENSITY, PARAM_COLORGRADING_DOF_FOCUSRANGE, PARAM_COLORGRADING_DOF_BLURAMOUNT, PARAM_SHADOWSC0_BIAS, PARAM_SHADOWSC0_SLOPE_BIAS, PARAM_SHADOWSC1_BIAS, PARAM_SHADOWSC1_SLOPE_BIAS, PARAM_SHADOWSC2_BIAS, PARAM_SHADOWSC2_SLOPE_BIAS, PARAM_SHADOWSC3_BIAS, PARAM_SHADOWSC3_SLOPE_BIAS, PARAM_SHADOWSC4_BIAS, PARAM_SHADOWSC4_SLOPE_BIAS, PARAM_SHADOWSC5_BIAS, PARAM_SHADOWSC5_SLOPE_BIAS, PARAM_SHADOWSC6_BIAS, PARAM_SHADOWSC6_SLOPE_BIAS, PARAM_SHADOWSC7_BIAS, PARAM_SHADOWSC7_SLOPE_BIAS, PARAM_SHADOW_JITTERING, PARAM_TOTAL }; enum EVariableType { TYPE_FLOAT, TYPE_COLOR }; struct SVariableInfo { const char * name; const char * displayName; const char * group; int nParamId; EVariableType type; float fValue[3]; ISplineInterpolator* pInterpolator; unsigned int bSelected : 1; }; struct SAdvancedInfo { float fStartTime; float fEndTime; float fAnimSpeed; }; struct SEnvironmentInfo { bool bSunLinkedToTOD; float sunRotationLatitude; float sunRotationLongitude; }; const int NETSER_FORCESET = BIT(0); const int NETSER_COMPENSATELAG = BIT(1); const int NETSER_STATICPROPS = BIT(2); }; struct ITimeOfDayUpdateCallback { }; struct IFoliage { enum EFoliageFlags { FLAG_FROZEN = 1 }; }; struct SSkyLightRenderParams { const int skyDomeTextureWidth = 64; const int skyDomeTextureHeight = 32; const int skyDomeTextureSize = 64 * 32; const int skyDomeTextureWidthBy8 = 8; const int skyDomeTextureWidthBy4Log = 4; const int skyDomeTextureHeightBy2Log = 4; _smart_ptr m_pSkyDomeMesh; uint32 dummy0; uint32 dummy1; const void* m_pSkyDomeTextureDataMie; const void* m_pSkyDomeTextureDataRayleigh; size_t m_skyDomeTexturePitch; int m_skyDomeTextureTimeStamp; int pad; Vec4 m_partialMieInScatteringConst; Vec4 m_partialRayleighInScatteringConst; Vec4 m_sunDirection; Vec4 m_phaseFunctionConsts; Vec4 m_hazeColor; Vec4 m_hazeColorMieNoPremul; Vec4 m_hazeColorRayleighNoPremul; Vec3 m_skyColorTop; Vec3 m_skyColorNorth; Vec3 m_skyColorEast; Vec3 m_skyColorSouth; Vec3 m_skyColorWest; }; struct sRAEColdData { Vec4 m_RAEPortalInfos[96]; }; struct SVisAreaInfo { float fHeight; Vec3 vAmbientColor; bool bAffectedByOutLights; bool bIgnoreSkyColor; bool bSkyOnly; float fViewDistRatio; bool bDoubleSide; bool bUseDeepness; bool bUseInIndoors; bool bOceanIsVisible; bool bIgnoreGI; }; struct SDebugFPSInfo { float fAverageFPS; float fMinFPS; float fMaxFPS; }; struct SRainParams { Matrix44 matOccTrans; Matrix44 matOccTransRender; Quat qRainRotation; AABB areaAABB; Vec3 vWorldPos; Vec3 vColor; float fAmount; float fCurrentAmount; float fRadius; float fFakeGlossiness; float fFakeReflectionAmount; float fDiffuseDarkening; float fRainDropsAmount; float fRainDropsSpeed; float fRainDropsLighting; float fMistAmount; float fMistHeight; float fPuddlesAmount; float fPuddlesMaskAmount; float fPuddlesRippleAmount; float fSplashesAmount; int nUpdateFrameID; bool bApplyOcclusion; bool bIgnoreVisareas; bool bDisableOcclusion; }; struct SSnowParams { Vec3 m_vWorldPos; float m_fRadius; float m_fSnowAmount; float m_fFrostAmount; float m_fSurfaceFreezing; int m_nSnowFlakeCount; float m_fSnowFlakeSize; float m_fSnowFallBrightness; float m_fSnowFallGravityScale; float m_fSnowFallWindScale; float m_fSnowFallTurbulence; float m_fSnowFallTurbulenceFreq; }; struct IScreenshotCallback { }; class IStreamedObjectListener; struct SLightVolume { struct SLightData { Vec4 vPos; Vec4 vColor; Vec4 vParams; }; }; struct I3DEngine : public IProcess { struct SObjectsStreamingStatus { int nReady; int nInProgress; int nTotal; int nActive; int nAllocatedBytes; int nMemRequired; int nMeshPoolSize; }; struct SStremaingBandwidthData { float fBandwidthActual; float fBandwidthRequested; }; enum eStreamingSubsystem { eStreamingSubsystem_Textures, eStreamingSubsystem_Objects, eStreamingSubsystem_Audio }; enum EChunkFileFormat { eChunkFileFormat_0x745, eChunkFileFormat_0x746 }; }; enum EFileTypes { eTerrainTextureFile = 100 }; struct SCommonFileHeader { char signature[4]; uint8 file_type; uint8 flags; uint16 version; struct STerrainTextureFileHeader_old { uint16 nSectorSizeMeters; uint16 nLodsNum; uint16 nLayerCount; uint16 nReserved; struct STerrainTextureFileHeader { uint16 nLayerCount; uint16 dwFlags; float fBrMultiplier; struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; }; }; }; }; }; }; };
I3DEngine.h
struct SOcTreeNodeChunk { int16 nChunkVersion; int16 ucChildsMask; AABB nodeBox; int32 nObjectsBlockSize; struct IGetLayerIdAtCallback { }; struct IVoxTerrain { }; struct SHotUpdateInfo { uint32 nHeigtmap; uint32 nObjTypeMask; const uint8* pVisibleLayerMask; const uint16* pLayerIdTranslation; AABB areaBox; struct ITerrain { struct SExportInfo { bool bHeigtmap; bool bObjects; AABB areaBox; }; }; struct ISegmentsManager { enum ESegmentLoadFlags { slfTerrain = BIT(1), slfVisArea = BIT(2), slfEntity = BIT(3), slfNavigation = BIT(4), slfAll = slfTerrain|slfVisArea|slfEntity|slfNavigation }; }; struct IVisAreaCallback { }; struct IVisAreaManager { }; struct IMergedMeshesManager { struct SInstanceSector { DynArraydata; string id; }; }; struct ITimeOfDay { enum ETimeOfDayParamID { PARAM_HDR_DYNAMIC_POWER_FACTOR, PARAM_TERRAIN_OCCL_MULTIPLIER, PARAM_GI_MULTIPLIER, PARAM_SUN_COLOR, PARAM_SUN_COLOR_MULTIPLIER, PARAM_SUN_SPECULAR_MULTIPLIER, PARAM_FOG_COLOR, PARAM_FOG_COLOR_MULTIPLIER, PARAM_VOLFOG_HEIGHT, PARAM_VOLFOG_DENSITY, PARAM_FOG_COLOR2, PARAM_FOG_COLOR2_MULTIPLIER, PARAM_VOLFOG_HEIGHT2, PARAM_VOLFOG_DENSITY2, PARAM_VOLFOG_HEIGHT_OFFSET, PARAM_FOG_RADIAL_COLOR, PARAM_FOG_RADIAL_COLOR_MULTIPLIER, PARAM_VOLFOG_RADIAL_SIZE, PARAM_VOLFOG_RADIAL_LOBE, PARAM_VOLFOG_FINAL_DENSITY_CLAMP, PARAM_VOLFOG_GLOBAL_DENSITY, PARAM_VOLFOG_RAMP_START, PARAM_VOLFOG_RAMP_END, PARAM_VOLFOG_RAMP_INFLUENCE, PARAM_VOLFOG_SHADOW_DARKENING, PARAM_VOLFOG_SHADOW_DARKENING_SUN, PARAM_VOLFOG_SHADOW_DARKENING_AMBIENT, PARAM_VOLFOG_SHADOW_RANGE, PARAM_SKYLIGHT_SUN_INTENSITY, PARAM_SKYLIGHT_SUN_INTENSITY_MULTIPLIER, PARAM_SKYLIGHT_KM, PARAM_SKYLIGHT_KR, PARAM_SKYLIGHT_G, PARAM_SKYLIGHT_WAVELENGTH_R, PARAM_SKYLIGHT_WAVELENGTH_G, PARAM_SKYLIGHT_WAVELENGTH_B, PARAM_NIGHSKY_HORIZON_COLOR, PARAM_NIGHSKY_HORIZON_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_COLOR, PARAM_NIGHSKY_ZENITH_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_SHIFT, PARAM_NIGHSKY_START_INTENSITY, PARAM_NIGHSKY_MOON_COLOR, PARAM_NIGHSKY_MOON_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_SCALE, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_OUTERCORONA_SCALE, PARAM_CLOUDSHADING_SUNLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SKYLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_INFLUENCE, PARAM_SUN_SHAFTS_VISIBILITY, PARAM_SUN_RAYS_VISIBILITY, PARAM_SUN_RAYS_ATTENUATION, PARAM_SUN_RAYS_SUNCOLORINFLUENCE, PARAM_SUN_RAYS_CUSTOMCOLOR, PARAM_OCEANFOG_COLOR, PARAM_OCEANFOG_COLOR_MULTIPLIER, PARAM_OCEANFOG_DENSITY, PARAM_SKYBOX_MULTIPLIER, PARAM_HDR_FILMCURVE_SHOULDER_SCALE, PARAM_HDR_FILMCURVE_LINEAR_SCALE, PARAM_HDR_FILMCURVE_TOE_SCALE, PARAM_HDR_FILMCURVE_WHITEPOINT, PARAM_HDR_COLORGRADING_COLOR_SATURATION, PARAM_HDR_COLORGRADING_COLOR_BALANCE, PARAM_HDR_EYEADAPTATION_SCENEKEY, PARAM_HDR_EYEADAPTATION_MIN_EXPOSURE, PARAM_HDR_EYEADAPTATION_MAX_EXPOSURE, PARAM_HDR_BLOOM_AMOUNT, PARAM_COLORGRADING_FILTERS_GRAIN, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_COLOR, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_DENSITY, PARAM_COLORGRADING_DOF_FOCUSRANGE, PARAM_COLORGRADING_DOF_BLURAMOUNT, PARAM_SHADOWSC0_BIAS, PARAM_SHADOWSC0_SLOPE_BIAS, PARAM_SHADOWSC1_BIAS, PARAM_SHADOWSC1_SLOPE_BIAS, PARAM_SHADOWSC2_BIAS, PARAM_SHADOWSC2_SLOPE_BIAS, PARAM_SHADOWSC3_BIAS, PARAM_SHADOWSC3_SLOPE_BIAS, PARAM_SHADOWSC4_BIAS, PARAM_SHADOWSC4_SLOPE_BIAS, PARAM_SHADOWSC5_BIAS, PARAM_SHADOWSC5_SLOPE_BIAS, PARAM_SHADOWSC6_BIAS, PARAM_SHADOWSC6_SLOPE_BIAS, PARAM_SHADOWSC7_BIAS, PARAM_SHADOWSC7_SLOPE_BIAS, PARAM_SHADOW_JITTERING, PARAM_TOTAL }; enum EVariableType { TYPE_FLOAT, TYPE_COLOR }; struct SVariableInfo { const char * name; const char * displayName; const char * group; int nParamId; EVariableType type; float fValue[3]; ISplineInterpolator* pInterpolator; unsigned int bSelected : 1; }; struct SAdvancedInfo { float fStartTime; float fEndTime; float fAnimSpeed; }; struct SEnvironmentInfo { bool bSunLinkedToTOD; float sunRotationLatitude; float sunRotationLongitude; }; const int NETSER_FORCESET = BIT(0); const int NETSER_COMPENSATELAG = BIT(1); const int NETSER_STATICPROPS = BIT(2); }; struct ITimeOfDayUpdateCallback { }; struct IFoliage { enum EFoliageFlags { FLAG_FROZEN = 1 }; }; struct SSkyLightRenderParams { const int skyDomeTextureWidth = 64; const int skyDomeTextureHeight = 32; const int skyDomeTextureSize = 64 * 32; const int skyDomeTextureWidthBy8 = 8; const int skyDomeTextureWidthBy4Log = 4; const int skyDomeTextureHeightBy2Log = 4; _smart_ptr m_pSkyDomeMesh; uint32 dummy0; uint32 dummy1; const void* m_pSkyDomeTextureDataMie; const void* m_pSkyDomeTextureDataRayleigh; size_t m_skyDomeTexturePitch; int m_skyDomeTextureTimeStamp; int pad; Vec4 m_partialMieInScatteringConst; Vec4 m_partialRayleighInScatteringConst; Vec4 m_sunDirection; Vec4 m_phaseFunctionConsts; Vec4 m_hazeColor; Vec4 m_hazeColorMieNoPremul; Vec4 m_hazeColorRayleighNoPremul; Vec3 m_skyColorTop; Vec3 m_skyColorNorth; Vec3 m_skyColorEast; Vec3 m_skyColorSouth; Vec3 m_skyColorWest; }; struct sRAEColdData { Vec4 m_RAEPortalInfos[96]; }; struct SVisAreaInfo { float fHeight; Vec3 vAmbientColor; bool bAffectedByOutLights; bool bIgnoreSkyColor; bool bSkyOnly; float fViewDistRatio; bool bDoubleSide; bool bUseDeepness; bool bUseInIndoors; bool bOceanIsVisible; bool bIgnoreGI; }; struct SDebugFPSInfo { float fAverageFPS; float fMinFPS; float fMaxFPS; }; struct SRainParams { Matrix44 matOccTrans; Matrix44 matOccTransRender; Quat qRainRotation; AABB areaAABB; Vec3 vWorldPos; Vec3 vColor; float fAmount; float fCurrentAmount; float fRadius; float fFakeGlossiness; float fFakeReflectionAmount; float fDiffuseDarkening; float fRainDropsAmount; float fRainDropsSpeed; float fRainDropsLighting; float fMistAmount; float fMistHeight; float fPuddlesAmount; float fPuddlesMaskAmount; float fPuddlesRippleAmount; float fSplashesAmount; int nUpdateFrameID; bool bApplyOcclusion; bool bIgnoreVisareas; bool bDisableOcclusion; }; struct SSnowParams { Vec3 m_vWorldPos; float m_fRadius; float m_fSnowAmount; float m_fFrostAmount; float m_fSurfaceFreezing; int m_nSnowFlakeCount; float m_fSnowFlakeSize; float m_fSnowFallBrightness; float m_fSnowFallGravityScale; float m_fSnowFallWindScale; float m_fSnowFallTurbulence; float m_fSnowFallTurbulenceFreq; }; struct IScreenshotCallback { }; class IStreamedObjectListener; struct SLightVolume { struct SLightData { Vec4 vPos; Vec4 vColor; Vec4 vParams; }; }; struct I3DEngine : public IProcess { struct SObjectsStreamingStatus { int nReady; int nInProgress; int nTotal; int nActive; int nAllocatedBytes; int nMemRequired; int nMeshPoolSize; }; struct SStremaingBandwidthData { float fBandwidthActual; float fBandwidthRequested; }; enum eStreamingSubsystem { eStreamingSubsystem_Textures, eStreamingSubsystem_Objects, eStreamingSubsystem_Audio }; enum EChunkFileFormat { eChunkFileFormat_0x745, eChunkFileFormat_0x746 }; }; enum EFileTypes { eTerrainTextureFile = 100 }; struct SCommonFileHeader { char signature[4]; uint8 file_type; uint8 flags; uint16 version; struct STerrainTextureFileHeader_old { uint16 nSectorSizeMeters; uint16 nLodsNum; uint16 nLayerCount; uint16 nReserved; struct STerrainTextureFileHeader { uint16 nLayerCount; uint16 dwFlags; float fBrMultiplier; struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; }; }; }; }; }; };
I3DEngine.h
struct IGetLayerIdAtCallback { };
I3DEngine.h
virtual ~IGetLayerIdAtCallback();
virtual ColorB GetColorAtPosition(const float x, const float y, bool bBilinear) = 0;
virtual float GetElevationAtPosition(const float x, const float y) = 0;
virtual bool GetHoleAtPosition(const int x, const int y) const = 0;
virtual uint32 GetLayerIdAtPosition(const int x, const int y) const = 0;
virtual float GetRGBMultiplier() = 0;
virtual uint32 GetSurfaceTypeIdAtPosition(const int x, const int y) const = 0;
Interface to terrain engine
struct IVoxTerrain { };
I3DEngine.h
virtual ~IVoxTerrain();
virtual void DrawEditingHelper(const Sphere & sp, EVoxelEditOperation eOperation, IMaterial * pHelperMat) = 0;
virtual IMemoryBlock * GetCompiledData(bool bSaveMesh, EEndian eEndian, bool bSaveForEditing, AABB * pAreaBox, int nSID = 0) = 0;
virtual void GetLayerData(void ** pData, int & nDataSize) = 0;
virtual PodArray<IRenderNode*> * GetNodesForUpdate() = 0;
virtual void OnMouse(bool bUp) = 0;
virtual void PaintLayerId(const float fpx, const float fpy, const float radius, const float hardness, const uint32 dwLayerId) = 0;
virtual bool SetCompiledData(byte * pData, int nDataSize, bool bUpdateMesh, EEndian eEndian, AABB * pAreaBox, int nSID = 0) = 0;
virtual void SetLayerData(void * pData, int nDataSize) = 0;
virtual void SetTextureArea(Vec3 * pPoints, int nPointsCount, int nShapePartId) = 0;
struct SHotUpdateInfo { uint32 nHeigtmap; uint32 nObjTypeMask; const uint8* pVisibleLayerMask; const uint16* pLayerIdTranslation; AABB areaBox; struct ITerrain { struct SExportInfo { bool bHeigtmap; bool bObjects; AABB areaBox; }; }; struct ISegmentsManager { enum ESegmentLoadFlags { slfTerrain = BIT(1), slfVisArea = BIT(2), slfEntity = BIT(3), slfNavigation = BIT(4), slfAll = slfTerrain|slfVisArea|slfEntity|slfNavigation }; }; struct IVisAreaCallback { }; struct IVisAreaManager { }; struct IMergedMeshesManager { struct SInstanceSector { DynArraydata; string id; }; }; struct ITimeOfDay { enum ETimeOfDayParamID { PARAM_HDR_DYNAMIC_POWER_FACTOR, PARAM_TERRAIN_OCCL_MULTIPLIER, PARAM_GI_MULTIPLIER, PARAM_SUN_COLOR, PARAM_SUN_COLOR_MULTIPLIER, PARAM_SUN_SPECULAR_MULTIPLIER, PARAM_FOG_COLOR, PARAM_FOG_COLOR_MULTIPLIER, PARAM_VOLFOG_HEIGHT, PARAM_VOLFOG_DENSITY, PARAM_FOG_COLOR2, PARAM_FOG_COLOR2_MULTIPLIER, PARAM_VOLFOG_HEIGHT2, PARAM_VOLFOG_DENSITY2, PARAM_VOLFOG_HEIGHT_OFFSET, PARAM_FOG_RADIAL_COLOR, PARAM_FOG_RADIAL_COLOR_MULTIPLIER, PARAM_VOLFOG_RADIAL_SIZE, PARAM_VOLFOG_RADIAL_LOBE, PARAM_VOLFOG_FINAL_DENSITY_CLAMP, PARAM_VOLFOG_GLOBAL_DENSITY, PARAM_VOLFOG_RAMP_START, PARAM_VOLFOG_RAMP_END, PARAM_VOLFOG_RAMP_INFLUENCE, PARAM_VOLFOG_SHADOW_DARKENING, PARAM_VOLFOG_SHADOW_DARKENING_SUN, PARAM_VOLFOG_SHADOW_DARKENING_AMBIENT, PARAM_VOLFOG_SHADOW_RANGE, PARAM_SKYLIGHT_SUN_INTENSITY, PARAM_SKYLIGHT_SUN_INTENSITY_MULTIPLIER, PARAM_SKYLIGHT_KM, PARAM_SKYLIGHT_KR, PARAM_SKYLIGHT_G, PARAM_SKYLIGHT_WAVELENGTH_R, PARAM_SKYLIGHT_WAVELENGTH_G, PARAM_SKYLIGHT_WAVELENGTH_B, PARAM_NIGHSKY_HORIZON_COLOR, PARAM_NIGHSKY_HORIZON_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_COLOR, PARAM_NIGHSKY_ZENITH_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_SHIFT, PARAM_NIGHSKY_START_INTENSITY, PARAM_NIGHSKY_MOON_COLOR, PARAM_NIGHSKY_MOON_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_SCALE, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_OUTERCORONA_SCALE, PARAM_CLOUDSHADING_SUNLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SKYLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_INFLUENCE, PARAM_SUN_SHAFTS_VISIBILITY, PARAM_SUN_RAYS_VISIBILITY, PARAM_SUN_RAYS_ATTENUATION, PARAM_SUN_RAYS_SUNCOLORINFLUENCE, PARAM_SUN_RAYS_CUSTOMCOLOR, PARAM_OCEANFOG_COLOR, PARAM_OCEANFOG_COLOR_MULTIPLIER, PARAM_OCEANFOG_DENSITY, PARAM_SKYBOX_MULTIPLIER, PARAM_HDR_FILMCURVE_SHOULDER_SCALE, PARAM_HDR_FILMCURVE_LINEAR_SCALE, PARAM_HDR_FILMCURVE_TOE_SCALE, PARAM_HDR_FILMCURVE_WHITEPOINT, PARAM_HDR_COLORGRADING_COLOR_SATURATION, PARAM_HDR_COLORGRADING_COLOR_BALANCE, PARAM_HDR_EYEADAPTATION_SCENEKEY, PARAM_HDR_EYEADAPTATION_MIN_EXPOSURE, PARAM_HDR_EYEADAPTATION_MAX_EXPOSURE, PARAM_HDR_BLOOM_AMOUNT, PARAM_COLORGRADING_FILTERS_GRAIN, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_COLOR, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_DENSITY, PARAM_COLORGRADING_DOF_FOCUSRANGE, PARAM_COLORGRADING_DOF_BLURAMOUNT, PARAM_SHADOWSC0_BIAS, PARAM_SHADOWSC0_SLOPE_BIAS, PARAM_SHADOWSC1_BIAS, PARAM_SHADOWSC1_SLOPE_BIAS, PARAM_SHADOWSC2_BIAS, PARAM_SHADOWSC2_SLOPE_BIAS, PARAM_SHADOWSC3_BIAS, PARAM_SHADOWSC3_SLOPE_BIAS, PARAM_SHADOWSC4_BIAS, PARAM_SHADOWSC4_SLOPE_BIAS, PARAM_SHADOWSC5_BIAS, PARAM_SHADOWSC5_SLOPE_BIAS, PARAM_SHADOWSC6_BIAS, PARAM_SHADOWSC6_SLOPE_BIAS, PARAM_SHADOWSC7_BIAS, PARAM_SHADOWSC7_SLOPE_BIAS, PARAM_SHADOW_JITTERING, PARAM_TOTAL }; enum EVariableType { TYPE_FLOAT, TYPE_COLOR }; struct SVariableInfo { const char * name; const char * displayName; const char * group; int nParamId; EVariableType type; float fValue[3]; ISplineInterpolator* pInterpolator; unsigned int bSelected : 1; }; struct SAdvancedInfo { float fStartTime; float fEndTime; float fAnimSpeed; }; struct SEnvironmentInfo { bool bSunLinkedToTOD; float sunRotationLatitude; float sunRotationLongitude; }; const int NETSER_FORCESET = BIT(0); const int NETSER_COMPENSATELAG = BIT(1); const int NETSER_STATICPROPS = BIT(2); }; struct ITimeOfDayUpdateCallback { }; struct IFoliage { enum EFoliageFlags { FLAG_FROZEN = 1 }; }; struct SSkyLightRenderParams { const int skyDomeTextureWidth = 64; const int skyDomeTextureHeight = 32; const int skyDomeTextureSize = 64 * 32; const int skyDomeTextureWidthBy8 = 8; const int skyDomeTextureWidthBy4Log = 4; const int skyDomeTextureHeightBy2Log = 4; _smart_ptr m_pSkyDomeMesh; uint32 dummy0; uint32 dummy1; const void* m_pSkyDomeTextureDataMie; const void* m_pSkyDomeTextureDataRayleigh; size_t m_skyDomeTexturePitch; int m_skyDomeTextureTimeStamp; int pad; Vec4 m_partialMieInScatteringConst; Vec4 m_partialRayleighInScatteringConst; Vec4 m_sunDirection; Vec4 m_phaseFunctionConsts; Vec4 m_hazeColor; Vec4 m_hazeColorMieNoPremul; Vec4 m_hazeColorRayleighNoPremul; Vec3 m_skyColorTop; Vec3 m_skyColorNorth; Vec3 m_skyColorEast; Vec3 m_skyColorSouth; Vec3 m_skyColorWest; }; struct sRAEColdData { Vec4 m_RAEPortalInfos[96]; }; struct SVisAreaInfo { float fHeight; Vec3 vAmbientColor; bool bAffectedByOutLights; bool bIgnoreSkyColor; bool bSkyOnly; float fViewDistRatio; bool bDoubleSide; bool bUseDeepness; bool bUseInIndoors; bool bOceanIsVisible; bool bIgnoreGI; }; struct SDebugFPSInfo { float fAverageFPS; float fMinFPS; float fMaxFPS; }; struct SRainParams { Matrix44 matOccTrans; Matrix44 matOccTransRender; Quat qRainRotation; AABB areaAABB; Vec3 vWorldPos; Vec3 vColor; float fAmount; float fCurrentAmount; float fRadius; float fFakeGlossiness; float fFakeReflectionAmount; float fDiffuseDarkening; float fRainDropsAmount; float fRainDropsSpeed; float fRainDropsLighting; float fMistAmount; float fMistHeight; float fPuddlesAmount; float fPuddlesMaskAmount; float fPuddlesRippleAmount; float fSplashesAmount; int nUpdateFrameID; bool bApplyOcclusion; bool bIgnoreVisareas; bool bDisableOcclusion; }; struct SSnowParams { Vec3 m_vWorldPos; float m_fRadius; float m_fSnowAmount; float m_fFrostAmount; float m_fSurfaceFreezing; int m_nSnowFlakeCount; float m_fSnowFlakeSize; float m_fSnowFallBrightness; float m_fSnowFallGravityScale; float m_fSnowFallWindScale; float m_fSnowFallTurbulence; float m_fSnowFallTurbulenceFreq; }; struct IScreenshotCallback { }; class IStreamedObjectListener; struct SLightVolume { struct SLightData { Vec4 vPos; Vec4 vColor; Vec4 vParams; }; }; struct I3DEngine : public IProcess { struct SObjectsStreamingStatus { int nReady; int nInProgress; int nTotal; int nActive; int nAllocatedBytes; int nMemRequired; int nMeshPoolSize; }; struct SStremaingBandwidthData { float fBandwidthActual; float fBandwidthRequested; }; enum eStreamingSubsystem { eStreamingSubsystem_Textures, eStreamingSubsystem_Objects, eStreamingSubsystem_Audio }; enum EChunkFileFormat { eChunkFileFormat_0x745, eChunkFileFormat_0x746 }; }; enum EFileTypes { eTerrainTextureFile = 100 }; struct SCommonFileHeader { char signature[4]; uint8 file_type; uint8 flags; uint16 version; struct STerrainTextureFileHeader_old { uint16 nSectorSizeMeters; uint16 nLodsNum; uint16 nLayerCount; uint16 nReserved; struct STerrainTextureFileHeader { uint16 nLayerCount; uint16 dwFlags; float fBrMultiplier; struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; }; }; }; }; };
I3DEngine.h
Types of binary files used by 3dengine
enum EFileTypes { eTerrainTextureFile = 100 };
I3DEngine.h
Interface to the 3d Engine.
struct I3DEngine : public IProcess { struct SObjectsStreamingStatus { int nReady; int nInProgress; int nTotal; int nActive; int nAllocatedBytes; int nMemRequired; int nMeshPoolSize; }; struct SStremaingBandwidthData { float fBandwidthActual; float fBandwidthRequested; }; enum eStreamingSubsystem { eStreamingSubsystem_Textures, eStreamingSubsystem_Objects, eStreamingSubsystem_Audio }; enum EChunkFileFormat { eChunkFileFormat_0x745, eChunkFileFormat_0x746 }; };
I3DEngine.h
enum EChunkFileFormat { eChunkFileFormat_0x745, eChunkFileFormat_0x746 };
I3DEngine.h
Chunk file writer.
enum eStreamingSubsystem { eStreamingSubsystem_Textures, eStreamingSubsystem_Objects, eStreamingSubsystem_Audio };
I3DEngine.h
struct SObjectsStreamingStatus { int nReady; int nInProgress; int nTotal; int nActive; int nAllocatedBytes; int nMemRequired; int nMeshPoolSize; };
I3DEngine.h
Members |
Description |
int nMeshPoolSize; |
in MB |
struct SStremaingBandwidthData { float fBandwidthActual; float fBandwidthRequested; };
I3DEngine.h
float fBandwidthActual;
float fBandwidthRequested;
SStremaingBandwidthData();
virtual void ActivateObjectsLayer(uint16 nLayerId, bool bActivate, bool bPhys, bool bObjects, bool bStaticLights, const char * pLayerName, IGeneralMemoryHeap* pHeap = NULL, bool bCheckLayerActivation = true) = 0;
Show/Hide objects by layer (useful for streaming and performance)
Enables or disables portal at a specified position.
virtual void ActivatePortal(const Vec3 & vPos, bool bActivate, const char * szEntityName) = 0;
Parameters |
Description |
const Vec3 & vPos |
Position to place the portal |
bool bActivate |
Set to true in order to enable the portal, or to false to disable szEntityName - |
virtual int AddPrecachePoint(const Vec3& vPos, const Vec3& vDir, float fTimeOut = 3.f, float fImportanceFactor = 1.0f) = 0;
begin streaming of meshes and textures for specified position, pre-cache stops after fTimeOut seconds
Applies physics in a specified area
virtual void ApplyForceToEnvironment(Vec3 vPos, float fRadius, float fAmountOfForce) = 0;
Parameters |
Description |
Vec3 vPos |
Center position to apply physics |
float fRadius |
Radius which specify the size of the area to apply physics |
float fAmountOfForce |
The amount of force, should be at least of 1.0f |
Physics applied to the area will apply to vegetations and allow it to move/blend.
virtual bool CheckIntersectClouds(const Vec3 & p1, const Vec3 & p2) = 0;
Returns true if input line segment intersect clouds sprites.
In debug mode check memory heap and makes assert, do nothing in release
virtual void CheckMemoryHeap() = 0;
Physicalizes area if not physicalized yet.
virtual void CheckPhysicalized(const Vec3 & vBoxMin, const Vec3 & vBoxMax) = 0;
virtual void ClearAllPrecachePoints() = 0;
virtual void ClearPrecachePoint(int id) = 0;
virtual bool ClipToVisAreas(IVisArea* pInside, Sphere& sphere, Vec3 const& vNormal, void* pNodeCache = 0) = 0;
Parameters |
Description |
IVisArea* pInside |
Vis Area to clip inside of. If 0, clip outside all Vis Areas. |
Sphere& sphere |
vNormal - |
pNodeChache |
|
Whether it was clipped
Clips geometry against the boundaries of VisAreas.
Closes terrain texture file handle and allows to replace/update it.
virtual void CloseTerrainTextureFile(int nSID = DEFAULT_SID) = 0;
Finishes objects geometery generation/loading.
virtual void CompleteObjectsGeometry() = 0;
virtual IChunkFile * CreateChunkFile(bool bReadOnly = false) = 0;
Creates ChunkFile.
virtual CContentCGF* CreateChunkfileContent(const char * filename) = 0;
CGF Loader. ///////////////////////////////////////////////////////////////////////
Creates a chunkfile content instance Returns 'NULL' if the memory for the instance could not be allocated
virtual ChunkFile::IChunkFileWriter* CreateChunkFileWriter(EChunkFileFormat eFormat, ICryPak* pPak, const char* filename) const = 0;
Creates new decals on the walls, static objects, terrain and entities.
virtual void CreateDecal(const CryEngineDecalInfo & Decal) = 0;
Parameters |
Description |
const CryEngineDecalInfo & Decal |
Structure describing the decal effect to be applied |
Creates the instance of the indexed mesh.
virtual IIndexedMesh* CreateIndexedMesh() = 0;
Creates a new light source.
virtual struct ILightSource * CreateLightSource() = 0;
Pointer to newly created light or -1 if it fails.
Creates instance of IRenderNode object with specified type.
virtual IRenderNode* CreateRenderNode(EERType type) = 0;
Creates static object containing empty IndexedMesh.
virtual IStatObj * CreateStatObj() = 0;
virtual IStatObj * CreateStatObjOptionalIndexedMesh(bool createIndexedMesh) = 0;
virtual ITerrain * CreateTerrain(const STerrainInfo & TerrainInfo) = 0;
Creates terrain engine
Creates a new VisArea.
virtual IVisArea * CreateVisArea(uint64 visGUID) = 0;
A pointer to a newly created VisArea object
virtual void DebugDraw_UpdateDebugNode() = 0;
Used to highlight an object under the reticule
Removes decals in a specified range.
virtual void DeleteDecalsInRange(AABB * pAreaBox, IRenderNode * pEntity) = 0;
Parameters |
Description |
IRenderNode * pEntity |
if not NULL will only delete decals attached to this entity |
vAreaBox |
Specify the area in which the decals will be removed |
Removes all decals attached to specified entity.
virtual void DeleteEntityDecals(IRenderNode * pEntity) = 0;
Deletes a light.
virtual void DeleteLightSource(ILightSource * pLightSource) = 0;
Delete RenderNode object.
virtual void DeleteRenderNode(IRenderNode * pRenderNode) = 0;
virtual void DeleteTerrain() = 0;
Deletes terrain
Deletes a VisArea.
virtual void DeleteVisArea(IVisArea * pVisArea) = 0;
Parameters |
Description |
IVisArea * pVisArea |
A pointer to the VisArea to delete |
Displays statistic on the 3d Engine.
virtual void DisplayInfo(float & fTextPosX, float & fTextPosY, float & fTextStepY, const bool bEnhanced) = 0;
Parameters |
Description |
float & fTextPosX |
X position for the text |
float & fTextPosY |
Y position for the text |
float & fTextStepY |
Amount of pixels to distance each line |
const bool bEnhanced |
false=normal, true=more interesting information |
virtual void DrawDeferredCoverageBufferDebug() = 0;
Draws text right aligned at the y pixel precision.
virtual void DrawTextRightAligned(const float x, const float y, const char * format, ...);
virtual void DrawTextRightAligned(const float x, const float y, const float scale, const ColorF & color, const char * format, ...);
Enables or disables ocean rendering.
virtual void EnableOceanRendering(bool bOcean) = 0;
Parameters |
Description |
bool bOcean |
Will enable or disable the rendering of ocean |
virtual void EndOcclusion() = 0;
virtual void FillDebugFPSInfo(SDebugFPSInfo&) = 0;
Finds a static object created from the given filename
virtual IStatObj * FindStatObjectByFilename(const char * filename) = 0;
Parameters |
Description |
szFileName |
CGF Filename - should not be 0 or "" |
A pointer to an object derived from IStatObj.
IStatObj
Frees entity render info.
virtual void FreeRenderNodeState(IRenderNode * pEntity) = 0;
virtual void FreeRNTmpData(CRNTmpData ** ppInfo) = 0;
Frees lod transition state
Gets the ocean water level for a specified position.
Notes: This function only takes into account ocean water.
virtual float GetAccurateOceanHeight(const Vec3 & pCurrPos) const = 0;
Parameters |
Description |
const Vec3 & pCurrPos |
Position to check water level |
A float value which indicate the water level.
virtual float GetBottomLevel(const Vec3 & referencePos, float maxRelevantDepth = 10.0f) = 0;
A set of overloads for enabling users to use different sets of input params. Basically, only referencePos is mandatory. The overloads as such don't need to be virtual but this seems to be a purely virtual interface.
Gets the closest walkable bottom z straight beneath the given reference position. Notes: This function will take into account both the global terrain elevation and local voxel (or other solid walkable object).
virtual float GetBottomLevel(const Vec3 & referencePos, float maxRelevantDepth, int objtypes) = 0;
Parameters |
Description |
const Vec3 & referencePos |
Position from where to start searching downwards. |
float maxRelevantDepth |
Max depth caller is interested in relative to referencePos (for ray casting performance reasons). |
int objtypes |
expects physics entity flags. Use this to specify what object types make a valid bottom for you. |
A float value which indicate the global world z of the bottom level beneath the referencePos. If the referencePos is below terrain but not inside any voxel area BOTTOM_LEVEL_UNKNOWN is returned.
virtual float GetBottomLevel(const Vec3 & referencePos, int objflags) = 0;
Gets caustics parameters.
virtual Vec4 GetCausticsParams() const = 0;
A Vec4 value which constains: x = unused, y = distance attenuation, z = caustics multiplier, w = caustics darkening multiplier
virtual IDeferredPhysicsEventManager* GetDeferredPhysicsEventManager() = 0;
virtual PodArray<CDLight*>* GetDynamicLightSources() = 0;
Gets the fog color.
virtual Vec3 GetFogColor() = 0;
Retrieves the current GI multiplier Notes:
virtual float GetGIAmount() const = 0;
scalar value
float GetGlobalParameter(E3DEngineParameter param);
virtual void GetGlobalParameter(E3DEngineParameter param, Vec3 & v) = 0;
Retrieves global 3d engine parameter.
Gets the global wind vector.
virtual Vec3 GetGlobalWind(bool bIndoors) const = 0;
Gets HDR setup parameters.
virtual void GetHDRSetupParams(Vec4 pParams[4]) const = 0;
Gets the unit size of the terrain Notes: The value should currently be 2.
virtual int GetHeightMapUnitSize() = 0;
A int value representing the terrain unit size in meters.
virtual IMergedMeshesManager * GetIMergedMeshesManager() = 0;
Returns interface to the mergedmeshes subsystem
virtual ITerrain * GetITerrain() = 0;
Returns interface to terrain engine
virtual IVisAreaManager * GetIVisAreaManager() = 0;
Returns interface to visarea manager.
virtual IVoxTerrain * GetIVoxTerrain() = 0;
Deprecated
virtual void GetLayerMemoryUsage(uint16 nLayerId, ICrySizer* pSizer, int* pNumBrushes, int* pNumDecals) const = 0;
Get object layer memory usage
Adds the level's path to a specified filename.
virtual const char * GetLevelFilePath(const char * szFileName) = 0;
Parameters |
Description |
const char * szFileName |
The filename for which we need to add the path |
Full path for the filename; including the level path and the filename appended after.
virtual float GetLightAmountInRange(const Vec3 & pPos, float fRange, bool bAccurate = 0) = 0;
Returns amount of light affecting a point in space inside a specific range (0 means no light affecting, 1 is completely affected by light). Use accurate parameter for a more expensive but with higher accuracy computation.
virtual const PodArray* GetLightEntities() = 0;
virtual float GetLightsHDRDynamicPowerFactor() const = 0;
In logarithmic scale -4.0 .. 4.0
Gives access to list holding all lighting volumes
virtual void GetLightVolumes(threadID nThreadID, SLightVolume *& pLightVols, uint32 & nNumVols) = 0;
An array holding all the SLightVolume pointers.
Gets the amount of loaded objects.
virtual int GetLoadedObjectCount();
An integer representing the amount of loaded objects.
Fills pObjectsArray with pointers to loaded static objects if pObjectsArray is NULL only fills nCount parameter with amount of loaded objects.
virtual void GetLoadedStatObjArray(IStatObj** pObjectsArray, int & nCount) = 0;
virtual IMaterialManager* GetMaterialManager() = 0;
Retrieve pointer to the material manager interface.
Gives access to materials library.
virtual class CMatMan * GetMatMan() = 0;
Gets the view distance.
virtual float GetMaxViewDistance(bool bScaled = true) = 0;
A float value representing the maximum view distance.
virtual uint32 GetObjectsByType(EERType objType, IRenderNode ** pObjects = 0) = 0;
Parameters |
Description |
IRenderNode ** pObjects = 0 |
0 if only the count is required |
Count returned
Call function 2 times (first to get the size then to fill in the data)
virtual uint32 GetObjectsByTypeInBox(EERType objType, const AABB & bbox, IRenderNode ** pObjects = 0) = 0;
virtual void GetObjectsByTypeInBox(EERType objType, const AABB & bbox, PodArray<IRenderNode*> * pLstObjects) = 0;
variant which takes a POD array which is resized in the function itself
virtual uint32 GetObjectsInBox(const AABB & bbox, IRenderNode ** pObjects = 0) = 0;
Gets stats on streamed objects
virtual void GetObjectsStreamingStatus(SObjectsStreamingStatus & outStatus) = 0;
Gets ocean animation caustics parameters.
virtual Vec4 GetOceanAnimationCausticsParams() const = 0;
A Vec4 value which constains: x = unused, y = height, z = depth, w = intensity
Gets ocean animation parameters.
virtual void GetOceanAnimationParams(Vec4 & pParams0, Vec4 & pParams1) const = 0;
virtual uint8 GetOceanRenderFlags() const = 0;
virtual uint32 GetOceanVisiblePixelsCount() const = 0;
virtual IOpticsManager * GetOpticsManager() = 0;
virtual IParticleManager * GetParticleManager() = 0;
Gets the physics material enumerator
virtual IPhysMaterialEnumerator * GetPhysMaterialEnumerator() = 0;
A pointer to an IPhysMaterialEnumerator derived object.
virtual int32 GetPostEffectID(const char* pPostEffectName) = 0;
virtual void GetPostEffectParam(const char * pParam, float & fValue) const = 0;
virtual void GetPostEffectParamString(const char * pParam, const char* & pszArg) const = 0;
virtual void GetPostEffectParamVec4(const char * pParam, Vec4 & pValue) const = 0;
virtual void GetPrecacheRoundIds(int pRoundIds[MAX_STREAM_PREDICTION_ZONES]) = 0;
virtual float GetPrevZoomFactor() = 0;
Gets the validity and fills current rain parameters.
virtual bool GetRainParams(SRainParams & rainParams) = 0;
Returns the Camera used for Rendering on 3DEngine Side, normaly equal to the view camera, except if frozen with e_camerafreeze Notes: Only valid during RenderWorld(else the camera of the last frame is used) This is the camera which should be used for all Engine side culling (since e_camerafreeze allows easy debugging then)
virtual const CCamera& GetRenderingCamera() const = 0;
following functions are used by SRenderingPassInfo
virtual ISegmentsManager * GetSegmentsManager() = 0;
pointer to ISegmentsManager interface
virtual EShadowMode GetShadowMode() const = 0;
Retrieves the current sky brightening multiplier Notes:
virtual float GetSkyBrightness() const = 0;
Scalar value
Gets the environment ambient color. Notes: Should have been specified in the editor.
virtual Vec3 GetSkyColor() const = 0;
An rgb value contained in a Vec3 object.
Gets various sky light parameters.
virtual void GetSkyLightParameters(Vec3& sunDir, Vec3& sunIntensity, float& Km, float& Kr, float& g, Vec3& rgbWaveLengths) = 0;
virtual IMaterial* GetSkyMaterial() = 0;
Returns SkyBox material.
Gets current snow parameters.
VIRTUAL bool GetSnowFallParams(int & nSnowFlakeCount, float & fSnowFlakeSize, float & fSnowFallBrightness, float & fSnowFallGravityScale, float & fSnowFallWindScale, float & fSnowFallTurbulence, float & fSnowFallTurbulenceFreq) = 0;
Gets current snow surface parameters.
VIRTUAL bool GetSnowSurfaceParams(Vec3 & vCenter, float & fRadius, float & fSnowAmount, float & fFrostAmount, float & fSurfaceFreezing) = 0;
Retrieves the current SSAO multiplier Notes:
virtual float GetSSAOAmount() const = 0;
scalar value
Retrieves the current SSAO contrast multiplier Notes:
virtual float GetSSAOContrast() const = 0;
scalar value
Gives access to the list holding all static light sources
virtual const PodArray<CDLight*> * GetStaticLightSources() = 0;
An array holding all the CDLight pointers.
Gets stats on the streaming bandwidth requests from subsystems
virtual void GetStreamingSubsystemData(int subsystem, SStremaingBandwidthData & outData) = 0;
Parameters |
Description |
int subsystem |
the streaming subsystem we want bandwidth data for |
SStremaingBandwidthData & outData |
structure containing the bandwidth data for the subsystem requested |
Gets the sun color Notes: Should have been specified in the editor.
virtual Vec3 GetSunColor() const = 0;
An rgb value contained in a Vec3 object.
Gets the current sun/sky color relation.
virtual float GetSunRel() const = 0;
virtual SRenderObjectModifier* GetTempRenderObjectModifier(const SRenderObjectModifier & rRenderObjectModifier, const SRenderingPassInfo & passInfo) = 0;
Gets the interpolated terrain elevation for a specified location. Notes: All x,y values are valid.
virtual float GetTerrainElevation(float x, float y, int nSID = DEFAULT_SID) = 0;
Parameters |
Description |
float x |
X coordinate of the location |
float y |
Y coordinate of the location |
A float which indicate the elevation level.
Gets the terrain hole flag for a specified location. Notes: Only values between 0 and WORLD_SIZE.
virtual bool GetTerrainHole(int x, int y) = 0;
Parameters |
Description |
int x |
X coordinate of the location |
int y |
Y coordinate of the location |
A bool which indicate is there hole or not.
Gets the size of the terrain sectors Notes: The value should be 64 by default.
virtual int GetTerrainSectorSize() = 0;
An int representing the size of a sector in meters.
Gets the size of the terrain Notes: The value should be 2048 by default.
virtual int GetTerrainSize() = 0;
An int representing the terrain size in meters.
Gets the terrain surface normal for a specified location.
virtual Vec3 GetTerrainSurfaceNormal(Vec3 vPos) = 0;
A terrain surface normal.
Returns terrain texture multiplier.
virtual float GetTerrainTextureMultiplier(int nSID = 0) const = 0;
Scalar value
Gets the terrain elevation for a specified location. Notes: Only values between 0 and WORLD_SIZE.
virtual float GetTerrainZ(int x, int y) = 0;
Parameters |
Description |
int x |
X coordinate of the location |
int y |
Y coordinate of the location |
A float which indicate the elevation level.
virtual ITimeOfDay* GetTimeOfDay() = 0;
Returns TOD interface.
virtual IVisArea * GetVisAreaFromPos(const Vec3 & vPos) = 0;
Parameters |
Description |
const Vec3 & vPos |
|
VisArea containing point, if any. 0 otherwise.
Gets the VisArea which is present at a specified point.
virtual const char * GetVoxelEditOperationName(EVoxelEditOperation eOperation) = 0;
Gets the ocean water level. Fastest option, always prefer is only ocean height required. Notes: This function will take into account just the global water level.
virtual float GetWaterLevel() = 0;
A float value which indicate the water level. In case no water was found at the specified location, the value WATER_LEVEL_UNKNOWN will be returned.
Gets the closest walkable bottom z straight beneath the given reference position.
Notes: This function will take into account both the global water level and any water volume present. Function is provided twice for performance with diff. arguments.
virtual float GetWaterLevel(const Vec3 * pvPos, IPhysicalEntity * pent = NULL, bool bAccurate = false) = 0;
Parameters |
Description |
const Vec3 * pvPos |
Desired position to inspect the water level |
IPhysicalEntity * pent = NULL |
Pointer to return the physical entity to test against (optional) |
A float value which indicate the water level. In case no water was found at the specified location, the value WATER_LEVEL_UNKNOWN will be returned.
Gets wind direction and force, averaged within a box.
virtual Vec3 GetWind(const AABB & box, bool bIndoors) const = 0;
virtual float GetZoomFactor() const = 0;
virtual int GetZoomMode() const = 0;
Initializes the 3D Engine.
virtual bool Init() = 0;
ShutDown Notes: Only call once, after creating the instance.
virtual bool InitLevelForEditor(const char * szFolderName, const char * szMissionName) = 0;
virtual bool IntersectsVisAreas(const AABB& box, void** pNodeCache = 0) = 0;
Parameters |
Description |
const AABB& box |
Volume to test for intersection. pNodeCache (out, optional): Set to a cached pointer, for quicker calls to ClipToVisAreas. |
Whether box intersects any vis areas.
Tests for intersection against Vis Areas.
virtual bool IsAmbientOcclusionEnabled() = 0;
True if e_ambient_occlusion is ON and AO data is valid
virtual bool IsAreaActivationInUse() = 0;
virtual bool IsSegmentOperationInProgress() = 0;
true if segmented world is performing an operation (load/save/move/etc)
virtual bool IsTerrainTextureStreamingInProgress() = 0;
Return true if terrain texture streaming takes place
virtual bool IsTessellationAllowed(const CRenderObject * pObj, const SRenderingPassInfo & passInfo, bool bIgnoreShadowPass = false) const = 0;
Return true if tessellation is allowed for given render object
Returns whether a world pos is under water.
virtual bool IsUnderWater(const Vec3& vPos) const = 0;
Determines if two VisAreas are connected.
Parameters |
Description |
IVisArea * pArea1 |
A pointer to a VisArea |
IVisArea * pArea2 |
A pointer to a VisArea |
int nMaxRecursion = 1 |
Maximum number of recursions to be done |
bool bSkipDisabledPortals = true |
Indicate if disabled portals should be skipped |
A boolean value set to true if the two VisAreas are connected, else false will be returned.
Used to determine if a sound is potentially hearable between two VisAreas.
virtual float IsZoomInProgress() const = 0;
virtual bool LoadChunkFileContent(CContentCGF* pCGF, const char * filename, bool bNoWarningMode = false, bool bCopyChunkFile = true) = 0;
Loads the contents of a chunkfile into the given CContentCGF. Returns 'false' on error.
virtual bool LoadChunkFileContentFromMem(CContentCGF* pCGF, const void* pData, size_t nDataLen, uint32 nLoadingFlags, bool bNoWarningMode = false, bool bCopyChunkFile = true) = 0;
Loads the contents of a chunkfile into the given CContentCGF. Returns 'false' on error.
Loads a designer object from a stream of _decoded_ binary node. (Base64Decode)
virtual IStatObj* LoadDesignerObject(int nVersion, const char* szBinaryStream, int size) = 0;
Parameters |
Description |
const char* szBinaryStream |
decoded stream + size |
virtual void LoadInternalState(struct IDataReadStream& reader, const uint8* pVisibleLayersMasks, const uint16* pLayerIdTranslation) = 0;
Load a level.
virtual bool LoadLevel(const char * szFolderName, const char * szMissionName) = 0;
Parameters |
Description |
const char * szFolderName |
Name of the subfolder to load |
const char * szMissionName |
Name of the mission |
A boolean which indicate the result of the function; true is succeed, or false if failed.
Will load a level from the folder specified with SetLevelPath. If a level is already loaded, the resources will be deleted before.
virtual IStatObj * LoadStatObj(TSerialize ser) = 0;
Loads statobj from a stream
Loads a static object from a CGF file.
virtual IStatObj* LoadStatObj(const char * szFileName, const char * szGeomName = NULL, IStatObj::SSubObject ** ppSubObject = NULL, bool bUseStreaming = true, unsigned long nLoadingFlags = 0) = 0;
Parameters |
Description |
const char * szFileName |
CGF Filename - should not be 0 or "" |
const char * szGeomName = NULL |
Optional name of geometry inside CGF. |
IStatObj::SSubObject ** ppSubObject = NULL |
[Out]Optional Out parameter,Pointer to the |
unsigned long nLoadingFlags = 0 |
Zero or a bitwise combination of the flags from ELoadingFlags, defined in IMaterial.h, under the interface IMaterialManager. |
A pointer to an object derived from IStatObj.
IStatObj
Disables CGFs unloading.
virtual void LockCGFResources() = 0;
virtual void OffsetPosition(Vec3 & delta) = 0;
Called when the segmented world moves
Notifies of an explosion, and maybe creates an hole in the terrain
virtual void OnExplosion(Vec3 vPos, float fRadius, bool bDeformTerrain = true) = 0;
Parameters |
Description |
Vec3 vPos |
Position of the explosion |
float fRadius |
Radius of the explosion |
bool bDeformTerrain = true |
Allow to deform the terrain |
This function should usually make sure that no static objects are near before making the hole.
Handles any work needed at start of new frame. Notes: Should be called for every frame.
virtual void OnFrameStart() = 0;
virtual void OnRenderMeshDeleted(IRenderMesh * pRenderMesh) = 0;
Removes references to RenderMesh
virtual void OverrideCameraPrecachePoint(const Vec3& vPos) = 0;
override the camera precache point with the requested position for the current round
Pre-caches some resources need for rendering.
virtual void PostLoadLevel() = 0;
Must be called after the game completely finishes loading the level. 3D engine uses it to pre-cache some resources needed for rendering.
Cleanups after save/load.
virtual void PostSerialize(bool bReading) = 0;
virtual void PrecacheCharacter(IRenderNode * pObj, const float fImportance, ICharacterInstance * pCharacter, IMaterial* pSlotMat, const Matrix34& matParent, const float fEntDistance, const float fScale, int nMaxDepth, bool bForceStreamingSystemUpdate, const SRenderingPassInfo & passInfo) = 0;
Activate streaming of character and all sub-components
virtual void PrecacheLevel(bool bPrecacheAllVisAreas, Vec3 * pPrecachePoints, int nPrecachePointsNum) = 0;
Places camera into every visarea or every manually set pre-cache points and render the scenes.
virtual void PrecacheRenderNode(IRenderNode * pObj, float fEntDistanceReal) = 0;
Activate streaming of render node and all sub-components
virtual void PrepareOcclusion(const CCamera & rCamera) = 0;
Prepares for the world stream update, should be called before rendering
virtual void PreWorldStreamUpdate(const CCamera& cam) = 0;
virtual void ProposeContentPrecache() = 0;
Proposes 3dengine to load on next frame all shaders and textures synchronously.
virtual bool RayObjectsIntersection2D(Vec3 vStart, Vec3 vEnd, Vec3 & vHitPoint, EERType eERType) = 0;
Used by editor during AO computations
Registers an entity to be rendered.
virtual void RegisterEntity(IRenderNode * pEntity, int nSID = -1, int nSIDConsideredSafe = -1) = 0;
Parameters |
Description |
IRenderNode * pEntity |
The entity to render |
Deletes the 3D Engine instance.
virtual void Release() = 0;
virtual void ReleaseChunkfileContent(CContentCGF*) = 0;
Deletes the chunkfile content instance
virtual void ReleaseChunkFileWriter(ChunkFile::IChunkFileWriter* p) const = 0;
virtual bool RenderMeshRayIntersection(IRenderMesh * pRenderMesh, SRayHitInfo & hitInfo, IMaterial * pCustomMtl = 0) = 0;
Used by editor during object alignment
virtual void RenderRenderNode_ShadowPass(IShadowCaster * pRNode, const SRenderingPassInfo & passInfo, JobManager::SJobState * pJobState) = 0;
Draws the world.
virtual void RenderWorld(const int nRenderFlags, const SRenderingPassInfo & passInfo, const char * szDebugName) = 0;
Parameters |
Description |
const char * szDebugName |
name that can be visualized for debugging purpose, must not be 0 |
SetCamera
virtual void ResetCoverageBufferSignalVariables() = 0;
Removes all particles and decals from the world.
virtual void ResetParticlesAndDecals() = 0;
virtual void ResetPostEffects(bool bOnSpecChange = false) const = 0;
Reload the heightmap.
virtual bool RestoreTerrainFromDisk(int nSID = 0) = 0;
success
Reloading the heightmap will resets all decals and particles. Notes: In future will restore deleted vegetations
Gets wind direction and forace at the sample points provided.
virtual bool SampleWind(Vec3* pSamples, int nSamples, const AABB& volume, bool bIndoors) const = 0;
the positions defining the samples will be overwritten with the accumulated wind influences.
virtual void SaveInternalState(struct IDataWriteStream& writer, const AABB& filterArea, const bool bTerrain, const uint32 objectMask) = 0;
LiveCreate
virtual int SaveStatObj(IStatObj * pStatObj, TSerialize ser) = 0;
Saves pStatObj to a stream. Notes: Full mesh for generated ones, path/geom otherwise
Selects an entity for debugging.
virtual void SelectEntity(IRenderNode * pEntity) = 0;
Parameters |
Description |
IRenderNode * pEntity |
The entity to render |
Saves/loads state of engine objects.
virtual void SerializeState(TSerialize ser) = 0;
virtual void SetCoverageBufferDepthReady() = 0;
Sets the fog color.
virtual void SetFogColor(const Vec3& vFogColor) = 0;
Gives 3dengine access to original and most precise heighmap data in the editor
virtual void SetGetLayerIdAtCallback(IGetLayerIdAtCallback * pCallBack) = 0;
virtual void SetGlobalParameter(E3DEngineParameter param, const Vec3 & v) = 0;
Sets global 3d engine parameter.
void SetGlobalParameter(E3DEngineParameter param, float val);
Sets the path used to load levels.
virtual void SetLevelPath(const char * szFolderName) = 0;
Parameters |
Description |
const char * szFolderName |
Should contains the folder to be used |
virtual bool SetMaterialFloat(char * szMatName, int nSubMatId, int nTexSlot, char * szParamName, float fValue) = 0;
fValue - new value
Sets the view distance scale.
virtual void SetMaxViewDistanceScale(float fScale) = 0;
Parameters |
Description |
float fScale |
may be between 0 and 1, 1.f = Unmodified view distance set by level designer, value of 0.5 will reduce it twice |
Notes |
This value will be reset automatically to 1 on next level loading. |
Returns whether ocean volume is visible or not.
virtual void SetOceanRenderFlags(uint8 nFlags) = 0;
Sets the physics material enumerator
virtual void SetPhysMaterialEnumerator(IPhysMaterialEnumerator * pPhysMaterialEnumerator) = 0;
Parameters |
Description |
IPhysMaterialEnumerator * pPhysMaterialEnumerator |
The physics material enumarator to set |
Post processing effects interfaces.
virtual void SetPostEffectParam(const char * pParam, float fValue, bool bForceValue = false) const = 0;
virtual void SetPostEffectParamString(const char * pParam, const char * pszArg) const = 0;
virtual void SetPostEffectParamVec4(const char * pParam, const Vec4 & pValue, bool bForceValue = false) const = 0;
virtual void SetPrevZoomFactor(float fZoomFactor) = 0;
Sets current rain parameters.
virtual void SetRainParams(const SRainParams & rainParams) = 0;
virtual void SetRecomputeStaticShadows(bool bRecompute) = 0;
virtual void SetRenderNodeMaterialAtPosition(EERType eNodeType, const Vec3 & vPos, IMaterial * pMat) = 0;
allows to modify material on render nodes at run-time (make sure it is properly restored back)
virtual void SetScreenshotCallback(IScreenshotCallback* pCallback) = 0;
Set Callback for Editor to store additional information in Minimap tool
virtual void SetSegmentOperationInProgress(bool bActive) = 0;
virtual void SetSegmentsManager(ISegmentsManager * pSegmentsManager) = 0;
virtual void SetShadowMode(EShadowMode shadowMode) = 0;
virtual void SetShadowsGSMCache(bool bCache) = 0;
Sets the current sky brightening multiplier.
virtual void SetSkyBrightness(float fMul) = 0;
Sets the current outdoor ambient color.
virtual void SetSkyColor(Vec3 vColor) = 0;
Sets various sky light parameters.
virtual void SetSkyLightParameters(const Vec3& sunDir, const Vec3& sunIntensity, float Km, float Kr, float g, const Vec3& rgbWaveLengths, bool forceImmediateUpdate = false) = 0;
Sets current snow parameters.
virtual void SetSnowFallParams(int nSnowFlakeCount, float fSnowFlakeSize, float fSnowFallBrightness, float fSnowFallGravityScale, float fSnowFallWindScale, float fSnowFallTurbulence, float fSnowFallTurbulenceFreq) = 0;
Sets current snow surface parameters.
virtual void SetSnowSurfaceParams(const Vec3 & vCenter, float fRadius, float fSnowAmount, float fFrostAmount, float fSurfaceFreezing) = 0;
virtual void SetStaticShadowBounds(const AABB& shadowBounds) = 0;
virtual void SetStreamableListener(IStreamedObjectListener* pListener) = 0;
Sets the current sun color.
virtual void SetSunColor(Vec3 vColor) = 0;
virtual void SetTerrainLayerBaseTextureData(int nLayerId, byte* pImage, int nDim, const char * nImgFileName, IMaterial * pMat, float fBr, float fTiling, int nDetailSurfTypeId, float fTilingDetail, float fSpecularAmount, float fSortOrder, ColorF layerFilterColor, float fUseRemeshing, bool bShowSelection) = 0;
Set global wind vector.
virtual void SetWind(const Vec3 & vWind) = 0;
virtual void SetZoomMode(int nZoomMode) = 0;
Shuts down the 3D Engine.
virtual void ShutDown() = 0;
virtual void SkipLayerLoading(uint16 nLayerId, bool bClearList) = 0;
Collect layer ID's to skip loading objects from these layers, e.g. to skip console specific layers
Sync all changes to the octree to prevent reading data which is about to be changed
virtual void SyncOctreeUpdate(IRenderNode* pEnt = NULL) = 0;
virtual void SyncProcessStreamingUpdate() = 0;
Syncs and performs outstanding operations for the Asyncrhon ProcessStreaming Update
clear all per frame temp data used in SRenderingPass
virtual void Tick() = 0;
virtual bool ToggelAsyncOctreeUpdates(bool) = 0;
Enable/Disable octree updates in a seperate thread
virtual void TraceFogVolumes(const Vec3& worldPos, ColorF& fogVolumeContrib, const SRenderingPassInfo & passInfo) = 0;
Clears all rendering resources, all objects, characters and materials, voxels and terrain. Notes: Should always be called before LoadLevel, and also before loading textures from a script.
virtual void UnloadLevel() = 0;
Enables CGFs unloading (this is default state), this function will also release all not used CGF's.
virtual void UnlockCGFResources() = 0;
virtual void UnRegisterEntityAsJob(IRenderNode* pEnt) = 0;
Notices the 3D Engine to stop rendering a specified entity.
virtual void UnRegisterEntityDirect(IRenderNode * pEntity) = 0;
Parameters |
Description |
IRenderNode * pEntity |
The entity to stop render |
Updates the 3D Engine. Notes: Should be called for every frame.
virtual void Update() = 0;
Updates rendering mesh in the stat obj associated with pPhysGeom. Notes: Creates or clones the object if necessary.
virtual IStatObj * UpdateDeformableStatObj(IGeometry * pPhysGeom, bop_meshupdate * pLastUpdate = 0, IFoliage * pSrcFoliage = 0) = 0;
Update all ShaderItems flags, only required after shaders were reloaded at runtime
virtual void UpdateShaderItems() = 0;
Updates the VisArea
virtual void UpdateVisArea(IVisArea * pArea, const Vec3 * pPoints, int nCount, const char * szName, const SVisAreaInfo & info, bool bReregisterObjects) = 0;
Parameters |
Description |
IVisArea * pArea |
pPoints - |
int nCount |
szName - |
const SVisAreaInfo & info |
bReregisterObjects - |
virtual IMemoryBlock * Voxel_GetObjects(Vec3 vPos, float fRadius, int nSurfaceTypeId, EVoxelEditOperation eOperation, EVoxelBrushShape eShape, EVoxelEditTarget eTarget) = 0;
Gets list of voxel objects that will be affected by paint operation, IMemoryBlock will contain array of IVoxelObject pointers.
Paints voxel shape.
virtual void Voxel_Paint(Vec3 vPos, float fRadius, int nSurfaceTypeId, Vec3 vBaseColor, EVoxelEditOperation eOperation, EVoxelBrushShape eShape, EVoxelEditTarget eTarget, PodArray<IRenderNode*> * pBrushes, float fMinVoxelSize) = 0;
Setups voxel flags.
virtual void Voxel_SetFlags(bool bPhysics, bool bSimplify, bool bShadows, bool bMaterials) = 0;
Performs the actual world streaming update. PreWorldStreamUpdate must be called before
virtual void WorldStreamUpdate() = 0;
struct IFoliage { enum EFoliageFlags { FLAG_FROZEN = 1 }; };
I3DEngine.h
enum EFoliageFlags { FLAG_FROZEN = 1 };
I3DEngine.h
virtual ~IFoliage();
virtual void AddRef() = 0;
virtual int GetBranchCount() = 0;
virtual IPhysicalEntity * GetBranchPhysics(int iBranch) = 0;
virtual int GetFlags() = 0;
virtual IRenderNode* GetIRenderNode() = 0;
virtual SSkinningData* GetSkinningData(const Matrix34& RenderMat34, const SRenderingPassInfo & passInfo) = 0;
virtual void Release() = 0;
virtual int Serialize(TSerialize ser) = 0;
virtual void SetFlags(int flags) = 0;
Manages simple pre-merged mesh instances into pre-baked sectors
struct IMergedMeshesManager { struct SInstanceSector { DynArraydata; string id; }; };
I3DEngine.h
struct SInstanceSector { DynArraydata; string id; };
I3DEngine.h
Members |
Description |
DynArray |
memory stream of internally compiled data |
string id; |
unique identifier string identifing this sector |
virtual ~IMergedMeshesManager();
Returns the compiled instance sectors as a null-terminated pointer array. Returns false on error.
virtual bool CompileSectors(DynArray<SInstanceSector>& pSectors, std::vector<struct IStatInstGroup*> * pVegGroupTable) = 0;
Compilation
The caller is responsible for freeing the allocated memory (both the array and the sectors)
Returns the current memory footprint in main memory (the accumulated footprint of all merged instances)
virtual size_t CurrentSizeInMainMem() const = 0;
Returns the current memory footprint in vram (accumulated vertex and indexbuffer size in bytes)
virtual size_t CurrentSizeInVram() const = 0;
Statistics
Returns the memory footprint of the prebaked geometry in bytes
virtual size_t GeomSizeInMainMem() const = 0;
virtual bool GetCompiledData(uint32 index, byte * pData, int nSize, string * pName, std::vector<struct IStatInstGroup*> ** ppStatInstGroupTable, const Vec3 & segmentOffset) = 0;
virtual int GetCompiledDataSize(uint32 index) = 0;
virtual int GetSegmentNodeCount() = 0;
Returns the list of merged mesh geometry currently active. Returns false on error.
virtual bool GetUsedMeshes(DynArray& pMeshNames) = 0;
Compilation
The instance count
virtual size_t InstanceCount() const = 0;
Returns the size of the instance map in bytes
virtual size_t InstanceSize() const = 0;
virtual void PrepareSegmentData(const AABB & aabb) = 0;
Returns the size of animated instances if they have spines
virtual size_t SpineSize() const = 0;
The number of visible instances last frame
virtual size_t VisibleInstances() const = 0;
struct IScreenshotCallback { };
I3DEngine.h
virtual ~IScreenshotCallback();
virtual void SendParameters(void* data, uint32 width, uint32 height, f32 minx, f32 miny, f32 maxx, f32 maxy) = 0;
struct ISegmentsManager { enum ESegmentLoadFlags { slfTerrain = BIT(1), slfVisArea = BIT(2), slfEntity = BIT(3), slfNavigation = BIT(4), slfAll = slfTerrain|slfVisArea|slfEntity|slfNavigation }; };
I3DEngine.h
callbacks interface for higher level segments management
enum ESegmentLoadFlags { slfTerrain = BIT(1), slfVisArea = BIT(2), slfEntity = BIT(3), slfNavigation = BIT(4), slfAll = slfTerrain|slfVisArea|slfEntity|slfNavigation };
I3DEngine.h
virtual ~ISegmentsManager();
virtual bool CreateSegments(ITerrain * pTerrain) = 0;
virtual bool DeleteSegments(ITerrain * pTerrain) = 0;
virtual bool FindSegment(ITerrain * pTerrain, const Vec3 & pt, int & nSID) = 0;
virtual bool FindSegmentCoordByID(int nSID, int & x, int & y) = 0;
virtual void ForceLoadSegments(unsigned int flags) = 0;
virtual int GetSegmentSizeInMeters() = 0;
virtual void GetTerrainSizeInMeters(int & x, int & y) = 0;
virtual void GlobalSegVecToLocalSegVec(const Vec3 & inPos, const Vec2 & inAbsCoords, Vec3 & outPos) = 0;
virtual Vec3 LocalToAbsolutePosition(Vec3 const& vPos, f32 fDir = 1.f) const = 0;
virtual bool PushEntityToSegment(unsigned int id, bool bLocal = true) = 0;
virtual void WorldVecToGlobalSegVec(const Vec3 & inPos, Vec3 & outPos, Vec2 & outAbsCoords) = 0;
virtual Vec3 WorldVecToLocalSegVec(const Vec3 & inPos) = 0;
class IStreamedObjectListener;
I3DEngine.h
virtual ~IStreamedObjectListener();
virtual void OnBegunUsingStreamedObjects(void** pHandles, size_t numHandles) = 0;
virtual void OnCreatedStreamedObject(const char* filename, void* pHandle) = 0;
virtual void OnDestroyedStreamedObject(void* pHandle) = 0;
virtual void OnEndedUsingStreamedObjects(void** pHandles, size_t numHandles) = 0;
virtual void OnReceivedStreamedObject(void* pHandle) = 0;
virtual void OnRequestedStreamedObject(void* pHandle) = 0;
virtual void OnUnloadedStreamedObject(void* pHandle) = 0;
struct ITerrain { struct SExportInfo { bool bHeigtmap; bool bObjects; AABB areaBox; }; };
I3DEngine.h
I3DEngine.h
AABB areaBox;
bool bHeigtmap;
bool bObjects;
SExportInfo();
virtual ~ITerrain();
Creates and place a new vegetation object on the terrain.
virtual IRenderNode* AddVegetationInstance(int nStaticGroupID, const Vec3 & vPos, const float fScale, uint8 ucBright, uint8 angle, uint8 angleX = 0, uint8 angleY = 0, int nSID = DEFAULT_SID) = 0;
virtual void CancelStreamCompiledData(int nSID) = 0;
Checks if it is possible to paint on the terrain with a given surface type ID. Notes: Should be called by the editor to avoid overflowing the sector surface type palettes.
virtual bool CanPaintSurfaceType(int x, int y, int r, uint16 usGlobalSurfaceType) = 0;
virtual int CreateSegment(Vec3 vSegmentSize, Vec3 vSegmentOrigin = Vec3(0, 0, 0), const char * pcPath = 0) = 0;
Allocate new world segment Returns handle of newly created segment (usually it is just id of segment in the list of currently loaded segments)
virtual bool DeleteSegment(int nSID, bool bDeleteNow) = 0;
Set new origin for existing world segment Returns true if specified segment was found and successfully deleted
virtual int FindSegment(Vec3 vPt) = 0;
Find (first) world segment containing given point (in local world coordinates) Returns id of the found segment or -1 if not found
virtual int FindSegment(int x, int y) = 0;
Find (first) world segment containing given point (in heightmap coordinates) Returns id of the found segment or -1 if not found
Saves data from terrain engine into memory block.
virtual bool GetCompiledData(byte * pData, int nDataSize, std::vector<struct IStatObj*> ** ppStatObjTable, std::vector** ppMatTable, std::vector<struct IStatInstGroup*> ** ppStatInstGroupTable, EEndian eEndian, SHotUpdateInfo * pExportInfo = NULL, int nSID = 0, const Vec3 & segmentOffset = Vec3(0, 0, 0)) = 0;
Returns terrain data memory block size.
virtual int GetCompiledDataSize(SHotUpdateInfo * pExportInfo = NULL, int nSID = 0) = 0;
Return number of used detail texture materials Fills materials array if materials!=NULL
virtual int GetDetailTextureMaterials(IMaterial* materials[], int nSID = 0) = 0;
virtual int GetMaxSegmentsCount() const = 0;
Returns a number bigger than the last valid segment ID to be used in loops like: for (int nSID = 0; nSID < GetMaxSegmentsCount(); ++nSID)
Returns current amount of terrain textures requests for streaming, if more than 0 = there is streaming in progress.
virtual int GetNotReadyTextureNodesCount() = 0;
Retrieves the resource (mostly texture system memory) memory usage for a given region of the terrain.
virtual void GetResourceMemoryUsage(ICrySizer* pSizer, const AABB& crstAABB, int nSID = 0) = 0;
Parameters |
Description |
ICrySizer* pSizer |
Is a pointer to an instance of the CrySizer object. The purpose of this object is making sure each element is accounted only once. |
const AABB& crstAABB |
Is a reference to the bounding box in which region we want to analyze the resources. |
virtual bool GetSegmentBounds(int nSID, AABB & bbox) = 0;
fills bbox with the bounding box of the specified segment (nSID) Returns true if succeeded, false if nSID is not valid segment id
virtual Vec3 GetSegmentOrigin(int nSID) = 0;
Returns the segment origin of the given segment id.
virtual const Vec3 & GetSegmentOrigin(int nSID) const = 0;
Get origin for existing world segment, really. Returns Vec3 with position or NaNs if segment ID is invalid
virtual const char* GetSegmentPath(int nSID) = 0;
Returns a pointer to the segment file path
virtual void GetTables(std::vector<struct IStatObj*> *& pStatObjTable, std::vector*& pMatTable, std::vector<struct IStatInstGroup*> *& pStatInstGroupTable, int nSID) = 0;
virtual int GetTablesSize(SHotUpdateInfo * pExportInfo, int nSID) = 0;
Returns whole terrain lightmap texture id.
virtual int GetTerrainLightmapTexId(Vec4 & vTexGenInfo, int nSID = 0) = 0;
virtual void ReleaseInactiveSegments() = 0;
Deallocate segment data in the deleted array
virtual void ReleaseTables(std::vector<struct IStatObj*> *& pStatObjTable, std::vector*& pMatTable, std::vector<struct IStatInstGroup*> *& pStatInstGroupTable) = 0;
virtual void SaveTables(byte *& pData, int & nDataSize, std::vector<struct IStatObj*> *& pStatObjTable, std::vector*& pMatTable, std::vector<struct IStatInstGroup*> *& pStatInstGroupTable, EEndian eEndian, SHotUpdateInfo * pExportInfo, int nSID) = 0;
Loads data into terrain engine from memory block.
virtual bool SetCompiledData(byte * pData, int nDataSize, std::vector<struct IStatObj*> ** ppStatObjTable, std::vector** ppMatTable, bool bHotUpdate = false, SHotUpdateInfo * pExportInfo = NULL, int nSID = 0, Vec3 vSegmentOrigin = Vec3(0,0,0)) = 0;
Sets ocean level.
virtual void SetOceanWaterLevel(float fOceanWaterLevel) = 0;
virtual bool SetSegmentOrigin(int nSID, Vec3 vSegmentOrigin, bool callOffsetPosition = true) = 0;
Set new origin for existing world segment Returns true if specified segment exist and origin was successfully updated
virtual bool SetSegmentPath(int nSID, const char * pcPath) = 0;
Changes the segment file path Returns true if specified segment exist and path was successfully updated
Updates part of height map. Notes: x1, y1, nSizeX, nSizeY are in terrain units pTerrainBlock points to a square 2D array with dimensions GetTerrainSize() by default update only elevation.
virtual void SetTerrainElevation(int x1, int y1, int nSizeX, int nSizeY, float * pTerrainBlock, uint8 * pSurfaceData, int nSurfOrgX, int nSurfOrgY, int nSurfSizeX, int nSurfSizeY, uint32 * pResolMap, int nResolMapSizeX, int nResolMapSizeY, int nSID = DEFAULT_SID) = 0;
Executes one step of streaming the compiled data in pData. Returns false when the streaming is complete, true if there is still work to do. You should call this until it returns true.
virtual bool StreamCompiledData(byte* pData, int nDataSize, int nSID, const Vec3 & vSegmentOrigin) = 0;
virtual int WorldToSegment(Vec3 & vPt, int nSID = DEFAULT_SID) = 0;
if nSID < 0 finds segment containing vPt (in local world coordinates) and adjusts vPt to be relative to segment's origin if nSID >= 0 does nothing Returns id of the found segment or -1 if not found
virtual int WorldToSegment(int & x, int & y, int nBitShift, int nSID = DEFAULT_SID) = 0;
if nSID < 0 finds segment containing given point on input, (x << nBitShift, y << nBitShift) represents a point in local world coordinates on output, x and y are adjusted to be relative to found segment if nSID >= 0 does nothing Returns id of the found segment or -1 if not found
Interface to the Time Of Day functionality.
struct ITimeOfDay { enum ETimeOfDayParamID { PARAM_HDR_DYNAMIC_POWER_FACTOR, PARAM_TERRAIN_OCCL_MULTIPLIER, PARAM_GI_MULTIPLIER, PARAM_SUN_COLOR, PARAM_SUN_COLOR_MULTIPLIER, PARAM_SUN_SPECULAR_MULTIPLIER, PARAM_FOG_COLOR, PARAM_FOG_COLOR_MULTIPLIER, PARAM_VOLFOG_HEIGHT, PARAM_VOLFOG_DENSITY, PARAM_FOG_COLOR2, PARAM_FOG_COLOR2_MULTIPLIER, PARAM_VOLFOG_HEIGHT2, PARAM_VOLFOG_DENSITY2, PARAM_VOLFOG_HEIGHT_OFFSET, PARAM_FOG_RADIAL_COLOR, PARAM_FOG_RADIAL_COLOR_MULTIPLIER, PARAM_VOLFOG_RADIAL_SIZE, PARAM_VOLFOG_RADIAL_LOBE, PARAM_VOLFOG_FINAL_DENSITY_CLAMP, PARAM_VOLFOG_GLOBAL_DENSITY, PARAM_VOLFOG_RAMP_START, PARAM_VOLFOG_RAMP_END, PARAM_VOLFOG_RAMP_INFLUENCE, PARAM_VOLFOG_SHADOW_DARKENING, PARAM_VOLFOG_SHADOW_DARKENING_SUN, PARAM_VOLFOG_SHADOW_DARKENING_AMBIENT, PARAM_VOLFOG_SHADOW_RANGE, PARAM_SKYLIGHT_SUN_INTENSITY, PARAM_SKYLIGHT_SUN_INTENSITY_MULTIPLIER, PARAM_SKYLIGHT_KM, PARAM_SKYLIGHT_KR, PARAM_SKYLIGHT_G, PARAM_SKYLIGHT_WAVELENGTH_R, PARAM_SKYLIGHT_WAVELENGTH_G, PARAM_SKYLIGHT_WAVELENGTH_B, PARAM_NIGHSKY_HORIZON_COLOR, PARAM_NIGHSKY_HORIZON_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_COLOR, PARAM_NIGHSKY_ZENITH_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_SHIFT, PARAM_NIGHSKY_START_INTENSITY, PARAM_NIGHSKY_MOON_COLOR, PARAM_NIGHSKY_MOON_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_SCALE, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_OUTERCORONA_SCALE, PARAM_CLOUDSHADING_SUNLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SKYLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_INFLUENCE, PARAM_SUN_SHAFTS_VISIBILITY, PARAM_SUN_RAYS_VISIBILITY, PARAM_SUN_RAYS_ATTENUATION, PARAM_SUN_RAYS_SUNCOLORINFLUENCE, PARAM_SUN_RAYS_CUSTOMCOLOR, PARAM_OCEANFOG_COLOR, PARAM_OCEANFOG_COLOR_MULTIPLIER, PARAM_OCEANFOG_DENSITY, PARAM_SKYBOX_MULTIPLIER, PARAM_HDR_FILMCURVE_SHOULDER_SCALE, PARAM_HDR_FILMCURVE_LINEAR_SCALE, PARAM_HDR_FILMCURVE_TOE_SCALE, PARAM_HDR_FILMCURVE_WHITEPOINT, PARAM_HDR_COLORGRADING_COLOR_SATURATION, PARAM_HDR_COLORGRADING_COLOR_BALANCE, PARAM_HDR_EYEADAPTATION_SCENEKEY, PARAM_HDR_EYEADAPTATION_MIN_EXPOSURE, PARAM_HDR_EYEADAPTATION_MAX_EXPOSURE, PARAM_HDR_BLOOM_AMOUNT, PARAM_COLORGRADING_FILTERS_GRAIN, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_COLOR, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_DENSITY, PARAM_COLORGRADING_DOF_FOCUSRANGE, PARAM_COLORGRADING_DOF_BLURAMOUNT, PARAM_SHADOWSC0_BIAS, PARAM_SHADOWSC0_SLOPE_BIAS, PARAM_SHADOWSC1_BIAS, PARAM_SHADOWSC1_SLOPE_BIAS, PARAM_SHADOWSC2_BIAS, PARAM_SHADOWSC2_SLOPE_BIAS, PARAM_SHADOWSC3_BIAS, PARAM_SHADOWSC3_SLOPE_BIAS, PARAM_SHADOWSC4_BIAS, PARAM_SHADOWSC4_SLOPE_BIAS, PARAM_SHADOWSC5_BIAS, PARAM_SHADOWSC5_SLOPE_BIAS, PARAM_SHADOWSC6_BIAS, PARAM_SHADOWSC6_SLOPE_BIAS, PARAM_SHADOWSC7_BIAS, PARAM_SHADOWSC7_SLOPE_BIAS, PARAM_SHADOW_JITTERING, PARAM_TOTAL }; enum EVariableType { TYPE_FLOAT, TYPE_COLOR }; struct SVariableInfo { const char * name; const char * displayName; const char * group; int nParamId; EVariableType type; float fValue[3]; ISplineInterpolator* pInterpolator; unsigned int bSelected : 1; }; struct SAdvancedInfo { float fStartTime; float fEndTime; float fAnimSpeed; }; struct SEnvironmentInfo { bool bSunLinkedToTOD; float sunRotationLatitude; float sunRotationLongitude; }; const int NETSER_FORCESET = BIT(0); const int NETSER_COMPENSATELAG = BIT(1); const int NETSER_STATICPROPS = BIT(2); };
I3DEngine.h
enum ETimeOfDayParamID { PARAM_HDR_DYNAMIC_POWER_FACTOR, PARAM_TERRAIN_OCCL_MULTIPLIER, PARAM_GI_MULTIPLIER, PARAM_SUN_COLOR, PARAM_SUN_COLOR_MULTIPLIER, PARAM_SUN_SPECULAR_MULTIPLIER, PARAM_FOG_COLOR, PARAM_FOG_COLOR_MULTIPLIER, PARAM_VOLFOG_HEIGHT, PARAM_VOLFOG_DENSITY, PARAM_FOG_COLOR2, PARAM_FOG_COLOR2_MULTIPLIER, PARAM_VOLFOG_HEIGHT2, PARAM_VOLFOG_DENSITY2, PARAM_VOLFOG_HEIGHT_OFFSET, PARAM_FOG_RADIAL_COLOR, PARAM_FOG_RADIAL_COLOR_MULTIPLIER, PARAM_VOLFOG_RADIAL_SIZE, PARAM_VOLFOG_RADIAL_LOBE, PARAM_VOLFOG_FINAL_DENSITY_CLAMP, PARAM_VOLFOG_GLOBAL_DENSITY, PARAM_VOLFOG_RAMP_START, PARAM_VOLFOG_RAMP_END, PARAM_VOLFOG_RAMP_INFLUENCE, PARAM_VOLFOG_SHADOW_DARKENING, PARAM_VOLFOG_SHADOW_DARKENING_SUN, PARAM_VOLFOG_SHADOW_DARKENING_AMBIENT, PARAM_VOLFOG_SHADOW_RANGE, PARAM_SKYLIGHT_SUN_INTENSITY, PARAM_SKYLIGHT_SUN_INTENSITY_MULTIPLIER, PARAM_SKYLIGHT_KM, PARAM_SKYLIGHT_KR, PARAM_SKYLIGHT_G, PARAM_SKYLIGHT_WAVELENGTH_R, PARAM_SKYLIGHT_WAVELENGTH_G, PARAM_SKYLIGHT_WAVELENGTH_B, PARAM_NIGHSKY_HORIZON_COLOR, PARAM_NIGHSKY_HORIZON_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_COLOR, PARAM_NIGHSKY_ZENITH_COLOR_MULTIPLIER, PARAM_NIGHSKY_ZENITH_SHIFT, PARAM_NIGHSKY_START_INTENSITY, PARAM_NIGHSKY_MOON_COLOR, PARAM_NIGHSKY_MOON_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR, PARAM_NIGHSKY_MOON_INNERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_INNERCORONA_SCALE, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR, PARAM_NIGHSKY_MOON_OUTERCORONA_COLOR_MULTIPLIER, PARAM_NIGHSKY_MOON_OUTERCORONA_SCALE, PARAM_CLOUDSHADING_SUNLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SKYLIGHT_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_MULTIPLIER, PARAM_CLOUDSHADING_SUNLIGHT_CUSTOM_COLOR_INFLUENCE, PARAM_SUN_SHAFTS_VISIBILITY, PARAM_SUN_RAYS_VISIBILITY, PARAM_SUN_RAYS_ATTENUATION, PARAM_SUN_RAYS_SUNCOLORINFLUENCE, PARAM_SUN_RAYS_CUSTOMCOLOR, PARAM_OCEANFOG_COLOR, PARAM_OCEANFOG_COLOR_MULTIPLIER, PARAM_OCEANFOG_DENSITY, PARAM_SKYBOX_MULTIPLIER, PARAM_HDR_FILMCURVE_SHOULDER_SCALE, PARAM_HDR_FILMCURVE_LINEAR_SCALE, PARAM_HDR_FILMCURVE_TOE_SCALE, PARAM_HDR_FILMCURVE_WHITEPOINT, PARAM_HDR_COLORGRADING_COLOR_SATURATION, PARAM_HDR_COLORGRADING_COLOR_BALANCE, PARAM_HDR_EYEADAPTATION_SCENEKEY, PARAM_HDR_EYEADAPTATION_MIN_EXPOSURE, PARAM_HDR_EYEADAPTATION_MAX_EXPOSURE, PARAM_HDR_BLOOM_AMOUNT, PARAM_COLORGRADING_FILTERS_GRAIN, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_COLOR, PARAM_COLORGRADING_FILTERS_PHOTOFILTER_DENSITY, PARAM_COLORGRADING_DOF_FOCUSRANGE, PARAM_COLORGRADING_DOF_BLURAMOUNT, PARAM_SHADOWSC0_BIAS, PARAM_SHADOWSC0_SLOPE_BIAS, PARAM_SHADOWSC1_BIAS, PARAM_SHADOWSC1_SLOPE_BIAS, PARAM_SHADOWSC2_BIAS, PARAM_SHADOWSC2_SLOPE_BIAS, PARAM_SHADOWSC3_BIAS, PARAM_SHADOWSC3_SLOPE_BIAS, PARAM_SHADOWSC4_BIAS, PARAM_SHADOWSC4_SLOPE_BIAS, PARAM_SHADOWSC5_BIAS, PARAM_SHADOWSC5_SLOPE_BIAS, PARAM_SHADOWSC6_BIAS, PARAM_SHADOWSC6_SLOPE_BIAS, PARAM_SHADOWSC7_BIAS, PARAM_SHADOWSC7_SLOPE_BIAS, PARAM_SHADOW_JITTERING, PARAM_TOTAL };
I3DEngine.h
enum EVariableType { TYPE_FLOAT, TYPE_COLOR };
I3DEngine.h
struct SAdvancedInfo { float fStartTime; float fEndTime; float fAnimSpeed; };
I3DEngine.h
struct SEnvironmentInfo { bool bSunLinkedToTOD; float sunRotationLatitude; float sunRotationLongitude; };
I3DEngine.h
bool bSunLinkedToTOD;
float sunRotationLatitude;
float sunRotationLongitude;
SEnvironmentInfo();
struct SVariableInfo { const char * name; const char * displayName; const char * group; int nParamId; EVariableType type; float fValue[3]; ISplineInterpolator* pInterpolator; unsigned int bSelected : 1; };
I3DEngine.h
Members |
Description |
const char * name; |
Variable name. |
const char * displayName; |
Variable user readable name. |
const char * group; |
Group name. |
float fValue[3]; |
Value of the variable (3 needed for color type) |
ISplineInterpolator* pInterpolator; |
Splines that control variable value |
const int NETSER_COMPENSATELAG = BIT(1);
const int NETSER_FORCESET = BIT(0);
MP serialization
const int NETSER_STATICPROPS = BIT(2);
virtual ~ITimeOfDay();
virtual void BeginEditMode() = 0;
virtual void EndEditMode() = 0;
virtual void GetAdvancedInfo(SAdvancedInfo & advInfo) = 0;
virtual float GetSunLatitude() = 0;
virtual float GetSunLongitude() = 0;
virtual float GetTime() = 0;
virtual int GetVariableCount() = 0;
Access to variables that control time of the day appearance.
virtual bool GetVariableInfo(int nIndex, SVariableInfo & varInfo) = 0;
virtual void LoadInternalState(struct IDataReadStream& reader) = 0;
virtual void NetSerialize(TSerialize ser, float lag, uint32 flags) = 0;
virtual void ResetVariables() = 0;
virtual void SaveInternalState(struct IDataWriteStream& writer) = 0;
LiveCreate
virtual void Serialize(TSerialize ser) = 0;
virtual void Serialize(XmlNodeRef & node, bool bLoading) = 0;
virtual void SetAdvancedInfo(const SAdvancedInfo & advInfo) = 0;
virtual void SetEnvironmentSettings(const SEnvironmentInfo& envInfo) = 0;
virtual void SetPaused(bool paused) = 0;
virtual void SetSunPos(float longitude, float latitude) = 0;
Sun position
Sets the time of the day specified in hours.
virtual void SetTime(float fHour, bool bForceUpdate = false) = 0;
virtual void SetTimer(ITimer * pTimer) = 0;
virtual void SetUpdateCallback(ITimeOfDayUpdateCallback* pCallback) = 0;
virtual void SetVariableValue(int nIndex, float fValue[3]) = 0;
Updates the current tod.
virtual void Tick() = 0;
Updates engine parameters after variable values have been changed.
virtual void Update(bool bInterpolate = true, bool bForceUpdate = false) = 0;
struct ITimeOfDayUpdateCallback { };
I3DEngine.h
virtual ~ITimeOfDayUpdateCallback();
virtual void BeginUpdate() = 0;
virtual void EndUpdate() = 0;
virtual bool GetCustomValue(ITimeOfDay::ETimeOfDayParamID paramID, int dim, float* pValues, float& blendWeight) = 0;
struct IVisAreaCallback { };
I3DEngine.h
virtual ~IVisAreaCallback();
virtual void OnVisAreaDeleted(IVisArea* pVisArea) = 0;
struct IVisAreaManager { };
I3DEngine.h
virtual ~IVisAreaManager();
virtual void AddListener(IVisAreaCallback * pListener) = 0;
virtual bool CreateSegment(int nSID) = 0;
virtual bool DeleteSegment(int nSID, bool bDeleteNow) = 0;
Saves data from VisAreaManager engine into memory block.
virtual bool GetCompiledData(uint8 * pData, int nDataSize, std::vector<struct IStatObj*> ** ppStatObjTable, std::vector** ppMatTable, std::vector<struct IStatInstGroup*> ** ppStatInstGroupTable, EEndian eEndian, SHotUpdateInfo * pExportInfo = NULL, const Vec3 & segment = Vec3(0, 0, 0)) = 0;
Returns VisAreaManager data memory block size.
virtual int GetCompiledDataSize(SHotUpdateInfo * pExportInfo = NULL) = 0;
Returns the accumulated number of visareas and portals.
virtual int GetNumberOfVisArea() const = 0;
Returns the visarea interface based on the id (0..GetNumberOfVisArea()) it can be a visarea or a portal.
virtual IVisArea* GetVisAreaById(int nID) const = 0;
virtual void OffsetPosition(const Vec3& delta) = 0;
virtual void PrepareSegmentData(const AABB & box) = 0;
virtual void ReleaseInactiveSegments() = 0;
virtual void RemoveListener(IVisAreaCallback * pListener) = 0;
Loads data into VisAreaManager engine from memory block.
virtual bool SetCompiledData(uint8 * pData, int nDataSize, std::vector<struct IStatObj*> ** ppStatObjTable, std::vector** ppMatTable, bool bHotUpdate, SHotUpdateInfo * pExportInfo, const Vec3 & vSegmentOrigin = Vec3(0, 0, 0)) = 0;
virtual bool StreamCompiledData(uint8 * pData, int nDataSize, int nSID, std::vector<struct IStatObj*> * pStatObjTable, std::vector* pMatTable, std::vector<struct IStatInstGroup*> * pStatInstGroupTable, const Vec3 & vSegmentOrigin, const Vec2 & vIndexOffset) = 0;
virtual void UpdateConnections() = 0;
Common header for binary files used by 3dengine
struct SCommonFileHeader { char signature[4]; uint8 file_type; uint8 flags; uint16 version; struct STerrainTextureFileHeader_old { uint16 nSectorSizeMeters; uint16 nLodsNum; uint16 nLayerCount; uint16 nReserved; struct STerrainTextureFileHeader { uint16 nLayerCount; uint16 dwFlags; float fBrMultiplier; struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; }; }; }; };
I3DEngine.h
Sub header for terrain texture file Notes: "locally higher texture resolution" following structure can be removed (as well in autotype)
struct STerrainTextureFileHeader_old { uint16 nSectorSizeMeters; uint16 nLodsNum; uint16 nLayerCount; uint16 nReserved; struct STerrainTextureFileHeader { uint16 nLayerCount; uint16 dwFlags; float fBrMultiplier; struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; }; }; };
I3DEngine.h
Sub header for terrain texture file
struct STerrainTextureFileHeader { uint16 nLayerCount; uint16 dwFlags; float fBrMultiplier; struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; }; };
I3DEngine.h
Layer header for terrain texture file (for each layer)
struct STerrainTextureLayerFileHeader { uint16 nSectorSizePixels; uint16 nReserved; ETEX_Format eTexFormat; uint32 nSectorSizeBytes; struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; }; struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; }; };
I3DEngine.h
struct SRenderingPassInfo { enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY }; enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES }; };
I3DEngine.h
state of 3dengine during rendering used to prevent global state
enum EShadowMapType { SHADOW_MAP_NONE = 0, SHADOW_MAP_GSM0, SHADOW_MAP_GSM1, SHADOW_MAP_GSM2, SHADOW_MAP_GSM3, SHADOW_MAP_GSM4, SHADOW_MAP_GSM5, SHADOW_MAP_GSM6, SHADOW_MAP_GSM7, SHADOW_MAP_LOCAL, SHADOW_MAP_REFLECTIVE, SHADOW_MAP_STATIC, SHADOW_MAP_STATIC_MGPU_COPY };
I3DEngine.h
enum ESkipRenderingFlags { SHADOWS = BIT(0), BRUSHES = BIT(1), VEGETATION = BIT(2), ENTITIES = BIT(3), TERRAIN = BIT(4), WATEROCEAN = BIT(5), PARTICLES = BIT(6), DECALS = BIT(7), TERRAIN_DETAIL_MATERIALS = BIT(8), FAR_SPRITES = BIT(9), WATER_WAVES = BIT(12), ROADS = BIT(13), WATER_VOLUMES = BIT(14), CLOUDS = BIT(15), CUBEMAP_GEN = BIT(16), GEOM_CACHES = BIT(17), STATIC_OBJECTS = BRUSHES|VEGETATION, DEFAULT_FLAGS = SHADOWS|BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES, DEFAULT_RECURSIVE_FLAGS = BRUSHES|VEGETATION|ENTITIES|TERRAIN|WATEROCEAN|PARTICLES|DECALS|TERRAIN_DETAIL_MATERIALS|FAR_SPRITES|WATER_WAVES|ROADS|WATER_VOLUMES|CLOUDS|GEOM_CACHES };
I3DEngine.h
Members |
Description |
STATIC_OBJECTS = BRUSHES|VEGETATION |
below are precombined flags |
enum flags to identify which objects to skip for this pass
static SRenderingPassInfo CreateGeneralPassRenderingInfo(const CCamera & rCamera, uint32 nRenderingFlags = DEFAULT_FLAGS, bool bAuxWindow = false);
static SRenderingPassInfo CreateRecursivePassRenderingInfo(const CCamera & rCamera, uint32 nRenderingFlags = DEFAULT_RECURSIVE_FLAGS);
static SRenderingPassInfo CreateShadowPassRenderingInfo(const CCamera & rCamera, SRenderingPassInfo::EShadowMapType eShadowMapType, uint32 nRenderingFlags = DEFAULT_FLAGS);
static SRenderingPassInfo CreateShadowPassRenderingInfo(const CCamera & rCamera, int nLightFlags, int nShadowMapLod, bool bExtendedLod, uint nShadowGpuID, uint32 * pShadowGenMask, uint32 nSide, uint32 nShadowFrustumID, uint32 nRenderingFlags = DEFAULT_FLAGS);
static SRenderingPassInfo CreateTempRenderingInfo(const CCamera & rCamera, const SRenderingPassInfo & rPassInfo);
static SRenderingPassInfo CreateTempRenderingInfo(uint32 nRenderingFlags, const SRenderingPassInfo & rPassInfo);
const CCamera& GetCamera() const;
int GetFrameID() const;
float GetInverseZoomFactor() const;
uint32 GetMainFrameID() const;
uint32 GetRecursiveLevel() const;
EShadowMapType GetShadowMapType() const;
float GetZoomFactor() const;
bool IsAuxWindow() const;
bool IsCameraUnderWater() const;
bool IsGeneralPass() const;
bool IsRecursivePass() const;
bool IsRenderingCubemap() const;
bool IsShadowPass() const;
bool IsStaticShadowPass() const;
bool IsZoomActive() const;
bool IsZoomInProgress() const;
bool RenderBrushes() const;
bool RenderClouds() const;
bool RenderDecals() const;
bool RenderEntities() const;
bool RenderFarSprites() const;
bool RenderGeomCaches() const;
bool RenderParticles() const;
bool RenderRoads() const;
bool RenderShadows() const;
bool RenderTerrain() const;
bool RenderTerrainDetailMaterial() const;
bool RenderVegetation() const;
bool RenderWaterOcean() const;
bool RenderWaterVolumes() const;
bool RenderWaterWaves() const;
uint32 ShadowFrustumID() const;
uint8 ShadowFrustumSide() const;
uint32* ShadowGenMaskAddress() const;
threadID ThreadID() const;
struct SRendItemSorter { enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; public: enum { }; };
I3DEngine.h
class to wrap a special counter used to presort SRendItems this is used to fix random ordering introduced by parallelization of parts of the 3DEngine
enum EDeferredPreprocess { eLPVPass = 0, eDeferredShadingPass = BIT(30) };
I3DEngine.h
Deferred PreProcess needs a special ordering, use these to prefix the values to ensure the deferred shading pass is after all LPV objects
bool operator <(const SRendItemSorter & rOther) const;
static SRendItemSorter CreateDefaultRendItemSorter();
static SRendItemSorter CreateDeferredPreProcessRendItemSorter(const SRenderingPassInfo & passInfo, EDeferredPreprocess deferredPrerocessType);
static SRendItemSorter CreateParticleRendItemSorter(const SRenderingPassInfo & passInfo);
static SRendItemSorter CreateRendItemSorter(const SRenderingPassInfo & passInfo);
static SRendItemSorter CreateShadowPassRendItemSorter(const SRenderingPassInfo & passInfo);
uint32 GetValue() const;
void IncreaseGroupCounter();
void IncreaseObjectCounter();
void IncreaseOctreeCounter();
void IncreaseParticleCounter();
bool IsRecursivePass() const;
uint32 ParticleCounter() const;
uint32 ShadowFrustumID() const;
SRendItemSorter();
explicit SRendItemSorter(uint32 _nValue);
ETEX_Format eTexFormat;
typically eTF_DXT1, eTF_A4R4G4B4 or eTF_R5G6B5
uint16 nReserved;
ensure padding and for later usage
uint32 nSectorSizeBytes;
redundant information for more convenient loading code
uint16 nSectorSizePixels;
uint16 dwFlags;
float fBrMultiplier;
uint16 nLayerCount;
STerrainTextureLayerFileHeader count following (also defines how may layers are interleaved) 1/2
uint16 nLayerCount;
STerrainTextureLayerFileHeader count following (also defines how may layers are interleaved) 1/2
uint16 nLodsNum;
uint16 nReserved;
uint16 nSectorSizeMeters;
uint8 file_type;
File type
uint8 flags;
File common flags
char signature[4];
File signature, should be "CRY
uint16 version;
File version
bool Check(uint16 t, uint16 v);
void Set(uint16 t, uint16 v);
struct SDebugFPSInfo { float fAverageFPS; float fMinFPS; float fMaxFPS; };
I3DEngine.h
float fAverageFPS;
float fMaxFPS;
float fMinFPS;
SDebugFPSInfo();
struct SLightVolume { struct SLightData { Vec4 vPos; Vec4 vColor; Vec4 vParams; }; };
I3DEngine.h
I3DEngine.h
Vec4 vColor;
Vec4 vParams;
Vec4 vPos;
SLightData();
SLightData(const Vec4 & vInPos, const Vec4 & vInColor, const Vec4 & vInParams);
DEFINE_ALIGNED_DATA(LightDataVector, pData, 16);
SLightVolume();
typedef DynArray<SLightData> LightDataVector;
struct sRAEColdData { Vec4 m_RAEPortalInfos[96]; };
I3DEngine.h
Members |
Description |
Vec4 m_RAEPortalInfos[96]; |
It stores all data needed to solve the problem between the portals & indirect lighting. byte m_OcclLights[MAX_LIGHTS_NUM]; |
Common scene rain parameters shared across engine and editor
struct SRainParams { Matrix44 matOccTrans; Matrix44 matOccTransRender; Quat qRainRotation; AABB areaAABB; Vec3 vWorldPos; Vec3 vColor; float fAmount; float fCurrentAmount; float fRadius; float fFakeGlossiness; float fFakeReflectionAmount; float fDiffuseDarkening; float fRainDropsAmount; float fRainDropsSpeed; float fRainDropsLighting; float fMistAmount; float fMistHeight; float fPuddlesAmount; float fPuddlesMaskAmount; float fPuddlesRippleAmount; float fSplashesAmount; int nUpdateFrameID; bool bApplyOcclusion; bool bIgnoreVisareas; bool bDisableOcclusion; };
I3DEngine.h
AABB areaAABB;
bool bApplyOcclusion;
bool bDisableOcclusion;
bool bIgnoreVisareas;
float fAmount;
float fCurrentAmount;
float fDiffuseDarkening;
float fFakeGlossiness;
float fFakeReflectionAmount;
float fMistAmount;
float fMistHeight;
float fPuddlesAmount;
float fPuddlesMaskAmount;
float fPuddlesRippleAmount;
float fRadius;
float fRainDropsAmount;
float fRainDropsLighting;
float fRainDropsSpeed;
float fSplashesAmount;
Matrix44 matOccTrans;
Transformation matrix for rendering into a new occ map
Matrix44 matOccTransRender;
Transformation matrix for rendering occluded rain using current occ map
int nUpdateFrameID;
Quat qRainRotation;
Quaternion for the scene's rain entity rotation
Vec3 vColor;
Vec3 vWorldPos;
SRainParams();
struct SSkyLightRenderParams { const int skyDomeTextureWidth = 64; const int skyDomeTextureHeight = 32; const int skyDomeTextureSize = 64 * 32; const int skyDomeTextureWidthBy8 = 8; const int skyDomeTextureWidthBy4Log = 4; const int skyDomeTextureHeightBy2Log = 4; _smart_ptrm_pSkyDomeMesh; uint32 dummy0; uint32 dummy1; const void* m_pSkyDomeTextureDataMie; const void* m_pSkyDomeTextureDataRayleigh; size_t m_skyDomeTexturePitch; int m_skyDomeTextureTimeStamp; int pad; Vec4 m_partialMieInScatteringConst; Vec4 m_partialRayleighInScatteringConst; Vec4 m_sunDirection; Vec4 m_phaseFunctionConsts; Vec4 m_hazeColor; Vec4 m_hazeColorMieNoPremul; Vec4 m_hazeColorRayleighNoPremul; Vec3 m_skyColorTop; Vec3 m_skyColorNorth; Vec3 m_skyColorEast; Vec3 m_skyColorSouth; Vec3 m_skyColorWest; };
I3DEngine.h
uint32 dummy0;
temporarily add padding bytes to prevent fetching Vec4 constants below from wrong offset
uint32 dummy1;
Vec4 m_hazeColor;
Vec4 m_hazeColorMieNoPremul;
Vec4 m_hazeColorRayleighNoPremul;
Vec4 m_partialMieInScatteringConst;
Sky dome shader constants
Vec4 m_partialRayleighInScatteringConst;
Vec4 m_phaseFunctionConsts;
_smart_ptrm_pSkyDomeMesh;
Sky dome mesh
const void* m_pSkyDomeTextureDataMie;
Sky dome texture data
const void* m_pSkyDomeTextureDataRayleigh;
Vec3 m_skyColorEast;
Vec3 m_skyColorNorth;
Vec3 m_skyColorSouth;
Vec3 m_skyColorTop;
Sky hemisphere colors
Vec3 m_skyColorWest;
size_t m_skyDomeTexturePitch;
int m_skyDomeTextureTimeStamp;
Vec4 m_sunDirection;
int pad;
Enable 16 byte alignment for Vec4s
const int skyDomeTextureHeight = 32;
const int skyDomeTextureHeightBy2Log = 4;
log2(32/2)
const int skyDomeTextureSize = 64 * 32;
const int skyDomeTextureWidth = 64;
const int skyDomeTextureWidthBy4Log = 4;
log2(64/4)
const int skyDomeTextureWidthBy8 = 8;
SSkyLightRenderParams();
struct SSnowParams { Vec3 m_vWorldPos; float m_fRadius; float m_fSnowAmount; float m_fFrostAmount; float m_fSurfaceFreezing; int m_nSnowFlakeCount; float m_fSnowFlakeSize; float m_fSnowFallBrightness; float m_fSnowFallGravityScale; float m_fSnowFallWindScale; float m_fSnowFallTurbulence; float m_fSnowFallTurbulenceFreq; };
I3DEngine.h
float m_fFrostAmount;
float m_fRadius;
float m_fSnowAmount;
Surface params.
float m_fSnowFallBrightness;
float m_fSnowFallGravityScale;
float m_fSnowFallTurbulence;
float m_fSnowFallTurbulenceFreq;
float m_fSnowFallWindScale;
float m_fSnowFlakeSize;
float m_fSurfaceFreezing;
int m_nSnowFlakeCount;
Snowfall params.
Vec3 m_vWorldPos;
SSnowParams();
struct SVisAreaInfo { float fHeight; Vec3 vAmbientColor; bool bAffectedByOutLights; bool bIgnoreSkyColor; bool bSkyOnly; float fViewDistRatio; bool bDoubleSide; bool bUseDeepness; bool bUseInIndoors; bool bOceanIsVisible; bool bIgnoreGI; };
I3DEngine.h
AABB areaBox;
uint32 nHeigtmap;
uint32 nObjTypeMask;
const uint16* pLayerIdTranslation;
const uint8* pVisibleLayerMask;
SHotUpdateInfo();
int16 nChunkVersion;
int32 nObjectsBlockSize;
AABB nodeBox;
int16 ucChildsMask;
int nChunkSize;
int8 nDummy;
int8 nFlags;
int8 nFlags2;
int nOcclAreasNum;
int nPortalsNum;
int8 nVersion;
int nVisAreasNum;
int32 nChunkSize;
int8 nDummy;
int8 nFlags;
int8 nFlags2;
int8 nVersion;
STerrainInfo TerrainInfo;
float fHeightmapZRatio;
float fOceanWaterLevel;
int nHeightMapSize_InUnits;
int nSectorSize_InMeters;
int nSectorsTableSize_InSectors;
int nUnitSize_InMeters;