mav_SMSObjListNew(3)

NAME
mav_SMSObjListNew - Create an SMS

LEVEL
Maverik Level 1

SYNTAX
MAV_SMS *mav_SMSObjListNew(void);

MAV_SMS *mav_SMSHBBNew(void);

DESCRIPTION
These function create and return an initialised SMS of the specified type.

mav_SMSObjListNew
    This function creates an "object list" type of SMS. This is the simplest type of SMS and stores objects as a linked list in the order in which they were inserted. View frustum culling is performed when this SMS is displayed by calculating the axis aligned bounding box of each object to determine if it is visible.

mav_SMSHBBNew
    This function create a "hierarchical bounding box" type of SMS. This type of SMS is designed to store the static objects in the scene, i.e. those who's size or position does not change. This restriction means that upon insertion the object's axis aligned bounding box can be calculated and stored for efficiency rather than being re-calculated each time it is required which is the case for the "object list" SMS. Furthermore, as objects are inserted a hierarchy of BB's is built up with the object's BB at the leaf nodes. Testing a BB determines the action required for all the objects beneath it in the hierarchy. View frustum culling is performed when this SMS is displayed by testing the BB's in the hierarchy which indicates either:

that all objects beneath it can be removed from further consideration if the BB lies completely outside the view frustum;

that all objects beneath it need to be displayed if the BB lies completely inside the view frustum;

or, if the BB intersects the frustum, that the BB for the next level down in the hierarchy needs to be checked.