Kig Python Scripting API Documentation

cubic-common.h
1 // Copyright (C) 2003 Dominique Devriese <devriese@kde.org>
2 
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301, USA.
17 
18 #ifndef KIG_MISC_CUBIC_COMMON_H
19 #define KIG_MISC_CUBIC_COMMON_H
20 
21 #include "common.h"
22 
23 class Transformation;
24 
32 {
33 public:
34  double coeffs[10];
43  explicit CubicCartesianData();
48  CubicCartesianData( double a000, double a001, double a002,
49  double a011, double a012, double a022,
50  double a111, double a112, double a122,
51  double a222 )
52  {
53  coeffs[0] = a000;
54  coeffs[1] = a001;
55  coeffs[2] = a002;
56  coeffs[3] = a011;
57  coeffs[4] = a012;
58  coeffs[5] = a022;
59  coeffs[6] = a111;
60  coeffs[7] = a112;
61  coeffs[8] = a122;
62  coeffs[9] = a222;
63  }
64  CubicCartesianData( const double incoeffs[10] );
65 
84  bool valid() const;
85 };
86 
87 bool operator==( const CubicCartesianData& lhs, const CubicCartesianData& rhs );
88 
95 const CubicCartesianData calcCubicThroughPoints (
96  const std::vector<Coordinate>& points );
97 
98 const CubicCartesianData calcCubicCuspThroughPoints (
99  const std::vector<Coordinate>& points );
100 
101 const CubicCartesianData calcCubicNodeThroughPoints (
102  const std::vector<Coordinate>& points );
103 
104 double calcCubicYvalue ( double x, double ymin, double ymax,
105  int root, CubicCartesianData data,
106  bool& valid, int& numroots );
107 
108 const Coordinate calcCubicLineIntersect( const CubicCartesianData& c,
109  const LineData& l,
110  int root, bool& valid );
111 
112 void calcCubicLineRestriction ( CubicCartesianData data,
113  Coordinate p1, Coordinate dir,
114  double& a, double& b, double& c, double& d );
115 
116 const CubicCartesianData calcCubicTransformation (
117  const CubicCartesianData& data,
118  const Transformation& t, bool& valid );
119 
120 #endif
static CubicCartesianData invalidData()
Create an invalid CubicCartesianData.
bool valid() const
Return whether this is a valid CubicCartesianData.
Simple class representing a line.
Definition: common.h:60
CubicCartesianData()
Default Constructor.
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
Class representing a transformation.
Definition: kigtransform.h:37
CubicCartesianData(double a000, double a001, double a002, double a011, double a012, double a022, double a111, double a112, double a122, double a222)
Constructor.
Definition: cubic-common.h:48
This class represents an equation of a cubic in the form (in homogeneous coordinates, ), .
Definition: cubic-common.h:31
KDE Logo
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Tue Feb 25 2025 13:46:37 by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001