Public Member Functions |
| | ModelerCommand (int _version, LWModCommand *_mc) |
| virtual int | Activate (void *p)=0 |
| LWPolID | AddCurve (const char *surf, int numPnt, const LWPntID *pnts, int flags) |
| EDError | AddDiscoVMap (LWPntID point, LWPolID pol, LWID type, const char *name, int dim, float *val) |
| | Add a discontinuous vmap vector to a polygon vertex.
|
| LWPolID | AddFace (const char *surf, int numPnt, const LWPntID *pnts) |
| LWPntID | AddIPoint (double *xyz, int numPnt, const LWPntID *ids, const double *wt=0) |
| | Create an "interpolated" point.
|
| LWPntID | AddIPoint (int numPnt, const LWPntID *ids, const double *wt=0) |
| EDError | AddPatch (int nr, int nc, int lr, int lc, EDBoundCv *r0, EDBoundCv *r1, EDBoundCv *c0, EDBoundCv *c1) |
| LWPntID | AddPoint (double *xyz) |
| LWPolID | AddPoly (LWID type, int numPnt, const LWPntID *pnt, LWPolID tmpl=0, const char *surf=0) |
| | Create a polygon.
|
| EDError | AddQuad (LWPntID p1, LWPntID p2, LWPntID p3, LWPntID p4) |
| EDError | AddTri (LWPntID p1, LWPntID p2, LWPntID p3) |
| int | AdvanceLayer () |
| void | Done (EDError err, int selm) |
| | Call this when the edit is complete.
|
| int | EdgeNew (LWEdgeID edg) |
| bool | EvaluateVMap (LWPntID point, LWPolID pol, float *val) |
| | Read the vmap vector for a point, accounting for both continuous and discontinuous values.
|
| void | FlipEdge (LWEdgeID edge) |
| void * | GetData (LWPntID pnt) |
| void * | GetData (LWEdgeID edg) |
| void * | GetData (LWPolID pol) |
| LWEdgeID | GetEdge (LWPntID p1, LWPntID p2) |
| | Returns the edge between p1 and p2 if such an edge exists.
|
| int | GetEdgeCount (EltOpLayer lyr, int mode) |
| LWPntID | GetEdgePoint1 (LWEdgeID edge) |
| LWPntID | GetEdgePoint2 (LWEdgeID edge) |
| int | GetEdgePolys (LWEdgeID edge, const LWPolID **pols) |
| int | GetFlags (LWPntID pnt) |
| int | GetFlags (LWEdgeID edg) |
| int | GetFlags (LWPolID pol) |
| EDPointInfo * | GetInfo (LWPntID id) |
| EDPolygonInfo * | GetInfo (LWPolID id) |
| EDEdgeInfo * | GetInfo (LWEdgeID id) |
| int | getLayer () |
| int | GetLayer (LWPntID pnt) |
| int | GetLayer (LWEdgeID edg) |
| int | GetLayer (LWPolID pol) |
| int | GetPointCount (EltOpLayer lyr, int mode) |
| int | GetPointEdges (LWPntID pnt, const LWEdgeID **edges) |
| | Returns the edges surrounding the specified point.
|
| void | GetPointPosition (LWPntID pnt, double pos[3]) |
| | Copies the position of the specified point into pos.
|
| int | GetPolyCount (EltOpLayer lyr, int mode) |
| bool | GetPolyNormal (LWPolID id, double n[3]) |
| int | GetPolyPoints (LWPolID pol, const LWPntID **pnts) |
| const char * | GetPolyTag (LWPolID polygon, LWID tagtype) |
| | Returns a tag string associated with the polygon.
|
| unsigned int | GetPolyType (LWPolID pol) |
| EDError | InitUV (float *uv) |
| | Set the texture UV for a point or polygon you're about to create.
|
| EDError | Move (LWPntID id, const double *delta) |
| int | PointNew (LWPntID pnt) |
| int | PolyNew (LWPolID pol) |
| bool | ReadVMap (LWPntID point, float *val) |
| | Read the vmap vector for a point.
|
| bool | ReadVMap (LWPntID point, LWPolID pol, float *val) |
| | Read the vmap vector for a polygon vertex.
|
| EDError | Remove (LWPntID id) |
| EDError | Remove (LWPolID id) |
| EDError | ReplacePolyPoints (LWPolID id, int n, const LWPntID *p) |
| | Replace the point list of a polygon.
|
| EDError | Scan (PointScanner &scanner, EltOpLayer lyr) |
| EDError | Scan (FastPointScanner &scanner, EltOpLayer lyr, bool selOnly) |
| EDError | Scan (PolyScanner &scanner, EltOpLayer lyr) |
| EDError | Scan (FastPolyScanner &scanner, EltOpLayer lyr, bool selOnly) |
| EDError | Scan (EdgeScanner &scanner, EltOpLayer lyr) |
| EDError | Scan (FastEdgeScanner &scanner, EltOpLayer lyr, bool selOnly) |
| void * | Select (void *vmapID, LWID vmaptype, const char *vmapname) |
| | Select a vmap for reading vectors.
|
| void * | Select (LWID vmaptype, const char *vmapname) |
| EDError | Select (LWPntID pnt, bool sel) |
| | Set the selection state of a point.
|
| EDError | Select (LWPolID pol, bool sel) |
| | Set the selection state of a polygon.
|
| EDError | Select (LWEdgeID edge, bool sel) |
| | Set the selection state of an edge.
|
| int | SetLayer (int lyr) |
| void | SetMeshEditOp (const MeshEditOp *_me) |
| EDError | SetPolTag (LWPolID id, LWID type, const char *name=0) |
| | Add a polygon tag to a polygon, or change an existing tag.
|
| EDError | SetPolyFlags (LWPolID id, int mask, int value) |
| | Set polygon flags.
|
| EDError | SetSurface (LWPolID id, const char *name) |
| | Change the surface assigned to a polygon.
|
| EDError | SetVMap (LWPntID id, LWID vmap, const char *c=0, int i=0, float *f=0) |
| | Add a vmap vector to a point.
|
| void lwpp::MeshEditOperator::Done |
( |
EDError |
err, |
|
|
int |
selm |
|
) |
| |
|
inlineinherited |
Call this when the edit is complete.
As changes are made during an edit, they are buffered through Modeler's undo mechanism, so they are not reflected in the data until done is called, and not at all if done sets the error argument.
In general, if one of the edit functions returns an error, you'll pass that error to done. If you just want the edit to stop or be discarded, possibly because the user pressed the Cancel button in a progress monitor, you'll pass EDERR_USERABORT. If an error occurs in your plug-in, you'll pass EDERR_NOMEMORY (for memory allocation errors) or EDERR_BADARGS (for everything else). And if the edit was successful, you'll use EDERR_NONE.
The selset argument tells Modeler how you want the selection to appear to the user after the edit has been applied. It contains flags combined using bitwise-or, and can include the following.
- EDSELM_CLEARCURRENT Deselect elements that were selected when the edit began.
- EDSELM_SELECTNEW Select elements created by the edit.
- EDSELM_FORCEVRTS Force selection of newly created vertices.
- EDSELM_FORCEPOLS Force selection of newly created polygons.
A value of 0 leaves all directly selected elements selected after the edit. The CLEARCURRENT and SELECTNEW flags are polite hints; they won't override selection settings made by the user. The force flags will always force direct selection of the points or polygons created by the edit.
| EDError lwpp::MeshEditOperator::InitUV |
( |
float * |
uv | ) |
|
|
inlineinherited |
Set the texture UV for a point or polygon you're about to create.
If a texture map is selected in Modeler's interface, the UVs will be assigned to that map as points or polygons are created. You'll typically want to give the user the option of whether or not to create UVs for new points and polygons.
When creating points, pass initUV an array of two floats and then call any of the functions that create a point. The two floats will be used as the U and V for the point, after which the initUV state will be cleared so that subsequent points have no UV unless the function is called again.
To initialize per-polygon, or discontinuous, UVs, call initUV with a pointer to 2n floats before creating a polygon with n vertices. For each vertex, if the point's continuous UV value is different from the UV in the array, then a polygon-specific UV is set for the vertex. If the point has no continuous UV, then the continuous value for the point is set to the polygon UV.
Any combination of these two methods can be used to assign UVs to new data. If only polygon UVs are specified, continuous UVs will still be created where polygons share UV values. Alternately, plug-ins can assign UVs to points and only specify polygon UVs along seam polygons.