struct IRenderNode : public IShadowCaster { enum EInternalFlags { DECAL_OWNER = BIT(0), REQUIRES_NEAREST_CUBEMAP = BIT(1), UPDATE_DECALS = BIT(2), REQUIRES_FORWARD_RENDERING = BIT(3), WAS_INVISIBLE = BIT(4), WAS_IN_VISAREA = BIT(5), WAS_FARAWAY = BIT(6), HAS_OCCLUSION_PROXY = BIT(7) }; struct GetEntityTerrainNode { IRenderNode * * m_pNext, * m_pPrev; IOctreeNode * m_pOcNode; struct CRNTmpData * m_pRNTmpData; float m_fWSMaxViewDist; int m_dwRndFlags; int8 m_cShadowLodBias; int m_nSID; unsigned char m_ucViewDistRatio; unsigned char m_ucLodRatio; unsigned char m_nInternalFlags; unsigned char m_nMaterialLayers; }; struct IVegetation : public IRenderNode { }; struct IBrush : public IRenderNode { }; struct SVegetationSpriteInfo { Sphere sp; float fScaleH; float fScaleV; struct SSectorTextureSet * pTerrainTexInfo; struct SVegetationSpriteLightInfo * pLightInfo; uint8 ucSunDotTerrain; uint8 ucAlphaTestRef; uint8 ucDissolveOut; uint8 ucShow3DModel; ColorB terrainColor; uint8 ucSlotId; struct IStatInstGroup * pStatInstGroup; const IRenderNode * pVegetation; }; const int FAR_TEX_COUNT = 12; const int FAR_TEX_ANGLE = (360/FAR_TEX_COUNT); const int FAR_TEX_HAL_ANGLE = (256/FAR_TEX_COUNT)/2; struct SVegetationSpriteLightInfo { float m_MipFactor; IDynTexture * m_pDynTexture; }; struct ILightSource : public IRenderNode { }; struct ILightShapeRenderNode : public IRenderNode { enum ELightShapeFlags { elsfDisableGI = 1<<0 }; }; struct IRoadRenderNode : public IRenderNode { }; struct IBreakableGlassRenderNode : public IRenderNode { }; struct IVoxelObject : public IRenderNode { }; struct SFogVolumeProperties { int m_volumeType; Vec3 m_size; ColorF m_color; bool m_useGlobalFogColor; float m_globalDensity; float m_densityOffset; float m_softEdges; float m_fHDRDynamic; float m_nearCutoff; float m_heightFallOffDirLong; float m_heightFallOffDirLati; float m_heightFallOffShift; float m_heightFallOffScale; }; struct IFogVolumeRenderNode : public IRenderNode { }; struct SDecalProperties { enum EProjectionType { ePlanar, eProjectOnStaticObjects, eProjectOnTerrain, eProjectOnTerrainAndStaticObjects }; EProjectionType m_projectionType; uint8 m_sortPrio; uint8 m_deferred; Vec3 m_pos; Vec3 m_normal; Matrix33 m_explicitRightUpFront; float m_radius; float m_depth; const char* m_pMaterialName; }; struct IDecalRenderNode : public IRenderNode { }; struct IWaterVolumeRenderNode : public IRenderNode { enum EWaterVolumeType { eWVT_Unknown, eWVT_Ocean, eWVT_Area, eWVT_River }; }; struct SWaterWaveParams { Vec3 m_pPos; float m_fSpeed, m_fSpeedVar; float m_fLifetime, m_fLifetimeVar; float m_fHeight, m_fHeightVar; float m_fPosVar; float m_fCurrLifetime; float m_fCurrFrameLifetime; float m_fCurrSpeed; float m_fCurrHeight; }; struct IWaterWaveRenderNode : public IRenderNode { }; struct SDistanceCloudProperties { Vec3 m_pos; float m_sizeX; float m_sizeY; float m_rotationZ; const char* m_pMaterialName; }; struct IDistanceCloudRenderNode : public IRenderNode { }; struct IRopeRenderNode : public IRenderNode { enum ERopeParamFlags { eRope_BindEndPoints = 0x0001, eRope_CheckCollisinos = 0x0002, eRope_Subdivide = 0x0004, eRope_Smooth = 0x0008, eRope_NoAttachmentCollisions = 0x0010, eRope_Nonshootable = 0x0020, eRope_Disabled = 0x0040, eRope_NoPlayerCollisions = 0x0080, eRope_StaticAttachStart = 0x0100, eRope_StaticAttachEnd = 0x0200, eRope_CastShadows = 0x0400, eRope_Awake = 0x0800 }; struct SRopeParams { int nFlags; float fThickness; float fAnchorRadius; int nNumSegments; int nNumSides; float fTextureTileU; float fTextureTileV; int nPhysSegments; int nMaxSubVtx; float mass; float tension; float friction; float frictionPull; Vec3 wind; float windVariance; float airResistance; float waterResistance; float jointLimit; float maxForce; int nMaxIters; float maxTimeStep; float stiffness; float hardness; float damping; float sleepSpeed; }; struct SEndPointLink { IPhysicalEntity * pPhysicalEntity; Vec3 offset; int nPartId; }; }; struct ILPVRenderNode : public IRenderNode { }; };
IEntityRenderState.h
enum EInternalFlags { DECAL_OWNER = BIT(0), REQUIRES_NEAREST_CUBEMAP = BIT(1), UPDATE_DECALS = BIT(2), REQUIRES_FORWARD_RENDERING = BIT(3), WAS_INVISIBLE = BIT(4), WAS_IN_VISAREA = BIT(5), WAS_FARAWAY = BIT(6), HAS_OCCLUSION_PROXY = BIT(7) };
IEntityRenderState.h
Members |
Description |
DECAL_OWNER = BIT(0) |
Owns some decals. |
REQUIRES_NEAREST_CUBEMAP = BIT(1) |
Pick nearest cube map |
UPDATE_DECALS = BIT(2) |
The node changed geometry - decals must be updated. |
REQUIRES_FORWARD_RENDERING = BIT(3) |
Special shadow processing needed. |
WAS_INVISIBLE = BIT(4) |
Was invisible last frame. |
WAS_IN_VISAREA = BIT(5) |
Was inside vis-ares last frame. |
WAS_FARAWAY = BIT(6) |
Was considered 'far away' for the purposes of physics deactivation. |
HAS_OCCLUSION_PROXY = BIT(7) |
This node has occlusion proxy. |
struct GetEntityTerrainNode { IRenderNode * * m_pNext, * m_pPrev; IOctreeNode * m_pOcNode; struct CRNTmpData * m_pRNTmpData; float m_fWSMaxViewDist; int m_dwRndFlags; int8 m_cShadowLodBias; int m_nSID; unsigned char m_ucViewDistRatio; unsigned char m_ucLodRatio; unsigned char m_nInternalFlags; unsigned char m_nMaterialLayers; };
IEntityRenderState.h
Current VisArea or null if in outdoors or entity was not registered in 3dengine.
int8 m_cShadowLodBias;
Shadow LOD bias
int m_dwRndFlags;
Render flags.
float m_fWSMaxViewDist;
Max view distance.
unsigned char m_nInternalFlags;
Flags for render node internal usage, one or more bits from EInternalFlags.
unsigned char m_nMaterialLayers;
Material layers bitmask -> which material layers are active.
int m_nSID;
Segment Id
IRenderNode * * m_pNext;
Every sector has linked list of IRenderNode objects.
IOctreeNode * m_pOcNode;
Current objects tree cell.
IRenderNode * m_pPrev;
Every sector has linked list of IRenderNode objects.
struct CRNTmpData * m_pRNTmpData;
Pointer to temporary data allocated only for currently visible objects.
unsigned char m_ucLodRatio;
LOD settings.
unsigned char m_ucViewDistRatio;
Max view distance settings.
Returns lod distance ratio.
int GetLodRatio() const;
Returns lod distance ratio
float GetLodRatioNormalized() const;
int GetMinSpec() const;
static const ERNListType GetRenderNodeListId(const EERType eRType);
Returns lod distance ratio.
int GetShadowLodBias() const;
? m_pOcNode-> GetTerrainNode();
Retrieves the view distance settings.
int GetViewDistRatio() const;
Returns max view distance ratio.
float GetViewDistRatioNormilized() const;
Retrieves the view distance settings without any value interpretation.
int GetViewDistRatioVal() const;
Sets material layers mask.
void SetMaterialLayers(uint8 nMtlLayers);
virtual void SetShadowLodBias(int8 nShadowLodBias);
Bias value to add to the regular lod
struct IBreakableGlassRenderNode : public IRenderNode { };
IEntityRenderState.h
virtual void ApplyExplosionToGlass(const EventPhysCollision* pPhysEvent) = 0;
virtual void ApplyImpactToGlass(const EventPhysCollision* pPhysEvent) = 0;
virtual void DestroyPhysFragment(SGlassPhysFragment* pPhysFrag) = 0;
virtual uint16 GetId() = 0;
virtual bool HasActiveFragments() = 0;
virtual bool HasGlassShattered() = 0;
virtual bool InitialiseNode(const SBreakableGlassInitParams& params, const Matrix34& matrix) = 0;
virtual void SetCVars(const SBreakableGlassCVars* pCVars) = 0;
virtual void SetId(const uint16 id) = 0;
virtual void Update(SBreakableGlassUpdateParams& params) = 0;
struct IBrush : public IRenderNode { };
IEntityRenderState.h
virtual const Matrix34& GetMatrix() const = 0;
virtual void SetDrawLast(bool enable) = 0;
struct IDecalRenderNode : public IRenderNode { };
IEntityRenderState.h
IDecalRenderNode is an interface to the Decal Render Node object.
virtual void CleanUpOldDecals() = 0;
virtual const SDecalProperties* GetDecalProperties() const = 0;
virtual const Matrix34& GetMatrix() = 0;
virtual void SetDecalProperties(const SDecalProperties& properties) = 0;
struct IDistanceCloudRenderNode : public IRenderNode { };
IEntityRenderState.h
virtual void SetProperties(const SDistanceCloudProperties& properties) = 0;
struct IFogVolumeRenderNode : public IRenderNode { };
IEntityRenderState.h
virtual void FadeGlobalDensity(float fadeTime, float newGlobalDensity) = 0;
virtual const Matrix34& GetMatrix() const = 0;
virtual void SetFogVolumeProperties(const SFogVolumeProperties& properties) = 0;
ILightShapeRenderNode is an interface to the LightShape render node object.
struct ILightShapeRenderNode : public IRenderNode { enum ELightShapeFlags { elsfDisableGI = 1<<0 }; };
IEntityRenderState.h
enum ELightShapeFlags { elsfDisableGI = 1<<0 };
IEntityRenderState.h
virtual bool LoadLightBox() = 0;
virtual bool LoadLightShape(const char * sLightShape, const uint32 nLSFlags) = 0;
Loads a light shape from cgf filename
virtual void SetLSFlags(const uint32 nNewFlags) = 0;
struct ILightSource : public IRenderNode { };
IEntityRenderState.h
virtual CDLight & GetLightProperties() = 0;
virtual const Matrix34& GetMatrix() = 0;
virtual struct ShadowMapFrustum * GetShadowFrustum(int nId = 0) = 0;
virtual bool IsCheapLight(uint64& sourceEntityGUID) const = 0;
virtual bool IsLightAreasVisible() = 0;
virtual void SetCastingException(IRenderNode * pNotCaster) = 0;
virtual void SetCheapLight(const uint64 entityGUID) = 0;
virtual void SetLightProperties(const CDLight & light) = 0;
struct ILPVRenderNode : public IRenderNode { };
IEntityRenderState.h
ILPVRenderNode is an interface to the Light Propagation Volume Render Node object.
virtual bool AutoFit(const DynArray<CDLight>& lightsToFit) = 0;
virtual void EnableSpecular(const bool bEnabled) = 0;
virtual float GetDensity() const = 0;
virtual void GetMatrix(Matrix34& mxGrid) const = 0;
virtual bool IsSpecularEnabled() const = 0;
virtual void SetDensity(const float fDensity) = 0;
virtual bool TryInsertLight(const CDLight & light) = 0;
virtual void UpdateMetrics(const Matrix34& mx, const bool recursive = false) = 0;
IRoadRenderNode is an interface to the Road Render Node object.
struct IRoadRenderNode : public IRenderNode { };
IEntityRenderState.h
virtual void GetClipPlanes(Plane * pPlanes, int nPlanesNum, int nVertId = 0) = 0;
virtual void GetTexCoordInfo(float * pTexCoordInfo) = 0;
virtual void SetIgnoreTerrainHoles(bool bVal) = 0;
virtual void SetSortPriority(uint8 sortPrio) = 0;
virtual void SetVertices(const Vec3 * pVerts, int nVertsNum, float fTexCoordBegin, float fTexCoordEnd, float fTexCoordBeginGlobal, float fTexCoordEndGlobal) = 0;
struct IRopeRenderNode : public IRenderNode { enum ERopeParamFlags { eRope_BindEndPoints = 0x0001, eRope_CheckCollisinos = 0x0002, eRope_Subdivide = 0x0004, eRope_Smooth = 0x0008, eRope_NoAttachmentCollisions = 0x0010, eRope_Nonshootable = 0x0020, eRope_Disabled = 0x0040, eRope_NoPlayerCollisions = 0x0080, eRope_StaticAttachStart = 0x0100, eRope_StaticAttachEnd = 0x0200, eRope_CastShadows = 0x0400, eRope_Awake = 0x0800 }; struct SRopeParams { int nFlags; float fThickness; float fAnchorRadius; int nNumSegments; int nNumSides; float fTextureTileU; float fTextureTileV; int nPhysSegments; int nMaxSubVtx; float mass; float tension; float friction; float frictionPull; Vec3 wind; float windVariance; float airResistance; float waterResistance; float jointLimit; float maxForce; int nMaxIters; float maxTimeStep; float stiffness; float hardness; float damping; float sleepSpeed; }; struct SEndPointLink { IPhysicalEntity * pPhysicalEntity; Vec3 offset; int nPartId; }; };
IEntityRenderState.h
enum ERopeParamFlags { eRope_BindEndPoints = 0x0001, eRope_CheckCollisinos = 0x0002, eRope_Subdivide = 0x0004, eRope_Smooth = 0x0008, eRope_NoAttachmentCollisions = 0x0010, eRope_Nonshootable = 0x0020, eRope_Disabled = 0x0040, eRope_NoPlayerCollisions = 0x0080, eRope_StaticAttachStart = 0x0100, eRope_StaticAttachEnd = 0x0200, eRope_CastShadows = 0x0400, eRope_Awake = 0x0800 };
IEntityRenderState.h
Members |
Description |
eRope_BindEndPoints = 0x0001 |
Bind rope at both end points. |
eRope_CheckCollisinos = 0x0002 |
Rope will check collisions. |
eRope_Subdivide = 0x0004 |
Rope will be subdivided in physics. |
eRope_Smooth = 0x0008 |
Rope will be smoothed after physics. |
eRope_NoAttachmentCollisions = 0x0010 |
Rope will ignore collisions against the objects it's attached to . |
eRope_Nonshootable = 0x0020 |
Rope cannot be broken by shooting. |
eRope_Disabled = 0x0040 |
simulation is completely disabled |
eRope_NoPlayerCollisions = 0x0080 |
explicit control over collisions with players |
eRope_StaticAttachStart = 0x0100 |
attach start point to the 'world |
eRope_StaticAttachEnd = 0x0200 |
attach end point to the 'world |
eRope_CastShadows = 0x0400 |
self-explanatory |
eRope_Awake = 0x0800 |
Rope will be awake initially |
struct SEndPointLink { IPhysicalEntity * pPhysicalEntity; Vec3 offset; int nPartId; };
IEntityRenderState.h
struct SRopeParams { int nFlags; float fThickness; float fAnchorRadius; int nNumSegments; int nNumSides; float fTextureTileU; float fTextureTileV; int nPhysSegments; int nMaxSubVtx; float mass; float tension; float friction; float frictionPull; Vec3 wind; float windVariance; float airResistance; float waterResistance; float jointLimit; float maxForce; int nMaxIters; float maxTimeStep; float stiffness; float hardness; float damping; float sleepSpeed; };
IEntityRenderState.h
Members |
Description |
int nFlags; | |
float fAnchorRadius; |
Radius for the end points anchors that bind rope to objects in world. |
int nNumSegments; |
Rendering/Tessellation. |
int nPhysSegments; |
Rope Physical/Params. |
float mass; |
Rope mass, if mass is 0 it will be static. |
virtual void GetEndPointLinks(SEndPointLink * links) = 0;
Retrieves information about linked objects at the end points, links must be a pointer to the 2 SEndPointLink structures.
virtual uint32 GetEntityOwner() const = 0;
virtual uint32 GetLinkedEndsMask() = 0;
virtual const IRopeRenderNode::SRopeParams& GetParams() const = 0;
virtual const Vec3* GetPoints() const = 0;
virtual int GetPointsCount() const = 0;
virtual void LinkEndEntities(IPhysicalEntity* pStartEntity, IPhysicalEntity* pEndEntity) = 0;
virtual void LinkEndPoints() = 0;
Callback from physics.
virtual void OnPhysicsPostStep() = 0;
virtual void ResetPoints() = 0;
virtual void ResetRopeSound() = 0;
virtual void SetEntityOwner(uint32 nEntityId) = 0;
virtual void SetName(const char * sNodeName) = 0;
virtual void SetParams(const SRopeParams& params) = 0;
virtual void SetPoints(const Vec3 * pPoints, int nCount) = 0;
virtual void SetRopeSound(char const* const pcSoundName, int unsigned const nSegmentToAttachTo, float const fOffset) = 0;
Sound related
virtual void StopRopeSound() = 0;
struct IVegetation : public IRenderNode { };
IEntityRenderState.h
We must use interfaces instead of unsafe type casts and unnecessary includes
virtual float GetScale() const = 0;
IVoxelObject is an interface to the Voxel Object Render Node object.
struct IVoxelObject : public IRenderNode { };
IEntityRenderState.h
virtual void CopyHM() = 0;
virtual DEVIRTUALIZATION_VTABLE_FIX struct IMemoryBlock * GetCompiledData(EEndian eEndian) = 0;
virtual void InterpolateVoxelData() = 0;
virtual bool IsEmpty() = 0;
virtual void Regenerate() = 0;
virtual bool ResetTransformation() = 0;
virtual void SetCompiledData(void * pData, int nSize, uint8 ucChildId, EEndian eEndian) = 0;
virtual void SetFlags(int nFlags) = 0;
virtual void SetMatrix(const Matrix34& mat) = 0;
Sets render node transformation matrix.
virtual void SetObjectName(const char * pName) = 0;
struct IWaterVolumeRenderNode : public IRenderNode { enum EWaterVolumeType { eWVT_Unknown, eWVT_Ocean, eWVT_Area, eWVT_River }; };
IEntityRenderState.h
IWaterVolumeRenderNode is an interface to the Water Volume Render Node object.
enum EWaterVolumeType { eWVT_Unknown, eWVT_Ocean, eWVT_Area, eWVT_River };
IEntityRenderState.h
virtual void CreateArea(uint64 volumeID, const Vec3* pVertices, unsigned int numVertices, const Vec2& surfUVScale, const Plane& fogPlane, bool keepSerializationParams = false, int nSID = -1) = 0;
virtual void CreateOcean(uint64 volumeID, bool keepSerializationParams = false) = 0;
Parameters |
Description |
uint64 volumeID |
TBD |
virtual void CreateRiver(uint64 volumeID, const Vec3* pVertices, unsigned int numVertices, float uTexCoordBegin, float uTexCoordEnd, const Vec2& surfUVScale, const Plane& fogPlane, bool keepSerializationParams = false, int nSID = -1) = 0;
virtual float GetFogDensity() const = 0;
virtual IPhysicalEntity* SetAndCreatePhysicsArea(const Vec3* pVertices, unsigned int numVertices) = 0;
virtual void SetAreaAttachedToEntity() = 0;
Sets if the render node is attached to a parent entity This must be called right after the object construction if it is the case Only supported for Areas (not rivers or ocean)
virtual void SetAreaPhysicsArea(const Vec3* pVertices, unsigned int numVertices, bool keepSerializationParams = false) = 0;
virtual void SetAuxPhysParams(pe_params_area *) = 0;
virtual void SetCapFogAtVolumeDepth(bool capFog) = 0;
virtual void SetCausticHeight(float causticHeight) = 0;
virtual void SetCausticIntensity(float causticIntensity) = 0;
virtual void SetCaustics(bool caustics) = 0;
virtual void SetCausticTiling(float causticTiling) = 0;
virtual void SetFogColor(const Vec3& fogColor) = 0;
virtual void SetFogColorAffectedBySun(bool enable) = 0;
virtual void SetFogDensity(float fogDensity) = 0;
virtual void SetFogShadowing(float fogShadowing) = 0;
virtual void SetRiverPhysicsArea(const Vec3* pVertices, unsigned int numVertices, bool keepSerializationParams = false) = 0;
virtual void SetStreamSpeed(float streamSpeed) = 0;
virtual void SetVolumeDepth(float volumeDepth) = 0;
struct IWaterWaveRenderNode : public IRenderNode { };
IEntityRenderState.h
virtual void Create(uint64 nID, const Vec3 * pVertices, uint32 nVertexCount, const Vec2 & pUVScale, const Matrix34 & pWorldTM) = 0;
virtual const SWaterWaveParams & GetParams() const = 0;
virtual void SetParams(const SWaterWaveParams & pParams) = 0;
struct SDecalProperties { enum EProjectionType { ePlanar, eProjectOnStaticObjects, eProjectOnTerrain, eProjectOnTerrainAndStaticObjects }; EProjectionType m_projectionType; uint8 m_sortPrio; uint8 m_deferred; Vec3 m_pos; Vec3 m_normal; Matrix33 m_explicitRightUpFront; float m_radius; float m_depth; const char* m_pMaterialName; };
IEntityRenderState.h
enum EProjectionType { ePlanar, eProjectOnStaticObjects, eProjectOnTerrain, eProjectOnTerrainAndStaticObjects };
IEntityRenderState.h
uint8 m_deferred;
float m_depth;
Matrix33 m_explicitRightUpFront;
Vec3 m_normal;
const char* m_pMaterialName;
Vec3 m_pos;
EProjectionType m_projectionType;
float m_radius;
uint8 m_sortPrio;
SDecalProperties();
struct SDistanceCloudProperties { Vec3 m_pos; float m_sizeX; float m_sizeY; float m_rotationZ; const char* m_pMaterialName; };
IEntityRenderState.h
IDistanceCloudRenderNode is an interface to the Distance Cloud Render Node object.
IFogVolumeRenderNode is an interface to the Fog Volume Render Node object.
struct SFogVolumeProperties { int m_volumeType; Vec3 m_size; ColorF m_color; bool m_useGlobalFogColor; float m_globalDensity; float m_densityOffset; float m_softEdges; float m_fHDRDynamic; float m_nearCutoff; float m_heightFallOffDirLong; float m_heightFallOffDirLati; float m_heightFallOffShift; float m_heightFallOffScale; };
IEntityRenderState.h
Members |
Description |
int m_volumeType; |
Common parameters. Center position & rotation values are taken from the entity matrix. |
float m_fHDRDynamic; |
0 to get the same results in LDR, <0 to get darker, >0 to get brighter. |
float m_heightFallOffDirLong; |
Height based fog specifics. |
float m_heightFallOffDirLati; |
Height based fog specifics. |
float m_heightFallOffShift; |
Height based fog specifics. |
float m_heightFallOffScale; |
Height based fog specifics. |
struct SVegetationSpriteInfo { Sphere sp; float fScaleH; float fScaleV; struct SSectorTextureSet * pTerrainTexInfo; struct SVegetationSpriteLightInfo * pLightInfo; uint8 ucSunDotTerrain; uint8 ucAlphaTestRef; uint8 ucDissolveOut; uint8 ucShow3DModel; ColorB terrainColor; uint8 ucSlotId; struct IStatInstGroup * pStatInstGroup; const IRenderNode * pVegetation; };
IEntityRenderState.h
float fScaleH;
float fScaleV;
struct SVegetationSpriteLightInfo * pLightInfo;
struct IStatInstGroup * pStatInstGroup;
struct SSectorTextureSet * pTerrainTexInfo;
const IRenderNode * pVegetation;
Used only by 3DEngine.
Sphere sp;
ColorB terrainColor;
uint8 ucAlphaTestRef;
uint8 ucDissolveOut;
uint8 ucShow3DModel;
uint8 ucSlotId;
Used only in case of sprite texture update.
uint8 ucSunDotTerrain;
void GetMemoryUsage(ICrySizer * pSizer) const;
Groups sprite gen data.
struct SVegetationSpriteLightInfo { float m_MipFactor; IDynTexture * m_pDynTexture; };
IEntityRenderState.h
float m_MipFactor;
IDynTexture * m_pDynTexture;
bool IsEqual(const Vec3 & vSunDir, const float fDirThreshold) const;
Notes: vSunDir should be normalized.
void SetLightingData(const Vec3 & vSunDir);
SVegetationSpriteLightInfo();
struct SWaterWaveParams { Vec3 m_pPos; float m_fSpeed, m_fSpeedVar; float m_fLifetime, m_fLifetimeVar; float m_fHeight, m_fHeightVar; float m_fPosVar; float m_fCurrLifetime; float m_fCurrFrameLifetime; float m_fCurrSpeed; float m_fCurrHeight; };
IEntityRenderState.h
SWaterWaveParams is an interface to the Water Wave Render Node object.
float m_fCurrFrameLifetime;
float m_fCurrHeight;
float m_fCurrLifetime;
float m_fCurrSpeed;
float m_fHeight;
float m_fHeightVar;
float m_fLifetime;
float m_fLifetimeVar;
float m_fPosVar;
float m_fSpeed;
float m_fSpeedVar;
Vec3 m_pPos;
SWaterWaveParams();
const int FAR_TEX_ANGLE = (360/FAR_TEX_COUNT);
const int FAR_TEX_COUNT = 12;
Number of sprites per object
const int FAR_TEX_HAL_ANGLE = (256/FAR_TEX_COUNT)/2;
virtual ~IRenderNode();
Make sure I3DEngine::FreeRenderNodeState(this) is called in destructor of derived class.
virtual bool CanExecuteRenderAsJob();
Physicalizes if it isn't already.
virtual void CheckPhysicalized();
virtual IRenderNode * Clone() const;
void CopyIRenderNodeData(IRenderNode * pDest) const;
virtual void Dematerialize();
virtual void Dephysicalize(bool bKeepIfReferenced = false);
virtual void FillBBox(AABB & aabb);
virtual const AABB GetBBox() const = 0;
virtual const AABB GetBBoxVirtual();
Gets physical entity (rope) for a given branch (if foliage is physicalized).
virtual IPhysicalEntity* GetBranchPhys(int idx, int nSlot = 0);
virtual string GetDebugString(char type = 0) const;
int GetDrawFrame(int nRecursionLevel = 0) const;
virtual int GetEditorObjectId();
virtual struct ICharacterInstance* GetEntityCharacter(unsigned int nSlot, Matrix34A * pMatrix = NULL, bool bReturnOnlyVisible = false);
virtual const char* GetEntityClassName() const = 0;
virtual IMaterial * GetEntitySlotMaterial(unsigned int nPartId, bool bReturnOnlyVisible = false, bool * pbDrawNear = NULL);
virtual struct IStatObj * GetEntityStatObj(unsigned int nPartId = 0, unsigned int nSubPartId = 0, Matrix34A * pMatrix = NULL, bool bReturnOnlyVisible = false);
Gives access to object components.
IVisArea * GetEntityVisArea() const;
Current VisArea or null if in outdoors or entity was not registered in 3dengine.
Returns physicalized foliage, if it *is* physicalized.
virtual struct IFoliage* GetFoliage(int nSlot = 0);
virtual float GetImportance() const;
virtual uint16 GetLayerId();
virtual void GetLocalBounds(AABB & bbox);
Gets local bounds of the render node.
Queries override material of this instance.
virtual IMaterial* GetMaterial(Vec3 * pHitPos = NULL) = 0;
Gets material layers mask.
virtual uint8 GetMaterialLayers() const;
virtual IMaterial* GetMaterialOverride() = 0;
virtual float GetMaxViewDist() = 0;
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
virtual const char* GetName() const = 0;
Gets/sets physical entity.
virtual struct IPhysicalEntity* GetPhysics() const = 0;
virtual Vec3 GetPos(bool bWorldOnly = true) const = 0;
Returns IRenderMesh of the object.
virtual struct IRenderMesh * GetRenderMesh(int nLod);
virtual EERType GetRenderNodeType() = 0;
unsigned int GetRndFlags() const;
virtual int GetSlotCount() const;
virtual uint8 GetSortPriority();
virtual int GetStatObjGroupId() const;
virtual void Hide(bool bHide);
Hides/disables node in renderer.
IRenderNode();
inline void IRenderNode::SetViewDistRatio(int nViewDistRatio);
virtual bool IsAllocatedOutsideOf3DEngineDLL();
virtual bool IsMovableByGame() const;
Changes the world coordinates position of this node by delta Don't forget to call this base function when overriding it.
virtual void OffsetPosition(const Vec3& delta) = 0;
virtual void OnEntityEvent(IEntity* pEntity, SEntityEvent const& event);
virtual void OnPhysAreaChange();
virtual void OnRenderNodeBecomeVisible(const SRenderingPassInfo & passInfo);
virtual float GetLodForDistance(float fDistance) { return 0;
Physicalizes node.
virtual void Physicalize(bool bInstant = false);
Physicalize stat object's foliage.
virtual bool PhysicalizeFoliage(bool bPhysicalize = true, int iSource = 0, int nSlot = 0);
virtual void Precache();
virtual void ReleaseNode(bool bImmediate = false);
Releases IRenderNode.
Renders node geometry
virtual void Render(const struct SRendParams & EntDrawParams, const SRenderingPassInfo & passInfo) = 0;
virtual void SetBBox(const AABB& WSBBox) = 0;
virtual void SetCollisionClassIndex(int tableIndex);
Used by the editor during export
void SetDrawFrame(int nFrameID, int nRecursionLevel);
Object draw frames (set if was drawn).
virtual void SetEditorObjectId(int nEditorObjectId);
virtual void SetEntityStatObj(unsigned int nSlot, IStatObj * pStatObj, const Matrix34A * pMatrix = NULL);
virtual void SetLayerId(uint16 nLayerId);
virtual void SetLodRatio(int nLodRatio);
Allows to adjust default lod distance settings, if fLodRatio is 100 - default lod distance is used.
Sets override material for this instance.
virtual void SetMaterial(IMaterial * pMat) = 0;
virtual void SetMatrix(const Matrix34& mat);
Sets render node transformation matrix.
virtual void SetMinSpec(int nMinSpec);
virtual void SetPhysics(IPhysicalEntity* pPhys) = 0;
void SetRndFlags(unsigned int dwFlags);
Rendering flags.
void SetRndFlags(unsigned int dwFlags, bool bEnable);
virtual void SetStatObjGroupId(int nVegetationanceGroupId);
virtual void SetViewDistRatio(int nViewDistRatio);
Allows to adjust default max view distance settings, if fMaxViewDistRatio is 100 - default max view distance is used.