[ Maverik Level 2 functions ]

#

mav_boxBB

mav_boxBB, mav_compositeBB, mav_coneBB, mav_ctorusBB, mav_cylinderBB, mav_ellipseBB, mav_facetBB, mav_hellipseBB, mav_hsphereBB, mav_polylineBB, mav_polygonBB, mav_polygonGrpBB, mav_pyramidBB, mav_rectangleBB, mav_rtorusBB, mav_SMSObjBB, mav_sphereBB, mav_teapotBB, mav_textBB, mav_avatarBB, mav_TDMCursorBB

## Summary

Compute axis-aligned bounding box for Maverik default object classes.

## Syntax

int mav_boxBB(MAV_object *o, MAV_BB *bb);

int mav_compositeBB(MAV_object *o, MAV_BB *bb);

int mav_coneBB(MAV_object *o, MAV_BB *bb);

int mav_ctorusBB(MAV_object *o, MAV_BB *bb);

int mav_cylinderBB(MAV_object *o, MAV_BB *bb);

int mav_ellipseBB(MAV_object *o, MAV_BB *bb);

int mav_facetBB(MAV_object *o, MAV_BB *bb);

int mav_hellipseBB(MAV_object *o, MAV_BB *bb);

int mav_hsphereBB(MAV_object *o, MAV_BB *bb);

int mav_polylineBB(MAV_object *o, MAV_BB *bb);

int mav_polygonBB(MAV_object *o, MAV_BB *bb);

int mav_polygonGrpBB(MAV_object *o, MAV_BB *bb);

int mav_pyramidBB(MAV_object *o, MAV_BB *bb);

int mav_rectangleBB(MAV_object *o, MAV_BB *bb);

int mav_rtorusBB(MAV_object *o, MAV_BB *bb);

int mav_SMSObjBB(MAV_object *o, MAV_BB *bb);

int mav_sphereBB(MAV_object *o, MAV_BB *bb);

int mav_teapotBB(MAV_object *o, MAV_BB *bb);

int mav_textBB(MAV_object *o, MAV_BB *bb);

int mav_avatarBB(MAV_object *o, MAV_BB *bb);

int mav_TDMCursorBB(MAV_object *o, MAV_BB *bb);

## Description

mav_boxBB (and the corresponding functions for other object classes) computes the axis-aligned bounding box for object `o`, returning the result in `bb`. mav_boxBB is optimised for speed at the expense of accuracy, and computes a box which may be an over-estimate of the true dimensions of the bounding box. This function is registered by mav_initialise as the default bounding box callback for each object class.

A corresponding set of bounding box computation functions named mav_boxBB2 (and similarly for other object classes) is also available, for applications which require an accurate (but necessarily slower) computation of the bounding box.

Explain BB2

Back to the index page.