3ds Max C++ API Reference
|
#include "maxheap.h"
#include "shphier.h"
#include "spline3d.h"
#include "shpsels.h"
#include "hitdata.h"
#include "TabTypes.h"
#include "GraphicsConstants.h"
#include "Util/CountedObject.h"
Classes | |
struct | bindShape |
Contains the data for the bind points. More... | |
class | ShapeSubHitRec |
class | SubShapeHitList |
class SubShapeHitList More... | |
class | ShapeHitData |
class | ShapeContextCallback |
class | BezierShapeTopology |
class | BezierShapeInterface_Ex41 |
class BezierShapeInterface_Ex41 : public BaseInterface More... | |
class | BezierShape |
Defines a basic bezier shape object. More... | |
Macros | |
#define | SHAPE_TRIM 0 |
#define | SHAPE_EXTEND 1 |
#define | BEZIER_SHAPE_INTERFACE_EX41 Interface_ID(0x23526cd1, 0x695d7e4e) |
#define | GET_BEZIER_SHAPE_INTERFACE_EX41() (BezierShapeInterface_Ex41*) GetInterface(BEZIER_SHAPE_INTERFACE_EX41) |
Functions | |
CoreExport bool | BezierShapeFindWeldTarget (ViewExp *pVpt, Matrix3 &tm, BezierShape *shape, int polyIndex, int knotToCompare, bool allowSelfWeld, bool autoWeld, int &weldToPolyOut, int &weldToKnotOut) |
Find an endpoint weld target in a shape. | |
CoreExport void | BezierShapeDoPolyLastToFirstWeld (BezierShape *shape, int polyIndex) |
Weld the last knot of a spline to the first knot in the same spline. | |
#define SHAPE_TRIM 0 |
#define SHAPE_EXTEND 1 |
#define BEZIER_SHAPE_INTERFACE_EX41 Interface_ID(0x23526cd1, 0x695d7e4e) |
#define GET_BEZIER_SHAPE_INTERFACE_EX41 | ( | ) | (BezierShapeInterface_Ex41*) GetInterface(BEZIER_SHAPE_INTERFACE_EX41) |
CoreExport bool BezierShapeFindWeldTarget | ( | ViewExp * | pVpt, |
Matrix3 & | tm, | ||
BezierShape * | shape, | ||
int | polyIndex, | ||
int | knotToCompare, | ||
bool | allowSelfWeld, | ||
bool | autoWeld, | ||
int & | weldToPolyOut, | ||
int & | weldToKnotOut | ||
) |
Find an endpoint weld target in a shape.
This is designed to work with the 3ds Max insert/create mechanism when it's working with the last knot in the shape being edited. It will use one of two threshold values depending on whether automatic endpoint welding is enabled. Caller has the option to allow the spline being edited to weld to itself (this will always be the knot being edited ('knotToCompare') welding to the first knot in the spline).
If any knots in the shape have endpoints that are appropriate for welding, the function will fill in the 'weldToPolyOut' poly and 'weldToKnotOut' knot indices with non-negative indices of the candidate knot.
[in] | pVpt | Pointer to the ViewExp for the viewport being used. This viewport will be used to compute the distance between endpoint knots in screen space, which is used with the auto-weld distance threshold value. |
[in] | tm | Transform of the object. |
[in] | shape | Pointer to the BezierShape containing the spline being edited and the weld target candidate splines. |
[in] | polyIndex | The index of the spline being edited. |
[in] | knotToCompare | The index of the knot that will be compared to candidate weld-target knots. |
[in] | allowSelfWeld | True if the caller wants to allow the spline being edited to weld 'knotToCompare' to its own first knot. |
[in] | autoWeld | true if End Point Auto-Welding is to be used. |
[out] | weldToPolyOut | The index of the spline being welded to or -1 if no weld found. |
[out] | weldToKnotOut | The index of the knot in the spline being welded to or -1 if no weld found. |
CoreExport void BezierShapeDoPolyLastToFirstWeld | ( | BezierShape * | shape, |
int | polyIndex | ||
) |
Weld the last knot of a spline to the first knot in the same spline.
This function performs last-to-first knot welding in a spline. It shifts the position of the last knot to align with the first knot, including the Bezier vectors, if any, sets the first knot type as needed to preserve the spline's shape and closes the spline.
[in] | shape | Pointer to the BezierShape containing the spline being welded. |
[in] | polyIndex | The index of the spline being welded. |