AddNURBSObjects()
AddNURBSObjects() adds the specified NURBSSet to the specified object.
Parameters
- Object* obj - Points to the object to have the specified NURBSSet added to. This object must be a NURBS object (otherwise it will simply return 0).
- IObjParam* ip - The 3ds Max interface pointer. If non-NULL, this is used to get at the 3ds Max function to do unique naming.
If a NULL is specified the names are not made unique.
- NURBSSet *nset - Points to the NURBS set that is added to the object.
SetSurfaceApprox()
SetSurfaceApprox() sets the surface approximation characteristics of an existing NURBS object.
Parameters
- Object* obj - The NURBS object to modify.
- BOOL viewport - TRUE to set the viewport approximation settings; FALSE to set the rendering settings.
- TessApprox *tess - Specifies the properties of the tesselation approximation to the mathematical surface.
- BOOL clearSurfs=FALSE - This tells the NURBS object to clear any over-ridden values on individual surfaces. The NURBS UI
lets users set surface approximation value on individual surfaces that override the values for the whole object. When this
is TRUE, then these are cleared.
SetCurveApprox()
Sets the curve approximation characteristics of an existing NURBS object.
Parameters
- Object* obj - The NURBS object to modify.
- BOOL viewport - TRUE to set the viewport approximation settings; FALSE to set the rendering settings.
- TessApprox *tess - Specifies the properties of the tesselation approximation to the mathematical curve.
- BOOL clearSurfs - Tells the NURBS object to clear any overridden values on individual curves. The NURBS UI lets users set
surface approximation value on individual surfaces that override the values for the whole object. When this is TRUE, then
these are cleared.
SetDispApprox()
SetDispApprox() sets the displacement mapping approximation characteristics of an existing NURBS object.
Parameters
- Object* obj - The NURBS object to modify.
- TessApprox *tess - Specifies the properties of the tesselation approximation to the mathematical curve.
- BOOL clearSurfs - This tells the NURBS object to clear any over-ridden values on individual surfaces. The NURBS UI lets users
set surface approximation value on individual surfaces that override the values for the whole object. When this is TRUE, then
these are cleared.
SetSurfaceDisplaySettings()
SetSurfaceDisplaySettings() sets the display properties of an existing NURBS object.
Parameters
- Object* obj - The NURBS object to modify.
- NURBSDisplay& disp - The display properties to use. See NURBSDisplay.
GetSurfaceDisplaySettings()
GetSurfaceDisplaySettings() retrieves the display properties of an existing NURBS object.
Parameters
- Object* obj - The NURBS object to check.
- NURBSDisplay& disp - The display properties are returned here. See Class NURBSDisplay.
Transform()
Transform() transforms the specified sub-objects within the NURBS object passed. Note that the parameter xPack is used for the transformation
when Animate mode is on, and mat is used when Animate is off. This stems from the fact that 3ds Max delays creation of controllers
on NURBS sub-objects until they are animated.
Parameters
- Object* obj - The NURBS object whose sub-objects are modified.
- NURBSIdTab& ids - The table of NURBS Ids of the sub-objects to transform. These are the sub-objects within the 3ds Max NURBS
object obj that are transformed.
- SetXFormPacket& xPack - When Animate mode is on, this matrix is used for the transformation. See Class SetXFormPacket.
- Matrix3 mat - When not in Animate mode, this matrix is used for the transformation.
- TimeValue t - The time at which to do the transformation.
BreakCurve()
BreakCurve() takes a specified NURBS curve sub-object and generates two curves from it.
Parameters
- Object* obj - The NURBS object whose curve sub-object is broken.
- NURBSId id - The id of the curve sub-object to break.
- double u - The point along the curve at which the break is made.
- TimeValue t - The time at which the curve is broken. The u parameter is relative to the state of the curve at this time (for
instance if it's animated).
BreakSurface()
BreakSurface() takes the specified NURBS surface sub-object and generates two surfaces from it.
Parameters
- Object* obj - The NURBS object whose surface sub-object is broken.
- NURBSId id - The id of the surface sub-object to break.
- BOOL breakU - If TRUE the break occurs along a constant U parameter; otherwise along a constant V parameter.
- double param - The distance in U or V space that the break should happen in.
- TimeValue t - The time at which the surface is broken. The u parameter is relative to the state of the surface at this time
(for instance if it's animated).
JoinCurves()
JoinCurves() takes two curves and joins them together and makes a single curve out of them. That is, the endpoints of the two curve objects
are connected by new segments, and the two original curves are replaced by a single curve. Returns the NURBSId of the newly
joined curve.
Parameters
- Object* obj - The NURBS object whose curve sub-objects are joined.
- NURBSId id1 - The id of the first curve sub-object.
- NURBSId id2 - The id of the second curve sub-object.
- BOOL begin1 - Specifies if the beginning or the end of curve 1 if joined. If TRUE the beginning is used; otherwise the end
is used. The beginning of the curve is the point of minimum parameter value.
- BOOL begin2 - Specifies if the beginning or the end of curve 2 if joined. If TRUE the beginning is used; otherwise the end
is used. The beginning of the curve is the point of minimum parameter value.
- double tolerance - A distance in 3ds Max units. If the gap between the curves you are joining is greater than this value,
this function creates the join by first creating a blend curve and then joining the three parts. If the gap is less than this
value, or if the curves are overlapping or coincident, no blend is created. Creating a blend and then joining the three curves
into a single curve is the better technique. The result matches the parent curves well. Without the blend step, the resulting
curve can deviate from the parent curves, in order to maintain smoothness. (The amount of deviation depends on how far from
tangent the two input curves were at the join.). A problem arises when there is a gap but it is too small. In this case, this
function generates the blend but because there isn't enough room for it, the resulting curve has a loop in it. To avoid this
loop, set this parameter higher than the gap distance. If you use a value of 0.0, the function chooses a value to use for
the tolerance.
- double ten1 - Specifies the tension of the new curve at the end of the first curve sub-object.
- double ten2 - Specifies the tension of the new curve at the end of the second curve sub-object.
- TimeValue t - The time at which the curves are joined.
JoinSurfaces()
JoinSurfaces() takes two surfaces and joins them together and makes a single surface out of them. That is, the specified edges of the two
surface objects are connected by a new surface, and the two original surfaces are replaced by a single surface. This function
returns the NURBSId of the newly joined surface.
Parameters
- Object* obj - The NURBS object whose surface sub-objects are joined.
- NURBSId id1 - The id of the first surface sub-object.
- NURBSId id2 - The id of the second surface sub-object.
- int edge1 - The index of the edge of surface 1 to join.
- int edge2 - The index of the edge of surface 2 to join.
- double tolerance - A distance in 3ds Max units. If the gap between the surfaces you are joining is greater than this value,
this function creates the join by first creating a blend surface. If the gap is less than this value, or if the surfaces are
overlapping or coincident, 3ds Max doesn't create the blend. Creating a blend and then joining the three surfaces into a single
surface is the better technique. The result matches the parent surfaces well. Without the blend step, the resulting surface
can deviate from the parent surfaces, in order to maintain smoothness. (The amount of deviation depends on how far from tangent
the two input surfaces were at the join.)/ A problem arises when there is a gap but it is too small. In this case, this function
generates the blend but because there isn't enough room for it, the resulting surface has a loop in it. To avoid this loop,
set the tolerance parameter higher than the gap distance. If you set the tolerance to 0.0, the function chooses a value to
use for the tolerance.
- double ten1 - Specifies the tension of the new surface at the edge of the first surface sub-object.
- double ten2 - Specifies the tension of the new surface at the edge of the second surface sub-object.
- TimeValue t - The time at which the surfaces are joined.
ZipCurves()
ZipSurfaces() concatenates two curves by concatenating the CV lattices of the two original curves. Zipping can change the shape of the
original curves, but usually it produces a better result than joining. If both curves are untrimmed point curves, the result
is a point curve. In all other cases, the result of zipping is a CV curve. Parameters
- Object* obj - The NURBS object whose curve sub-objects are zipped.
- NURBSId id1 - The id of the first curve sub-object.
- NURBSId id2 - The id of the second curve sub-object.
- BOOL begin1 - Specifies if the beginning or the end of curve 1 if joined. If TRUE the beginning is used; otherwise the end
is used. The beginning of the curve is the point of minimum parameter value.
- BOOL begin2 - Specifies if the beginning or the end of curve 2 if joined. If TRUE the beginning is used; otherwise the end
is used. The beginning of the curve is the point of minimum parameter value.
- double tolerance 0- A distance in 3ds Max units. If the gap between the curves you are zipping is greater than this value,
this function creates the join by first creating a blend curve and then joining the three parts. If the gap is less than this
value, or if the curves are overlapping or coincident, no blend is created. If you use a value of 0.0, the function chooses
a value to use for the tolerance.
- TimeValue t - The time at which the surfaces are joined.
ZipSurfaces()
ZipSurfaces() concatenates the CV lattices of the two original surfaces. Zipping can change the shape of the original surfaces, but compared
to joining it usually produces a simpler surface that is easier to edit.
Parameters
- Object* obj - The NURBS object whose surface sub-objects are zipped.
- NURBSId id1 - The id of the first surface sub-object.
- NURBSId id2 - The id of the second surface sub-object.
- int edge1 - The index of the edge of surface 1 to join.
- int edge2 - The index of the edge of surface 2 to join.
- double tolerance - A distance in 3ds Max units. If the gap between the surfaces you are zipping is greater than this value,
this function creates the join by first creating a blend surface. If the gap is less than this value, or if the surfaces are
overlapping or coincident, 3ds Max doesn't create the blend. If you set the tolerance to 0.0, the function chooses a value
to use for the tolerance.
- double ten1 - Specifies the tension of the new surface at the edge of the first surface sub-object.
- double ten2 - Specifies the tension of the new surface at the edge of the second surface sub-object.
- TimeValue t - The time at which the surfaces are joined.
MakeIndependent()
MakeIndependent() takes a dependent sub-object (fillet, offset, blend, etc.) and turns it into a CV variant of itself such that it is independent
(no longer dependent on a parent). Returns the NURBSId of the resulting object or zero if it could not be done.
Parameters
- Object* obj - The NURBS object whose sub-object is made independent.
- NURBSId id - The id of the dependent sub-object.
- TimeValue t - The time at which the sub-object is made independent.
MakeRigid()
MakeRigid() makes any kind of surface sub-object into a rigid surface in order to improve performance. Once you have made a surface rigid,
the only editing allowed is to transform it at the Surface sub-object level. You can't move a rigid surface's points or CVs,
or change the number of points or CVs. Rigid surfaces reduce the amount of memory used by the NURBS model. Making surfaces
rigid improves performance, especially for large and complex models. Returns the NURBSId of the rigid surface.
Parameters
- Object* obj - The NURBS object whose surface sub-objects is made rigid.
- NURBSId id - The id of the sub-object who is made rigid.
- TimeValue t - The time at which to make it rigid.
SetApproxPreset()
SetApproxPreset() chooses one of the Tesselation Presets which appear in the 3ds Max UI in the Surface Approximation rollup. These are the
Low, Medium and High buttons. See also GetTessPreset() and SetTessPreset() below.
Parameters
- Object* pObj - The objects whose specified Tesselation Preset is set.
- int i - Specifies which preset to make active. One of the following values:
-
- 0: Low
- 1: Medium
- 2: High
ToggleShadedLattice()
Inverts the state of the Shaded Lattice setting for the object. This goes between 'Tesselated Mesh' and 'Shaded Lattice'
surface display mode.
Parameters
- Object* pObj - The object whose Shaded Lattice setting is toggled.
GetTessPreset()
GetTessPreset() returns a pointer to the tesselation object corresponding to the specified type of tesselation preset.
Parameters
- int which - Determines which type of tesselation is set. One of the following values:
-
- 0: Curve tesselation in the viewports.
- 1: Curve tesselation by the production renderer.
- 2: Surface tesselation in the viewports.
- 3: Surface tesselation by the production renderer.
- 4: Displacement mapping (by the production renderer).
- 0: Curve tesselation in the viewports.
- 1: Curve tesselation by the production renderer.
- 2: Surface tesselation in the viewports.
- 3: Surface tesselation by the production renderer.
- 4: Displacement mapping (by the production renderer).
- int preset - Specifies which preset to get. One of the following values:
-
- 0: Low
- 1: Medium
- 2: High
SetTessPreset()
SetTessPreset() sets the tesselation object corresponding to the specified type of tesselation preset.
Parameters
- int which - Determines which type of tesselation is set. One of the following values:
-
- 0: Curve tesselation in the viewports.
- 1: Curve tesselation by the production renderer.
- 2: Surface tesselation in the viewports.
- 3: Surface tesselation by the production renderer.
- 4: Displacement mapping (by the production renderer).
- 0: Curve tesselation in the viewports.
- 1: Curve tesselation by the production renderer.
- 2: Surface tesselation in the viewports.
- 3: Surface tesselation by the production renderer.
- 4: Displacement mapping (by the production renderer).
- int preset - Specifies which preset to get. One of the following values:
-
- 0: Low
- 1: Medium
- 2: High
- TessApprox& tess - The tesselation object to set.
BuildEMObjectFromLofterObject()
BuildEMObjectFromLofterObject() generates a new NURBS object from the specified loft object at the current time. This function is intended for internal usage
in the lofter to convert a loft object to a NURBS surface. It returns a pointer to the new NURBS object.
Parameters
- Object *loftObject - Points to the source loft object.
- double tolerance - This parameter is the maximum deviation of the NURBS approximation to the true loft surface.
BuildEMObjectFromPatchObject()
BuildEMObjectFromPatchObject() generates a new NURBS object from the specified patch object at the current time. Returns a pointer to the new NURBS object.
Parameters
- Object *patchObject - Points to the source patch object.
DetachObjects()
DetachObjects() creates a new named NURBS object in the scene respecting the copy and relational flags like the 3ds Max Detach operation.
Returns a pointer to the new object created by the detach, or NULL if an error occured.
Parameters
- TimeValue t - The time at which to detach the object.
- INode *pNode - The node of the existing object.
- Object* pobj - Points to the NURBS object whose sub-objects are detached.
- NURBSIdList list - The list of objects to detach. Note: typedef Tab<NURBSId> NURBSIdList.
- char *newObjName - The name for the new node created.
- BOOL copy - TRUE to create a copy for the detached objects leaving the original; FALSE to remove the originals.
- BOOL relational - If TRUE the object will contain relational data; if FALSE the object will contain a CV curve or CV surface
equivalent of the object.
GetSelectionLevel()
GetSelectionLevel() returns the current sub-object selection level for the specified NURBS object.
Parameters
- Object* pObj - The object to check.
SetSelectionLevel()
SetSelectionLevel() sets the current sub-object selection level for the specified NURBS object.
Parameters
- Object* pObj - Points to the object whose sub-object selection state is set.
- NURBSSubObjectLevel level - The sub-object level.
GetSelection()
GetSelection() returns a BitArray containing the sub-object selection state of a NURBS object.
Parameters
- Object* pObj - Points to the object whose sub-object selection data is retrieved.
- NURBSSubObjectLevel level - The sub-object level data to get. See NURBS Sub-Object Level Options.
- BitArray& selset - The BitArray for the result. Bits set are selected components. See Class BitArray.
SetSelection()
SetSelection() sets the specified sub-object selection state of the NURBS object passed.
Parameters
- Object* pObj - Points to the object whose sub-object selection state is set.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- BitArray& selset - The BitArray with the selection data. Bits which are set indicate items to select.
MoveCurrentSelection()
MoveCurrentSelection() moves the current sub-object selection at the specified level.
Parameters
- Object* pObj - The object whose components are transformed.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- TimeValue t - The time to transform the sub-objects.
- Matrix3& partm - The 'parent' transformation matrix.
- Matrix3& tmAxis - The axis system about which the selection is transformed.
- Point3& val - The amount of the transformation relative to the axis system.
- BOOL localOrigin - If TRUE the transformation takes place about the nodes local origin; otherwise about the world origin.
RotateCurrentSelection()
RotateCurrentSelection() rotates the current sub-object selection at the specified level.
Parameters
- Object* pObj - The object whose components are transformed.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- TimeValue t - The time to transform the sub-objects.
- Matrix3& partm - The 'parent' transformation matrix.
- Matrix3& tmAxis - The axis system about which the selection is transformed.
- Quat& val - The amount of the transformation relative to the axis system.
- BOOL localOrigin - If TRUE the transformation takes place about the nodes local origin; otherwise about the world origin.
ScaleCurrentSelection()
ScaleCurrentSelection() scales the current sub-object selection at the specified level.
Parameters
- Object* pObj - The object whose components are transformed.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- TimeValue t - The time to transform the sub-objects.
- Matrix3& partm - The 'parent' transformation matrix.
- Matrix3& tmAxis - The axis system about which the selection is transformed.
- Point3& val - The amount of the transformation relative to the axis system.
- BOOL localOrigin - If TRUE the transformation takes place about the nodes local origin; otherwise about the world origin.
SubObjectCount()
SubObjectCount() returns the number of sub-objects at the specified level.
Parameters
- Object* pObj - Points to the object to check.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
NamedSelSetCount()
NamedSelSetCount() returns the number of named selection sets at the specified level
Parameters
- Object* pObj - Points to the object to check.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
GetNamedSelSetName()
GetNamedSelSetName() returns the name of the nth named selection set of the specified sub-object level.
Parameters
- Object* pObj - Points to the object to check.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- int i - The zero based index of the selection set (between 0 and NamedSelSetCount()-1).
GetNamedSelSet()
GetNamedSelSet() retrieves the name of, and BitArray holding, the named selelction set for the specified sub-object level.
Parameters
- Object* pObj - Points to the object whose named selection set is retrieved.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- TCHAR* name - The retrieved name of the set.
- BitArray& selSet - The retrieved selection set data. See Class BitArray.
SetNamedSelSet()
SetNamedSelSet() sets the specified named selection set. The set must exist. To add a new set see AppendNamedSelSet().
Parameters
- Object* pObj - Points to the object whose named selection set is stored.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- TCHAR* name - The name of the set.
- BitArray& sel - The selection data.
AppendNamedSelSet()
AppendNamedSelSet() adds a new named selection set to the specified object.
Parameters
- Object* pObj - Points to the object whose named selection set list is appended.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- TCHAR* name - The name for the set.
- BitArray& sel - The selection data. See Class BitArray.
DeleteCurrentSelection()
DeleteCurrentSelection() deletes the current sub-object selection.
Parameters
- Object* pObj - Points to the object whose current selection is deleted.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
MapNURBSIdToSelSetIndex()
MapNURBSIdToSelSetIndex() returns the index into a sub-object selection set of the sub-object component.
Parameters
- Object* pObj - Points to the object whose sub-object component selection set index is returned.
- NURBSId id - The ID of the sub-object to find.
- int& index - The zero based selection set index is returned here.
- NURBSSubObjectLevel& level - The sub-object level. See NURBS Sub-Object Level Options.
MapSelSetIndexToNURBSId()
The MapSelSetIndexToNURBSId() returns the NURBSId of the sub-object component whose selection set index is passed.
Parameters
- Object* pObj - Points to the object whose sub-object component NURBSId is returned.
- int index - The zero based index into the selection set.
- NURBSSubObjectLevel level - The sub-object level. See NURBS Sub-Object Level Options.
- NURBSId& id - The ID is returned here.
UpdateSurfaceMapper()
The UpdateSurfaceMapper() function has the effect of pressing the "Update" button. If any other modifier is passed in, the function does nothing.
Parameters
- Modifier* pMod - Points to the NURBS Surface Mapper WSM.