BRL-CAD
vlist.h
Go to the documentation of this file.
1/* V L I S T . H
2 * BRL-CAD
3 *
4 * Copyright (c) 1993-2023 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/** @file rt/vlist.h
21 *
22 */
23
24#ifndef RT_VLIST_H
25#define RT_VLIST_H
26
27#include "common.h"
28
29/* system headers */
30#include <stdio.h> /* for FILE */
31
32/* interface headers */
33#include "vmath.h"
34#include "bu/vls.h"
35#include "rt/defines.h"
36
37__BEGIN_DECLS
38
39/**
40 * TODO - replace these with the appropriate libbn calls specifically
41 * passing &RTG.rtg_vlfree
42 */
43RT_EXPORT extern void rt_vlist_copy(struct bu_list *dest,
44 const struct bu_list *src);
45RT_EXPORT extern void rt_vlist_cleanup(void);
46RT_EXPORT extern void rt_vlist_import(struct bu_list *hp,
47 struct bu_vls *namevls,
48 const unsigned char *buf);
49RT_EXPORT extern struct bv_vlblock * rt_vlblock_init(void);
50
51
52
53/************************************************************************
54 * *
55 * UNIX-Plot VLIST import/export routines *
56 * *
57 ************************************************************************/
58
59RT_EXPORT extern int rt_process_uplot_value(struct bu_list **vhead,
60 struct bv_vlblock *vbp,
61 FILE *fp,
62 int c,
63 double char_size,
64 int mode);
65
66
67/**
68 * Read a BRL-style 3-D UNIX-plot file into a vector list. For now,
69 * discard color information, only extract vectors. This might be
70 * more naturally located in mged/plot.c
71 */
72RT_EXPORT extern int rt_uplot_to_vlist(struct bv_vlblock *vbp,
73 FILE *fp,
74 double char_size,
75 int mode);
76
77
78/**
79 * Used by MGED's "labelvert" command.
80 */
81RT_EXPORT extern void rt_label_vlist_verts(struct bv_vlblock *vbp,
82 struct bu_list *src,
83 mat_t mat,
84 double sz,
85 double mm2local);
86
87/**
88 * Used by MGED's "labelface" command.
89 */
90RT_EXPORT extern void rt_label_vlist_faces(struct bv_vlblock *vbp,
91 struct bu_list* f_list,
92 mat_t mat,
93 double sz,
94 double mm2local);
95
96
97__END_DECLS
98
99#endif /* RT_VLIST_H */
100
101/*
102 * Local Variables:
103 * tab-width: 8
104 * mode: C
105 * indent-tabs-mode: t
106 * c-file-style: "stroustrup"
107 * End:
108 * ex: shiftwidth=4 tabstop=8
109 */
Header file for the BRL-CAD common definitions.
void int char * mode
Definition: tig.h:179
void int * c
Definition: tig.h:139
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition: vmath.h:366
void rt_vlist_cleanup(void)
struct bv_vlblock * rt_vlblock_init(void)
int rt_uplot_to_vlist(struct bv_vlblock *vbp, FILE *fp, double char_size, int mode)
void rt_vlist_copy(struct bu_list *dest, const struct bu_list *src)
void rt_label_vlist_verts(struct bv_vlblock *vbp, struct bu_list *src, mat_t mat, double sz, double mm2local)
void rt_label_vlist_faces(struct bv_vlblock *vbp, struct bu_list *f_list, mat_t mat, double sz, double mm2local)
void rt_vlist_import(struct bu_list *hp, struct bu_vls *namevls, const unsigned char *buf)
int rt_process_uplot_value(struct bu_list **vhead, struct bv_vlblock *vbp, FILE *fp, int c, double char_size, int mode)
Definition: list.h:131
Definition: vls.h:53
fundamental vector, matrix, quaternion math macros