29 #ifndef __RENDERWORLDLOCAL_H__
30 #define __RENDERWORLDLOCAL_H__
68 static const int CHILDREN_HAVE_MULTIPLE_AREAS = -2;
69 static const int AREANUM_SOLID = -1;
114 virtual bool Trace(
modelTrace_t &trace,
const idVec3 &start,
const idVec3 &end,
const float radius,
bool skipDynamic =
true,
bool skipPlayer =
false )
const;
121 virtual void DebugCircle(
const idVec4 &color,
const idVec3 &origin,
const idVec3 &dir,
const float radius,
const int numSteps,
const int lifetime = 0,
const bool depthTest =
false );
125 virtual void DebugFrustum(
const idVec4 &color,
const idFrustum &frustum,
const bool showFromOrigin =
false,
const int lifetime = 0 );
126 virtual void DebugCone(
const idVec4 &color,
const idVec3 &apex,
const idVec3 &dir,
float radius1,
float radius2,
const int lifetime = 0 );
133 virtual void DrawText(
const char *text,
const idVec3 &origin,
float scale,
const idVec4 &color,
const idMat3 &viewAxis,
const int align = 1,
const int lifetime = 0,
bool depthTest =
false );
bool ProcessDemoCommand(idDemoFile *readDemo, renderView_t *demoRenderView, int *demoTimeOffset)
void AddEntityRefToArea(idRenderEntityLocal *def, portalArea_t *area)
virtual qhandle_t AddEntityDef(const renderEntity_t *re)
virtual void RegenerateWorld()
GLsizei const GLfloat * points
virtual void DebugCircle(const idVec4 &color, const idVec3 &origin, const idVec3 &dir, const float radius, const int numSteps, const int lifetime=0, const bool depthTest=false)
void SetPortalState(qhandle_t portal, int blockingBits)
idList< idRenderModel * > localModels
virtual const renderLight_t * GetRenderLight(qhandle_t lightHandle) const
void FlowViewThroughPortals(const idVec3 origin, int numPlanes, const idPlane *planes)
virtual exitPortal_t GetPortal(int areaNum, int portalNum)
struct portalArea_s portalArea_t
areaReference_t lightRefs
virtual void DebugPolygon(const idVec4 &color, const idWinding &winding, const int lifeTime=0, const bool depthTest=false)
virtual void UpdateEntityDef(qhandle_t entityHandle, const renderEntity_t *re)
bool generateAllInteractionsCalled
void FloodViewThroughArea_r(const idVec3 origin, int areaNum, const struct portalStack_s *ps)
idRenderLightLocal * fogLight
virtual void RemoveDecals(qhandle_t entityHandle)
virtual qhandle_t AddLightDef(const renderLight_t *rlight)
virtual void UpdateLightDef(qhandle_t lightHandle, const renderLight_t *rlight)
idScreenRect & GetAreaScreenRect(int areaNum) const
GLenum GLenum GLenum GLenum GLenum scale
void WriteRenderEntity(qhandle_t handle, const renderEntity_t *ent)
void AddAreaEntityRefs(int areaNum, const struct portalStack_s *ps)
idList< idRenderEntityLocal * > entityDefs
virtual void DebugSphere(const idVec4 &color, const idSphere &sphere, const int lifetime=0, bool depthTest=false)
void FlowLightThroughPortals(idRenderLightLocal *light)
virtual void RenderScene(const renderView_t *renderView)
virtual void DebugClearPolygons(int time)
void FindViewLightsAndEntities(void)
void TouchWorldModels(void)
virtual bool InitFromMap(const char *mapName)
bool CullLightByPortals(const idRenderLightLocal *light, const struct portalStack_s *ps)
void WriteRenderLight(qhandle_t handle, const renderLight_t *light)
virtual void DebugArrow(const idVec4 &color, const idVec3 &start, const idVec3 &end, int size, const int lifetime=0)
void PushVolumeIntoTree_r(idRenderEntityLocal *def, idRenderLightLocal *light, const idSphere *sphere, int numPoints, const idVec3(*points), int nodeNum)
void AddAreaLightRefs(int areaNum, const struct portalStack_s *ps)
virtual void DebugBox(const idVec4 &color, const idBox &box, const int lifetime=0)
virtual void DebugBounds(const idVec4 &color, const idBounds &bounds, const idVec3 &org=vec3_origin, const int lifetime=0)
virtual bool Trace(modelTrace_t &trace, const idVec3 &start, const idVec3 &end, const float radius, bool skipDynamic=true, bool skipPlayer=false) const
areaNumRef_t * FloodFrustumAreas(const idFrustum &frustum, areaNumRef_t *areas)
struct doublePortal_s doublePortal_t
void WriteFreeEntity(qhandle_t handle)
idList< idRenderLightLocal * > lightDefs
void WriteRenderView(const renderView_t *renderView)
void ResizeInteractionTable()
virtual void DebugLine(const idVec4 &color, const idVec3 &start, const idVec3 &end, const int lifetime=0, const bool depthTest=false)
struct doublePortal_s * nextFoggedPortal
qhandle_t FindPortal(const idBounds &b) const
int NumPortals(void) const
doublePortal_t * doublePortals
idInteraction ** interactionTable
void StartWritingDemo(idDemoFile *demo)
virtual void DrawText(const char *text, const idVec3 &origin, float scale, const idVec4 &color, const idMat3 &viewAxis, const int align=1, const int lifetime=0, bool depthTest=false)
void WriteFreeLight(qhandle_t handle)
virtual void FreeLightDef(qhandle_t lightHandle)
virtual const renderEntity_t * GetRenderEntity(qhandle_t entityHandle) const
virtual bool FastWorldTrace(modelTrace_t &trace, const idVec3 &start, const idVec3 &end) const
GLubyte GLubyte GLubyte GLubyte w
const int LUDICROUS_INDEX
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
idRenderModel * ParseModel(idLexer *src)
virtual bool ModelTrace(modelTrace_t &trace, qhandle_t entityHandle, const idVec3 &start, const idVec3 &end, const float radius) const
areaNumRef_t * FloodFrustumAreas_r(const idFrustum &frustum, const int areaNum, const idBounds &bounds, areaNumRef_t *areas)
virtual void DebugScreenRect(const idVec4 &color, const idScreenRect &rect, const viewDef_t *viewDef, const int lifetime=0)
bool PortalIsFoggedOut(const portal_t *p)
bool CullEntityByPortals(const idRenderEntityLocal *entity, const struct portalStack_s *ps)
idBlockAlloc< areaReference_t, 1024 > areaReferenceAllocator
virtual void ProjectDecalOntoWorld(const idFixedWinding &winding, const idVec3 &projectionOrigin, const bool parallel, const float fadeDepth, const idMaterial *material, const int startTime)
virtual ~idRenderWorldLocal()
void BoundsInAreas_r(int nodeNum, const idBounds &bounds, int *areas, int *numAreas, int maxAreas) const
bool AreasAreConnected(int areaNum1, int areaNum2, portalConnection_t connection)
struct portal_s * portals[2]
virtual void DebugWinding(const idVec4 &color, const idWinding &w, const idVec3 &origin, const idMat3 &axis, const int lifetime=0, const bool depthTest=false)
idBlockAlloc< areaNumRef_t, 1024 > areaNumRefAllocator
void RecurseProcBSP_r(modelTrace_t *results, int parentNodeNum, int nodeNum, float p1f, float p2f, const idVec3 &p1, const idVec3 &p2) const
virtual bool CheckAreaForPortalSky(int areaNum)
virtual int NumPortalsInArea(int areaNum)
int CommonChildrenArea_r(areaNode_t *node)
virtual int NumAreas(void) const
int interactionTableHeight
virtual void DebugClearLines(int time)
void FloodConnectedAreas(portalArea_t *area, int portalAttributeIndex)
void AddWorldModelEntities()
virtual guiPoint_t GuiTrace(qhandle_t entityHandle, const idVec3 start, const idVec3 end) const
virtual void GenerateAllInteractions()
float DrawTextLength(const char *text, float scale, int len=0)
void CreateLightDefInteractions(idRenderLightLocal *ldef)
virtual void SetRenderView(const renderView_t *renderView)
int connectedAreaNum[NUM_PORTAL_ATTRIBUTES]
int interactionTableWidth
portalArea_t * portalAreas
virtual void DebugCone(const idVec4 &color, const idVec3 &apex, const idVec3 &dir, float radius1, float radius2, const int lifetime=0)
void FloodLightThroughArea_r(idRenderLightLocal *light, int areaNum, const struct portalStack_s *ps)
idRenderModel * ParseShadowModel(idLexer *src)
virtual void DebugAxis(const idVec3 &origin, const idMat3 &axis)
virtual int PointInArea(const idVec3 &point) const
void BuildConnectedAreas_r(int areaNum)
int GetPortalState(qhandle_t portal)
areaReference_t entityRefs
idScreenRect ScreenRectFromWinding(const idWinding *w, viewEntity_t *space)
void AddLightRefToArea(idRenderLightLocal *light, portalArea_t *area)
void PushVolumeIntoTree(idRenderEntityLocal *def, idRenderLightLocal *light, int numPoints, const idVec3(*points))
void BuildConnectedAreas(void)
struct doublePortal_s * doublePortal
void ParseInterAreaPortals(idLexer *src)
void WriteVisibleDefs(const viewDef_t *viewDef)
void ParseNodes(idLexer *src)
virtual void ProjectDecal(qhandle_t entityHandle, const idFixedWinding &winding, const idVec3 &projectionOrigin, const bool parallel, const float fadeDepth, const idMaterial *material, const int startTime)
virtual void ProjectOverlay(qhandle_t entityHandle, const idPlane localTextureAxis[2], const idMaterial *material)
void AddAreaRefs(int areaNum, const struct portalStack_s *ps)
idScreenRect * areaScreenRect
virtual void FreeEntityDef(qhandle_t entityHandle)
idBlockAlloc< idInteraction, 256 > interactionAllocator
virtual void DebugFrustum(const idVec4 &color, const idFrustum &frustum, const bool showFromOrigin=false, const int lifetime=0)
virtual int BoundsInAreas(const idBounds &bounds, int *areas, int maxAreas) const