aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/Intersection/QuadraticParameterization.h
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-14 14:19:30 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-14 14:19:30 +0000
commit235f56a92f6eb6accbb243e11b3c45e3798f38f2 (patch)
tree2dc85f3ef6164f2f5e4285828d5777c2dbcd77b6 /experimental/Intersection/QuadraticParameterization.h
parentffadfb5d43a2b09394b4650829bcfc7329ed2d30 (diff)
shape ops work in progress
add quartic solution for intersecting quadratics git-svn-id: http://skia.googlecode.com/svn/trunk@5541 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/Intersection/QuadraticParameterization.h')
-rw-r--r--experimental/Intersection/QuadraticParameterization.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/experimental/Intersection/QuadraticParameterization.h b/experimental/Intersection/QuadraticParameterization.h
new file mode 100644
index 0000000000..5c651b61cf
--- /dev/null
+++ b/experimental/Intersection/QuadraticParameterization.h
@@ -0,0 +1,27 @@
+#include "DataTypes.h"
+
+class QuadImplicitForm {
+public:
+ QuadImplicitForm(const Quadratic& q);
+ bool implicit_match(const QuadImplicitForm& two) const;
+
+ double x2() const { return p[xx_coeff]; }
+ double xy() const { return p[xy_coeff]; }
+ double y2() const { return p[yy_coeff]; }
+ double x() const { return p[x_coeff]; }
+ double y() const { return p[y_coeff]; }
+ double c() const { return p[c_coeff]; }
+
+private:
+ enum Coeffs {
+ xx_coeff,
+ xy_coeff,
+ yy_coeff,
+ x_coeff,
+ y_coeff,
+ c_coeff,
+ coeff_count
+ };
+
+ double p[coeff_count];
+};