Isle
Loading...
Searching...
No Matches
realtime.h File Reference
#include "matrix.h"
#include "roi.h"
Include dependency graph for realtime.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NORMVEC3(dst, src)
 [AI] Normalizes the given 3D vector, storing the result in the destination (dst) array. More...
 

Functions

void CalcLocalTransform (const Vector3 &p_posVec, const Vector3 &p_dirVec, const Vector3 &p_upVec, Matrix4 &p_outMatrix)
 [AI] Computes a transformation matrix based on a position, direction, and up vector. More...
 
void CalcWorldBoundingVolumes (const BoundingSphere &modelling_sphere, const Matrix4 &local2world, BoundingBox &, BoundingSphere &)
 [AI] Computes the world-space bounding box and bounding sphere for an ROI using a modeling sphere and a transformation matrix. More...
 

Macro Definition Documentation

◆ NORMVEC3

#define NORMVEC3 (   dst,
  src 
)
Value:
{ \
double len = sqrt(NORMSQRD3(src)); \
VDS3(dst, src, len); \
}
#define NORMSQRD3(v)
Definition: vec.h:474

[AI] Normalizes the given 3D vector, storing the result in the destination (dst) array.

[AI]

[AI] NORMVEC3(dst, src) calculates the length of 'src', and divides each component of 'src' by its length, writing the normalized vector into 'dst'. [AI]

Definition at line 9 of file realtime.h.

Function Documentation

◆ CalcLocalTransform()

void CalcLocalTransform ( const Vector3 p_posVec,
const Vector3 p_dirVec,
const Vector3 p_upVec,
Matrix4 p_outMatrix 
)

[AI] Computes a transformation matrix based on a position, direction, and up vector.

[AI]

Parameters
p_posVecWorld position vector (translation) to use for transformation. [AI]
p_dirVecWorld direction vector (Z axis of the matrix). This will be normalized. [AI]
p_upVecWorld up vector (Y axis of the matrix). This will be normalized and orthogonalized. [AI]
p_outMatrixOutput parameter to receive the resulting 4x4 transformation matrix, built from the supplied vectors. [AI]

[AI] The resulting matrix is suitable for orienting/repositioning an object in 3D space: the direction is used for the forward axis, up for vertical axis, and the function ensures all axes are orthogonal and normalized. [AI]

Definition at line 7 of file realtime.cpp.

◆ CalcWorldBoundingVolumes()

void CalcWorldBoundingVolumes ( const BoundingSphere modelling_sphere,
const Matrix4 local2world,
BoundingBox world_bounding_box,
BoundingSphere world_bounding_sphere 
)

[AI] Computes the world-space bounding box and bounding sphere for an ROI using a modeling sphere and a transformation matrix.

[AI]

Parameters
modelling_sphereThe source bounding sphere describing the object in its local/model space. [AI]
local2worldTransformation matrix converting local coordinates to world coordinates. [AI]
[out]BoundingBoxOutput axis-aligned bounding box computed in world space. [AI]
[out]BoundingSphereOutput bounding sphere transformed to world space. [AI]

[AI] Helper utility for ROI (Real-time Object Instance) classes, typically used in update_world_bounding_volumes() to create world-space volumes for culling or collision, by transforming an existing modeling sphere. [AI]

Definition at line 163 of file orientableroi.cpp.