geo_polygon.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'geo_polygon.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ERT_GEO_POLYGON_H
20#define ERT_GEO_POLYGON_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <stdbool.h>
27
29
30 typedef struct geo_polygon_struct geo_polygon_type;
31
34 void geo_polygon_free__( void * arg );
35 void geo_polygon_add_point( geo_polygon_type * polygon , double x , double y );
36 void geo_polygon_add_point_front( geo_polygon_type * polygon , double x , double y);
38 bool geo_polygon_contains_point( const geo_polygon_type * polygon , double x , double y);
39 bool geo_polygon_contains_point__( const geo_polygon_type * polygon , double x , double y, bool force_edge_inside);
41 void geo_polygon_fprintf(const geo_polygon_type * polygon , FILE * stream);
42 void geo_polygon_shift(geo_polygon_type * polygon , double x0 , double y0);
45 void geo_polygon_iget_xy(const geo_polygon_type * polygon , int index , double *x , double *y);
46 bool geo_polygon_segment_intersects(const geo_polygon_type * polygon , double x1 , double y1 , double x2 , double y2);
47 const char * geo_polygon_get_name( const geo_polygon_type * polygon );
48 void geo_polygon_set_name( geo_polygon_type * polygon , const char * name);
50 bool geo_polygon_equal( const geo_polygon_type * polygon1 , const geo_polygon_type * polygon2 );
51
53
54#ifdef __cplusplus
55}
56#endif
57#endif
const char *const name
Definition: cJSON.h:258
int index
Definition: cJSON.h:168
void geo_polygon_close(geo_polygon_type *polygoon)
void geo_polygon_fprintf(const geo_polygon_type *polygon, FILE *stream)
bool geo_polygon_segment_intersects(const geo_polygon_type *polygon, double x1, double y1, double x2, double y2)
void geo_polygon_iget_xy(const geo_polygon_type *polygon, int index, double *x, double *y)
void geo_polygon_free(geo_polygon_type *polygon)
void geo_polygon_free__(void *arg)
bool geo_polygon_equal(const geo_polygon_type *polygon1, const geo_polygon_type *polygon2)
void geo_polygon_set_name(geo_polygon_type *polygon, const char *name)
geo_polygon_type * geo_polygon_alloc(const char *name)
void geo_polygon_add_point_front(geo_polygon_type *polygon, double x, double y)
void geo_polygon_add_point(geo_polygon_type *polygon, double x, double y)
void geo_polygon_shift(geo_polygon_type *polygon, double x0, double y0)
bool geo_polygon_contains_point__(const geo_polygon_type *polygon, double x, double y, bool force_edge_inside)
double geo_polygon_get_length(geo_polygon_type *polygon)
bool geo_polygon_contains_point(const geo_polygon_type *polygon, double x, double y)
int geo_polygon_get_size(const geo_polygon_type *polygon)
geo_polygon_type * geo_polygon_fload_alloc_irap(const char *filename)
const char * geo_polygon_get_name(const geo_polygon_type *polygon)
UTIL_IS_INSTANCE_HEADER(geo_polygon)
struct geo_polygon_struct geo_polygon_type
Definition: geo_polygon.hpp:30
void geo_polygon_reset(geo_polygon_type *polygon)
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x(y+z)