108 void SetFrustrum(
float fov,
float front,
float back);
122 void Update(
float p_previousRenderTime,
float);
171 float prev_render_time;
172 float view_area_at_one;
180 float frustum_vertices[8][3];
181 float transformed_points[8][3];
182 float frustum_planes[6][4];
184 IDirect3DRMFrame2* frame;
185 float seconds_allowed;
[AI] Represents an axis-aligned bounding box in 3D space, using minimum and maximum points.
[AI] Represents a bounding sphere in 3D space with center and radius.
[AI] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
[AI] Represents an ROI (Real-time Object Instance) that can be oriented in world space,...
[AI] Handles global view and level-of-detail (LOD) settings for real-time rendering.
[AI] Scene graph node for parental transforms/color/material/texture; can hold meshes or other groups...
[AI] Main interface/factory for rendering resources and scene graphs.
[AI] Represents a rendering viewport and drawing context.
[AI] Manages all ViewROI objects that are rendered in a given scene, handles frustum culling,...
void SetFrustrum(float fov, float front, float back)
[AI] Sets the projection frustum parameters and marks the frustum as needing recalculation.
void SetPOVSource(const OrientableROI *point_of_view)
[AI] Sets the OrientableROI to use as the camera's point-of-view; updates the transformation matrix a...
void ManageVisibilityAndDetailRecursively(ViewROI *p_roi, int p_und)
[AI] Recursively traverses and updates the visibility and LOD detail of a ROI and its children,...
Flags
[AI] Bit flags used internally by ViewManager to track various states or trigger needed calculations ...
@ c_bit1
[AI] Used to signals a pending operation (exact purpose is contextually flagged during update routine...
@ c_bit4
[AI] Signals that the frustum parameters/planes are valid and up to date.
@ c_bit2
[AI] Indicates the need to update view transformation matrices.
@ c_bit3
[AI] Indicates the need to recalculate frustum parameters (e.g., due to a resolution or frustum chang...
ViewROI * Pick(Tgl::View *p_view, unsigned long x, unsigned long y)
[AI] Using a screen coordinate and viewport, finds the ViewROI (if any) under the given coordinates b...
void Update(float p_previousRenderTime, float)
[AI] Performs the per-frame update: applies frustum/view updates if needed and recurses the ROI graph...
unsigned int IsBoundingBoxInFrustum(const BoundingBox &p_bounding_box)
[AI] Determines if a bounding box is (partially) inside the camera's view frustum using frustum-plane...
void SetResolution(int width, int height)
[AI] Sets the viewport resolution and marks the frustum as needing recalculation.
const CompoundObject & GetROIs()
[AI] Returns the internal CompoundObject list of all managed ViewROI objects for iteration or queries...
static int CalculateLODLevel(float p_und1, float p_und2, ViewROI *p_roi)
[AI] Determines the LOD level index for a ROI based on projected size and user-defined/scene paramete...
void Remove(ViewROI *p_roi)
[AI] Removes a single ViewROI from the managed ROI list, also detaching any associated LOD data from ...
void Add(ViewROI *p_roi)
[AI] Adds a ViewROI object to the list of managed ROI objects.
void UpdateROIDetailBasedOnLOD(ViewROI *p_roi, int p_und)
[AI] Based on computed LOD, updates the scene to show the correct mesh for a given ROI,...
static int IsROIVisibleAtLOD(ViewROI *p_roi)
[AI] Checks whether the given ROI should be considered visible at any LOD, including compound sub-ROI...
void RemoveROIDetailFromScene(ViewROI *p_roi)
[AI] Removes the currently active LOD detail from the rendering scene for the given ROI and detaches ...
void UpdateViewTransformations()
[AI] Updates the transformation matrices using the current POV and frustum edges, recalculating plane...
float ProjectedSize(const BoundingSphere &p_bounding_sphere)
[AI] Computes the projected area of a bounding sphere onto the camera's viewing plane (used for LOD c...
virtual ~ViewManager()
[AI] Destroys the ViewManager including detaching the current POV source and releasing Direct3DRM obj...
void RemoveAll(ViewROI *p_roi)
[AI] Recursively removes all ViewROI objects.
int CalculateFrustumTransformations()
[AI] Computes frustum planes and transformed corner positions for the current camera/view,...
[AI] ViewROI objects represent viewable and placeable objects in the scene, each holding their own tr...
vector< const ROI * > ROIList
[AI] Typedef for a list of ROI pointers.
list< ROI * > CompoundObject