Inkscape
Vector Graphics Editor
|
#include <sp-mesh-array.h>
Public Member Functions | |
SPMeshPatchI (std::vector< std::vector< SPMeshNode * > > *n, int r, int c) | |
Geom::Point | getPoint (unsigned side, unsigned point) |
Returns point for side in proper order for patch. | |
std::vector< Geom::Point > | getPointsForSide (unsigned i) |
Returns vector of points for a side in proper order for a patch (clockwise order). | |
void | setPoint (unsigned side, unsigned point, Geom::Point const &p, bool set=true) |
Set point for side in proper order for patch. | |
char | getPathType (unsigned i) |
Get path type for side (stored in handle nodes). | |
void | setPathType (unsigned, char t) |
Set path type for side (stored in handle nodes). | |
Geom::Point | getTensorPoint (unsigned i) |
Return tensor control point for "corner" i. | |
void | setTensorPoint (unsigned i, Geom::Point const &p) |
Set tensor control point for "corner" i. | |
bool | tensorIsSet () |
Return if any tensor control point is set. | |
bool | tensorIsSet (unsigned i) |
Geom::Point | coonsTensorPoint (unsigned i) |
Find default tensor point (equivalent point to Coons Patch). | |
void | updateNodes () |
Update default values for handle and tensor nodes. | |
std::optional< Inkscape::Colors::Color > | getColor (unsigned i) |
Return color for corner of patch. | |
void | setColor (unsigned i, Inkscape::Colors::Color const &c) |
Set color for corner of patch. | |
SPStop * | getStopPtr (unsigned i) |
Return stop pointer for corner of patch. | |
void | setStopPtr (unsigned i, SPStop *) |
Set stop pointer for corner of patch. | |
Private Attributes | |
std::vector< std::vector< SPMeshNode * > > * | nodes |
int | row |
int | col |
Definition at line 111 of file sp-mesh-array.h.
SPMeshPatchI::SPMeshPatchI | ( | std::vector< std::vector< SPMeshNode * > > * | n, |
int | r, | ||
int | c | ||
) |
Definition at line 79 of file sp-mesh-array.cpp.
References c, col, MG_NODE_TYPE_CORNER, MG_NODE_TYPE_HANDLE, MG_NODE_TYPE_TENSOR, node, nodes, row, and size.
Geom::Point SPMeshPatchI::coonsTensorPoint | ( | unsigned | i | ) |
Find default tensor point (equivalent point to Coons Patch).
Formulas defined in PDF spec. Equivalent to 1/3 of side length from corner for square patch.
Definition at line 355 of file sp-mesh-array.cpp.
References getPoint().
Referenced by getTensorPoint(), and updateNodes().
std::optional< Inkscape::Colors::Color > SPMeshPatchI::getColor | ( | unsigned | i | ) |
Return color for corner of patch.
Definition at line 472 of file sp-mesh-array.cpp.
References col, nodes, and row.
Referenced by SPMeshNodeArray::write().
char SPMeshPatchI::getPathType | ( | unsigned | i | ) |
Get path type for side (stored in handle nodes).
Definition at line 191 of file sp-mesh-array.cpp.
Referenced by SPMeshNodeArray::write().
Geom::Point SPMeshPatchI::getPoint | ( | unsigned | side, |
unsigned | point | ||
) |
Returns point for side in proper order for patch.
Definition at line 110 of file sp-mesh-array.cpp.
Referenced by GrDrag::addStopNearPoint(), coonsTensorPoint(), getPointsForSide(), SPMeshNodeArray::read(), and SPMeshNodeArray::write().
std::vector< Geom::Point > SPMeshPatchI::getPointsForSide | ( | unsigned | i | ) |
Returns vector of points for a side in proper order for a patch (clockwise order).
Definition at line 135 of file sp-mesh-array.cpp.
References getPoint().
Referenced by GrDrag::updateLines(), and SPMeshNodeArray::write().
SPStop * SPMeshPatchI::getStopPtr | ( | unsigned | i | ) |
Return stop pointer for corner of patch.
Definition at line 515 of file sp-mesh-array.cpp.
Geom::Point SPMeshPatchI::getTensorPoint | ( | unsigned | k | ) |
Return tensor control point for "corner" i.
If not set, returns calculated (Coons) point.
Definition at line 314 of file sp-mesh-array.cpp.
References col, coonsTensorPoint(), nodes, row, and set.
Referenced by SPMeshNodeArray::write().
void SPMeshPatchI::setColor | ( | unsigned | i, |
Inkscape::Colors::Color const & | c | ||
) |
Set color for corner of patch.
Definition at line 492 of file sp-mesh-array.cpp.
Referenced by SPMeshNodeArray::create(), and SPMeshNodeArray::read().
void SPMeshPatchI::setPathType | ( | unsigned | s, |
char | t | ||
) |
Set path type for side (stored in handle nodes).
Definition at line 218 of file sp-mesh-array.cpp.
Referenced by SPMeshNodeArray::create(), and SPMeshNodeArray::read().
void SPMeshPatchI::setPoint | ( | unsigned | side, |
unsigned | point, | ||
Geom::Point const & | p, | ||
bool | set = true |
||
) |
Set point for side in proper order for patch.
Definition at line 150 of file sp-mesh-array.cpp.
References col, MG_NODE_TYPE_CORNER, MG_NODE_TYPE_HANDLE, row, and set.
Referenced by SPMeshNodeArray::create(), and SPMeshNodeArray::read().
void SPMeshPatchI::setStopPtr | ( | unsigned | i, |
SPStop * | stop | ||
) |
Set stop pointer for corner of patch.
Definition at line 541 of file sp-mesh-array.cpp.
Referenced by SPMeshNodeArray::read().
void SPMeshPatchI::setTensorPoint | ( | unsigned | i, |
Geom::Point const & | p | ||
) |
Set tensor control point for "corner" i.
Definition at line 245 of file sp-mesh-array.cpp.
References col, MG_NODE_TYPE_TENSOR, and row.
Referenced by SPMeshNodeArray::read().
bool SPMeshPatchI::tensorIsSet | ( | ) |
Return if any tensor control point is set.
Definition at line 276 of file sp-mesh-array.cpp.
References tensorIsSet().
Referenced by SPMeshNodeArray::tensor_toggle(), tensorIsSet(), and SPMeshNodeArray::write().
bool SPMeshPatchI::tensorIsSet | ( | unsigned | i | ) |
void SPMeshPatchI::updateNodes | ( | ) |
Update default values for handle and tensor nodes.
Definition at line 417 of file sp-mesh-array.cpp.
References col, coonsTensorPoint(), MG_NODE_TYPE_HANDLE, MG_NODE_TYPE_TENSOR, nodes, row, and set.
Referenced by SPMeshNodeArray::create(), and SPMeshNodeArray::tensor_toggle().
|
private |
Definition at line 115 of file sp-mesh-array.h.
Referenced by getColor(), getPathType(), getPoint(), getStopPtr(), getTensorPoint(), setColor(), setPathType(), setPoint(), setStopPtr(), setTensorPoint(), SPMeshPatchI(), and updateNodes().
|
private |
Definition at line 113 of file sp-mesh-array.h.
Referenced by getColor(), getTensorPoint(), SPMeshPatchI(), and updateNodes().
|
private |
Definition at line 114 of file sp-mesh-array.h.
Referenced by getColor(), getPathType(), getPoint(), getStopPtr(), getTensorPoint(), setColor(), setPathType(), setPoint(), setStopPtr(), setTensorPoint(), SPMeshPatchI(), and updateNodes().