cubic-common.h Source File (Kig Python Scripting API)

| # Kig Python Scripting API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members

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
23class Transformation;
24
31 class CubicCartesianData
32{
33public:
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
78 static CubicCartesianData invalidData();
84 bool valid() const;
85};
86
87bool operator==( const CubicCartesianData& lhs, const CubicCartesianData& rhs );
88
95const CubicCartesianData calcCubicThroughPoints (
96 const std::vector<Coordinate>& points );
97
98const CubicCartesianData calcCubicCuspThroughPoints (
99 const std::vector<Coordinate>& points );
100
101const CubicCartesianData calcCubicNodeThroughPoints (
102 const std::vector<Coordinate>& points );
103
104double calcCubicYvalue ( double x, double ymin, double ymax,
105 int root, CubicCartesianData data,
106 bool& valid, int& numroots );
107
108const Coordinate calcCubicLineIntersect( const CubicCartesianData& c,
109 const LineData& l,
110 int root, bool& valid );
111
112void calcCubicLineRestriction ( CubicCartesianData data,
113 Coordinate p1, Coordinate dir,
114 double& a, double& b, double& c, double& d );
115
116const CubicCartesianData calcCubicTransformation (
117 const CubicCartesianData& data,
118 const Transformation& t, bool& valid );
119
120#endif
Coordinate
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition coordinate.h:34
CubicCartesianData
This class represents an equation of a cubic in the form (in homogeneous coordinates,...
Definition cubic-common.h:32
CubicCartesianData::valid
bool valid() const
Return whether this is a valid CubicCartesianData.
CubicCartesianData::invalidData
static CubicCartesianData invalidData()
Create an invalid CubicCartesianData.
CubicCartesianData::CubicCartesianData
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
CubicCartesianData::CubicCartesianData
CubicCartesianData()
LineData
Simple class representing a line.
Definition common.h:49
Transformation
Class representing a transformation.
Definition kigtransform.h:38
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on by doxygen 1.16.1 written by Dimitri van Heesch, © 1997-2001