74 VL_DEBUG_SET_OBJECT_NAME()
143 for(
unsigned i=0; i<
mActors.size(); ++i)
155 {min_corner.
x(), min_corner.
y(), min_corner.
z()},
156 {max_corner.
x(), min_corner.
y(), min_corner.
z()},
157 {max_corner.
x(), max_corner.
y(), min_corner.
z()},
158 {min_corner.
x(), max_corner.
y(), min_corner.
z()},
159 {min_corner.
x(), min_corner.
y(), max_corner.
z()},
160 {max_corner.
x(), min_corner.
y(), max_corner.
z()},
161 {max_corner.
x(), max_corner.
y(), max_corner.
z()},
162 {min_corner.
x(), max_corner.
y(), max_corner.
z()}
167 Say(format) << min_corner.
x() << min_corner.
y() << min_corner.
z(),
168 Say(format) << max_corner.
x() << min_corner.
y() << min_corner.
z(),
169 Say(format) << max_corner.
x() << max_corner.
y() << min_corner.
z(),
170 Say(format) << min_corner.
x() << max_corner.
y() << min_corner.
z(),
171 Say(format) << min_corner.
x() << min_corner.
y() << max_corner.
z(),
172 Say(format) << max_corner.
x() << min_corner.
y() << max_corner.
z(),
173 Say(format) << max_corner.
x() << max_corner.
y() << max_corner.
z(),
174 Say(format) << min_corner.
x() << max_corner.
y() << max_corner.
z()
177 for(
int i=0; i<8; ++i)
215 for(
int z=0; z<d; ++z)
217 float tz = (float)z/(d-1);
218 v.
z() = min_corner.
z()*(1.0f-tz) + max_corner.
z()*tz;
219 for(
int y=0; y<h; ++y)
221 float ty = (float)y/(h-1);
222 v.
y() = min_corner.
y()*(1.0f-ty) + max_corner.
y()*ty;
223 for(
int x=0; x<w; ++x)
225 float tx = (float)x/(w-1);
226 v.
x() = min_corner.
x()*(1.0f-tx) + max_corner.
x()*tx;
228 scalar[x+y*w+z*w*h] = func(v.
x(),v.
y(),v.
z());
void setupLabels(const String &format, const fvec3 &min_corner, const fvec3 &max_corner, Font *font, Transform *root_tr)
Associates a Renderable object to an Effect and Transform.
Defines the volume data to be used with a MarchingCube object.
void setEffect(Effect *effect)
Binds an Effect to an Actor.
ref< Text > mTextTemplate
ref< DrawElementsUShort > mDrawElements
Vector3< float > fvec3
A 3 components vector with float precision.
Transform * transform()
Returns the Transform bound tho an Actor.
void setShadowColor(const fvec4 &shadow_color)
ref< Effect > mIsosurfaceEffect
If enabled, do depth comparisons and update the depth buffer; Note that even if the depth buffer exis...
void setup(float *data, bool use_directly, bool copy_data, const fvec3 &bottom_left, const fvec3 &top_right, const ivec3 &slices)
Setup the volume data with the specified memory management.
const fvec3 & minCorner() const
Default value: fvec3(-1,-1,-1)
A simple String formatting class.
A Renderable that renders text with a given Font.
ActorTree * actorTreeMulti()
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
const String & labelFormat() const
Sets the format of the labels.
const T_Scalar & z() const
A font to be used with a Text renderable.
void run(bool generate_colors)
If enabled, use the current lighting parameters to compute the vertex color; Otherwise, simply associate the current color with each vertex, see also Material, LightModel, and Light.
void setText(const String &text)
If enabled, blend the incoming RGBA color values with the values in the color buffers, see also BlendFunc for more information.
Font * acquireFont(const String &font, int size, bool smooth=false)
Creates or returns an already created Font.
ref< Actor > mIsosurfaceActor
Defines the volume parameters to be used with a MarchingCube and Volume object.
void setBorderEnabled(bool border)
const Collection< VolumeInfo > * volumeInfo() const
The Geometry class is a Renderable that implements a polygonal mesh made of polygons, lines and points.
An efficient implementation of the Marching Cubes algorithm.
Visualization Library main namespace.
ref< ArrayFloat3 > mVertsArray
VLGRAPHICS_EXPORT ref< Geometry > makeBox(const vec3 &origin, real xside=1, real yside=1, real zside=1, bool tex_coords=true)
Creates a box.
void evaluateFunction(float *scalar, const fvec3 &min_corner, const fvec3 &max_corner, const Function &func)
void setBackgroundColor(const fvec4 &background_color)
const ActorCollection * actors() const
Returns the actors contained in a ActorTree node.
void setOutlineColor(const fvec4 &outline_color)
The AABB class implements an axis-aligned bounding box using vl::real precision.
ref< Transform > mPlotTransform
ref< ArrayFloat3 > mNormsArray
std::vector< ref< Actor > > mActors
A function to be used with VolumePlot.
const float * values() const
void setShadowVector(const fvec2 &shadow_vector)
const T_Scalar & y() const
void setTransform(Transform *transform)
Binds a Transform to an Actor.
ivec3 mSamplingResolution
Vector3< int > ivec3
A 3 components vector with int precision.
Shader * shader(int lodi=0, int pass=0)
Utility function, same as 'lod(lodi)->at(pass);'.
Defines the sequence of Shader objects used to render an Actor.
void setColor(const fvec4 &color)
void setDisplayListEnabled(bool enabled)
Enable/disable display lists (disabled by default).
void setShadowEnabled(bool shadow)
void setMargin(int margin)
static Matrix4 & getTranslation(Matrix4 &out, const Vector3< float > &v)
void setLod(int lod_index, Renderable *renderable)
Sets the Renderable object representing the LOD level specifed by lod_index.
const fvec3 & maxCorner() const
Default value: fvec3(+1,+1,+1)
Wraps the OpenGL function glLight().
const T_Scalar & x() const
The ref<> class is used to reference-count an Object.
void setBorderColor(const fvec4 &border_color)
The ActorTree class implements a generic tree whose nodes contain Actors.
void setBufferObjectEnabled(bool enabled)
Enable/disable BufferObject (vertex buffer object) (enabled by default).
void setAlignment(int align)
void enable(EEnable capability)
void setMatrix(const fmat4 &matrix)
const Text * textTemplate() const
A Text used to initialize the plot labels.
const Font * labelFont() const
The Font to be used for the box labels.
void compute(const Function &func, float threshold)
Computes the function and generates the plot. This method should be called after all the other method...
VLGRAPHICS_EXPORT FontManager * defFontManager()
Returns the default FontManager used by Visualization Library.
void setBackgroundEnabled(bool background)
ref< Geometry > mIsosurfaceGeometry
void setOutlineEnabled(bool outline)
ref< ActorTree > mActorTreeMulti