-
Notifications
You must be signed in to change notification settings - Fork 2
/
vlist.h
127 lines (107 loc) · 4.21 KB
/
vlist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/* V L I S T . H
* BRL-CAD
*
* Copyright (c) 1993-2015 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; see the file named COPYING for more
* information.
*/
/** @file rt/vlist.h
*
*/
#ifndef RT_VLIST_H
#define RT_VLIST_H
#include "common.h"
#include "vmath.h"
#include "bu/vls.h"
__BEGIN_DECLS
/**
* TODO - replace these with the appropriate libbn calls specifically
* passing &RTG.rtg_vlfree
*/
RT_EXPORT extern void rt_vlist_copy(struct bu_list *dest,
const struct bu_list *src);
RT_EXPORT extern void rt_vlist_cleanup(void);
RT_EXPORT extern void rt_vlist_import(struct bu_list *hp,
struct bu_vls *namevls,
const unsigned char *buf);
RT_EXPORT extern struct bn_vlblock * rt_vlblock_init(void);
/************************************************************************
* *
* UNIX-Plot VLIST import/export routines *
* *
************************************************************************/
/**
* Output a bn_vlblock object in extended UNIX-plot format, including
* color.
*/
RT_EXPORT extern void rt_plot_vlblock(FILE *fp,
const struct bn_vlblock *vbp);
/**
* Output a vlist as an extended 3-D floating point UNIX-Plot file.
* You provide the file. Uses libplot3 routines to create the
* UNIX-Plot output.
*/
RT_EXPORT extern void rt_vlist_to_uplot(FILE *fp,
const struct bu_list *vhead);
RT_EXPORT extern int rt_process_uplot_value(struct bu_list **vhead,
struct bn_vlblock *vbp,
FILE *fp,
int c,
double char_size,
int mode);
/**
* Read a BRL-style 3-D UNIX-plot file into a vector list. For now,
* discard color information, only extract vectors. This might be
* more naturally located in mged/plot.c
*/
RT_EXPORT extern int rt_uplot_to_vlist(struct bn_vlblock *vbp,
FILE *fp,
double char_size,
int mode);
/**
* Used by MGED's "labelvert" command.
*/
RT_EXPORT extern void rt_label_vlist_verts(struct bn_vlblock *vbp,
struct bu_list *src,
mat_t mat,
double sz,
double mm2local);
/**
* Used by MGED's "labelvert" command for NMG indices.
*/
RT_EXPORT extern void rt_label_vidx_verts(struct bn_vlblock *vbp,
struct bu_list *src,
mat_t mat,
double sz,
double mm2local);
/**
* Used by MGED's "labelface" command.
*/
RT_EXPORT extern void rt_label_vlist_faces(struct bn_vlblock *vbp,
struct bu_list* f_list,
mat_t mat,
double sz,
double mm2local);
__END_DECLS
#endif /* RT_VLIST_H */
/*
* Local Variables:
* tab-width: 8
* mode: C
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/