BRL-CAD
grid.h
Go to the documentation of this file.
1/* G R I D . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2008-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/** @addtogroup libanalyze
21 *
22 */
23/** @{ */
24/** @file analyze/grid.h */
25
26#ifndef ANALYZE_GRID_H
27#define ANALYZE_GRID_H
28
29#include "common.h"
30#include "vmath.h"
31#include "bu/opt.h"
32#include "bu/vls.h"
33#include "raytrace.h"
34
35#include "analyze/defines.h"
36
37__BEGIN_DECLS
38
39/*
40 * Grid specific structures
41 */
42
43/**
44 * This structure acts a function pointer table for grid generating functions
45 */
46
48 int (*next_ray)(struct xray *rayp, void *grid_context);
49 double (*grid_spacing)(void *grid_context);
50};
51
52/**
53 * This structure is the context passed to the grid generating functions for
54 * the rectangular grid type.
55 */
56
58 int view;
62 long steps[3];
64
69 size_t x_points;
73};
74
75/**
76 * grid generator for rectangular grid type
77 */
78ANALYZE_EXPORT extern int rectangular_grid_generator(struct xray *rayp, void *grid_context);
79
80/**
81 * grid generator for rectangular triple grid type
82 */
83ANALYZE_EXPORT extern int rectangular_triple_grid_generator(struct xray *rayp, void *grid_context);
84
85/**
86 * function to get the grid spacing of rectangular grid
87 */
88ANALYZE_EXPORT extern double rectangular_grid_spacing(void *grid_context);
89
90
91__END_DECLS
92
93#endif /* ANALYZE_GRID_H */
94
95/** @} */
96
97/*
98 * Local Variables:
99 * tab-width: 8
100 * mode: C
101 * indent-tabs-mode: t
102 * c-file-style: "stroustrup"
103 * End:
104 * ex: shiftwidth=4 tabstop=8
105 */
Header file for the BRL-CAD common definitions.
int rectangular_triple_grid_generator(struct xray *rayp, void *grid_context)
double rectangular_grid_spacing(void *grid_context)
int rectangular_grid_generator(struct xray *rayp, void *grid_context)
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition: vmath.h:345
double fastf_t
fastest 64-bit (or larger) floating point type
Definition: vmath.h:330
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition: vmath.h:351
int(* next_ray)(struct xray *rayp, void *grid_context)
Definition: grid.h:48
double(* grid_spacing)(void *grid_context)
Definition: grid.h:49
size_t current_point
Definition: grid.h:71
fastf_t grid_spacing
Definition: grid.h:70
int max_views
Definition: grid.h:59
long steps[3]
Definition: grid.h:62
point_t mdl_origin
Definition: grid.h:61
point_t start_coord
Definition: grid.h:66
int single_grid
Definition: grid.h:60
size_t x_points
Definition: grid.h:69
size_t total_points
Definition: grid.h:72
vect_t ray_direction
Definition: grid.h:65
vect_t dx_grid
Definition: grid.h:67
int refine_flag
Definition: grid.h:63
vect_t dy_grid
Definition: grid.h:68
Primary ray data structure.
Definition: xray.h:41
fundamental vector, matrix, quaternion math macros