A cache class for Bezier and B-spline surfaces. More...
#include <BSplSLib_Cache.hxx>

Public Member Functions | |
| 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 TColStd_Array2OfReal *theWeights=NULL) | |
| Constructor for caching of the span for the surface. | |
| Standard_Boolean | IsCacheValid (Standard_Real theParameterU, Standard_Real theParameterV) const |
| Verifies validity of the cache using parameters of the point. | |
| void | BuildCache (const Standard_Real &theParameterU, const Standard_Real &theParameterV, const TColStd_Array1OfReal &theFlatKnotsU, const TColStd_Array1OfReal &theFlatKnotsV, const TColgp_Array2OfPnt &thePoles, const TColStd_Array2OfReal *theWeights=NULL) |
| Recomputes the cache data. Does not verify validity of the cache. | |
| void | D0 (const Standard_Real &theU, const Standard_Real &theV, gp_Pnt &thePoint) const |
| Calculates the point on the surface for specified parameters. | |
| 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. | |
| 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. | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| 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. | |
| 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. | |
| 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. | |
| Standard_Integer | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. | |
| Standard_Integer | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
Additional Inherited Members | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
| static constexpr const char * | get_type_name () |
| Returns a type descriptor about this object. | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
| Returns type descriptor of Standard_Transient class. | |
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 | ( | 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 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 along 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 |
| theWeights | array of weights of corresponding poles |
| void BSplSLib_Cache::BuildCache | ( | const Standard_Real & | theParameterU, |
| const Standard_Real & | theParameterV, | ||
| const TColStd_Array1OfReal & | theFlatKnotsU, | ||
| 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 |