Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/AdvApp2Var_Node.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1996-04-09
0002 // Created by: Joelle CHAUVET
0003 // Copyright (c) 1996-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _AdvApp2Var_Node_HeaderFile
0018 #define _AdvApp2Var_Node_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Handle.hxx>
0022 #include <Standard_Type.hxx>
0023 #include <TColgp_Array2OfPnt.hxx>
0024 #include <TColStd_Array2OfReal.hxx>
0025 
0026 //! used to store constraints on a (Ui,Vj) point
0027 class AdvApp2Var_Node : public Standard_Transient
0028 {
0029   DEFINE_STANDARD_RTTIEXT(AdvApp2Var_Node, Standard_Transient)
0030 public:
0031   Standard_EXPORT AdvApp2Var_Node();
0032 
0033   Standard_EXPORT AdvApp2Var_Node(const Standard_Integer iu, const Standard_Integer iv);
0034 
0035   Standard_EXPORT AdvApp2Var_Node(const gp_XY&           UV,
0036                                   const Standard_Integer iu,
0037                                   const Standard_Integer iv);
0038 
0039   //! Returns the coordinates (U,V) of the node
0040   const gp_XY& Coord() const { return myCoord; }
0041 
0042   //! changes the coordinates (U,V) to (x1,x2)
0043   void SetCoord(const Standard_Real x1, const Standard_Real x2)
0044   {
0045     myCoord.SetX(x1);
0046     myCoord.SetY(x2);
0047   }
0048 
0049   //! returns the continuity order in U of the node
0050   Standard_Integer UOrder() const { return myOrdInU; }
0051 
0052   //! returns the continuity order in V of the node
0053   Standard_Integer VOrder() const { return myOrdInV; }
0054 
0055   //! affects the value F(U,V) or its derivates on the node (U,V)
0056   void SetPoint(const Standard_Integer iu, const Standard_Integer iv, const gp_Pnt& Pt)
0057   {
0058     myTruePoints.SetValue(iu, iv, Pt);
0059   }
0060 
0061   //! returns the value F(U,V) or its derivates on the node (U,V)
0062   const gp_Pnt& Point(const Standard_Integer iu, const Standard_Integer iv) const
0063   {
0064     return myTruePoints.Value(iu, iv);
0065   }
0066 
0067   //! affects the error between F(U,V) and its approximation
0068   void SetError(const Standard_Integer iu, const Standard_Integer iv, const Standard_Real error)
0069   {
0070     myErrors.SetValue(iu, iv, error);
0071   }
0072 
0073   //! returns the error between F(U,V) and its approximation
0074   Standard_Real Error(const Standard_Integer iu, const Standard_Integer iv) const
0075   {
0076     return myErrors.Value(iu, iv);
0077   }
0078 
0079   //! Assign operator.
0080   AdvApp2Var_Node& operator=(const AdvApp2Var_Node& theOther)
0081   {
0082     myTruePoints = theOther.myTruePoints;
0083     myErrors     = theOther.myErrors;
0084     myCoord      = theOther.myCoord;
0085     myOrdInU     = theOther.myOrdInU;
0086     myOrdInV     = theOther.myOrdInV;
0087     return *this;
0088   }
0089 
0090 private:
0091   AdvApp2Var_Node(const AdvApp2Var_Node& theOther);
0092 
0093 private:
0094   TColgp_Array2OfPnt   myTruePoints;
0095   TColStd_Array2OfReal myErrors;
0096   gp_XY                myCoord;
0097   Standard_Integer     myOrdInU;
0098   Standard_Integer     myOrdInV;
0099 };
0100 
0101 #endif // _AdvApp2Var_Node_HeaderFile