Class NURBSTextureSurface

3DS Max Plug-In SDK

Class NURBSTextureSurface

See Also: Class NURBSControlVertex, Class NURBSSurface, Class NURBSTexturePoint.

class NURBSTextureSurface

Description:

This class is available in release 2.5 and later only.

A NURBS texture surface is a surface associated with the surface sub-object. 3ds max uses the texture surface to control how materials are mapped. In effect, changing the texture surface stretches or otherwise changes the UV coordinates for the surface, altering the mapping.

This class provides access to the NURBS Texture Surface. This is a 2D (not 3D) surface that lives in the parameter space of the corresponding NURBSSurface which controls the texture mapping used by the NURBSSurface.

Methods:

Prototype:

NURBSTextureSurface();

Remarks:

Constructor. The data members are initialized as follows:

 mMapperType = kNMapDefault;

 mpPoints = NULL;

Prototype:

~NURBSTextureSurface();

Remarks:

Destructor. Any mpPoints are deleted.

Prototype:

NURBSTexSurfType MapperType();

Remarks:

This method is available in release 3.0 and later only.

Returns the NURBS Texture Surface Type. See List of NURBS Texture Surface Types.

Prototype:

void SetMapperType(NURBSTexSurfType type);

Remarks:

This method is available in release 3.0 and later only.

Sets the NURBS Texture Surface Type.

Parameters:

NURBSTexSurfType type

The type to set. See List of NURBS Texture Surface Types.

Prototype:

void SetParent(int index);

Remarks:

This method is available in release 3.0 and later only.

This sets the Id of the "source" surface for a kNMapSurfaceMapper texture surface, it should be NULL in other cases. This is only used if the NURBSTexSurfType is set the kNMapSufaceMapper. In that case the texture surface is generated by projecting the texture of another NURBS surface sub-object in the NURBS model. The projection travels along the direction of the normals of the source surface. Projected texture surfaces are relational. This method set the parent surface which is projected.

Parameters:

int index

The index in the NURBSSet of the source surface.

Prototype:

void SetParentId(NURBSId id);

Remarks:

This method is available in release 3.0 and later only.

This sets the index in the NURBSSet of the "source" surface for a kNMapSurfaceMapper texture surface. This is only used if the NURBSTexSurfType is set the kNMapSufaceMapper. In that case the texture surface is generated by projecting the texture of another NURBS surface sub-object in the NURBS model. The projection travels along the direction of the normals of the source surface. Projected texture surfaces are relational. This method set the parent surface which is projected.

Parameters:

NURBSId id

The ID of the source surface.

Prototype:

int GetParent();

Remarks:

This method is available in release 3.0 and later only.

Returns the index in the NURBSSet of the surface that's mapped.

Prototype:

NURBSId GetParentId();

Remarks:

This method is available in release 3.0 and later only.

Returns the ID of the surface that's mapped.

Prototype:

void SetNumPoints(int u, int v);

Remarks:

This method is available in release 3.0 and later only.

Sets the number of points in U and V for the texture surface.

Parameters:

int u

The number of points in U.

int v

The number of points in V.

Prototype:

int GetNumUPoints();

Remarks:

This method is available in release 3.0 and later only.

Returns the number of points in U.

Prototype:

int GetNumVPoints();

Remarks:

This method is available in release 3.0 and later only.

Returns the number of points in V.

Prototype:

void GetNumPoints(int &u, int &v);

Remarks:

This method is available in release 3.0 and later only.

Retrieves the number of points in U and V.

Parameters:

int &u

The number of points in U is returned here.

int &v

The number of points in V is returned here.

Prototype:

NURBSTexturePoint* GetPoint(int u, int v);

Remarks:

This method is available in release 3.0 and later only.

Returns a pointer to the specified NURBS Texture Point.

Parameters:

int u

Specifies the U point.

int v

Specifies the V point.

Prototype:

void SetPoint(int u, int v, NURBSTexturePoint& pnt);

Remarks:

This method is available in release 3.0 and later only.

Sets the specified NURBS Texture Point.

Parameters:

int u

Specifies the U point.

int v

Specifies the V point.

NURBSTexturePoint& pnt

The point to set.

Prototype:

NURBSTextureSurface & operator=(const NURBSTextureSurface& surf);

Remarks:

Assignment operator.

Parameters:

const NURBSTextureSurface& surf

The surface to assign.