mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
Dereferenced null pointers was eliminated for PLib, BSplCLib and BSplSLib. All affected code was changed accordingly.
103 lines
3.2 KiB
Plaintext
103 lines
3.2 KiB
Plaintext
// Created on: 1993-11-25
|
|
// Created by: Bruno DUMORTIER
|
|
// Copyright (c) 1993-1999 Matra Datavision
|
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// This library is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
// by the Free Software Foundation, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#include <BSplCLib.hxx>
|
|
#include <TColgp_Array2OfPnt.hxx>
|
|
#include <TColStd_Array2OfReal.hxx>
|
|
|
|
//=======================================================================
|
|
//function : CoefsD0
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline void BSplSLib::CoefsD0(const Standard_Real U,
|
|
const Standard_Real V,
|
|
const TColgp_Array2OfPnt& Poles,
|
|
const TColStd_Array2OfReal* Weights,
|
|
gp_Pnt& Point)
|
|
{
|
|
BSplSLib::CacheD0(U, V,
|
|
Poles.RowLength() - 1, Poles.ColLength() - 1,
|
|
0., 0., 1., 1.,
|
|
Poles, Weights, Point);
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : CoefsD1
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline void BSplSLib::CoefsD1(const Standard_Real U,
|
|
const Standard_Real V,
|
|
const TColgp_Array2OfPnt& Poles,
|
|
const TColStd_Array2OfReal* Weights,
|
|
gp_Pnt& Point,
|
|
gp_Vec& VecU,
|
|
gp_Vec& VecV)
|
|
{
|
|
BSplSLib::CacheD1(U, V,
|
|
Poles.RowLength() - 1, Poles.ColLength() - 1,
|
|
0., 0., 1., 1.,
|
|
Poles, Weights, Point, VecU, VecV);
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : CoefsD2
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline void BSplSLib::CoefsD2(const Standard_Real U,
|
|
const Standard_Real V,
|
|
const TColgp_Array2OfPnt& Poles,
|
|
const TColStd_Array2OfReal* Weights,
|
|
gp_Pnt& Point,
|
|
gp_Vec& VecU,
|
|
gp_Vec& VecV,
|
|
gp_Vec& VecUU,
|
|
gp_Vec& VecUV,
|
|
gp_Vec& VecVV)
|
|
{
|
|
BSplSLib::CacheD2(U, V,
|
|
Poles.RowLength() - 1, Poles.ColLength() - 1,
|
|
0., 0., 1., 1.,
|
|
Poles, Weights, Point, VecU, VecV,
|
|
VecUU, VecUV, VecVV);
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : PolesCoefficients
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline void BSplSLib::PolesCoefficients(const TColgp_Array2OfPnt& Poles,
|
|
TColgp_Array2OfPnt& CachePoles)
|
|
{
|
|
BSplSLib::PolesCoefficients(Poles, BSplSLib::NoWeights(),
|
|
CachePoles, BSplSLib::NoWeights());
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : NoWeights
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline TColStd_Array2OfReal* BSplSLib::NoWeights()
|
|
{
|
|
return NULL;
|
|
}
|
|
|