Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuLightDial Class Reference

A multidimensional slider for the light weights! More...

#include <vuLightDial.h>

Inheritance diagram for vuLightDial:

Inheritance graph
[legend]
Collaboration diagram for vuLightDial:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { idLIGHTINT, idHIDE, idLAST }

Public Member Functions

 vuLightDial (wxWindow *parent, vuTFDesignSpec &tf)
 Constructor for the dialog window.
bool isUpdated ()
 lights have been updated?
void updateSliders ()
 Set the slider according to the weights.
float getLj (int j, const wxPoint &x)
 returns value of lagrange interpolation polynomial L(j)

Protected Member Functions

void OnSlideIntensity ()
 change in intensity slider
void OnHide ()
 hide button clicked
void reweightLights ()
 reweights the lights according to slider position
void OnMouseEvent (wxMouseEvent &event)
 mouse handler
void OnPaint ()
 customized handle for paint events
void DrawShape ()
void repaintParent ()
 repaint parent (should be a (vuUtilityWindow*))

Protected Attributes

vuTFDesignSpecm_TFunc
 handle to the tfunc holding the light sources
wxSlider * m_LightIntensity
 Slider for the overall intensity.
wxRect m_DialArea
 area of the dial
int m_WeightX
 position of the light weight
int m_WeightY
 position of the light weight
wxSizer * m_DialSpacer
 spacer for the dial
bool m_IsUpdated
 is updated?
wxPoint m_LPos [LDIAL_MAXLIGHTS]
bool m_LActive [LDIAL_MAXLIGHTS]
wxPoint m_HullPos [LDIAL_MAXLIGHTS]
int m_LIndices [LDIAL_MAXLIGHTS]
int m_NLights
int m_NCHull
vuConvexHull m_CHull
wxBitmap * m_BulbImg

Detailed Description

A multidimensional slider for the light weights!

the weights result from reciprocal distances to the nodes being normalized to sum==1

Definition at line 28 of file vuLightDial.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
idLIGHTINT 
idHIDE 
idLAST 

Definition at line 31 of file vuLightDial.h.


Constructor & Destructor Documentation

vuLightDial::vuLightDial wxWindow *  parent,
vuTFDesignSpec tf
 

Constructor for the dialog window.

This creates the dialog window and it's controls, but doesn't show it. Call the standard ShowModal() method to display it.

Parameters:
parent The parent window showing the dialog.
tf The transfer function to be displayed and edited by the dialog.

Definition at line 40 of file vuLightDial.cpp.

References bulbimg, HEADERIMG, LDIAL_INTENSITY, and LDIAL_SLDRES.


Member Function Documentation

void vuLightDial::DrawShape  )  [protected]
 

Definition at line 159 of file vuLightDial.cpp.

References vuConvexHull::addPoint(), vuConvexHull::clearPoints(), dc, vuConvexHull::getCHull(), vuTFDesignSpec::getNumLights(), m_BulbImg, m_CHull, m_DialArea, m_HullPos, m_LActive, m_LIndices, m_LPos, m_NCHull, m_NLights, M_PI, m_TFunc, m_WeightX, m_WeightY, and MIN.

Referenced by updateSliders().

Here is the call graph for this function:

float vuLightDial::getLj int  j,
const wxPoint &  x
 

returns value of lagrange interpolation polynomial L(j)

Definition at line 278 of file vuLightDial.cpp.

References DNORM, m_LActive, and m_LPos.

Referenced by reweightLights().

bool vuLightDial::isUpdated  )  [inline]
 

lights have been updated?

Definition at line 48 of file vuLightDial.h.

References m_IsUpdated.

Referenced by vuSpectral::glRender(), and vuSpecFVR::glRender().

void vuLightDial::OnHide  )  [protected]
 

hide button clicked

Definition at line 136 of file vuLightDial.cpp.

void vuLightDial::OnMouseEvent wxMouseEvent &  event  )  [protected]
 

mouse handler

Definition at line 290 of file vuLightDial.cpp.

References linalg::abs(), vuConvexHull::addPoint(), LR, m_CHull, m_DialArea, m_IsUpdated, m_LActive, m_LPos, m_WeightX, m_WeightY, repaintParent(), reweightLights(), and RR.

Here is the call graph for this function:

void vuLightDial::OnPaint  )  [protected]
 

customized handle for paint events

Definition at line 146 of file vuLightDial.cpp.

void vuLightDial::OnSlideIntensity  )  [protected]
 

change in intensity slider

Definition at line 262 of file vuLightDial.cpp.

References LDIAL_SLDRES.

void vuLightDial::repaintParent  )  [protected]
 

repaint parent (should be a (vuUtilityWindow*))

Definition at line 402 of file vuLightDial.cpp.

Referenced by OnMouseEvent().

void vuLightDial::reweightLights  )  [protected]
 

reweights the lights according to slider position

Definition at line 362 of file vuLightDial.cpp.

References getLj(), vuTFDesignSpec::getNumLights(), LDIAL_SLDRES, m_DialArea, m_LightIntensity, M_PI, m_TFunc, m_WeightX, m_WeightY, MIN, vuTFDesignSpec::setLightIntensity(), and vuTFDesignSpec::weightLights().

Referenced by OnMouseEvent().

Here is the call graph for this function:

void vuLightDial::updateSliders  ) 
 

Set the slider according to the weights.

A correct implementation of this function is quite tricky if even impossible because of the limitation of the 2D slidespace and the nD weight space. So far we just use an approximation. Actually, we are doing nothing so far ;-)

Definition at line 128 of file vuLightDial.cpp.

References DrawShape(), vuTFDesignSpec::getLightIntensity(), LDIAL_SLDRES, m_LightIntensity, and m_TFunc.

Referenced by vuSpectral::glRender().

Here is the call graph for this function:


Member Data Documentation

wxBitmap* vuLightDial::m_BulbImg [protected]
 

Definition at line 121 of file vuLightDial.h.

Referenced by DrawShape().

vuConvexHull vuLightDial::m_CHull [protected]
 

Definition at line 119 of file vuLightDial.h.

Referenced by DrawShape(), and OnMouseEvent().

wxRect vuLightDial::m_DialArea [protected]
 

area of the dial

Definition at line 102 of file vuLightDial.h.

Referenced by DrawShape(), OnMouseEvent(), and reweightLights().

wxSizer* vuLightDial::m_DialSpacer [protected]
 

spacer for the dial

Definition at line 108 of file vuLightDial.h.

wxPoint vuLightDial::m_HullPos[LDIAL_MAXLIGHTS] [protected]
 

Definition at line 115 of file vuLightDial.h.

Referenced by DrawShape().

bool vuLightDial::m_IsUpdated [protected]
 

is updated?

Definition at line 111 of file vuLightDial.h.

Referenced by isUpdated(), and OnMouseEvent().

bool vuLightDial::m_LActive[LDIAL_MAXLIGHTS] [protected]
 

Definition at line 114 of file vuLightDial.h.

Referenced by DrawShape(), getLj(), and OnMouseEvent().

wxSlider* vuLightDial::m_LightIntensity [protected]
 

Slider for the overall intensity.

Definition at line 99 of file vuLightDial.h.

Referenced by reweightLights(), and updateSliders().

int vuLightDial::m_LIndices[LDIAL_MAXLIGHTS] [protected]
 

Definition at line 116 of file vuLightDial.h.

Referenced by DrawShape().

wxPoint vuLightDial::m_LPos[LDIAL_MAXLIGHTS] [protected]
 

Definition at line 113 of file vuLightDial.h.

Referenced by DrawShape(), getLj(), and OnMouseEvent().

int vuLightDial::m_NCHull [protected]
 

Definition at line 117 of file vuLightDial.h.

Referenced by DrawShape().

int vuLightDial::m_NLights [protected]
 

Definition at line 117 of file vuLightDial.h.

Referenced by DrawShape().

vuTFDesignSpec& vuLightDial::m_TFunc [protected]
 

handle to the tfunc holding the light sources

Definition at line 96 of file vuLightDial.h.

Referenced by DrawShape(), reweightLights(), and updateSliders().

int vuLightDial::m_WeightX [protected]
 

position of the light weight

Definition at line 105 of file vuLightDial.h.

Referenced by DrawShape(), OnMouseEvent(), and reweightLights().

int vuLightDial::m_WeightY [protected]
 

position of the light weight

Definition at line 105 of file vuLightDial.h.

Referenced by DrawShape(), OnMouseEvent(), and reweightLights().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:18 2004 for vuVolume by  doxygen 1.3.9.1