Represents a rendered object in the world. More...
#include
Inherits IShadowCaster.
Inherited by IBreakableGlassRenderNode, IBrush, ICharacterRenderNode, ICloudBlockerRenderNode, IDecalRenderNode, IDistanceCloudRenderNode, IFogVolumeRenderNode, IGeomCacheRenderNode, ILightSource, IParticleEmitter, IRoadRenderNode, IRopeRenderNode, IVegetation, IVoxelObject, and IWaterVolumeRenderNode.
Public Types | |
enum | EInternalFlags : uint8 { 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) } |
enum | EGIMode { eGM_None = 0, eGM_StaticVoxelization, eGM_DynamicVoxelization, eGM_HideIfGiIsActive, eGM_AnalyticalProxy_Soft, eGM_AnalyticalProxy_Hard, eGM_AnalytPostOccluder, eGM_IntegrateIntoTerrain } |
Object can be used by GI system in several ways. More... | |
typedef uint64 | RenderFlagsType |
Public Member Functions | |
virtual bool | CanExecuteRenderAsJob () |
virtual const char * | GetName () const =0 |
Debug info about object. | |
virtual const char * | GetEntityClassName () const =0 |
virtual string | GetDebugString (char type=0) const |
virtual float | GetImportance () const |
virtual void | ReleaseNode (bool bImmediate=false) |
Releases IRenderNode. | |
virtual IRenderNode * | Clone () const |
virtual void | SetMatrix (const Matrix34 &mat) |
Sets render node transformation matrix. | |
virtual void | GetLocalBounds (AABB &bbox) |
Gets local bounds of the render node. | |
virtual Vec3 | GetPos (bool bWorldOnly=true) const =0 |
virtual const AABB | GetBBox () const =0 |
virtual void | FillBBox (AABB &aabb) |
virtual void | SetBBox (const AABB &WSBBox)=0 |
virtual void | OffsetPosition (const Vec3 &delta)=0 |
virtual void | Render (const struct SRendParams &EntDrawParams, const SRenderingPassInfo &passInfo)=0 |
Renders node geometry. | |
virtual void | Hide (bool bHide) |
Hides/disables node in renderer. | |
virtual IStatObj * | GetEntityStatObj (unsigned int nSubPartId=0, Matrix34A *pMatrix=NULL, bool bReturnOnlyVisible=false) |
Gives access to object components. | |
virtual void | SetEntityStatObj (IStatObj *pStatObj, const Matrix34A *pMatrix=NULL) |
virtual ICharacterInstance * | GetEntityCharacter (Matrix34A *pMatrix=NULL, bool bReturnOnlyVisible=false) |
Retrieve access to the character instance of the the RenderNode. | |
virtual struct IGeomCacheRenderNode * | GetGeomCacheRenderNode (unsigned int nSlot, Matrix34A *pMatrix=NULL, bool bReturnOnlyVisible=false) |
virtual struct IRenderMesh * | GetRenderMesh (int nLod) |
virtual void | SetLodRatio (int nLodRatio) |
virtual uint8 | GetMaterialLayers () const |
Get material layers mask. | |
virtual struct IPhysicalEntity * | GetPhysics () const =0 |
Get physical entity. | |
virtual void | SetPhysics (IPhysicalEntity *pPhys)=0 |
virtual void | CheckPhysicalized () |
Physicalizes if it isn't already. | |
virtual void | Physicalize (bool bInstant=false) |
Physicalize the node. | |
virtual bool | PhysicalizeFoliage (bool bPhysicalize=true, int iSource=0, int nSlot=0) |
Physicalize stat object's foliage. | |
virtual IPhysicalEntity * | GetBranchPhys (int idx, int nSlot=0) |
Get physical entity (rope) for a given branch (if foliage is physicalized). | |
virtual struct IFoliage * | GetFoliage (int nSlot=0) |
virtual | ~IRenderNode () |
Make sure I3DEngine::FreeRenderNodeState(this) is called in destructor of derived class. | |
virtual void | SetMaterial (IMaterial *pMat)=0 |
Set override material for this instance. | |
virtual IMaterial * | GetMaterial (Vec3 *pHitPos=NULL) const =0 |
Queries override material of this instance. | |
virtual IMaterial * | GetMaterialOverride ()=0 |
virtual void | SetCollisionClassIndex (int tableIndex) |
Used by the editor during export. | |
virtual void | SetStatObjGroupIndex (int nVegetationGroupIndex) |
virtual int | GetStatObjGroupId () const |
virtual void | SetLayerId (uint16 nLayerId) |
virtual uint16 | GetLayerId () |
virtual float | GetMaxViewDist ()=0 |
virtual EERType | GetRenderNodeType ()=0 |
virtual bool | IsAllocatedOutsideOf3DEngineDLL () |
virtual void | Dephysicalize (bool bKeepIfReferenced=false) |
virtual void | Dematerialize () |
virtual void | GetMemoryUsage (ICrySizer *pSizer) const =0 |
virtual void | Precache () |
virtual void | UpdateStreamingPriority (const SUpdateStreamingPriorityContext &streamingContext) |
virtual const AABB | GetBBoxVirtual () |
virtual void | OnRenderNodeBecomeVisibleAsync (SRenderNodeTempData *pTempData, const SRenderingPassInfo &passInfo) |
virtual void | OnRenderNodeVisible (bool bBecomeVisible) |
Called when RenderNode becomes visible or invisible, can only be called from the Main thread. | |
virtual uint8 | GetSortPriority () |
virtual EGIMode | GetGIMode () const |
Retrieves the way object is used by GI system. | |
virtual void | SetMinSpec (RenderFlagsType nMinSpec) |
virtual void | SetViewDistRatio (int nViewDistRatio) |
void | CopyIRenderNodeData (IRenderNode *pDest) const |
ILINE void | SetRndFlags (RenderFlagsType dwFlags) |
Rendering flags. (. More... | |
ILINE void | SetRndFlags (RenderFlagsType dwFlags, bool bEnable) |
ILINE RenderFlagsType | GetRndFlags () const |
ILINE void | SetDrawFrame (int nFrameID, int nRecursionLevel) |
Object draw frames (set if was drawn). | |
ILINE int | GetDrawFrame (int nRecursionLevel=0) const |
ILINE IVisArea * | GetEntityVisArea () const |
struct CTerrainNode * | GetEntityTerrainNode () const |
ILINE void | SetViewDistUnlimited () |
Makes object visible at any distance. | |
ILINE int | GetViewDistRatio () const |
Retrieves the view distance settings. | |
ILINE int | GetViewDistRatioVal () const |
Retrieves the view distance settings without any value interpretation. | |
ILINE float | GetViewDistRatioNormilized () const |
ILINE int | GetLodRatio () const |
ILINE float | GetLodRatioNormalized () const |
virtual bool | GetLodDistances (const SFrameLodInfo &frameLodInfo, float *distances) const |
virtual void | SetShadowLodBias (int8 nShadowLodBias) |
Bias value to add to the regular lod. | |
ILINE int | GetShadowLodBias () const |
virtual void | SetCameraSpacePos (Vec3 *pCameraSpacePos) |
ILINE void | SetMaterialLayers (uint8 nMtlLayers) |
Set material layers mask. | |
ILINE int | GetMinSpec () const |
ILINE void | InvalidatePermanentRenderObject () |
Inform 3d engine that permanent render object that captures drawing state of this node is not valid and must be recreated. | |
virtual void | SetEditorObjectId (uint32 nEditorObjectId) |
virtual void | SetEditorObjectInfo (bool bSelected, bool bHighlighted) |
virtual void | SetOwnerEntity (IEntity *pEntity) |
virtual IEntity * | GetOwnerEntity () const |
void | RemoveAndMarkForAutoDeleteTempData () |
Public Attributes | |
IRenderNode * | m_pNext |
Every sector has linked list of IRenderNode objects. | |
IRenderNode * | m_pPrev |
IOctreeNode * | m_pOcNode |
Current objects tree cell. | |
std::atomic< SRenderNodeTempData * > | m_pTempData |
Pointer to temporary data allocated only for currently visible objects. | |
int | m_manipulationFrame = -1 |
CryRWLock | m_manipulationLock |
uint32 | m_nHUDSilhouettesParam |
Hud silhouette parameter, default is black with alpha zero. | |
float | m_fWSMaxViewDist |
Max view distance. | |
RenderFlagsType | m_dwRndFlags |
Render flags (. More... | |
uint8 | m_nInternalFlags |
Flags for render node internal usage, one or more bits from EInternalFlags. | |
uint8 | m_ucViewDistRatio |
Max view distance settings. | |
uint8 | m_ucLodRatio |
LOD settings. | |
uint8 | m_nMaterialLayers |
Material layers bitmask -> which material layers are active. | |
int8 | m_cShadowLodBias |
uint32 | m_nEditorSelectionID |
Static Public Attributes | |
static const int8 | SHADOW_LODBIAS_DISABLE = -128 |
Represents a rendered object in the world.
To visualize objects in a world CRYENGINE defines the concept of render nodes and render elements. Render nodes represent general objects in the 3D engine. Among other things they are used to build a hierarchy for visibility culling, allow physics interactions (optional) and rendering. For actual rendering they add themselves to the renderer (with the help of render objects as you can see in the sample code below) passing an appropriate render element which implements the actual drawing of the object.
enum IRenderNode::EGIMode |
Object can be used by GI system in several ways.
enum IRenderNode::EInternalFlags : uint8 |
|
inline |
|
inline |
|
inline virtual |
|
inline |
|
inline |
|
inline virtual |
|
inline |
|
inline |
|
pure virtual |
Changes the world coordinates position of this node by delta. Don't forget to call this base function when overriding it.
|
inline virtual |
Called immediately when render node becomes visible from any thread. Not reentrant, multiple simultaneous calls to this method on the same rendernode from multiple threads is not supported and should not happen
|
inline virtual |
Sets camera space position of the render node. Only implemented by few nodes.
|
inline virtual |
Allows to adjust default lod distance settings. If fLodRatio is 100 - default lod distance is used.
|
inline |
Rendering flags. (.
|
inline virtual |
Allows to adjust default max view distance settings. If fMaxViewDistRatio is 100 - default max view distance is used.
RenderFlagsType IRenderNode::m_dwRndFlags |
Render flags (.
uint32 IRenderNode::m_nEditorSelectionID |
Selection ID used to map the rendernode to a baseobject in the editor, or differentiate between objects in highlight framebuffer This ID is split in two parts. The low 8 bits store flags such as selection and highlight state The high 24 bits store the actual ID of the object. This need not be the same as CryGUID, though the CryGUID could be used to generate it
|
static |
Shadow LOD bias. Set to SHADOW_LODBIAS_DISABLE to disable any shadow lod overrides for this rendernode.