CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GeNurbCurve3d.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#ifndef OD_GENURB3D_H
25#define OD_GENURB3D_H
27class OdGeEllipArc3d;
28class OdGeLineSeg3d;
29class OdGePolyline3d;
30class OdGeKnotVector;
31
32#include "Ge/GeSplineEnt3d.h"
33#include "OdPlatformSettings.h"
34
35#include "TD_PackPush.h"
36
48{
49public:
50
55
62 const OdGeNurbCurve3d& source);
63
90 int degree,
91 const OdGeKnotVector& knots,
92 const OdGePoint3dArray& controlPoints,
93 bool isPeriodic = false);
94
127 int degree,
128 const OdGeKnotVector& knots,
129 const OdGePoint3dArray& controlPoints,
130 const OdGeDoubleArray& weights,
131 bool isPeriodic = false);
132 // TD Special
133
168 int degree,
169 const OdGeKnotVector& knots,
170 const OdGePoint3d* controlPoints,
171 OdUInt32 numControlPoints,
172 const double* weights,
173 OdUInt32 numWeights,
174 bool isPeriodic = false);
175 //
176
192 int degree,
193 const OdGePolyline3d& fitPolyline,
194 bool isPeriodic = false);
195
212 const OdGePoint3dArray& fitPoints,
213 const OdGeVector3d& startTangent,
214 const OdGeVector3d& endTangent,
215 bool startTangentDefined = true,
216 bool endTangentDefined = true,
217 const OdGeTol& fitTol = OdGeContext::gTol);
218
229 const OdGePoint3dArray& fitPoints,
230 const OdGeTol& fitTolerance = OdGeContext::gTol);
231
246 const OdGePoint3dArray& fitPoints,
247 const OdGeVector3dArray& fitTangents,
248 const OdGeTol& fitTolerance = OdGeContext::gTol,
249 bool isPeriodic = false);
250
270 const OdGePoint3dArray& fitPoints,
271 const OdGeVector3d& startTangent,
272 const OdGeVector3d& endTangent,
273 bool startTangentDefined,
274 bool endTangentDefined,
275 OdGeKnotParameterization knotParam,
276 const OdGeTol& fitTolerance = OdGeContext::gTol);
277
289 const OdGeEllipArc3d& ellipse,
290 int numSpans = 0);
291
301 const OdGeLineSeg3d& lineSeg);
302
309 int numFitPoints() const;
310
320
331 int fitPointIndex,
332 OdGePoint3d& point) const;
333
344 OdGeTol& fitTolerance) const;
345
357 OdGeVector3d& startTangent,
358 OdGeVector3d& endTangent) const;
359
373 OdGeVector3d& startTangent,
374 OdGeVector3d& endTangent,
375 bool& startTangentDefined,
376 bool& endTangentDefined) const;
377
395 OdGePoint3dArray& fitPoints,
396 OdGeTol& fitTolerance,
397 bool& tangentsExist,
398 OdGeVector3d& startTangent,
399 OdGeVector3d& endTangent) const;
400
419 OdGePoint3dArray& fitPoints,
420 OdGeTol& fitTolerance,
421 bool& tangentsExist,
422 OdGeVector3d& startTangent,
423 OdGeVector3d& endTangent,
424 OdGeKnotParameterization& knotParam) const;
425
426 // NURBS data query functions
427
458 int& degree,
459 bool& rational,
460 bool& periodic,
461 OdGeKnotVector& knots,
462 OdGePoint3dArray& controlPoints,
463 OdGeDoubleArray& weights) const;
464
474 int numWeights() const;
475
484 double weightAt(
485 int weightIndex) const;
486
502 int weightIndex,
503 double weight);
504
518 bool evalMode() const;
519
534 const OdGeTol& tol = OdGeContext::gTol) const;
535
550 const OdGeTol& tol = OdGeContext::gTol) const;
551
552 // Fit data edit functions
553
564 int fitPointIndex,
565 const OdGePoint3d& point);
566
578 int fitPointIndex,
579 const OdGePoint3d& point);
580
593 int fitPointIndex);
594
608 bool addControlPointAt(double newKnot, const OdGePoint3d& point, double weight = 1.0);
609
619
629
639 const OdGeTol& fitTol = OdGeContext::gTol);
640
651 const OdGeVector3d& startTangent,
652 const OdGeVector3d& endTangent);
653
666 const OdGeVector3d& startTangent,
667 const OdGeVector3d& endTangent,
668 bool startTangentDefined,
669 bool endTangentDefined);
670
688 const OdGePoint3dArray& fitPoints,
689 const OdGeVector3d& startTangent,
690 const OdGeVector3d& endTangent,
691 const OdGeTol& fitTol = OdGeContext::gTol);
692
713 const OdGeKnotVector& fitKnots,
714 const OdGePoint3dArray& fitPoints,
715 const OdGeVector3d& startTangent,
716 const OdGeVector3d& endTangent,
717 const OdGeTol& fitTol = OdGeContext::gTol,
718 bool isPeriodic = false);
719
739 int degree,
740 const OdGePoint3dArray& fitPoints,
741 const OdGeTol& fitTol = OdGeContext::gTol);
742
760 const OdGePoint3dArray& fitPoints,
761 const OdGeVector3d& startTangent,
762 const OdGeVector3d& endTangent,
763 OdGeKnotParameterization knotParam,
764 const OdGeTol& fitTol = OdGeContext::gTol);
765
777
786 OdGeNurbCurve3d& addKnot(double newKnot);
787
799 OdGeNurbCurve3d& insertKnot(double newKnot);
800
817 bool evalMode = false);
818
832 const OdGeNurbCurve3d& curve, const OdGeTol &iTolerance = OdGeContext::gTol);
833
844 double newStartParam,
845 double newEndParam);
846
859 double weight = 1.0);
860
872
880
891
899
909
919 const OdGeNurbCurve3d& spline);
920
922 // TD Special :
923
924 // These functions are only for internal use
925 //DOM-IGNORE-BEGIN
927
929 double param,
930 int hint) const;
931
932 // This is needed in surface (for rational case only)
934 double param,
935 OdGePoint3d& point,
936 double& divider,
937 int hint) const;
938 // NURBS data edit functions
939
971 int degree,
972 const OdGeKnotVector& knots,
973 const OdGePoint3dArray& controlPoints,
974 const OdGeDoubleArray& weights,
975 bool isPeriodic = false);
976
987
1003 static OdGeNurbCurve3d* convertFrom(const OdGeCurve3d* source, const OdGeInterval& domain, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false);
1004
1019 static OdGeNurbCurve3d* convertFrom(const OdGeCurve3d* source, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false);
1020
1021protected:
1032 bool modifyPositionAndTangent(double param, const OdGePoint3d& point, const OdGeVector3d* deriv);
1034
1053 OdGeNurbCurve3d& setData(int degree, const OdGePoint3dArray& controlPoints, const OdGeKnotVector& knots, const OdGeDoubleArray& weights,
1054 const OdGePoint3dArray& fitPoints, const OdGeVector3d& startTangent, const OdGeVector3d& endTangent,
1055 bool isStartTangentDefined, bool isEndTangentDefined, bool isPeriodic, const OdGeTol& fitTol);
1056
1062 void setKnotTolerance(double tol);
1063 //DOM-IGNORE-END
1064};
1065
1066GE_TOOLKIT_EXPORT OdGeNurbCurve3d* convertFrom( const OdGeCurve3d* source, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false );
1067
1068#include "TD_PackPop.h"
1069
1070#endif // OD_GENURB3D_H
1071
tol
Definition: DimVarDefs.h:2287
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
GE_TOOLKIT_EXPORT OdGeNurbCurve3d * convertFrom(const OdGeCurve3d *source, const OdGeTol &tol=OdGeContext::gTol, bool sameParametrization=false)
unsigned int OdUInt32
OdGePoint3d evalPoint(double param) const
bool setFitKnotParameterization(OdGeKnotParameterization knotParam)
OdGeNurbCurve3d & insertKnot(double newKnot)
void setKnotTolerance(double tol)
OdGeNurbCurve3d & addKnot(double newKnot)
int numFitPoints() const
OdGeNurbCurve3d & makePeriodic()
bool getFitTangents(OdGeVector3d &startTangent, OdGeVector3d &endTangent, bool &startTangentDefined, bool &endTangentDefined) const
static OdGeNurbCurve3d * convertFrom(const OdGeCurve3d *source, const OdGeInterval &domain, const OdGeTol &tol=OdGeContext::gTol, bool sameParametrization=false)
bool evalMode() const
OdGePoint3d evalPoint(double param, int hint) const
int numWeights() const
void evalPointDivider(double param, OdGePoint3d &point, double &divider, int hint) const
OdGeNurbCurve3d & setWeightAt(int weightIndex, double weight)
bool getFitData(OdGePoint3dArray &fitPoints, OdGeTol &fitTolerance, bool &tangentsExist, OdGeVector3d &startTangent, OdGeVector3d &endTangent) const
OdGeNurbCurve3d & makeClosed()
bool getParamsOfC1Discontinuity(OdGeDoubleArray &params, const OdGeTol &tol=OdGeContext::gTol) const
OdGeNurbCurve3d(const OdGePoint3dArray &fitPoints, const OdGeVector3d &startTangent, const OdGeVector3d &endTangent, bool startTangentDefined, bool endTangentDefined, OdGeKnotParameterization knotParam, const OdGeTol &fitTolerance=OdGeContext::gTol)
bool getFitPointAt(int fitPointIndex, OdGePoint3d &point) const
bool addFitPointAt(int fitPointIndex, const OdGePoint3d &point)
bool buildFitData(OdGeKnotParameterization knotParam=OdGe::kChord)
OdGeNurbCurve3d & setFitData(const OdGePoint3dArray &fitPoints, const OdGeVector3d &startTangent, const OdGeVector3d &endTangent, const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve3d(const OdGePoint3dArray &fitPoints, const OdGeVector3dArray &fitTangents, const OdGeTol &fitTolerance=OdGeContext::gTol, bool isPeriodic=false)
OdGeNurbCurve3d(const OdGePoint3dArray &fitPoints, const OdGeTol &fitTolerance=OdGeContext::gTol)
double weightAt(int weightIndex) const
bool getParamsOfG1Discontinuity(OdGeDoubleArray &params, const OdGeTol &tol=OdGeContext::gTol) const
static OdGeNurbCurve3d * convertFrom(const OdGeCurve3d *source, const OdGeTol &tol=OdGeContext::gTol, bool sameParametrization=false)
bool setFitTangents(const OdGeVector3d &startTangent, const OdGeVector3d &endTangent, bool startTangentDefined, bool endTangentDefined)
OdGeNurbCurve3d(int degree, const OdGeKnotVector &knots, const OdGePoint3dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic=false)
void getDefinitionData(int &degree, bool &rational, bool &periodic, OdGeKnotVector &knots, OdGePoint3dArray &controlPoints, OdGeDoubleArray &weights) const
OdGeNurbCurve3d & set(int degree, const OdGeKnotVector &knots, const OdGePoint3dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic=false)
OdGeNurbCurve3d(const OdGeNurbCurve3d &source)
OdGeNurbCurve3d(int degree, const OdGePolyline3d &fitPolyline, bool isPeriodic=false)
OdGeNurbCurve3d & setFitData(const OdGePoint3dArray &fitPoints, const OdGeVector3d &startTangent, const OdGeVector3d &endTangent, OdGeKnotParameterization knotParam, const OdGeTol &fitTol=OdGeContext::gTol)
bool getFitKnotParameterization(OdGeKnotParameterization &knotParam) const
bool setFitTangents(const OdGeVector3d &startTangent, const OdGeVector3d &endTangent)
bool deleteFitPointAt(int fitPointIndex)
TD_USING(OdGeSplineEnt3d::evalPoint)
bool deleteControlPointAt(int index)
OdGeNurbCurve3d & makeNonPeriodic()
OdGeNurbCurve3d & setFitData(int degree, const OdGePoint3dArray &fitPoints, const OdGeTol &fitTol=OdGeContext::gTol)
bool getFitTolerance(OdGeTol &fitTolerance) const
void makeClosedFit()
OdGeNurbCurve3d(int degree, const OdGeKnotVector &knots, const OdGePoint3dArray &controlPoints, bool isPeriodic=false)
OdGeNurbCurve3d(const OdGeEllipArc3d &ellipse, int numSpans=0)
OdGeNurbCurve3d(const OdGeLineSeg3d &lineSeg)
OdGeNurbCurve3d & setFitData(const OdGeKnotVector &fitKnots, const OdGePoint3dArray &fitPoints, const OdGeVector3d &startTangent, const OdGeVector3d &endTangent, const OdGeTol &fitTol=OdGeContext::gTol, bool isPeriodic=false)
OdGeNurbCurve3d & makeRational(double weight=1.0)
OdGeNurbCurve3d & hardTrimByParams(double newStartParam, double newEndParam)
bool setFitPointAt(int fitPointIndex, const OdGePoint3d &point)
bool getFitTangents(OdGeVector3d &startTangent, OdGeVector3d &endTangent) const
bool addControlPointAt(double newKnot, const OdGePoint3d &point, double weight=1.0)
bool setFitTolerance(const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve3d(const OdGePoint3dArray &fitPoints, const OdGeVector3d &startTangent, const OdGeVector3d &endTangent, bool startTangentDefined=true, bool endTangentDefined=true, const OdGeTol &fitTol=OdGeContext::gTol)
bool getFitData(OdGePoint3dArray &fitPoints, OdGeTol &fitTolerance, bool &tangentsExist, OdGeVector3d &startTangent, OdGeVector3d &endTangent, OdGeKnotParameterization &knotParam) const
OdGeNurbCurve3d & setEvalMode(bool evalMode=false)
OdGeNurbCurve3d & elevateDegree(int plusDegree)
OdGeNurbCurve3d(int degree, const OdGeKnotVector &knots, const OdGePoint3d *controlPoints, OdUInt32 numControlPoints, const double *weights, OdUInt32 numWeights, bool isPeriodic=false)
OdGeNurbCurve3d & joinWith(const OdGeNurbCurve3d &curve, const OdGeTol &iTolerance=OdGeContext::gTol)
OdGeNurbCurve3d & makeOpen()
OdGeNurbCurve3d & setData(int degree, const OdGePoint3dArray &controlPoints, const OdGeKnotVector &knots, const OdGeDoubleArray &weights, const OdGePoint3dArray &fitPoints, const OdGeVector3d &startTangent, const OdGeVector3d &endTangent, bool isStartTangentDefined, bool isEndTangentDefined, bool isPeriodic, const OdGeTol &fitTol)
bool modifyPositionAndTangent(double param, const OdGePoint3d &point, const OdGeVector3d *deriv)
OdGeSplineEnt3d & operator=(const OdGeSplineEnt3d &spline)
Definition: GeTol.h:49
GLenum GLint * params
Definition: gles2_ext.h:184
GLuint index
Definition: gles2_ext.h:265
GLsizei GLsizei GLchar * source
Definition: gles2_ext.h:282
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:65
OdGeKnotParameterization
Definition: Ge.h:513
@ kChord
Definition: Ge.h:515