Open CASCADE Technology  7.4.0
Public Member Functions

BSplSLib_Cache Class Reference

A cache class for Bezier and B-spline surfaces. More...

#include <BSplSLib_Cache.hxx>

Inheritance diagram for BSplSLib_Cache:
Inheritance graph
[legend]

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. 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 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. 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_Transientoperator= (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_TransientThis () 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...
 

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BSplSLib_Cache()

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.

Parameters
theDegreeUdegree along the first parameter (U) of the surface
thePeriodicUidentify the surface is periodical along U axis
theFlatKnotsUknots of the surface (with repetition) along U axis
theDegreeVdegree alogn the second parameter (V) of the surface
thePeriodicVidentify the surface is periodical along V axis
theFlatKnotsVknots of the surface (with repetition) along V axis
theWeightsarray of weights of corresponding poles

Member Function Documentation

◆ BuildCache()

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.

Parameters
theParameterUthe parametric value on the U axis to identify the span
theParameterVthe parametric value on the V axis to identify the span
theDegreeUdegree along U axis
thePeriodicUidentify whether the surface is periodic along U axis
theFlatKnotsUflat knots of the surface along U axis
theDegreeVdegree along V axis
thePeriodicVidentify whether the surface is periodic along V axis
theFlatKnotsVflat knots of the surface along V axis
thePolesarray of poles of the surface
theWeightsarray of weights of corresponding poles

◆ D0()

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.

Parameters
[in]theUfirst parameter for calculation of the value
[in]theVsecond parameter for calculation of the value
[out]thePointthe result of calculation (the point on the surface)

◆ D1()

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.

Parameters
[in]theUfirst parameter of calculation of the value
[in]theVsecond parameter of calculation of the value
[out]thePointthe result of calculation (the point on the surface)
[out]theTangentUtangent vector along U axis in the calculated point
[out]theTangentVtangent vector along V axis in the calculated point

◆ D2()

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.

Parameters
[in]theUfirst parameter of calculation of the value
[in]theVsecond parameter of calculation of the value
[out]thePointthe result of calculation (the point on the surface)
[out]theTangentUtangent vector along U axis in the calculated point
[out]theTangentVtangent vector along V axis in the calculated point
[out]theCurvatureUcurvature vector (2nd derivative on U) along U axis
[out]theCurvatureVcurvature vector (2nd derivative on V) along V axis
[out]theCurvatureUV2nd mixed derivative on U anv V

◆ IsCacheValid()

Standard_Boolean BSplSLib_Cache::IsCacheValid ( Standard_Real  theParameterU,
Standard_Real  theParameterV 
) const

Verifies validity of the cache using parameters of the point.

Parameters
theParameterUfirst parameter of the point placed in the span
theParameterVsecond parameter of the point placed in the span

The documentation for this class was generated from the following file: