Open CASCADE Technology
7.3.0
|
A cache class for Bezier and B-spline surfaces. More...
#include <BSplSLib_Cache.hxx>
Public Member Functions | |
BSplSLib_Cache () | |
Default constructor. More... | |
BSplSLib_Cache (const Standard_Integer &theDegreeU, const Standard_Boolean &thePeriodicU, const TColStd_Array1OfReal &theFlatKnotsU, const Standard_Integer &theDegreeV, const Standard_Boolean &thePeriodicV, const TColStd_Array1OfReal &theFlatKnotsV, const TColgp_Array2OfPnt &thePoles, const TColStd_Array2OfReal *theWeights=NULL) | |
Constructor for caching of the span for the surface. More... | |
Standard_Boolean | IsCacheValid (Standard_Real theParameterU, Standard_Real theParameterV) const |
Verifies validity of the cache using parameters of the point. More... | |
void | BuildCache (const Standard_Real &theParameterU, const Standard_Real &theParameterV, const Standard_Integer &theDegreeU, const Standard_Boolean &thePeriodicU, const TColStd_Array1OfReal &theFlatKnotsU, const Standard_Integer &theDegreeV, const Standard_Boolean &thePeriodicV, const TColStd_Array1OfReal &theFlatKnotsV, const TColgp_Array2OfPnt &thePoles, const TColStd_Array2OfReal *theWeights=NULL) |
Recomputes the cache data. Does not verify validity of the cache. More... | |
void | D0 (const Standard_Real &theU, const Standard_Real &theV, gp_Pnt &thePoint) const |
Calculates the point on the surface for specified parameters. More... | |
void | D1 (const Standard_Real &theU, const Standard_Real &theV, gp_Pnt &thePoint, gp_Vec &theTangentU, gp_Vec &theTangentV) const |
Calculates the point on the surface and its first derivative. More... | |
void | D2 (const Standard_Real &theU, const Standard_Real &theV, gp_Pnt &thePoint, gp_Vec &theTangentU, gp_Vec &theTangentV, gp_Vec &theCurvatureU, gp_Vec &theCurvatureV, gp_Vec &theCurvatureUV) const |
Calculates the point on the surface and derivatives till second order. More... | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. More... | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. More... | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. More... | |
virtual | ~Standard_Transient () |
Destructor must be virtual. More... | |
virtual void | Delete () const |
Memory deallocator for transient classes. More... | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. More... | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. More... | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. More... | |
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
Standard_Transient * | This () const |
Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More... | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. More... | |
void | IncrementRefCounter () const |
Increments the reference counter of this object. More... | |
Standard_Integer | DecrementRefCounter () const |
Decrements the reference counter of this object; returns the decremented value. More... | |
Protected Member Functions | |
void | PeriodicNormalization (const Standard_Integer &theDegree, const TColStd_Array1OfReal &theFlatKnots, Standard_Real &theParameter) const |
Normalizes the parameter for periodical surfaces. More... | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
typedef void | base_type |
Returns a type descriptor about this object. More... | |
Static Public Member Functions inherited from Standard_Transient | |
static const char * | get_type_name () |
Returns a type descriptor about this object. More... | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. More... | |
A cache class for Bezier and B-spline surfaces.
Defines all data, that can be cached on a span of the surface. The data should be recalculated in going from span to span.
BSplSLib_Cache::BSplSLib_Cache | ( | ) |
Default constructor.
BSplSLib_Cache::BSplSLib_Cache | ( | const Standard_Integer & | theDegreeU, |
const Standard_Boolean & | thePeriodicU, | ||
const TColStd_Array1OfReal & | theFlatKnotsU, | ||
const Standard_Integer & | theDegreeV, | ||
const Standard_Boolean & | thePeriodicV, | ||
const TColStd_Array1OfReal & | theFlatKnotsV, | ||
const TColgp_Array2OfPnt & | thePoles, | ||
const TColStd_Array2OfReal * | theWeights = NULL |
||
) |
Constructor for caching of the span for the surface.
theDegreeU | degree along the first parameter (U) of the surface |
thePeriodicU | identify the surface is periodical along U axis |
theFlatKnotsU | knots of the surface (with repetition) along U axis |
theDegreeV | degree alogn the second parameter (V) of the surface |
thePeriodicV | identify the surface is periodical along V axis |
theFlatKnotsV | knots of the surface (with repetition) along V axis |
thePoles | array of poles of the surface |
theWeights | array of weights of corresponding poles |
void BSplSLib_Cache::BuildCache | ( | const Standard_Real & | theParameterU, |
const Standard_Real & | theParameterV, | ||
const Standard_Integer & | theDegreeU, | ||
const Standard_Boolean & | thePeriodicU, | ||
const TColStd_Array1OfReal & | theFlatKnotsU, | ||
const Standard_Integer & | theDegreeV, | ||
const Standard_Boolean & | thePeriodicV, | ||
const TColStd_Array1OfReal & | theFlatKnotsV, | ||
const TColgp_Array2OfPnt & | thePoles, | ||
const TColStd_Array2OfReal * | theWeights = NULL |
||
) |
Recomputes the cache data. Does not verify validity of the cache.
theParameterU | the parametric value on the U axis to identify the span |
theParameterV | the parametric value on the V axis to identify the span |
theDegreeU | degree along U axis |
thePeriodicU | identify whether the surface is periodic along U axis |
theFlatKnotsU | flat knots of the surface along U axis |
theDegreeV | degree along V axis |
thePeriodicV | identify whether the surface is periodic along V axis |
theFlatKnotsV | flat knots of the surface along V axis |
thePoles | array of poles of the surface |
theWeights | array of weights of corresponding poles |
void BSplSLib_Cache::D0 | ( | const Standard_Real & | theU, |
const Standard_Real & | theV, | ||
gp_Pnt & | thePoint | ||
) | const |
Calculates the point on the surface for specified parameters.
[in] | theU | first parameter for calculation of the value |
[in] | theV | second parameter for calculation of the value |
[out] | thePoint | the result of calculation (the point on the surface) |
void BSplSLib_Cache::D1 | ( | const Standard_Real & | theU, |
const Standard_Real & | theV, | ||
gp_Pnt & | thePoint, | ||
gp_Vec & | theTangentU, | ||
gp_Vec & | theTangentV | ||
) | const |
Calculates the point on the surface and its first derivative.
[in] | theU | first parameter of calculation of the value |
[in] | theV | second parameter of calculation of the value |
[out] | thePoint | the result of calculation (the point on the surface) |
[out] | theTangentU | tangent vector along U axis in the calculated point |
[out] | theTangentV | tangent vector along V axis in the calculated point |
void BSplSLib_Cache::D2 | ( | const Standard_Real & | theU, |
const Standard_Real & | theV, | ||
gp_Pnt & | thePoint, | ||
gp_Vec & | theTangentU, | ||
gp_Vec & | theTangentV, | ||
gp_Vec & | theCurvatureU, | ||
gp_Vec & | theCurvatureV, | ||
gp_Vec & | theCurvatureUV | ||
) | const |
Calculates the point on the surface and derivatives till second order.
[in] | theU | first parameter of calculation of the value |
[in] | theV | second parameter of calculation of the value |
[out] | thePoint | the result of calculation (the point on the surface) |
[out] | theTangentU | tangent vector along U axis in the calculated point |
[out] | theTangentV | tangent vector along V axis in the calculated point |
[out] | theCurvatureU | curvature vector (2nd derivative on U) along U axis |
[out] | theCurvatureV | curvature vector (2nd derivative on V) along V axis |
[out] | theCurvatureUV | 2nd mixed derivative on U anv V |
Standard_Boolean BSplSLib_Cache::IsCacheValid | ( | Standard_Real | theParameterU, |
Standard_Real | theParameterV | ||
) | const |
Verifies validity of the cache using parameters of the point.
theParameterU | first parameter of the point placed in the span |
theParameterV | second parameter of the point placed in the span |
|
protected |
Normalizes the parameter for periodical surfaces.
[in] | theDegree | degree along selected direction |
[in] | theFlatKnots | knots with repetitions along selected direction |
[in,out] | theParameter | the value to be normalized into the knots array |