CFx SDK Documentation  2022 SP0
GeKnotVector.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 
25 #ifndef OD_GE_KNOT_VECTOR
26 #define OD_GE_KNOT_VECTOR
28 #include "Ge/GeExport.h"
29 #include "Ge/GeDoubleArray.h"
30 #include "Ge/GeIntArray.h"
31 
32 class OdGeInterval;
33 
34 #include "TD_PackPush.h"
35 
44 {
45 public:
54  double tol = 1.e-9);
56  int size,
57  int growSize,
58  double tol = 1.e-9);
60  int size,
61  const double source[],
62  double tol = 1.e-9);
64  int plusMult,
65  const OdGeKnotVector& source);
67  const OdGeKnotVector& source);
69  const OdGeDoubleArray& source,
70  double tol = 1.e-9);
72 
73  OdGeKnotVector& operator =(
74  const OdGeKnotVector& knotVector);
75  OdGeKnotVector& operator =(
76  const OdGeDoubleArray& dblArray);
77 
83  double& operator [](
84  int i);
85  double operator [](
86  int i) const;
87 
93  bool isEqualTo(
94  const OdGeKnotVector& knotVector) const;
95 
99  double startParam() const;
100 
104  double endParam() const;
105 
116  int knotIndex) const;
117 
125  int numIntervals() const;
126 
137  int order,
138  double param,
139  OdGeInterval& interval) const;
140 
152  OdGeDoubleArray& knots,
153  OdGeIntArray *multiplicity = NULL) const;
154 
161  bool contains(
162  double param) const;
163 
167  bool isOn(
168  double knot) const;
169 
174 
181  int knotIndex);
182 
190  int startIndex,
191  int endIndex);
192 
202  int knotIndex,
203  double knot,
204  int multiplicity = 1);
205 
217  double param);
218 
224  int append(
225  double knot);
226 
239  OdGeKnotVector& tail,
240  double knotRatio = 0.0);
241 
252  int split(
253  double param,
254  OdGeKnotVector* pKnotHead,
255  int multLast,
256  OdGeKnotVector* pKnotTail,
257  int multFirst) const;
258 
268  double lower,
269  double upper);
270 
274  double tolerance() const;
275 
283  double tol);
284 
288  int length() const;
289 
293  bool isEmpty() const;
294 
302  int logicalLength() const;
303 
315  int size);
316 
317  int physicalLength() const;
319 
323  int growLength() const;
324 
330  OdGeKnotVector& setGrowLength(int rowLength);
331 
339  const double* getPtr() const;
340 
348  const double* asArrayPtr() const;
349 
357  double* asArrayPtr();
358 
367  int size,
368  const double source[],
369  double tol = 1.e-9);
370 
372  double param) const;
373 
374 protected:
380  bool isValid(
381  OdUInt32 knotIndex) const;
382 
384  double m_Tolerance;
385 
388 };
389 
392 
393 #include "TD_PackPop.h"
394 
395 #endif // OD_GE_KNOT_VECTOR
396 
tol
Definition: DimVarDefs.h:2287
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
GE_TOOLKIT_EXPORT OdGeDoubleArray & getArray(OdGeKnotVector *p)
#define NULL
Definition: GsProperties.h:177
unsigned int OdUInt32
bool isOn(double knot) const
OdGeKnotVector & append(OdGeKnotVector &tail, double knotRatio=0.0)
friend GE_TOOLKIT_EXPORT const OdGeDoubleArray & getArray(const OdGeKnotVector *p)
void getDistinctKnots(OdGeDoubleArray &knots, OdGeIntArray *multiplicity=NULL) const
int multiplicityAt(int knotIndex) const
bool contains(double param) const
OdGeKnotVector(double tol=1.e-9)
int growLength() const
double startParam() const
OdGeKnotVector(int size, int growSize, double tol=1.e-9)
double tolerance() const
OdGeKnotVector & set(int size, const double source[], double tol=1.e-9)
OdGeKnotVector & setRange(double lower, double upper)
bool isEmpty() const
OdGeKnotVector(const OdGeKnotVector &source)
OdGeKnotVector & reverse()
double endParam() const
int split(double param, OdGeKnotVector *pKnotHead, int multLast, OdGeKnotVector *pKnotTail, int multFirst) const
int multiplicityAt(double param) const
double * asArrayPtr()
int getInterval(int order, double param, OdGeInterval &interval) const
double m_Tolerance
Definition: GeKnotVector.h:384
int physicalLength() const
const double * asArrayPtr() const
OdGeKnotVector(int plusMult, const OdGeKnotVector &source)
OdGeKnotVector(const OdGeDoubleArray &source, double tol=1.e-9)
OdGeDoubleArray m_Data
Definition: GeKnotVector.h:383
OdGeKnotVector & insertAt(int knotIndex, double knot, int multiplicity=1)
OdGeKnotVector & setTolerance(double tol)
int logicalLength() const
OdGeKnotVector & removeAt(int knotIndex)
OdGeKnotVector & setPhysicalLength(int)
OdGeKnotVector & setLogicalLength(int size)
bool isValid(OdUInt32 knotIndex) const
OdGeKnotVector & setGrowLength(int rowLength)
int append(double knot)
OdGeKnotVector(int size, const double source[], double tol=1.e-9)
bool isEqualTo(const OdGeKnotVector &knotVector) const
friend GE_TOOLKIT_EXPORT OdGeDoubleArray & getArray(OdGeKnotVector *p)
OdGeKnotVector & removeSubVector(int startIndex, int endIndex)
int numIntervals() const
const double * getPtr() const
int length() const
OdGeKnotVector & insert(double param)
GLsizeiptr size
Definition: gles2_ext.h:182
GLsizei GLsizei GLchar * source
Definition: gles2_ext.h:282