#include <vuTFDesignSpec.h>
Inheritance diagram for vuTFDesignSpec:
Public Member Functions | |
vuTFDesignSpec (dword ncomp=32, dword range=256) | |
This default constructor creates a 32 by 256 look up table for intensities. | |
void | generateFunction () |
Generates the transfer function using the defined control nodes. | |
void | generateOpacities () |
Interpolates the opacity nodes as alpha values into the transfer function. | |
dword | addLight (const float *_col) |
Adds a light source. | |
const LightNode & | getLightNode (dword index) const |
returns a light of given index | |
dword | getNumLights () const |
Returns the number of lights. | |
void | setLightWeight (dword index, float _weight) |
Set the weight for one light. | |
float | getLightWeight (dword index) const |
void | weightLights (const float *weights) |
Define the weights for the lights. | |
void | setLightIntensity (float intensity) |
Sets a scalar that is used to rescale the intensity of the light. | |
float | getLightIntensity () |
Returns the light intensity scaling factor. | |
void | setLightOpacityNode (word lindex, int intensity) |
Set index of the node whose opacity should be controled by the weight of the light. | |
void | generateLight () |
Calculate a light source from a weighted sum of the added light sources. | |
void | setupMtlTriAlphaNodes () |
Adds opacity nodes to span triangles over the materials. | |
void | setAlphaByLight () |
Sets the alpha values of some nodes by the weights of the according light source. | |
void | clearAllNodes () |
Remove all colour and opacity nodes and insert default nodes at 0 and 255. | |
SPalette & | getPalette () |
returns a handle to the spectral palette | |
void | updatePalette () |
sets entries in palette according to lights and materials in transfer func. | |
void | updateFromPalette () |
sets materials and lights in transfer function from values in palette | |
vuTFDesignSpec (dword ncomp=32, dword range=256) | |
This default constructor creates a 32 by 256 look up table for intensities. | |
void | generateFunction () |
Generates the transfer function using the defined control nodes. | |
void | generateOpacities () |
Interpolates the opacity nodes as alpha values into the transfer function. | |
dword | addLight (const float *_col) |
Adds a light source. | |
const LightNode & | getLightNode (dword index) const |
returns a light of given index | |
dword | getNumLights () const |
Returns the number of lights. | |
void | setLightWeight (dword index, float _weight) |
Set the weight for one light. | |
float | getLightWeight (dword index) const |
void | weightLights (const float *weights) |
Define the weights for the lights. | |
void | setLightIntensity (float intensity) |
Sets a scalar that is used to rescale the intensity of the light. | |
float | getLightIntensity () |
Returns the light intensity scaling factor. | |
void | setLightOpacityNode (word lindex, int intensity) |
Set index of the node whose opacity should be controled by the weight of the light. | |
void | generateLight () |
Calculate a light source from a weighted sum of the added light sources. | |
void | setupMtlTriAlphaNodes () |
Adds opacity nodes to span triangles over the materials. | |
void | setAlphaByLight () |
Sets the alpha values of some nodes by the weights of the according light source. | |
void | clearAllNodes () |
Remove all colour and opacity nodes and insert default nodes at 0 and 255. | |
SPalette & | getPalette () |
returns a handle to the spectral palette | |
void | updatePalette () |
sets entries in palette according to lights and materials in transfer func. | |
void | updateFromPalette () |
sets materials and lights in transfer function from values in palette | |
Protected Member Functions | |
void | parseTFunc () |
Parses the transfer function description file. | |
void | writeTFunc (ofstream &ofp) const |
Save the specified transfer function to output stream. | |
bool | readLight () |
Read a line defining a light source. | |
bool | writeLights (ofstream &ofp) const |
Writes information about all registered lights to the output stream. | |
void | parseTFunc () |
Parses the transfer function description file. | |
void | writeTFunc (ofstream &ofp) const |
Save the specified transfer function to output stream. | |
bool | readLight () |
Read a line defining a light source. | |
bool | writeLights (ofstream &ofp) const |
Writes information about all registered lights to the output stream. | |
Protected Attributes | |
vuDVector< LightNode > | m_Lights |
float | m_LightIntensity |
SPalette | m_Palette |
vuDVector< LightNode > | m_Lights |
The getRGBa() function of vuTFIntensity base class is overridden to provide a proper transformation of the spectral colours to RGBa.
Definition at line 13 of file General/vuTFunc/vuTFDesignSpec.h.
|
This default constructor creates a 32 by 256 look up table for intensities.
Definition at line 58 of file General/vuTFunc/vuTFDesignSpec.h. |
|
This default constructor creates a 32 by 256 look up table for intensities.
Definition at line 58 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFDesignSpec.h. |
|
Adds a light source. The spectrum is defined by an array of floating point components. The number of elements in the array has to match the number of components for the light model used in the transfer function (see constructor vuTFDesign() )
|
|
Adds a light source. The spectrum is defined by an array of floating point components. The number of elements in the array has to match the number of components for the light model used in the transfer function (see constructor vuTFDesign() )
Definition at line 62 of file General/vuTFunc/vuTFDesignSpec.cpp. References vuDVector< T >::add(), dword, vuDVector< T >::getLength(), and m_Lights. Referenced by readLight(), and updateFromPalette(). |
Here is the call graph for this function:
|
Remove all colour and opacity nodes and insert default nodes at 0 and 255.
Reimplemented from vuTFDesign. |
|
Remove all colour and opacity nodes and insert default nodes at 0 and 255.
Reimplemented from vuTFDesign. Definition at line 269 of file General/vuTFunc/vuTFDesignSpec.cpp. References vuTFDesign::clearAllNodes(), vuDVector< T >::getLength(), m_Lights, and vuDVector< T >::removeRange(). Referenced by parseTFunc(). |
Here is the call graph for this function:
|
Generates the transfer function using the defined control nodes. Extends vuTFDesign::generateFunction() Reimplemented from vuTFDesign. |
|
Generates the transfer function using the defined control nodes. Extends vuTFDesign::generateFunction() Reimplemented from vuTFDesign. Definition at line 13 of file General/vuTFunc/vuTFDesignSpec.cpp. References vuTFDesign::generateFunction(). Referenced by vuTFDialogSpec::editSpecColour(), vuSpectral::init(), vuSpecSplat::init(), vuSpecFVR::init(), main(), vuTFDialogSpec::OnEditPalette(), vuTFDialogSpec::OnSetupNodes(), and vuTFDialogSpec::OnSlideLight(). |
Here is the call graph for this function:
|
Calculate a light source from a weighted sum of the added light sources. The resulting light is stored in m_Light and is used to make 'colours' out of the reflectances, which is performed in getRGBa(). |
|
Calculate a light source from a weighted sum of the added light sources. The resulting light is stored in m_Light and is used to make 'colours' out of the reflectances, which is performed in getRGBa(). Definition at line 116 of file General/vuTFunc/vuTFDesignSpec.cpp. References dword, vuColour< S >::getData(), getNumLights(), and m_Lights. Referenced by weightLights(). |
Here is the call graph for this function:
|
Interpolates the opacity nodes as alpha values into the transfer function.
Reimplemented from vuTFDesign. |
|
Interpolates the opacity nodes as alpha values into the transfer function.
Reimplemented from vuTFDesign. Definition at line 20 of file General/vuTFunc/vuTFDesignSpec.cpp. References dword, and vuDVector< T >::getLength(). |
Here is the call graph for this function:
|
Returns the light intensity scaling factor.
Definition at line 98 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFDesignSpec.h. |
|
Returns the light intensity scaling factor.
Definition at line 98 of file General/vuTFunc/vuTFDesignSpec.h. Referenced by vuTFDialogSpec::updateSliders(), and vuLightDial::updateSliders(). |
|
returns a light of given index
|
|
returns a light of given index
Definition at line 86 of file General/vuTFunc/vuTFDesignSpec.cpp. References m_Lights. Referenced by main(), vuTFDialogSpec::OnSlideLight(), vuTFDialogSpec::updateSliders(), and writeLights(). |
|
Definition at line 86 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFDesignSpec.h. References getNumLights(), and m_Lights. |
Here is the call graph for this function:
|
Definition at line 86 of file General/vuTFunc/vuTFDesignSpec.h. References getNumLights(), and m_Lights. |
Here is the call graph for this function:
|
Returns the number of lights.
|
|
Returns the number of lights.
Definition at line 76 of file General/vuTFunc/vuTFDesignSpec.cpp. References dword, vuDVector< T >::getLength(), and m_Lights. Referenced by vuTFDialogSpec::buildCustomSizer(), vuLightDial::DrawShape(), vuTFDialogSpec::editSpecColour(), generateLight(), getLightWeight(), vuTFDialogSpec::OnEditPalette(), vuLightDial::reweightLights(), setLightOpacityNode(), updateFromPalette(), updatePalette(), weightLights(), and writeLights(). |
Here is the call graph for this function:
|
returns a handle to the spectral palette
Definition at line 123 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFDesignSpec.h. |
|
returns a handle to the spectral palette
Definition at line 123 of file General/vuTFunc/vuTFDesignSpec.h. |
|
Parses the transfer function description file.
Reimplemented from vuTFDesign. |
|
Parses the transfer function description file.
Reimplemented from vuTFDesign. Definition at line 279 of file General/vuTFunc/vuTFDesignSpec.cpp. References clearAllNodes(), m_Palette, vuTFDesign::readColour(), readLight(), vuTFDesign::readNComp(), vuTFDesign::readOpacity(), SPalette::reset(), and updatePalette(). |
Here is the call graph for this function:
|
Read a line defining a light source. If there is a syntactic error a char* exception is thrown. On succesful reading the light node is added to the transfer function.
|
|
Read a line defining a light source. If there is a syntactic error a char* exception is thrown. On succesful reading the light node is added to the transfer function.
Definition at line 297 of file General/vuTFunc/vuTFDesignSpec.cpp. References addLight(), dword, vuParser::readNumber(), and vuParser::readString(). Referenced by parseTFunc(). |
Here is the call graph for this function:
|
Sets the alpha values of some nodes by the weights of the according light source. This is just an idea for handling multiple alpha values in a different way. |
|
Sets the alpha values of some nodes by the weights of the according light source. This is just an idea for handling multiple alpha values in a different way. Definition at line 217 of file General/vuTFunc/vuTFDesignSpec.cpp. References vuDVector< T >::getLength(), m_Lights, and word. Referenced by vuTFDialogSpec::OnSlideLight(). |
Here is the call graph for this function:
|
Sets a scalar that is used to rescale the intensity of the light.
Definition at line 96 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFDesignSpec.h. References m_LightIntensity. |
|
Sets a scalar that is used to rescale the intensity of the light.
Definition at line 96 of file General/vuTFunc/vuTFDesignSpec.h. References m_LightIntensity. Referenced by vuTFDialogSpec::OnSlideLight(), and vuLightDial::reweightLights(). |
|
Set index of the node whose opacity should be controled by the weight of the light.
|
|
Set index of the node whose opacity should be controled by the weight of the light.
Definition at line 162 of file General/vuTFunc/vuTFDesignSpec.cpp. References getNumLights(), vuTFDesign::getNumOpacities(), and m_Lights. Referenced by vuTFDialogSpec::OnSlideLight(). |
Here is the call graph for this function:
|
Set the weight for one light. The weight for each light is used as coefficient in the weighted sum to determine the final light source. This function does not call generateLight() |
|
Set the weight for one light. The weight for each light is used as coefficient in the weighted sum to determine the final light source. This function does not call generateLight() Definition at line 94 of file General/vuTFunc/vuTFDesignSpec.cpp. References m_Lights. Referenced by weightLights(). |
|
Adds opacity nodes to span triangles over the materials. This is used for the alpha manipulation by light weights in connection with multiple spectral light sources. |
|
Adds opacity nodes to span triangles over the materials. This is used for the alpha manipulation by light weights in connection with multiple spectral light sources. Definition at line 180 of file General/vuTFunc/vuTFDesignSpec.cpp. References vuDVector< T >::getLength(), vuDVector< T >::insert(), vuDVector< T >::removeRange(), and word. Referenced by vuTFDialogSpec::OnSetupNodes(). |
Here is the call graph for this function:
|
sets materials and lights in transfer function from values in palette
|
|
sets materials and lights in transfer function from values in palette
Definition at line 345 of file General/vuTFunc/vuTFDesignSpec.cpp. References addLight(), dword, vuColour< S >::getData(), SPalette::getNLights(), SPalette::getNRefls(), vuTFDesign::getNumColours(), getNumLights(), SPalette::getSpec(), m_Lights, and m_Palette. Referenced by vuTFDialogSpec::editSpecColour(), and vuTFDialogSpec::OnEditPalette(). |
Here is the call graph for this function:
|
sets entries in palette according to lights and materials in transfer func.
|
|
sets entries in palette according to lights and materials in transfer func.
Definition at line 321 of file General/vuTFunc/vuTFDesignSpec.cpp. References SPalette::addLight(), SPalette::addReflectance(), dword, SPalette::getNLights(), SPalette::getNRefls(), vuTFDesign::getNumColours(), getNumLights(), SPalette::getSpec(), ns_vu1112112::light, m_Lights, m_Palette, and SPalette::matchDesignColours(). Referenced by vuTFDialogSpec::editSpecColour(), vuTFDialogSpec::OnEditPalette(), and parseTFunc(). |
Here is the call graph for this function:
|
Define the weights for the lights. The light source used for the scene is then a weighted sum of the given lights ATTENTION: The length of the weights array has to match the number of light sources given by getNumLights(). This function also calls generateLight() |
|
Define the weights for the lights. The light source used for the scene is then a weighted sum of the given lights ATTENTION: The length of the weights array has to match the number of light sources given by getNumLights(). This function also calls generateLight() Definition at line 103 of file General/vuTFunc/vuTFDesignSpec.cpp. References dword, generateLight(), getNumLights(), and setLightWeight(). Referenced by vuTFDialogSpec::OnSlideLight(), and vuLightDial::reweightLights(). |
Here is the call graph for this function:
|
Writes information about all registered lights to the output stream.
|
|
Writes information about all registered lights to the output stream.
Definition at line 254 of file General/vuTFunc/vuTFDesignSpec.cpp. References vuTFDesignSpec::LightNode::col, dword, getLightNode(), getNumLights(), and word. Referenced by writeTFunc(). |
Here is the call graph for this function:
|
Save the specified transfer function to output stream. Override to save extended properties of derived transfer function. On error throw const char * Reimplemented from vuTFDesign. |
|
Save the specified transfer function to output stream. Override to save extended properties of derived transfer function. On error throw const char * Reimplemented from vuTFDesign. Definition at line 246 of file General/vuTFunc/vuTFDesignSpec.cpp. References vuTFDesign::writeColours(), writeLights(), vuTFDesign::writeNComp(), and vuTFDesign::writeOpacities(). |
Here is the call graph for this function:
|
Definition at line 155 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFDesignSpec.h. Referenced by setLightIntensity(). |
|
Definition at line 154 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFDesignSpec.h. |
|
Definition at line 154 of file General/vuTFunc/vuTFDesignSpec.h. Referenced by addLight(), clearAllNodes(), generateLight(), getLightNode(), getLightWeight(), getNumLights(), setAlphaByLight(), setLightOpacityNode(), setLightWeight(), updateFromPalette(), and updatePalette(). |
|
Definition at line 156 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFDesignSpec.h. Referenced by parseTFunc(), updateFromPalette(), and updatePalette(). |