Lagrange
ExactPredicates.h
1/*
2 * Copyright 2016 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/api.h>
15#include <lagrange/common.h>
16
17#include <memory>
18#include <string>
19
20namespace lagrange {
21
22class LA_CORE_API ExactPredicates
23{
24public:
33 static std::unique_ptr<ExactPredicates> create(const std::string& engine);
34
35public:
36 ExactPredicates() = default;
37 virtual ~ExactPredicates() = default;
38
39public:
50 virtual short collinear3D(double p1[3], double p2[3], double p3[3]) const;
51
63 virtual short orient2D(double p1[2], double p2[2], double p3[2]) const = 0;
64
78 virtual short orient3D(double p1[3], double p2[3], double p3[3], double p4[3]) const = 0;
79
93 virtual short incircle(double p1[2], double p2[2], double p3[2], double p4[2]) const = 0;
94
110 virtual short insphere(double p1[3], double p2[3], double p3[3], double p4[3], double p5[3])
111 const = 0;
112};
113} // namespace lagrange
Definition: ExactPredicates.h:23
virtual short orient2D(double p1[2], double p2[2], double p3[2]) const =0
Exact 2D orientation test.
virtual short insphere(double p1[3], double p2[3], double p3[3], double p4[3], double p5[3]) const =0
Exact 3D insphere test.
virtual short incircle(double p1[2], double p2[2], double p3[2], double p4[2]) const =0
Exact 2D incircle test.
virtual short orient3D(double p1[3], double p2[3], double p3[3], double p4[3]) const =0
Exact 3D orientation test.
Main namespace for Lagrange.
Definition: AABBIGL.h:30