namespace basegfx
{ class B3DPolyPolygon; class B3DPolygon; class B3DRange;
}
namespace basegfx::utils
{ // B3DPolygon tools
/** Check if given polygon is closed. This is kind of a 'classic'methodtosupportoldpolygondefinitions. Thoseoldpolygondefinitionsdefinetheclosedstate ofthepolygonusingidenticalstartandendpoints.This methodcorrectsthis(removesdoublestart/endpoints) andsetstheClosed()-stateofthepolygoncorrectly.
*/
BASEGFX_DLLPUBLIC void checkClosed(B3DPolygon& rCandidate);
// Get successor and predecessor indices. Returning the same index means there // is none. Same for successor.
BASEGFX_DLLPUBLIC sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const B3DPolygon& rCandidate);
// get size of polygon. Control vectors are included in that ranges.
BASEGFX_DLLPUBLIC B3DRange getRange(const B3DPolygon& rCandidate);
// get length of polygon
BASEGFX_DLLPUBLIC double getLength(const B3DPolygon& rCandidate);
/** Create/replace normals for given 3d geometry with default normals from given center to outside. rCandidate:the3dgeometrytochange rCenter:thecenterofthe3dgeometry
*/
B3DPolygon applyDefaultNormalsSphere( const B3DPolygon& rCandidate, const B3DPoint& rCenter);
/** invert normals for given 3d geometry.
*/
BASEGFX_DLLPUBLIC B3DPolygon invertNormals( const B3DPolygon& rCandidate);
/** Create/replace texture coordinates for given 3d geometry with parallel projected one rRange:thefullrangeofthe3dgeometry IfbChangeX,xtexturecoordinatewillberecalculated. IfbChangeY,ytexturecoordinatewillberecalculated.
*/
B3DPolygon applyDefaultTextureCoordinatesParallel( const B3DPolygon& rCandidate, const B3DRange& rRange, bool bChangeX, bool bChangeY);
/** Create/replace texture coordinates for given 3d geometry with spherical one rCenter:thecentreoftheused3dgeometry IfbChangeX,xtexturecoordinatewillberecalculated. IfbChangeY,ytexturecoordinatewillberecalculated.
*/
B3DPolygon applyDefaultTextureCoordinatesSphere( const B3DPolygon& rCandidate, const B3DPoint& rCenter, bool bChangeX, bool bChangeY);
// isInside tests for B3DPoint. On border is not inside as long as not true is given in bWithBorder flag.
BASEGFX_DLLPUBLIC bool isInside(const B3DPolygon& rCandidate, const B3DPoint& rPoint, bool bWithBorder);
// calculates if given point is on given line, taking care of the numerical epsilon
BASEGFX_DLLPUBLIC bool isPointOnLine(const B3DPoint& rStart, const B3DPoint& rEnd, const B3DPoint& rCandidate, bool bWithPoints);
// calculates if given point is on given polygon, taking care of the numerical epsilon. Uses // isPointOnLine internally
BASEGFX_DLLPUBLIC bool isPointOnPolygon(const B3DPolygon& rCandidate, const B3DPoint& rPoint);
// helper to get a fCut position between a plane (given with normal and a point) // and a line given by start and end point
BASEGFX_DLLPUBLIC bool getCutBetweenLineAndPlane(const B3DVector& rPlaneNormal, const B3DPoint& rPlanePoint, const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, double& fCut);
/** snap some polygon coordinates to discrete coordinates
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.