BRender Technical Reference Manual:4 Data Structures (Alphabetical Reference):br_bounds
Next|Prev|Up
The Structure
Members
Operations
BrBoundsToMatrix34()
Copy/Assign
Initialisation

br_bounds


The Structure

A data structure describing an axis-aligned bounding box for a model or hierarchy of actors.

The typedef

(See vector.h for precise declaration and ordering)

br_vector3 min Minimal corner

br_vector3 max Maximal corner

Related Functions

Scene Modelling

See BrScenePick3D()
82.

Image Support

See BrOnScreenCheck()249.

Related Structures

Note that this structure is not used by the render bounds call-back function (it represents its bounds in pixel co-ordinates).

Scene Modelling

See br_actor74, br_model228.

Members

br_vector3 min

Co-ordinates of the minimal corner of the bounding box.

br_vector3 max

Co-ordinates of the maximal corner of the bounding box.

Operations


BrBoundsToMatrix34()

Description:
Find the transform that maps a 2 unit cube centred at the origin to the given bounding box.

Declaration:
br_matrix34* BrBoundsToMatrix34(br_matrix34* mat, const br_bounds* bounds)

Arguments:
br_matrix34 * mat

A non-Null pointer to the destination matrix, into which will be placed the transform.

const br_bounds * bounds

A non-Null pointer to the bounding box.

Effects:
Will calculate the transform required to transform a 2 unit cube centred at the origin to the given bounding box.

Result:
br_matrix34 *

The pointer to the destination matrix, mat, returned for convenience.

Remarks:
Typically used to facilitate 3D cursors, e.g. a child model actor with a cursor model whose co-ordinates are based upon a 2 unit cube, can use this function to define its transform.

See Also:
br_actor
74


Copy/Assign

Copy by assignment.

Initialisation

Use vector initialisers, e.g.

br_bounds my_bounds={BR_VECTOR3(-1.,-2.,-3.), BR_VECTOR3(1.,2.,3.)};

Generated with
CERN WebMaker