CFx SDK Documentation  2020SP3
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 
OdGeKnotVector::contains
bool contains(double param) const
OdGeKnotVector::m_Tolerance
double m_Tolerance
Definition: GeKnotVector.h:384
NULL
#define NULL
Definition: GsProperties.h:177
OdGeKnotVector::removeAt
OdGeKnotVector & removeAt(int knotIndex)
OdGeKnotVector::getDistinctKnots
void getDistinctKnots(OdGeDoubleArray &knots, OdGeIntArray *multiplicity=NULL) const
OdGeKnotVector::getArray
friend GE_TOOLKIT_EXPORT OdGeDoubleArray & getArray(OdGeKnotVector *p)
tol
tol
Definition: DimVarDefs.h:2287
OdGeKnotVector::append
OdGeKnotVector & append(OdGeKnotVector &tail, double knotRatio=0.0)
OdGeKnotVector::setTolerance
OdGeKnotVector & setTolerance(double tol)
OdGeKnotVector::asArrayPtr
double * asArrayPtr()
OdGeKnotVector::logicalLength
int logicalLength() const
source
GLsizei GLsizei GLchar * source
Definition: gles2_ext.h:282
OdGeKnotVector::OdGeKnotVector
OdGeKnotVector(int plusMult, const OdGeKnotVector &source)
OdGeKnotVector::insert
OdGeKnotVector & insert(double param)
OdGeKnotVector::setLogicalLength
OdGeKnotVector & setLogicalLength(int size)
OdArray< double, OdMemoryAllocator< double > >
TD_PackPop.h
OdGeKnotVector::OdGeKnotVector
OdGeKnotVector(int size, const double source[], double tol=1.e-9)
OdGeKnotVector::isEqualTo
bool isEqualTo(const OdGeKnotVector &knotVector) const
OdGeKnotVector::split
int split(double param, OdGeKnotVector *pKnotHead, int multLast, OdGeKnotVector *pKnotTail, int multFirst) const
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGeKnotVector::isOn
bool isOn(double knot) const
size
GLsizeiptr size
Definition: gles2_ext.h:182
OdGeKnotVector::multiplicityAt
int multiplicityAt(double param) const
OdGeKnotVector::OdGeKnotVector
OdGeKnotVector(int size, int growSize, double tol=1.e-9)
OdGeKnotVector::setPhysicalLength
OdGeKnotVector & setPhysicalLength(int)
OdGeKnotVector::endParam
double endParam() const
OdGeKnotVector::~OdGeKnotVector
~OdGeKnotVector()
OdGeKnotVector::getArray
friend GE_TOOLKIT_EXPORT const OdGeDoubleArray & getArray(const OdGeKnotVector *p)
OdGeKnotVector::startParam
double startParam() const
OdGeKnotVector::numIntervals
int numIntervals() const
OdGeKnotVector::setRange
OdGeKnotVector & setRange(double lower, double upper)
OdGeKnotVector::getInterval
int getInterval(int order, double param, OdGeInterval &interval) const
OdGeKnotVector::length
int length() const
OdGeKnotVector::multiplicityAt
int multiplicityAt(int knotIndex) const
OdGeKnotVector::asArrayPtr
const double * asArrayPtr() const
OdGeKnotVector::physicalLength
int physicalLength() const
OdGeKnotVector::getPtr
const double * getPtr() const
TD_PackPush.h
OdGeKnotVector::reverse
OdGeKnotVector & reverse()
OdGeKnotVector
Definition: GeKnotVector.h:44
getArray
GE_TOOLKIT_EXPORT OdGeDoubleArray & getArray(OdGeKnotVector *p)
OdGeKnotVector::OdGeKnotVector
OdGeKnotVector(double tol=1.e-9)
OdGeKnotVector::growLength
int growLength() const
OdGeKnotVector::m_Data
OdGeDoubleArray m_Data
Definition: GeKnotVector.h:383
OdGeKnotVector::OdGeKnotVector
OdGeKnotVector(const OdGeDoubleArray &source, double tol=1.e-9)
OdGeKnotVector::isValid
bool isValid(OdUInt32 knotIndex) const
GE_TOOLKIT_EXPORT
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
OdGeKnotVector::OdGeKnotVector
OdGeKnotVector(const OdGeKnotVector &source)
OdGeKnotVector::setGrowLength
OdGeKnotVector & setGrowLength(int rowLength)
OdGeKnotVector::set
OdGeKnotVector & set(int size, const double source[], double tol=1.e-9)
OdGeInterval
Definition: GeInterval.h:40
OdGeKnotVector::insertAt
OdGeKnotVector & insertAt(int knotIndex, double knot, int multiplicity=1)
OdGeKnotVector::isEmpty
bool isEmpty() const
OdGeKnotVector::removeSubVector
OdGeKnotVector & removeSubVector(int startIndex, int endIndex)
OdGeKnotVector::tolerance
double tolerance() const
OdGeKnotVector::append
int append(double knot)
GeIntArray.h
GeDoubleArray.h