cartesian2d.h
Go to the documentation of this file.
1 // Copyright (c) 2010-2016 The YP-Spur Authors, except where otherwise indicated.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to
5 // deal in the Software without restriction, including without limitation the
6 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 // sell copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 // SOFTWARE.
20 
21 #ifndef __AUXLIB_CARTESIAN2D_H
22 #define __AUXLIB_CARTESIAN2D_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif // __cplusplus
27 
28 #include <unistd.h>
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <math.h>
32 
33 typedef struct cs_t *CSptr;
34 typedef struct cs_t
35 {
36  double x;
37  double y;
38  double theta;
39  CSptr parent;
40  CSptr child;
41  CSptr brother;
42  int level;
44 
45 CSptr CS_add(CSptr parent_cs, double x, double y, double theta);
46 int CS_delete(CSptr target_cs);
47 int CS_set(CSptr target_cs, double x, double y, double theta);
48 int CS_set_on_CS(CSptr target_cs, CSptr on_cs, double x, double y, double theta);
49 void CS_turn_base(double *x, double *y, double *theta);
50 
51 void CS_recursive_trans(CSptr target_cs, CSptr now_cs, double *x, double *y, double *theta);
52 void inv_trans_cs(CSptr target_cs, double *x, double *y, double *theta);
53 void trans_cs(CSptr target_cs, double *x, double *y, double *theta);
54 void trace_trans_cs(CSptr target_cs, double *x, double *y, double *theta);
55 
56 #ifdef __cplusplus
57 }
58 #endif // __cplusplus
59 #endif // __AUXLIB_CARTESIAN2D_H
double theta
Definition: cartesian2d.h:38
int CS_delete(CSptr target_cs)
Definition: libcarte2d.c:80
CSptr CS_add(CSptr parent_cs, double x, double y, double theta)
Definition: libcarte2d.c:31
void inv_trans_cs(CSptr target_cs, double *x, double *y, double *theta)
Definition: libcarte2d.c:173
int CS_set_on_CS(CSptr target_cs, CSptr on_cs, double x, double y, double theta)
Definition: libcarte2d.c:113
void CS_turn_base(double *x, double *y, double *theta)
Definition: libcarte2d.c:123
void trans_cs(CSptr target_cs, double *x, double *y, double *theta)
Definition: libcarte2d.c:187
void CS_recursive_trans(CSptr target_cs, CSptr now_cs, double *x, double *y, double *theta)
Definition: libcarte2d.c:137
CSptr parent
Definition: cartesian2d.h:39
int level
Definition: cartesian2d.h:42
int CS_set(CSptr target_cs, double x, double y, double theta)
Definition: libcarte2d.c:100
struct cs_t CoordinateSystem
double y
Definition: cartesian2d.h:37
struct cs_t * CSptr
Definition: cartesian2d.h:33
void trace_trans_cs(CSptr target_cs, double *x, double *y, double *theta)
Definition: libcarte2d.c:201
double x
Definition: cartesian2d.h:36
CSptr child
Definition: cartesian2d.h:40
CSptr brother
Definition: cartesian2d.h:41


yp-spur
Author(s):
autogenerated on Fri May 7 2021 02:12:17