Class CollisionVNormal

3DS Max Plug-In SDK

Class CollisionVNormal

See Also: Class ICollision, Class CollisionOps, Class CollisionPlane, Class CollisionSphere, Class CollisionMesh, Class Box3, Class Point3

class CollisionVNormal

Description:

This class is available in release 4.0 and later only.

This class represents a general list of collision vertex normals.

Data Members:

public:

Point3 norm;

The normal vector

DWORD smooth;

The smoothing flag.

CollisionVNormal *next;

A pointer to the next normal in the linked list.

BOOL init;

The initialization flag.

Methods:

public:

Prototype:

CollisionVNormal();

Remarks:

Constructor.

Default Implementation:

{smooth=0;next=NULL;init=FALSE;norm=Point3(0,0,0);}

Prototype:

CollisionVNormal(Point3 &n,DWORD s);

Remarks:

Constructor.

Parameters:

Point3 &n

The vector to initialize with.

DWORD s

The smoothing flag to initialize with.

Default Implementation:

{next=NULL;init=TRUE;norm=n;smooth=s;}

Prototype:

~CollisionVNormal();

Remarks:

Destructor.

Default Implementation:

{delete next;}

Prototype:

void AddNormal(Point3 &n,DWORD s);

Remarks:

Add a vector to the list.

Parameters:

Point3 &n

The vector to add.

DWORD s

The smoothing flag to add.

Prototype:

Point3 &GetNormal(DWORD s);;

Remarks:

Returns the specified normal from the list.

Parameters:

DWORD s

The index of the normal in the list.

Prototype:

void Normalize();

Remarks:

This method normalizes the vector.