geBox

Description: Box is a 3D Oriented Bounding Box

Source file: ...\genesis3d\OpenSource\Source\Math\Box.h

Contents:

Functions: Set, SetXForm, DetectCollisionBetween

Types: geBox

Changes for Genesis3D v1.6: None 

Types:

geBox
typedef struct geBox {
      // Note: all member variables are **PRIVATE**
      float               xScale, yScale, zScale; // the Box's scales along the Box's local frame axes
      // the Box's local frame origin lies at (0, 0, 0) in local space
      // these are the scaled Box axes in the global frame
      geVec3d        GlobalFrameAxes[3];
      // the transformation that takes the Box's axes from local space
      // to global space, and its inverse
      geXForm3d     Transform, TransformInv;
} geBox;

 

Return to Contents

Functions:

void geBox_Set(geBox* Box, float xScale, float yScale, float zScale, const geXForm3d* Transform);

Call this to set up a Box for the first time or when the Box's local frame axes scale(s) change

 Return to Contents

void geBox_SetXForm(geBox* Box, const geXForm3d* Transform);

Call this to set the Box's transformation matrix (does not change the scales of the Box's local frame axes)

Return to Contents

geBoolean geBox_DetectCollisionBetween(const geBox* Box1, const geBox* Box2);

returns GE_TRUE if the boxes overlap, GE_FALSE otherwise

Return to Contents