HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_VolumeOptions.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GEO_VolumeOptions.h (GEO Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GEO_VOLUMEOPTIONS_H_INCLUDED__
12 #define __GEO_VOLUMEOPTIONS_H_INCLUDED__
13 
14 #include <UT/UT_VoxelArray.h>
15 
16 #include "GEO_API.h"
17 
19 {
26 };
27 
29 {
37 };
38 
40 {
46 
48 };
49 
51 {
63 
65 };
66 
68 {
69  explicit
72  fpreal iso = 0.0,
73  fpreal density = 1.0,
76  fpreal tiles = 1.0)
77  : myMode(mode)
78  , myIso(iso)
79  , myDensity(density)
80  , myLod(lod)
81  , myTypeInfo(typeinfo)
82  , myTiles(tiles)
83  {
84  }
85  bool operator==(const GEO_VolumeOptions &v) const
86  {
87  return (myMode == v.myMode
88  && myIso == v.myIso
89  && myDensity == v.myDensity
90  && myLod == v.myLod
91  && myTypeInfo == v.myTypeInfo
92  && myTiles == v.myTiles);
93  }
94  bool operator!=(const GEO_VolumeOptions &v) const
95  {
96  return !(*this == v);
97  }
98 
105 };
106 
107 /// Return string token from GEO_VolumeBorder enum value
108 GEO_API const char * GEOgetVolumeBorderToken(
110 /// Return GEO_VolumeBorder enum value from string token. def is returned if
111 /// token is unknown.
113  const char *token,
114  GEO_VolumeBorder def);
115 
116 /// Return string token from GEO_VolumeVis enum value
117 GEO_API const char * GEOgetVolumeVisToken(
118  GEO_VolumeVis vis);
119 /// Return GEO_VolumeVis enum value from string token. def is returned if
120 /// token is unknown.
122  const char *vis,
123  GEO_VolumeVis def);
124 
125 /// Return string token from GEO_VolumeVisLod enum value
126 GEO_API const char * GEOgetVolumeVisLodToken(
128 /// Return GEO_VolumeVisLod enum value from string token. def is returned if
129 /// token is unknown.
131  const char *token,
132  GEO_VolumeVisLod def);
133 
134 /// Return string token from GEO_VolumeTypeInfo enum value
137 /// Return GEO_VolumeTypeInfo enum value from string token. def is returned if
138 /// token is unknown.
140  const char *token,
141  GEO_VolumeTypeInfo def);
142 
143 inline size_t format(char *buf, size_t bufsize, const GEO_VolumeBorder &v)
144 {
145  UT::Format::Writer writer(buf, bufsize);
147  return f.format(writer, "{}", {GEOgetVolumeBorderToken(v)});
148 }
149 
150 inline size_t format(char *buf, size_t bufsize, const GEO_VolumeVis &v)
151 {
152  UT::Format::Writer writer(buf, bufsize);
154  return f.format(writer, "{}", {GEOgetVolumeVisToken(v)});
155 }
156 
157 inline size_t format(char *buf, size_t bufsize, const GEO_VolumeVisLod &v)
158 {
159  UT::Format::Writer writer(buf, bufsize);
161  return f.format(writer, "{}", {GEOgetVolumeVisLodToken(v)});
162 }
163 
164 inline size_t format(char *buf, size_t bufsize, const GEO_VolumeTypeInfo &v)
165 {
166  UT::Format::Writer writer(buf, bufsize);
168  return f.format(writer, "{}", {GEOgetVolumeTypeInfoToken(v)});
169 }
170 
171 #endif // __GEO_VOLUMEOPTIONS_H_INCLUDED__
bool operator==(const GEO_VolumeOptions &v) const
GEO_API const char * GEOgetVolumeBorderToken(GEO_VolumeBorder border)
Return string token from GEO_VolumeBorder enum value.
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
GLenum GLuint GLsizei bufsize
Definition: glcorearb.h:1818
const GLdouble * v
Definition: glcorearb.h:837
bool operator!=(const GEO_VolumeOptions &v) const
GEO_API GEO_VolumeBorder GEOgetVolumeBorderEnum(const char *token, GEO_VolumeBorder def)
GEO_API GEO_VolumeTypeInfo GEOgetVolumeTypeInfoEnum(const char *token, GEO_VolumeTypeInfo def)
GEO_VolumeVis myMode
GLfloat f
Definition: glcorearb.h:1926
size_t format(char *buf, size_t bufsize, const GEO_VolumeBorder &v)
GEO_API const char * GEOgetVolumeVisLodToken(GEO_VolumeVisLod lod)
Return string token from GEO_VolumeVisLod enum value.
GEO_VolumeBorder
GEO_VolumeTypeInfo myTypeInfo
GEO_VolumeVisLod myLod
GEO_API const char * GEOgetVolumeVisToken(GEO_VolumeVis vis)
Return string token from GEO_VolumeVis enum value.
GEO_VolumeTypeInfo
#define GEO_API
Definition: GEO_API.h:14
GEO_VolumeOptions(GEO_VolumeVis mode=GEO_VOLUMEVIS_SMOKE, fpreal iso=0.0, fpreal density=1.0, GEO_VolumeVisLod lod=GEO_VOLUMEVISLOD_FULL, GEO_VolumeTypeInfo typeinfo=GEO_VOLUMETYPEINFO_NONE, fpreal tiles=1.0)
GEO_VolumeVis
GEO_API const char * GEOgetVolumeTypeInfoToken(GEO_VolumeTypeInfo lod)
Return string token from GEO_VolumeTypeInfo enum value.
GEO_API GEO_VolumeVisLod GEOgetVolumeVisLodEnum(const char *token, GEO_VolumeVisLod def)
GLenum mode
Definition: glcorearb.h:99
GEO_API GEO_VolumeVis GEOgetVolumeVisEnum(const char *vis, GEO_VolumeVis def)
GLint GLint GLsizei GLint border
Definition: glcorearb.h:108
fpreal64 fpreal
Definition: SYS_Types.h:277
GEO_VolumeVisLod
size_t format(W &writer, const char *format, std::initializer_list< ArgValue > args)
GLint lod
Definition: glcorearb.h:2765