Class ISectList

3DS Max Plug-In SDK

Class ISectList

See Also: Structure ISect.

class ISectList

Description:

This class is available in release 2.0 and later only.

It provides a list of ray / triangle intersection sturctures (struct ISect). Methods are available for initializing the list, adding to the list, and selectively removing items from the list.

All methods of this class are implemented by the system.

Note the following global functions may be used to create and free instances of this class.

Function:

ISect *GetNewISect();

Remarks:

This global function is available in release 2.0 and later only.

Returns a pointer to a new ISect structure.

Function:

void DiscardISect(ISect *is);

Remarks:

This global function is available in release 2.0 and later only.

Deletes the ISect structure whose pointer is passed.

Parameters:

ISect *is

Points to the ISect structure to free.

Data Members:

public:

ISect *first;

A pointer to the first intersection.

Methods:

Prototype:

ISectList();

Remarks:

Constructor. The list is set to empty.

Prototype:

~ISectList();

Remarks:

Destructor. The list is freed. first is set to NULL.

Prototype:

BOOL IsEmpty();

Remarks:

Returns TRUE if the list is empty; otherwise FALSE.

Prototype:

void Add(ISect *is);

Remarks:

Adds the specified ISect to the list with the most distant layers first.

Parameters:

ISect *is

Points to the ISect structure to add to the list.

Prototype:

void Prune(float a);

Remarks:

Removes the ISect structures from the list whose t values are less than or equal to the specified value a.

Parameters:

float a

The ray parameter used for comparison.

Prototype:

void Init();

Remarks:

Deletes any items from the list and sets first to NULL.