Kinetic Visualization (Visualisierung 2 - S2012)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes
AppletParticleKinematicImpl Class Reference

Here our main rendering starts. More...

#include <AppletParticleKinematicImpl.h>

Inheritance diagram for AppletParticleKinematicImpl:
AppletParticleKinematic

List of all members.

Public Member Functions

 AppletParticleKinematicImpl ()
virtual ~AppletParticleKinematicImpl (void)
virtual vl::String appletInfo ()
virtual void initEvent ()
void fileDroppedEvent (const std::vector< vl::String > &files)
void updateText ()
virtual void updateScene ()
virtual void keyPressEvent (unsigned short, vl::EKey key)
void initialize ()
vl::Rendering * volumeRendering ()
vl::Rendering * particleRendering ()
void setStickParticleToDensityLevel (bool stick)
void setParticleCurvatureK (float k)
void setParticleFlockingK (float k)
void setParticleRepulsionK (float k)
void setParticleFlockingSigma (float s)
void setParticleRepulsionSigma (float s)
void setUserPreferredDirection (const vl::vec3 &direction)
void setUserPreferredDirectionK (float k)
void setCrowdedThreshold (float mu)
void setCrowdedSigma (float sigma)
void enableDying (bool d)
void setPreprocessingSigma (float k)
void setDensityLevel (float d)
void enableGaussianPreprocessing (bool doGaussian)
void setGradientMagnitudeThreshold (float threshold)
void setMaxNumParticles (int maxParticles)
void setNeighbourRadius (int radius)
void setSampleStep (float step)
void setShadingIntensity (float intensity)
void setGradientIntensity (float intensity)
void setOpacityIntensity (float intensity)
void setParticleSize (float size)
void setRenderSmoothedImage (bool render)
void setParticlesEnabled (bool particles_enabled)
void setParticleShadingEnabled (bool particle_shading_enabled)
void setRenderModeByIndex (int mode)
void setTransferFunction (vl::ref< vl::Image > img)
vl::Image * getImage ()
void addAppletParticleKinematicListener (AppletParticleKinematicListener *l)
void removeAppletParticleKinematicListener (AppletParticleKinematicListener *l)
void setVolumeFilename (const std::string &filename)
vl::String getVolumeFilename ()
- Public Member Functions inherited from AppletParticleKinematic
 AppletParticleKinematic ()
void updateEvent ()
virtual ~AppletParticleKinematic ()

Private Types

enum  RaycastMode { DVR_Mode }

Private Member Functions

void setupScene ()
 Sets the scene up.
void setupVolume ()
 Initializes the volume.
void setupParticles ()
 Initializes the particles.
void initParticleCandidatePositions ()
 Initializes the candidate particle positions on the volume.
void updateParticles ()
 Updates the particles (must be repeatedly called)
void fireListeners ()
void computeGradientNormalization ()
 Computes the normalized gradient.

Private Attributes

bool PARTICLE_STICK_DENSITY_LEVEL
float PARTICLE_CURVATURE_K
float PARTICLE_FLOCKING_K
float PARTICLE_FLOCKING_SIGMA
float PARTICLE_REPULSION_K
float PARTICLE_REPULSION_SIGMA
float PARTICLE_USER_PREFERRED_DIRECTION_K
vl::vec3 PARTICLE_USER_PREFERRED_DIRECTION
float PARTICLE_CROWDED_THRESHOLD
float PARTICLE_CROWDED_SIGMA
bool ENABLE_PARTICLE_DYING
bool RENDER_SMOOTHED_IMAGE
float SAMPLE_STEP
float SHADING_INTENSITY
float GRADIENT_INTENSITY
float OPACITY_INTENSITY
float PARTICLE_SIZE
bool PARTICLES_ENABLED
bool PARTICLE_SHADING_ENABLED
enum
AppletParticleKinematicImpl::RaycastMode 
MODE
float DENSITY_LEVEL
int NEIGHBOUR_RADIUS
int MAX_NUM_PARTICLES
float GRADIENT_MAGNITUDE_THRESHOLD
float PREPROCESSING_SIGMA
bool PREPROCESSING_GAUSSIAN
bool _reloadParticles
vl::String _volumeFilename
 Filename of the volume.
vl::ref< vl::Transform > _volumeTr
 Transformation of the volume.
vl::ref< vl::Transform > _light0Tr
 Transformation of the light.
vl::ref< vl::Light > _light0
 The light.
vl::ref< vl::Uniform > _shadingIntensityUniform
vl::ref< vl::Uniform > _sampleStepUniform
vl::ref< vl::Uniform > _gradientIntensityUniform
vl::ref< vl::Uniform > _opacityIntensityUniform
vl::ref< vl::Uniform > _particleSizeUniform
vl::ref< vl::Uniform > _particlesEnabledUniform
vl::ref< vl::Uniform > _particlesShadingEnabledUniform
vl::ref< vl::Text > _valThresholdText
vl::ref< vl::GLSLProgram > _GLSL
 main shader
vl::ref< vl::GLSLProgram > _particleProgram
 particle shader
vl::ref< vl::Actor > _volumeAct
 volume 'actor' in the scenegraph
vl::ref< vl::RaycastVolume > _raycastVolume
 volume 'geometry'
vl::ref< vl::Image > _volumeImage
 Volumetric image.
vl::ref< vl::Image > _volumeSmoothedImage
 Smoothed volumetric image.
vl::ref< vl::Image > _volumeGradient
 Gradient image of the volume.
vl::ref< vl::Image > _volumeNormalizedGradient
 Min-Max Normalized gradient of the volume.
vl::ref< vl::Image > _volumeCurvature
 Curvature of the volume.
vl::vec3 _gradientMin
vl::vec3 _gradientMax
std::vector< std::shared_ptr
< Particle > > 
_particles
 A flat list of particles.
std::shared_ptr< ParticleMap_particleMap
 Stores a 3D-map of particles.
std::vector< vl::vec3 > _particleCandidatePositions
 List of possible positions in the volume where particles could spawn.
vl::ref< vl::Geometry > _glParticles
 Stores the particle-points.
vl::ref< vl::Texture > _particleTexture
 texture for the particle
vl::ref< vl::Texture > _particleDepthTexture
 Depth map which is generated in the particle rendering pass.
vl::ref< vl::Texture > _particleColorTexture
 Color texture which is generated in the particle rendering pass.
vl::ref< vl::Texture > _normalizedGradientTexture
 Normalized gradient texture. Used in particle rendering and volume rendering.
vl::ref
< vl::FBOTexture2DAttachment > 
_particleDepthAttachment
vl::ref
< vl::FBOTexture2DAttachment > 
_particleColorAttachment
vl::ref< vl::FramebufferObject > _fboParticles
vl::ref< vl::Rendering > _volumeRendering
 Rendering objects for the volume rendering pass.
vl::ref< vl::Rendering > _particleRendering
 Rendering objects for the particle rendering pass.
vl::ref< vl::Image > _transferFunction
 Storage for the transfer function.
std::vector
< AppletParticleKinematicListener * > 
_listeners
 Set of listeners if something has changed.

Detailed Description

Here our main rendering starts.


Member Enumeration Documentation

Enumerator:
DVR_Mode 

Constructor & Destructor Documentation

AppletParticleKinematicImpl::AppletParticleKinematicImpl ( void  )
AppletParticleKinematicImpl::~AppletParticleKinematicImpl ( void  )
virtual

Member Function Documentation

void AppletParticleKinematicImpl::addAppletParticleKinematicListener ( AppletParticleKinematicListener l)
inlinevirtual
vl::String AppletParticleKinematicImpl::appletInfo ( )
virtual

Reimplemented from AppletParticleKinematic.

void AppletParticleKinematicImpl::computeGradientNormalization ( )
private

Computes the normalized gradient.

void AppletParticleKinematicImpl::enableDying ( bool  d)
virtual
void AppletParticleKinematicImpl::enableGaussianPreprocessing ( bool  doGaussian)
virtual
void AppletParticleKinematicImpl::fileDroppedEvent ( const std::vector< vl::String > &  files)
virtual
void AppletParticleKinematicImpl::fireListeners ( )
private
vl::Image* AppletParticleKinematicImpl::getImage ( )
inlinevirtual
vl::String AppletParticleKinematicImpl::getVolumeFilename ( )
inlinevirtual
void AppletParticleKinematicImpl::initEvent ( )
virtual
void AppletParticleKinematicImpl::initialize ( )
void AppletParticleKinematicImpl::initParticleCandidatePositions ( )
private

Initializes the candidate particle positions on the volume.

void AppletParticleKinematicImpl::keyPressEvent ( unsigned  short,
vl::EKey  key 
)
virtual
vl::Rendering* AppletParticleKinematicImpl::particleRendering ( )
inline
void AppletParticleKinematicImpl::removeAppletParticleKinematicListener ( AppletParticleKinematicListener l)
inlinevirtual
void AppletParticleKinematicImpl::setCrowdedSigma ( float  sigma)
virtual
void AppletParticleKinematicImpl::setCrowdedThreshold ( float  mu)
virtual
void AppletParticleKinematicImpl::setDensityLevel ( float  d)
virtual
void AppletParticleKinematicImpl::setGradientIntensity ( float  intensity)
virtual
void AppletParticleKinematicImpl::setGradientMagnitudeThreshold ( float  threshold)
virtual
void AppletParticleKinematicImpl::setMaxNumParticles ( int  maxParticles)
virtual
void AppletParticleKinematicImpl::setNeighbourRadius ( int  radius)
virtual
void AppletParticleKinematicImpl::setOpacityIntensity ( float  intensity)
virtual
void AppletParticleKinematicImpl::setParticleCurvatureK ( float  k)
virtual
void AppletParticleKinematicImpl::setParticleFlockingK ( float  k)
virtual
void AppletParticleKinematicImpl::setParticleFlockingSigma ( float  s)
virtual
void AppletParticleKinematicImpl::setParticleRepulsionK ( float  k)
virtual
void AppletParticleKinematicImpl::setParticleRepulsionSigma ( float  s)
virtual
void AppletParticleKinematicImpl::setParticlesEnabled ( bool  particles_enabled)
virtual
void AppletParticleKinematicImpl::setParticleShadingEnabled ( bool  particle_shading_enabled)
virtual
void AppletParticleKinematicImpl::setParticleSize ( float  size)
virtual
void AppletParticleKinematicImpl::setPreprocessingSigma ( float  k)
virtual
void AppletParticleKinematicImpl::setRenderModeByIndex ( int  mode)
virtual
void AppletParticleKinematicImpl::setRenderSmoothedImage ( bool  render)
virtual
void AppletParticleKinematicImpl::setSampleStep ( float  step)
virtual
void AppletParticleKinematicImpl::setShadingIntensity ( float  intensity)
virtual
void AppletParticleKinematicImpl::setStickParticleToDensityLevel ( bool  stick)
virtual
void AppletParticleKinematicImpl::setTransferFunction ( vl::ref< vl::Image >  img)
virtual
void AppletParticleKinematicImpl::setupParticles ( )
private

Initializes the particles.

void AppletParticleKinematicImpl::setupScene ( )
private

Sets the scene up.

void AppletParticleKinematicImpl::setupVolume ( )
private

Initializes the volume.

void AppletParticleKinematicImpl::setUserPreferredDirection ( const vl::vec3 &  direction)
virtual
void AppletParticleKinematicImpl::setUserPreferredDirectionK ( float  k)
virtual
void AppletParticleKinematicImpl::setVolumeFilename ( const std::string &  filename)
inline
void AppletParticleKinematicImpl::updateParticles ( )
private

Updates the particles (must be repeatedly called)

void AppletParticleKinematicImpl::updateScene ( )
virtual
void AppletParticleKinematicImpl::updateText ( )
vl::Rendering* AppletParticleKinematicImpl::volumeRendering ( )
inline

Member Data Documentation

vl::ref<vl::FramebufferObject> AppletParticleKinematicImpl::_fboParticles
private
vl::ref<vl::Geometry> AppletParticleKinematicImpl::_glParticles
private

Stores the particle-points.

vl::ref<vl::GLSLProgram> AppletParticleKinematicImpl::_GLSL
private

main shader

vl::ref<vl::Uniform> AppletParticleKinematicImpl::_gradientIntensityUniform
private
vl::vec3 AppletParticleKinematicImpl::_gradientMax
private
vl::vec3 AppletParticleKinematicImpl::_gradientMin
private
vl::ref<vl::Light> AppletParticleKinematicImpl::_light0
private

The light.

vl::ref<vl::Transform> AppletParticleKinematicImpl::_light0Tr
private

Transformation of the light.

std::vector<AppletParticleKinematicListener*> AppletParticleKinematicImpl::_listeners
private

Set of listeners if something has changed.

vl::ref<vl::Texture> AppletParticleKinematicImpl::_normalizedGradientTexture
private

Normalized gradient texture. Used in particle rendering and volume rendering.

vl::ref<vl::Uniform> AppletParticleKinematicImpl::_opacityIntensityUniform
private
std::vector<vl::vec3> AppletParticleKinematicImpl::_particleCandidatePositions
private

List of possible positions in the volume where particles could spawn.

vl::ref<vl::FBOTexture2DAttachment> AppletParticleKinematicImpl::_particleColorAttachment
private
vl::ref<vl::Texture> AppletParticleKinematicImpl::_particleColorTexture
private

Color texture which is generated in the particle rendering pass.

vl::ref<vl::FBOTexture2DAttachment> AppletParticleKinematicImpl::_particleDepthAttachment
private
vl::ref<vl::Texture> AppletParticleKinematicImpl::_particleDepthTexture
private

Depth map which is generated in the particle rendering pass.

std::shared_ptr<ParticleMap> AppletParticleKinematicImpl::_particleMap
private

Stores a 3D-map of particles.

vl::ref<vl::GLSLProgram> AppletParticleKinematicImpl::_particleProgram
private

particle shader

vl::ref<vl::Rendering> AppletParticleKinematicImpl::_particleRendering
private

Rendering objects for the particle rendering pass.

std::vector<std::shared_ptr<Particle> > AppletParticleKinematicImpl::_particles
private

A flat list of particles.

vl::ref<vl::Uniform> AppletParticleKinematicImpl::_particlesEnabledUniform
private
vl::ref<vl::Uniform> AppletParticleKinematicImpl::_particleSizeUniform
private
vl::ref<vl::Uniform> AppletParticleKinematicImpl::_particlesShadingEnabledUniform
private
vl::ref<vl::Texture> AppletParticleKinematicImpl::_particleTexture
private

texture for the particle

vl::ref<vl::RaycastVolume> AppletParticleKinematicImpl::_raycastVolume
private

volume 'geometry'

bool AppletParticleKinematicImpl::_reloadParticles
private
vl::ref<vl::Uniform> AppletParticleKinematicImpl::_sampleStepUniform
private
vl::ref<vl::Uniform> AppletParticleKinematicImpl::_shadingIntensityUniform
private
vl::ref<vl::Image> AppletParticleKinematicImpl::_transferFunction
private

Storage for the transfer function.

vl::ref<vl::Text> AppletParticleKinematicImpl::_valThresholdText
private
vl::ref<vl::Actor> AppletParticleKinematicImpl::_volumeAct
private

volume 'actor' in the scenegraph

vl::ref<vl::Image> AppletParticleKinematicImpl::_volumeCurvature
private

Curvature of the volume.

vl::String AppletParticleKinematicImpl::_volumeFilename
private

Filename of the volume.

vl::ref<vl::Image> AppletParticleKinematicImpl::_volumeGradient
private

Gradient image of the volume.

vl::ref<vl::Image> AppletParticleKinematicImpl::_volumeImage
private

Volumetric image.

vl::ref<vl::Image> AppletParticleKinematicImpl::_volumeNormalizedGradient
private

Min-Max Normalized gradient of the volume.

vl::ref<vl::Rendering> AppletParticleKinematicImpl::_volumeRendering
private

Rendering objects for the volume rendering pass.

vl::ref<vl::Image> AppletParticleKinematicImpl::_volumeSmoothedImage
private

Smoothed volumetric image.

vl::ref<vl::Transform> AppletParticleKinematicImpl::_volumeTr
private

Transformation of the volume.

float AppletParticleKinematicImpl::DENSITY_LEVEL
private
bool AppletParticleKinematicImpl::ENABLE_PARTICLE_DYING
private
float AppletParticleKinematicImpl::GRADIENT_INTENSITY
private
float AppletParticleKinematicImpl::GRADIENT_MAGNITUDE_THRESHOLD
private
int AppletParticleKinematicImpl::MAX_NUM_PARTICLES
private
enum AppletParticleKinematicImpl::RaycastMode AppletParticleKinematicImpl::MODE
private
int AppletParticleKinematicImpl::NEIGHBOUR_RADIUS
private
float AppletParticleKinematicImpl::OPACITY_INTENSITY
private
float AppletParticleKinematicImpl::PARTICLE_CROWDED_SIGMA
private
float AppletParticleKinematicImpl::PARTICLE_CROWDED_THRESHOLD
private
float AppletParticleKinematicImpl::PARTICLE_CURVATURE_K
private
float AppletParticleKinematicImpl::PARTICLE_FLOCKING_K
private
float AppletParticleKinematicImpl::PARTICLE_FLOCKING_SIGMA
private
float AppletParticleKinematicImpl::PARTICLE_REPULSION_K
private
float AppletParticleKinematicImpl::PARTICLE_REPULSION_SIGMA
private
bool AppletParticleKinematicImpl::PARTICLE_SHADING_ENABLED
private
float AppletParticleKinematicImpl::PARTICLE_SIZE
private
bool AppletParticleKinematicImpl::PARTICLE_STICK_DENSITY_LEVEL
private
vl::vec3 AppletParticleKinematicImpl::PARTICLE_USER_PREFERRED_DIRECTION
private
float AppletParticleKinematicImpl::PARTICLE_USER_PREFERRED_DIRECTION_K
private
bool AppletParticleKinematicImpl::PARTICLES_ENABLED
private
bool AppletParticleKinematicImpl::PREPROCESSING_GAUSSIAN
private
float AppletParticleKinematicImpl::PREPROCESSING_SIGMA
private
bool AppletParticleKinematicImpl::RENDER_SMOOTHED_IMAGE
private
float AppletParticleKinematicImpl::SAMPLE_STEP
private
float AppletParticleKinematicImpl::SHADING_INTENSITY
private

The documentation for this class was generated from the following files: