BRL-CAD
tcl_encode.h
Go to the documentation of this file.
1 /* T C L _ E N C O D E . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2004-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 
21 /*----------------------------------------------------------------------*/
22 /* @file tcl_encode.h */
23 /** @addtogroup bntcl */
24 /** @{ */
25 
26 /**
27  * @brief Support routines for the math functions
28  */
29 
30 #ifndef BN_TCL_ENCODE_H
31 #define BN_TCL_ENCODE_H
32 
33 #include "common.h"
34 #include "vmath.h"
35 #include "bn/defines.h"
36 #include "bu/vls.h"
37 
39 
40 /* XXX Really need a decode_array function that uses atof(),
41  * XXX so that junk like leading { and commas between inputs
42  * XXX don't spoil the conversion.
43  */
44 
45 /* The presence of Tcl_Interp as an arg prevents giving arg list */
46 
47 BN_EXPORT extern int bn_decode_mat(mat_t m,
48  const char *str);
49 BN_EXPORT extern int bn_decode_quat(quat_t q,
50  const char *str);
51 BN_EXPORT extern int bn_decode_vect(vect_t v,
52  const char *str);
53 BN_EXPORT extern int bn_decode_hvect(hvect_t v,
54  const char *str);
55 BN_EXPORT extern void bn_encode_mat(struct bu_vls *vp,
56  const mat_t m);
57 BN_EXPORT extern void bn_encode_quat(struct bu_vls *vp,
58  const quat_t q);
59 BN_EXPORT extern void bn_encode_vect(struct bu_vls *vp,
60  const vect_t v);
61 BN_EXPORT extern void bn_encode_hvect(struct bu_vls *vp,
62  const hvect_t v);
63 
65 
66 #endif /* BN_TCL_ENCODE_H */
67 /** @} */
68 /*
69  * Local Variables:
70  * mode: C
71  * tab-width: 8
72  * indent-tabs-mode: t
73  * c-file-style: "stroustrup"
74  * End:
75  * ex: shiftwidth=4 tabstop=8
76  */
int bn_decode_quat(quat_t q, const char *str)
void bn_encode_vect(struct bu_vls *vp, const vect_t v)
Header file for the BRL-CAD common definitions.
#define __BEGIN_DECLS
Definition: common.h:73
int bn_decode_hvect(hvect_t v, const char *str)
int bn_decode_vect(vect_t v, const char *str)
int bn_decode_mat(mat_t m, const char *str)
Support routines for the math functions.
void bn_encode_quat(struct bu_vls *vp, const quat_t q)
#define __END_DECLS
Definition: common.h:74
void bn_encode_hvect(struct bu_vls *vp, const hvect_t v)
Definition: vls.h:56
void bn_encode_mat(struct bu_vls *vp, const mat_t m)
Definition: tcl.c:108