#include <TColgp_Array1OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <GeomAbs_Shape.hxx>
+#include <BSplSLib.hxx>
+
class Standard_ConstructionError;
class Standard_DimensionError;
class Standard_RangeError;
//! Raised if the length of P in the U an V direction is not equal to
//! NbUPoles and NbVPoles.
Standard_EXPORT void Poles (TColgp_Array2OfPnt& P) const;
-
+
+ //! Returns the poles of the Bezier surface.
+ const TColgp_Array2OfPnt& Poles() const
+ {
+ return poles->Array2();
+ }
//! Returns the degree of the surface in the U direction it is
//! NbUPoles - 1
//! equal to NbUPoles and NbVPoles.
Standard_EXPORT void Weights (TColStd_Array2OfReal& W) const;
+ //! Returns the weights of the Bezier surface.
+ const TColStd_Array2OfReal* Weights() const
+ {
+ if (!weights.IsNull())
+ return &weights->Array2();
+ return BSplSLib::NoWeights();
+ }
//! Returns True if the first control points row and the
//! last control points row are identical. The tolerance
private:
- Standard_EXPORT Geom_BezierSurface(const Handle(TColgp_HArray2OfPnt)& SurfacePoles, const Handle(TColgp_HArray2OfPnt)& SurfaceCoefficients, const Handle(TColStd_HArray2OfReal)& PoleWeights, const Handle(TColStd_HArray2OfReal)& CoefficientWeights, const Standard_Boolean IsURational, const Standard_Boolean IsVRational);
+ Geom_BezierSurface(const Handle(TColgp_HArray2OfPnt)& SurfacePoles, const Handle(TColStd_HArray2OfReal)& PoleWeights, const Standard_Boolean IsURational, const Standard_Boolean IsVRational);
//! Set poles to Poles, weights to Weights (not
//! copied).
//! coefficient 1.
//!
//! if nbpoles < 2 or nbpoles > MaDegree
- Standard_EXPORT void Init (const Handle(TColgp_HArray2OfPnt)& Poles, const Handle(TColStd_HArray2OfReal)& Weights);
+ void Init (const Handle(TColgp_HArray2OfPnt)& Poles, const Handle(TColStd_HArray2OfReal)& Weights);
- //! Recompute the coeficients.
- Standard_EXPORT void UpdateCoefficients (const Standard_Real U = 0.0, const Standard_Real V = 0.0);
Standard_Boolean urational;
Standard_Boolean vrational;
Handle(TColgp_HArray2OfPnt) poles;
Handle(TColStd_HArray2OfReal) weights;
- Handle(TColgp_HArray2OfPnt) coeffs;
- Handle(TColStd_HArray2OfReal) wcoeffs;
- Standard_Real ucacheparameter;
- Standard_Real vcacheparameter;
- Standard_Real ucachespanlenght;
- Standard_Real vcachespanlenght;
- Standard_Integer validcache;
Standard_Real umaxderivinv;
Standard_Real vmaxderivinv;
Standard_Boolean maxderivinvok;