Blender  V2.93
DNA_volume_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #include "DNA_ID.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 struct PackedFile;
30 struct VolumeGridVector;
31 
32 typedef struct Volume_Runtime {
33  /* OpenVDB Grids */
34  struct VolumeGridVector *grids;
35 
36  /* Current frame in sequence for evaluated volume */
37  int frame;
38 
39  /* Default simplify level for volume grids loaded from files. */
42 
43 typedef struct VolumeDisplay {
44  float density;
50  float slice_depth;
51  int _pad[1];
53 
54 typedef struct VolumeRender {
55  int precision;
56  int space;
57  float step_size;
58  float clipping;
60 
61 typedef struct Volume {
62  ID id;
63  struct AnimData *adt; /* animation data (must be immediately after id) */
64 
65  /* File */
66  char filepath[1024]; /* FILE_MAX */
68 
69  /* Sequence */
72  char _pad1[2];
76 
77  /* Flag */
78  int flag;
79 
80  /* Grids */
82 
83  /* Material */
84  struct Material **mat;
85  short totcol;
86  short _pad2[3];
87 
88  /* Render & Display Settings */
91 
92  /* Draw Cache */
93  void *batch_cache;
94 
95  /* Runtime Data */
98 
99 /* Volume.flag */
100 enum {
101  VO_DS_EXPAND = (1 << 0),
102 };
103 
104 /* Volume.sequence_mode */
105 typedef enum VolumeSequenceMode {
111 
112 /* VolumeDisplay.wireframe_type */
113 typedef enum VolumeWireframeType {
119 
120 /* VolumeDisplay.wireframe_detail */
121 typedef enum VolumeWireframeDetail {
125 
126 /* VolumeRender.space */
127 typedef enum VolumeRenderSpace {
131 
132 /* VolumeDisplay.interpolation_method */
138 
139 /* VolumeDisplay.axis_slice_method */
144 
145 /* VolumeDisplay.slice_axis */
146 typedef enum SliceAxis {
152 
153 /* Only one material supported currently. */
154 #define VOLUME_MATERIAL_NR 1
155 
156 #ifdef __cplusplus
157 }
158 #endif
ID and Library types, which are fundamental for sdna.
struct VolumeRender VolumeRender
VolumeRenderSpace
@ VOLUME_SPACE_WORLD
@ VOLUME_SPACE_OBJECT
struct Volume_Runtime Volume_Runtime
VolumeWireframeType
@ VOLUME_WIREFRAME_NONE
@ VOLUME_WIREFRAME_BOXES
@ VOLUME_WIREFRAME_POINTS
@ VOLUME_WIREFRAME_BOUNDS
VolumeDisplayInterpMethod
@ VOLUME_DISPLAY_INTERP_CLOSEST
@ VOLUME_DISPLAY_INTERP_LINEAR
@ VOLUME_DISPLAY_INTERP_CUBIC
AxisAlignedSlicingMethod
@ VOLUME_AXIS_SLICE_SINGLE
@ VOLUME_AXIS_SLICE_FULL
struct VolumeDisplay VolumeDisplay
@ VO_DS_EXPAND
VolumeSequenceMode
@ VOLUME_SEQUENCE_REPEAT
@ VOLUME_SEQUENCE_CLIP
@ VOLUME_SEQUENCE_EXTEND
@ VOLUME_SEQUENCE_PING_PONG
SliceAxis
@ VOLUME_SLICE_AXIS_Y
@ VOLUME_SLICE_AXIS_X
@ VOLUME_SLICE_AXIS_AUTO
@ VOLUME_SLICE_AXIS_Z
struct Volume Volume
VolumeWireframeDetail
@ VOLUME_WIREFRAME_COARSE
@ VOLUME_WIREFRAME_FINE
Definition: DNA_ID.h:273
struct VolumeGridVector * grids
int frame_duration
char filepath[1024]
int frame_start
char is_sequence
int frame_offset
char _pad1[2]
void * batch_cache
struct PackedFile * packedfile
short _pad2[3]
short totcol
struct Material ** mat
VolumeRender render
VolumeDisplay display
char sequence_mode
Volume_Runtime runtime
int active_grid
struct AnimData * adt