Isle
|
[AI] An extension of LegoROI that adds support for keeping and applying a base time reference (used for time-based animation/control). More...
#include <legoroi.h>
Public Member Functions | |
TimeROI (Tgl::Renderer *p_renderer, ViewLODList *p_lodList, LegoTime p_time) | |
[AI] Creates a TimeROI with reference time and LOD geometry. More... | |
void | FUN_100a9b40 (Matrix4 &p_matrix, LegoTime p_time) |
[AI] Updates animated position/offset by integrating movement since last update (applying time delta). More... | |
![]() | |
LegoROI (Tgl::Renderer *p_renderer) | |
[AI] Constructs a new LegoROI for a given renderer. More... | |
LegoROI (Tgl::Renderer *p_renderer, ViewLODList *p_lodList) | |
[AI] Constructs a LegoROI with a specified LOD list to manage its geometry representations. More... | |
~LegoROI () override | |
[AI] Destroys the LegoROI, cleaning up children and name resources. More... | |
LegoResult | Read (OrientableROI *p_unk0xd4, Tgl::Renderer *p_renderer, ViewLODListManager *p_viewLODListManager, LegoTextureContainer *p_textureContainer, LegoStorage *p_storage) |
[AI] Reads and initializes this ROI from a LEGO project resource stream, populating geometry, color/texture, and children recursively. More... | |
LegoROI * | FindChildROI (const LegoChar *p_name, LegoROI *p_roi) |
[AI] Recursively searches for a child ROI by name, starting at the given ROI. More... | |
LegoResult | FUN_100a8da0 (LegoTreeNode *p_node, const Matrix4 &p_matrix, LegoTime p_time, LegoROI *p_roi) |
[AI] [Unknown function. More... | |
LegoResult | SetFrame (LegoAnim *p_anim, LegoTime p_time) |
[AI] Sets the current animation frame for this ROI based on a parsed animation structure. More... | |
LegoResult | SetLodColor (LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha) |
[AI] Sets the RGBA color for all LODs and recursively for all children. More... | |
LegoResult | SetTextureInfo (LegoTextureInfo *p_textureInfo) |
[AI] Associates every LOD in this ROI (and sub-ROIs) with a given texture (palette/material information). More... | |
LegoResult | GetTextureInfo (LegoTextureInfo *&p_textureInfo) |
[AI] Attempts to retrieve a texture info pointer used by any LOD in this ROI or its children. More... | |
LegoResult | FUN_100a9330 (LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha) |
[AI] Alias to SetLodColor; applies color to all LODs and children. More... | |
LegoResult | SetLodColor (const LegoChar *p_name) |
[AI] Sets all LOD and child colors based on a named logical color alias. More... | |
LegoResult | FUN_100a93b0 (const LegoChar *p_name) |
[AI] Like SetLodColor, but uses a different implementation or legacy style. More... | |
LegoU32 | FUN_100a9410 (Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3, LegoBool p_collideBox) |
[AI] Tests for collision along or within sphere/box, and computes intersection point as needed. More... | |
void | SetName (const LegoChar *p_name) |
[AI] Sets this ROI's name, replacing the previous (converted to lower-case). More... | |
float | IntrinsicImportance () const override |
[AI] Returns the importance rating for LOD/visibility management (fixed value). More... | |
void | UpdateWorldBoundingVolumes () override |
[AI] Updates this ROI's world-space bounding volumes based on its local-to-world transform. More... | |
void | ClearMeshOffset () |
[AI] Resets mesh offset for all LODs in this ROI. More... | |
void | SetDisplayBB (int p_displayBB) |
[AI] Sets whether to display or hide the bounding box. More... | |
const LegoChar * | GetName () const |
[AI] Gets this ROI's name. More... | |
LegoEntity * | GetEntity () |
[AI] Gets the entity associated with this ROI (or NULL). More... | |
BoundingSphere & | GetBoundingSphere () |
[AI] Accesses the local bounding sphere object. More... | |
void | SetEntity (LegoEntity *p_entity) |
[AI] Associates a LegoEntity with this ROI (typically called by parent entity/logic). More... | |
void | SetComp (CompoundObject *p_comp) |
[AI] Attaches a new CompoundObject pointer (container for child ROIs). More... | |
void | SetBoundingSphere (const BoundingSphere &p_sphere) |
[AI] Sets the local and world bounding spheres. More... | |
void | SetUnknown0x80 (const BoundingBox &p_unk0x80) |
[AI] Sets the local bounding box from read data. More... | |
![]() | |
ViewROI (Tgl::Renderer *pRenderer, ViewLODList *lodList) | |
[AI] Constructs a ViewROI with the specified renderer and LOD list. More... | |
~ViewROI () override | |
[AI] Destructor cleans up internal geometry and releases LOD list reference. More... | |
void | SetLODList (ViewLODList *lodList) |
[AI] Sets the ViewLODList for this ROI, managing reference counting. More... | |
float | IntrinsicImportance () const override |
[AI] Returns the intrinsic importance of this ROI, used for LOD or sorting. More... | |
void | VTable0x1c () override |
[AI] Updates internal state, potentially related to animation or LOD switching (exact purpose unclear). More... | |
void | SetLocalTransform (const Matrix4 &p_transform) override |
[AI] Sets the local transformation; propagates to the underlying geometry group. More... | |
void | VTable0x24 (const Matrix4 &p_transform) override |
[AI] Updates an internal transformation, synchronizing ROI and geometry. More... | |
virtual Tgl::Group * | GetGeometry () |
[AI] Returns a pointer to this ROI's Tgl::Group geometry for rendering and manipulation. More... | |
virtual const Tgl::Group * | GetGeometry () const |
[AI] Returns a const pointer to this ROI's Tgl::Group geometry. More... | |
int | GetUnknown0xe0 () |
[AI] Gets the value of an internal state field at offset 0xe0. More... | |
void | SetUnknown0xe0 (int p_unk0xe0) |
[AI] Sets the value of the internal state field at offset 0xe0. More... | |
![]() | |
OrientableROI () | |
Default constructor. More... | |
const float * | GetWorldVelocity () const override |
Returns a pointer to the object's velocity vector in world space. More... | |
const BoundingBox & | GetWorldBoundingBox () const override |
Returns the object's bounding box in world coordinates. More... | |
const BoundingSphere & | GetWorldBoundingSphere () const override |
Returns the object's bounding sphere in world coordinates. More... | |
virtual void | VTable0x14 () |
[AI] Calls VTable0x1c(). More... | |
virtual void | UpdateWorldBoundingVolumes ()=0 |
Recalculates all world bounding volumes from the current local-to-world transform. More... | |
virtual void | VTable0x1c () |
[AI] Concrete subclass implementation should implement this to perform post-bounding-volume-change logic. More... | |
virtual void | SetLocalTransform (const Matrix4 &p_transform) |
Sets the local-to-world transformation matrix directly. More... | |
virtual void | VTable0x24 (const Matrix4 &p_transform) |
Post-multiplies the current local-to-world matrix by p_transform. More... | |
virtual void | UpdateWorldData (const Matrix4 &p_transform) |
Applies p_transform in (presumably) parent coordinates and updates world data for self and children. More... | |
virtual void | UpdateWorldVelocity () |
Updates the world velocity (must be implemented by subclasses if custom velocity logic is needed). More... | |
void | WrappedSetLocalTransform (const Matrix4 &p_transform) |
Wraps SetLocalTransform, for possible override or interface uniformity. More... | |
void | UpdateTransformationRelativeToParent (const Matrix4 &p_transform) |
Calculates and updates the world transform relative to this object's parent, then calls UpdateWorldData. More... | |
void | WrappedVTable0x24 (const Matrix4 &p_transform) |
Wraps VTable0x24, possibly for decoupling or uniform invocation. More... | |
void | GetLocalTransform (Matrix4 &p_transform) |
Retrieves the local-to-world transformation, or if there is a parent, computes the transform relative to it. More... | |
void | FUN_100a58f0 (const Matrix4 &p_transform) |
Assigns the given matrix as the local-to-world transformation and enables some internal flags. More... | |
void | FUN_100a5a30 (const Vector3 &p_world_velocity) |
Sets the world velocity to the provided vector. More... | |
const Matrix4 & | GetLocal2World () const |
Accessor for the current local-to-world transformation matrix. More... | |
const float * | GetWorldPosition () const |
Returns a pointer to the world position from the transformation matrix (translation row). More... | |
const float * | GetWorldDirection () const |
Returns a pointer to the world direction vector (forward axis) from the transformation matrix. More... | |
const float * | GetWorldUp () const |
Returns a pointer to the world up vector from the transformation matrix. More... | |
OrientableROI * | GetParentROI () const |
Accessor for the parent ROI in the transformation hierarchy. More... | |
void | SetParentROI (OrientableROI *p_parentROI) |
Sets the parent ROI used for transformation hierarchy. More... | |
void | ToggleUnknown0xd8 (BOOL p_enable) |
Enables or disables some bitfields in the internal unknown status variable m_unk0xd8. More... | |
![]() | |
ROI () | |
[AI] Constructs an empty ROI, initially visible with no LOD or compound object assigned. More... | |
virtual | ~ROI () |
[AI] Destroys the ROI and asserts that 'comp' and 'lods' are managed/deleted by derived types. More... | |
virtual float | IntrinsicImportance () const =0 |
[AI] Returns the intrinsic importance (used for LOD selection, culling etc). More... | |
virtual const float * | GetWorldVelocity () const =0 |
[AI] Returns the object's world-space velocity as a pointer to float values. More... | |
virtual const BoundingBox & | GetWorldBoundingBox () const =0 |
[AI] Returns the world-space bounding box of the object. More... | |
virtual const BoundingSphere & | GetWorldBoundingSphere () const =0 |
[AI] Returns the world-space bounding sphere of the object. More... | |
const LODListBase * | GetLODs () const |
[AI] Returns the LOD list associated with this ROI, or NULL if not set. More... | |
const LODObject * | GetLOD (int i) const |
[AI] Returns the LODObject at the specified index. More... | |
int | GetLODCount () const |
[AI] Returns the number of available LODs for this ROI. More... | |
const CompoundObject * | GetComp () const |
[AI] Returns the pointer to the compound object structure, or NULL if not present. More... | |
unsigned char | GetVisibility () |
[AI] Returns the visibility flag; true if visible, false if hidden. More... | |
void | SetVisibility (unsigned char p_visible) |
[AI] Sets the visibility flag to the provided value. More... | |
Additional Inherited Members | |
![]() | |
enum | { c_bit1 = 0x01 , c_bit2 = 0x02 } |
![]() | |
static void | FUN_100a8e80 (LegoTreeNode *p_node, Matrix4 &p_matrix, LegoTime p_time, LegoROI **p_roiMap) |
[AI] [Static] Recursively evaluates animation nodes, updating the transformation matrices and visibility for ROI instances using a mapping table. More... | |
static void | FUN_100a8fd0 (LegoTreeNode *p_node, Matrix4 &p_matrix, LegoTime p_time, LegoROI **p_roiMap) |
[AI] [Static] Similar to FUN_100a8e80, but only updates transformation matrices, not visibility or invocation. More... | |
static LegoResult | FUN_100a8cb0 (LegoAnimNodeData *p_data, LegoTime p_time, Matrix4 &p_matrix) |
[AI] [Static] Sets the transform matrix for a given animation node at a specific time. More... | |
static void | FUN_100a81b0 (const LegoChar *p_error, const LegoChar *p_name) |
[AI] [Static] Prints or logs an error message about missing ROI for animation (no-op in release). More... | |
static void | configureLegoROI (int p_roi) |
[AI] [Static] Configures the global ROI loading limit, controlling max LODs at load time. More... | |
static void | SetColorOverride (ColorOverride p_colorOverride) |
[AI] [Static] Sets the global color override callback function to allow palette remapping or customization. More... | |
static LegoBool | GetRGBAColor (const LegoChar *p_name, float &p_red, float &p_green, float &p_blue, float &p_alpha) |
[AI] [Static] Resolves a logical color alias into RGBA floats. More... | |
static LegoBool | ColorAliasLookup (const LegoChar *p_param, float &p_red, float &p_green, float &p_blue, float &p_alpha) |
[AI] [Static] Looks up a color alias in the static alias table and sets p_red/p_green/p_blue/p_alpha with normalized [0..1] floats. More... | |
static LegoBool | GetPaletteEntries (const LegoChar *p_name, unsigned char *paletteEntries, LegoU32 p_numEntries) |
[AI] [Static] Fetches palette entries for a named texture using current texture handler. More... | |
![]() | |
static undefined | SetUnk101013d8 (undefined p_flag) |
[AI] Sets the global flag g_unk101013d8 and returns its previous value. More... | |
![]() | |
void | UpdateWorldData (const Matrix4 &parent2world) override |
[AI] Updates object's and geometry's world transformation based on parent's world matrix. More... | |
![]() | |
Tgl::Group * | geometry |
[AI] Root group for all geometry/renderable objects for this ROI. More... | |
int | m_unk0xe0 |
[AI] Unidentified state integer, typically initialized to -1. More... | |
![]() | |
MxMatrix | m_local2world |
The transform from local to world space; 4x4 transformation matrix. More... | |
BoundingBox | m_world_bounding_box |
The object's axis-aligned bounding box in world space, recalculated as needed. More... | |
BoundingBox | m_unk0x80 |
An unknown bounding box; usage unclear, could be related to extended collision or volume testing. More... | |
BoundingSphere | m_world_bounding_sphere |
The object's bounding sphere in world space, recalculated from m_local2world. More... | |
Mx3DPointFloat | m_world_velocity |
The object's velocity vector in world coordinates. More... | |
OrientableROI * | m_parentROI |
If non-null, points to the parent OrientableROI for local/world transformation hierarchy. More... | |
undefined4 | m_unk0xd8 |
Unknown status or flag field; bits manipulated via ToggleUnknown0xd8, possibly related to dirty state or internal update need. More... | |
![]() | |
CompoundObject * | comp |
[AI] List of sub-ROIs composing this ROI (compound object), or NULL. [AI] More... | |
LODListBase * | lods |
[AI] Pointer to list of LODObject instances, or NULL if not set. [AI] More... | |
unsigned char | m_visible |
[AI] Visibility flag: nonzero = visible. [AI] More... | |
[AI] An extension of LegoROI that adds support for keeping and applying a base time reference (used for time-based animation/control).
[AI] Stores a start/reference time, used in movement or animation interpolation. @size 0x10c [AI] @vtable LEGO1 0x100dbea8 [AI]
TimeROI::TimeROI | ( | Tgl::Renderer * | p_renderer, |
ViewLODList * | p_lodList, | ||
LegoTime | p_time | ||
) |
[AI] Creates a TimeROI with reference time and LOD geometry.
p_renderer | [AI] The renderer/context. |
p_lodList | [AI] The view LOD list. |
p_time | [AI] Start or reference time for animation. |
Definition at line 733 of file legoroi.cpp.
[AI] Updates animated position/offset by integrating movement since last update (applying time delta).
p_matrix | [AI] New matrix to compare/reference. |
p_time | [AI] Current time. |
Definition at line 740 of file legoroi.cpp.