MAV_objectIntersection - Object/line intersection.

[ Maverik Level 2 typedefs ]

#

MAV_objectIntersection

## Summary

Object/line intersection.

## Syntax

    typedef struct {
      float pt1;
      float pt2;
      MAV_vector intpt;
      MAV_vector surnorm;
    } MAV_objectIntersection;

## Description

The object intersection data structure, `MAV_objectIntersection`, is used by intersection callback routines to report the details of an object/line intersection test.

Currently, the only data held in this structure is `pt1` -- the distance from the line's origin to the first intersection of the line with the object. This value should be set to a negative number if the line does not intersect the object (under these circumstances the intersection callback routine should also return `MAV_FALSE`). If the line originates inside the object, `pt1` is zero.

The `MAV_objectIntersection` for the object with the closest intersection distance forms the `objint` field in event callback data structures such as `MAV_keyboardEvent`.

(This data structure needs re-redesigning, and may well change in the future.)

Back to the index page.