Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RwBBox
[Geometrical Types]


Data Structures

struct   RwBBox

Functions

RwBBox RwBBoxCalculate (RwBBox *boundBox, const RwV3d *verts, RwInt32 numVerts)
RwBBox RwBBoxInitialize (RwBBox *boundBox, const RwV3d *vertex)
RwBBox RwBBoxAddPoint (RwBBox *boundBox, const RwV3d *vertex)
RwBool  RwBBoxContainsPoint (const RwBBox *boundBox, const RwV3d *vertex)

Detailed Description

Bounding Box

RwBBox Overview

Requirements

Overview

RenderWare Graphics Bounding Box datatype. This object defines a bounding-box. It is used in a number of RenderWare objects to define sizes, boundaries or collision-detection zones. Aside from basic initialization, functionality is also provided for resizing the bounding-box to enclose an arbitrary point.

More information can be found in the Fundamentals chapter of the User Guide.


Function Documentation

RwBBox* RwBBoxAddPoint RwBBox   boundBox,
const RwV3d   vertex
 

RwBBoxAddPoint is used to adjust the specified bounding-box so that it contains the specified vertex. The bounding-box must have been previously initialized with a single vertex or calculated from an array of vertices.

Parameters:
boundBox  Pointer to the bounding-box.
vertex  Pointer to a RwV3d value containing the position of the vertex.
Returns:
Returns a pointer to the bounding-box if successful, or NULL if there is an error.
See also:
RwBBoxCalculate , RwBBoxContainsPoint , RwBBoxInitialize
RwBBox* RwBBoxCalculate RwBBox   boundBox,
const RwV3d   verts,
RwInt32    numVerts
 

RwBBoxCalculate is used to calculate the axis-aligned bounding-box of the specified array of 3D points.

Parameters:
boundBox  Pointer to the bounding-box.
verts  An array of vertex positions.
numVerts  A RwInt32 value equal to the number of vertices in the array.
Returns:
Returns a pointer to the bounding-box if successful, or NULL if there is an error.
See also:
RwBBoxAddPoint , RwBBoxContainsPoint , RwBBoxInitialize
RwBool RwBBoxContainsPoint const RwBBox   boundBox,
const RwV3d   vertex
 

RwBBoxContainsPoint is used to test whether the specified vertex falls within the given bounding-box. Points lying exactly on the box’s boundary are considered to be inside the box.

Parameters:
boundBox  Pointer to the bounding-box.
vertex  Pointer to a RwV3d value containing the position of the vertex.
Returns:
Returns TRUE if vertex lies inside box or FALSE otherwise, or if there is an error.
See also:
RwBBoxAddPoint , RwBBoxCalculate , RwBBoxInitialize
RwBBox* RwBBoxInitialize RwBBox   boundBox,
const RwV3d   vertex
 

RwBBoxInitialize is used to initialize a bounding-box. The bounding-box is initialized with both the infimum and supremum vertices set to the supplied vertex. A bounding-box normally has the infimum and supremum vertices set to different values, otherwise it is just a point. Therefore, initialization is a two-stage process actually completed by a making a subsequent call to the RwBBoxAddPoint function.

(This two-stage system proves its usefulness when calculating bounding-boxes that contain an arbitrary number of vectors.)

Parameters:
boundBox  Pointer to the bounding-box structure to fill in.
vertex  Pointer to the first vertex to initialize with.
Returns:
Returns a pointer to the bounding-box if successful, or NULL if there is an error.
See also:
RwBBoxAddPoint , RwBBoxCalculate , RwBBoxContainsPoint

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:13 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)