BRL-CAD
voxelize.h
Go to the documentation of this file.
1
/* V O X E L I Z E . 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/voxelize.h */
25
26
#ifndef ANALYZE_VOXELIZE_H
27
#define ANALYZE_VOXELIZE_H
28
29
#include "
common.h
"
30
#include "
raytrace.h
"
31
#include "
analyze/defines.h
"
32
33
__BEGIN_DECLS
34
35
/*
36
* Voxel specific structures
37
*/
38
39
/**
40
* This structure is for lists that store region names for each voxel
41
*/
42
43
struct
voxelRegion
{
44
char
*
regionName
;
45
fastf_t
regionDistance
;
46
struct
voxelRegion
*
nextRegion
;
47
};
48
49
/**
50
* This structure stores the information about voxels provided by a single raytrace.
51
*/
52
53
struct
rayInfo
{
54
fastf_t
sizeVoxel
;
55
fastf_t
*
fillDistances
;
56
struct
voxelRegion
*
regionList
;
57
};
58
59
/**
60
* voxelize function takes raytrace instance and user parameters as inputs
61
*/
62
ANALYZE_EXPORT
extern
void
63
voxelize
(
struct
rt_i
*rtip,
fastf_t
voxelSize[3],
int
levelOfDetail,
void
(*create_boxes)(
void
*callBackData,
int
x
,
int
y
,
int
z
,
const
char
*
regionName
,
fastf_t
percentageFill),
void
*callBackData);
64
65
__END_DECLS
66
67
#endif
/* ANALYZE_VOXELIZE_H */
68
69
/** @} */
70
71
/*
72
* Local Variables:
73
* tab-width: 8
74
* mode: C
75
* indent-tabs-mode: t
76
* c-file-style: "stroustrup"
77
* End:
78
* ex: shiftwidth=4 tabstop=8
79
*/
defines.h
common.h
Header file for the BRL-CAD common definitions.
y
void float float * y
Definition:
tig.h:73
z
void float float float * z
Definition:
tig.h:90
x
void float * x
Definition:
tig.h:72
voxelize
void voxelize(struct rt_i *rtip, fastf_t voxelSize[3], int levelOfDetail, void(*create_boxes)(void *callBackData, int x, int y, int z, const char *regionName, fastf_t percentageFill), void *callBackData)
fastf_t
double fastf_t
fastest 64-bit (or larger) floating point type
Definition:
vmath.h:330
raytrace.h
rayInfo
Definition:
voxelize.h:53
rayInfo::fillDistances
fastf_t * fillDistances
Definition:
voxelize.h:55
rayInfo::sizeVoxel
fastf_t sizeVoxel
Definition:
voxelize.h:54
rayInfo::regionList
struct voxelRegion * regionList
Definition:
voxelize.h:56
rt_i
Definition:
rt_instance.h:61
voxelRegion
Definition:
voxelize.h:43
voxelRegion::regionName
char * regionName
Definition:
voxelize.h:44
voxelRegion::regionDistance
fastf_t regionDistance
Definition:
voxelize.h:45
voxelRegion::nextRegion
struct voxelRegion * nextRegion
Definition:
voxelize.h:46
include
analyze
voxelize.h
Generated on Tue Mar 7 2023 23:41:49 for BRL-CAD by
1.9.3