Scene Class Reference

Scene is used to calculate maps of data about the system and its fields that can be rendered onto a Screen. More...

#include <scene.hpp>

Collaboration diagram for Scene:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ecalc_t { CALC_BFIELD = 1, CALC_EFIELD, CALC_POTENTIAL }

Public Member Functions

 Scene (ElectroDynamics &dynamics)
 ~Scene ()
void calc (Screen &screen, ecalc_t ct=CALC_BFIELD)
 Calculate field values based on screen.
void render_map (Screen &screen)
 Render field onto screen.
void render_lic (Screen &screen)
 Render line integral convolutions of the field onto the screen.
void render_lic_animation (Screen &screen, const char *name_prefix, int frames)
 Render line integral convolution animation of the field onto the screen.
void set_coloring (size_t levels=0, bool use_log=false)
 Define coloring scheme used at render operations.
const Screen::colorcmap (prec_t bf)
bool render_bline (Screen &screen, const vect3d &pos, const Screen::color &color, prec_t limit_dist=-1, const vect3d &limit_pos=vect3d(0, 0, 0), prec_t limit_pos_radius=0.0, bool backwards=false)
 Render a lines following the field from given position.
void calibrate_bline_step (const vect3d &pos, prec_t step)
 Precalibrate field values for the render_bline_range() from the given position.
void render_bline_range (Screen &screen, const vect3d &pos0, const vect3d &pos1, const Screen::color &color, prec_t first_factor=1.0, prec_t dist_limit=-1, const vect3d &line_end=vect3d(0, 0, 0), prec_t line_end_radius=0.0)
 Render a series of lines in the given range.
bool find_untouching_bline (vect3d &result, const vect3d &pos0, vect3d &pos1, prec_t limit_dist=-1, prec_t limit_pos_radius=0.0)
 Find the position of a line close to any structures in the simulation.
prec_t get_fmin ()
 Get field minimum magnitude.
prec_t get_fmax ()
 Get field maximum magnitude.
prec_t get_fadd ()
 Get field correction add.
void calibrate_field (prec_t min, prec_t max, prec_t add=0)
 Recalibrate fields to given values used at rendering, values outside the given range are truncated.

Static Public Member Functions

static prec_t hf (prec_t a, prec_t b, prec_t phi)

Friends

struct calctask
struct lictask

Classes

struct  calctask
struct  lictask
struct  value_map

Detailed Description

Scene is used to calculate maps of data about the system and its fields that can be rendered onto a Screen.

The idea is that the screen defines a projection. You first use the Scene to calculate a set of values that are stored withing the Scene object. Later this data can be visualized on the Screen with different parameters.

Definition at line 40 of file scene.hpp.


Member Enumeration Documentation

enum Scene::ecalc_t

Enumerator:
CALC_BFIELD 
CALC_EFIELD 
CALC_POTENTIAL 

Definition at line 112 of file scene.hpp.


Constructor & Destructor Documentation

Scene::Scene ( ElectroDynamics dynamics  ) 

Scene::~Scene (  ) 


Member Function Documentation

void Scene::calc ( Screen screen,
ecalc_t  ct = CALC_BFIELD 
)

Calculate field values based on screen.

void Scene::render_map ( Screen screen  ) 

Render field onto screen.

void Scene::render_lic ( Screen screen  ) 

Render line integral convolutions of the field onto the screen.

void Scene::render_lic_animation ( Screen screen,
const char *  name_prefix,
int  frames 
)

Render line integral convolution animation of the field onto the screen.

void Scene::set_coloring ( size_t  levels = 0,
bool  use_log = false 
)

Define coloring scheme used at render operations.

Parameters:
levels Number of levels to use, with levels=0 meaning all levels
use_log Use logarithmic scale for values

const Screen::color& Scene::cmap ( prec_t  bf  ) 

bool Scene::render_bline ( Screen screen,
const vect3d pos,
const Screen::color color,
prec_t  limit_dist = -1,
const vect3d limit_pos = vect3d(0, 0, 0),
prec_t  limit_pos_radius = 0.0,
bool  backwards = false 
)

Render a lines following the field from given position.

Parameters:
pos Start rendering from
color Render with given color
limit_dist Limit distance to draw the line, with -1 being infinite
limit_pos When line comes to proximity terminate rendering
limit_pos_radius Proximity to limit_pos that is used to terminate drawing
backwards Draw backwards to the field direction
Returns:
True if the line drawn connected on ends.

void Scene::calibrate_bline_step ( const vect3d pos,
prec_t  step 
)

Precalibrate field values for the render_bline_range() from the given position.

void Scene::render_bline_range ( Screen screen,
const vect3d pos0,
const vect3d pos1,
const Screen::color color,
prec_t  first_factor = 1.0,
prec_t  dist_limit = -1,
const vect3d line_end = vect3d(0, 0, 0),
prec_t  line_end_radius = 0.0 
)

Render a series of lines in the given range.

bool Scene::find_untouching_bline ( vect3d result,
const vect3d pos0,
vect3d pos1,
prec_t  limit_dist = -1,
prec_t  limit_pos_radius = 0.0 
)

Find the position of a line close to any structures in the simulation.

prec_t Scene::get_fmin (  )  [inline]

Get field minimum magnitude.

Definition at line 157 of file scene.hpp.

prec_t Scene::get_fmax (  )  [inline]

Get field maximum magnitude.

Definition at line 159 of file scene.hpp.

prec_t Scene::get_fadd (  )  [inline]

Get field correction add.

Definition at line 161 of file scene.hpp.

void Scene::calibrate_field ( prec_t  min,
prec_t  max,
prec_t  add = 0 
) [inline]

Recalibrate fields to given values used at rendering, values outside the given range are truncated.

Definition at line 164 of file scene.hpp.

static prec_t Scene::hf ( prec_t  a,
prec_t  b,
prec_t  phi 
) [static]


Friends And Related Function Documentation

friend struct calctask [friend]

Definition at line 193 of file scene.hpp.

friend struct lictask [friend]

Definition at line 204 of file scene.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Dec 6 20:31:16 2007 for Ephi by  doxygen 1.5.0