C# 클래스 idTech4.Renderer.idRenderWorld

상속: IDisposable
파일 보기 프로젝트 열기: iainmckay/idtech4.net 1 사용 예제들

공개 메소드들

메소드 설명
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