C# Класс idTech4.Renderer.idRenderWorld

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddEntityDefinition ( RenderEntityComponent renderComponent ) : idRenderEntity
DebugClearLines ( int time ) : void
DebugClearPolygons ( int time ) : void
Dispose ( ) : void
FindViewLightsAndEntities ( ) : void

All the modelrefs and lightrefs that are in visible areas will have viewEntitys and viewLights created for them.

The scissorRects on the viewEntitys and viewLights may be empty if they were considered, but not actually visible.

GenerateInteractions ( ) : void

Force the generation of all light / surface interactions at the start of a level. If this isn't called, they will all be dynamically generated

This really isn't all that helpful anymore, because the calculation of shadows and light interactions is deferred from idRenderWorld::CreateLightDefInteractions(), but we use it as an oportunity to size the interactionTable.

GetRenderEntity ( int handle ) : RenderEntityComponent
InitFromMap ( string name ) : bool

A NULL or empty name will make a world without a map model, which is still useful for displaying a bare model.

RenderScene ( idRenderView renderView ) : void

Rendering a scene may actually render multiple subviews for mirrors and portals, and may render composite textures for gui console screens and light projections. It would also be acceptable to render a scene multiple times, for "rear view mirrors", etc.

UpdateEntityDefinition ( idRenderEntity renderEntity, RenderEntityComponent renderComponent ) : void

Does not write to the demo file, which will only be updated for visible entities.

UpdateEntityDefinition ( int index, RenderEntityComponent renderComponent ) : void

Does not write to the demo file, which will only be updated for visible entities.

Приватные методы

Метод Описание
AddAreaEntityReferences ( int areaNumber, PortalStack portalStack ) : void

Any models that are visible through the current portalStack will have their scissor.

AddAreaReferences ( int areaNumber, PortalStack portalStack ) : void

This may be entered multiple times with different planes if more than one portal sees into the area.

AddEntityRefToArea ( idRenderEntity def, PortalArea area ) : void

This is called by R_PushVolumeIntoTree and also directly for the world model references that are precalculated.

AddWorldModelEntities ( ) : void
BuildConnectedAreas ( ) : void

This is only valid for a given view, not all views in a frame.

BuildConnectedAreas_r ( int areaNumber ) : void
ClearPortalStates ( ) : void
ClearWorld ( ) : void

Sets up for a single area world.

CommonChildrenArea ( AreaNode node ) : int
CreateEntityReferences ( idRenderEntity def ) : void

Creates all needed model references in portal areas, chaining them to both the area and the entityDef.

Bumps tr.viewCount..

CullEntityByPortals ( idRenderEntity entity, PortalStack portalStack ) : bool

Return true if the entity reference bounds do not intersect the current portal chain.

Dispose ( bool disposing ) : void
FloodConnectedAreas ( PortalArea area, int portalAttributeIndex ) : void
FloodViewThroughArea ( Vector3 origin, int areaNumber, PortalStack portalStack ) : void
FlowViewThroughPortals ( Vector3 origin, int planeCount, Plane planes ) : void

Finds viewLights and viewEntities by flowing from an origin through the visible portals. origin point can see into. The planes array defines a volume (positive sides facing in) that should contain the origin, such as a view frustum or a point light box. Zero planes assumes an unbounded volume.

FreeDefs ( ) : void
FreeEntityDef ( int index ) : void
FreeEntityDefDerivedData ( idRenderEntity def, bool keepDecals, bool keepCachedDynamicModel ) : void
FreeWorld ( ) : void
ParseInterAreaPortals ( idLexer lexer ) : void
ParseModel ( idLexer lexer ) : idRenderModel
ParseNodes ( idLexer lexer ) : void
ParseShadowModel ( idLexer lexer ) : idRenderModel
PointInArea ( Vector3 point ) : int

Will return -1 if the point is not in an area, otherwise it will return 0 <= value < tr.world->numPortalAreas.

PortalIsFoggedOut ( Portal portal ) : bool
PushVolumeIntoTree ( idRenderEntity def, object light, int pointCount, Vector3 points ) : void
PushVolumeIntoTree_r ( idRenderEntity def, object light, idSphere sphere, int pointCount, Vector3 points, int nodeNumber ) : void Used for both light volumes and model volumes. This does not clip the points by the planes, so some slop occurs. tr.viewCount should be bumped before calling, allowing it to prevent double checking areas. We might alternatively choose to do this with an area flow.
ScreenRectangleFromWinding ( idWinding winding, ViewEntity space ) : idScreenRect
SetEntityDefViewEntity ( idRenderEntity def ) : ViewEntity

If the entityDef isn't already on the viewEntity list, create a viewEntity and add it to the list with an empty scissor rect.

This does not instantiate dynamic models for the entity yet.

SetupAreaReferences ( ) : void
idRenderWorld ( ) : System

Описание методов

AddEntityDefinition() публичный Метод

public AddEntityDefinition ( RenderEntityComponent renderComponent ) : idRenderEntity
renderComponent RenderEntityComponent
Результат idRenderEntity

DebugClearLines() публичный Метод

public DebugClearLines ( int time ) : void
time int
Результат void

DebugClearPolygons() публичный Метод

public DebugClearPolygons ( int time ) : void
time int
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

FindViewLightsAndEntities() публичный Метод

All the modelrefs and lightrefs that are in visible areas will have viewEntitys and viewLights created for them.
The scissorRects on the viewEntitys and viewLights may be empty if they were considered, but not actually visible.
public FindViewLightsAndEntities ( ) : void
Результат void

GenerateInteractions() публичный Метод

Force the generation of all light / surface interactions at the start of a level. If this isn't called, they will all be dynamically generated
This really isn't all that helpful anymore, because the calculation of shadows and light interactions is deferred from idRenderWorld::CreateLightDefInteractions(), but we use it as an oportunity to size the interactionTable.
public GenerateInteractions ( ) : void
Результат void

GetRenderEntity() публичный Метод

public GetRenderEntity ( int handle ) : RenderEntityComponent
handle int
Результат RenderEntityComponent

InitFromMap() публичный Метод

A NULL or empty name will make a world without a map model, which is still useful for displaying a bare model.
public InitFromMap ( string name ) : bool
name string
Результат bool

RenderScene() публичный Метод

Rendering a scene may actually render multiple subviews for mirrors and portals, and may render composite textures for gui console screens and light projections. It would also be acceptable to render a scene multiple times, for "rear view mirrors", etc.
public RenderScene ( idRenderView renderView ) : void
renderView idRenderView
Результат void

UpdateEntityDefinition() публичный Метод

Does not write to the demo file, which will only be updated for visible entities.
public UpdateEntityDefinition ( idRenderEntity renderEntity, RenderEntityComponent renderComponent ) : void
renderEntity idRenderEntity
renderComponent RenderEntityComponent
Результат void

UpdateEntityDefinition() публичный Метод

Does not write to the demo file, which will only be updated for visible entities.
public UpdateEntityDefinition ( int index, RenderEntityComponent renderComponent ) : void
index int
renderComponent RenderEntityComponent
Результат void