Public Member Functions | Public Attributes

TessApprox Class Reference

Search for all occurrences

Detailed Description

See also:
Class NURBSSet.

Description:
This class is available in release 2.0 and later only.

This class describes the properties of a tesselation approximation to the mathematical surface.

All methods of this class are implemented by the system.
Data Members:
TessType type;

These are the types of tesselation (one of which is obsolete). One of the following values:

TESS_SET

This is the old form of tesselation for Bezier Patches. This is also the default for these patches. For instance, if you create a Quad Patch and apply an Edit Patch modifier, then exit sub-object mode, you'll see a panel in the rollup for 'Tesselation'. The top choice is 'Fixed (original)'. This is the same type of tesselation done in 3ds Max 1.x.

TESS_PARAM

Specifies parametric tesselation. This provides for a fixed number of u by v tesselations. There are u times v quadrilaterals and each one is split up into two triangles.

TESS_SPATIAL

Specifies spatial tesselation. This uses edge as its parameter. This specifies that the size of the tesselation will be the edge length (see below). In view dependent tesselation edge is specified in pixels.

TESS_CURVE

Specifies view dependent tesselation. This uses the ang and dist data members described below.

TESS_LDA

This option is available in release 3.0 and later only.

Specifies a method which combines the spatial (edge-length) method and the curvature (distance and angle) methods. This uses the ang, dist and edge data members below.

TESS_REGULAR

This option is available in release 3.0 and later only.

Generates a fixed, regular tessellation across the surface. There are no additional parameters.

TESS_ISO

Obsolete -- Do Not Use.

ViewConfig vpt_cfg;

This determines what is displayed in the interactive renderer. These correspond to the controls in the user interface (under Surface/Approximation/Viewports). This is not available for bezier patches. One of the following values:

ISO_ONLY

Only Iso lines. Iso(parametric) lines are similar to contour lines. The lines show where the NURBS surface has a constant U value or V value or both. Iso line representations can be less crowded and easier to visualize than wire mesh representations..

ISO_AND_MESH

Iso lines and the mesh. When chosen, wireframe viewports display iso line representations of the surface, and shaded viewports display the shaded surface.

MESH_ONLY

Just the mesh. When chosen, wireframe viewports display the surface as a wire mesh, and shaded viewports display the shaded surface. In wireframe viewports, this option lets you see the curve approximation used for viewports.

TessSubdivStyle subdiv;

This data member is available in release 3.0 and later only.

The type of subdivision. One of the following values:

SUBDIV_TREE

Subdivides the surface using a binary tree.

SUBDIV_GRID

Subdivides the surface using a regular grid.

SUBDIV_DELAUNAY

Subdivides the surface using nearly equilateral triangles.

BOOL view;

Specifies if this is view dependent tesselation. If TRUE this will tesselate less finely the farther away from the camera the object is. If FALSE the tesselation does not change based on distance from the camera.

int u;

This is used for parametric tesselation. This is the number of tesselations in u. This is the number of sub-divisions for a knot span for the surface.

int v;

This is used for parametric tesselation. This is the number of tesselations in v.

int u_iso;

This is used with the ISO line display. This is the number of additional interior iso lines in u (there are always lines along the outter edges).

int v_iso;

This is used with the ISO line display. This is the number of additional interior iso lines in v (there are always lines along the outter edges).

float ang;

This is used in curvature dependent tesselation (TESS_CURVE). If 0.0 is specified this is ignored. If specified this ensure that no two adjacent face normals exceed this angle between them. This value is specified in radians.

float dist;

This is used in curvature dependent tesselation (TESS_CURVE). If 0.0 is specified this is ignored. This specifies a distance that cannot be exceeded between a vertex on the mesh and the mathematical surface. This is defined as a percentage of the diagonal of the bounding box of the individual surface in object space. For instance if this was set to 1.0, the allowable error in generating a tesselation would be 1% of the bounding box diagonal distance of the surface. This would be 1/100 (1 %) of the diagonal distance of the bounding box. In this way if an object is scaled the tesselation remains the same. Additionally, if you have an object with a big surface and a little surface, the smaller surface will get tesselated more finely because its own bounding box is used. This prevents the smaller surface from just becoming a single triangle for example.

float edge;

This is the length of an edge to use in spatial (TESS_SPATIAL) tesselation. In view dependent tesselation this is specified in pixels. If not in view dependent tesselation this is a percentage of the bounding box diagonal length.

int minSub;

This data member is available in release 3.0 and later only.

For Grid or Tree subdivisions, this limit controls the number of recursive decompositions that are performed during tessellation. This is the minimum number of recursions.

int maxSub;

This data member is available in release 3.0 and later only.

For Grid or Tree subdivisions, this limit controls the number of recursive decompositions that are performed during tessellation. This is the maximum number of recursions.

int maxTris;

This data member is available in release 3.0 and later only.

For Delaunay subdivision, this specifies the maximum mumber of triangles into which the surface will be divided.

#include <maxtess.h>

Inheritance diagram for TessApprox:
Inheritance graph
[legend]

List of all members.

Public Member Functions

UtilExport  TessApprox ()
UtilExport  TessApprox (TessType type, float distance, float edge, float angle, TessSubdivStyle subdivStyle, int minSub, int maxSub, float m=0.0f)
UtilExport  TessApprox (const TessApprox &tess)
UtilExport TessApprox operator= (const TessApprox &tess)
UtilExport int  operator== (const TessApprox &tess) const
UtilExport IOResult  Load (ILoad *iload)
UtilExport IOResult  Save (ISave *isave)

Public Attributes

TessType  type
ViewConfig  vpt_cfg
TessSubdivStyle  subdiv
BOOL  view
float  merge
int  u
int  v
int  u_iso
int  v_iso
float  ang
float  dist
float  edge
int  minSub
int  maxSub
int  maxTris
BOOL  showInteriorFaces

Constructor & Destructor Documentation

UtilExport TessApprox ( )
Remarks:
Constructor. The data members are initialized as follows:

type = TESS_SET;

u = v = 2;

u_iso = 2;

v_iso = 3;

view = FALSE;

ang = 20.0f;

dist = 10.0f;

edge = 10.0f;

vpt_cfg = ISO_AND_MESH;

merge = 0.0f;

minSub = 0;

maxSub = 5;

maxTris = 20000;

subdiv = SUBDIV_TREE;

showInteriorFaces = FALSE;
UtilExport TessApprox ( TessType  type,
float  distance,
float  edge,
float  angle,
TessSubdivStyle  subdivStyle,
int  minSub,
int  maxSub,
float  m = 0.0f 
)
Remarks:
Constructor. The data members are initialized to the values passed.
UtilExport TessApprox ( const TessApprox tess )
Remarks:
Constructor. The data members are initialized from the object passed.
Operators:

Member Function Documentation

UtilExport TessApprox& operator= ( const TessApprox tess )
Remarks:
Assignment operator.
Parameters:
const TessApprox &tess

The object to assign.
UtilExport int operator== ( const TessApprox tess ) const
Remarks:
Equality operator. Returns nonzero if they are equal; otherwise zero.
Parameters:
const TessApprox &tess

The object to compare.
UtilExport IOResult Load ( ILoad iload )
UtilExport IOResult Save ( ISave isave )

Member Data Documentation

TessType type
ViewConfig vpt_cfg
TessSubdivStyle subdiv
BOOL view
float merge
int u
int v
int u_iso
int v_iso
float ang
float dist
float edge
int minSub
int maxSub
int maxTris

TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox
TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox TessApprox