Commit 4853ed7d authored by Artur Grunau's avatar Artur Grunau

FloatingPointProperty: provide a default step value

Even though many float-based properties derived from
FloatingPointProperty used the same step value, T(0.01), it had to be
specified when instantiating them. To reduce boilerplate code in
property constructors, FloatingPointProperty now uses T(0.01) as the
default step value.
parent 8fcbfb5b
......@@ -36,8 +36,8 @@ namespace campvis {
ProcessorDecoratorBackground::ProcessorDecoratorBackground()
: AbstractProcessorDecorator()
, _backgroundColor1("backgroundColor1", "Background Color 1", tgt::vec4(.9f, .9f, .9f, 1), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, _backgroundColor2("backgroundColor2", "Background Color 2", tgt::vec4(.6f, .6f, .6f, 1), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, _backgroundColor1("backgroundColor1", "Background Color 1", tgt::vec4(.9f, .9f, .9f, 1), tgt::vec4(0.f), tgt::vec4(1.f))
, _backgroundColor2("backgroundColor2", "Background Color 2", tgt::vec4(.6f, .6f, .6f, 1), tgt::vec4(0.f), tgt::vec4(1.f))
{
}
......
......@@ -38,7 +38,7 @@ namespace campvis {
: AbstractProcessorDecorator()
, _applyMask("applyMask", "Apply Mask to image", false, AbstractProcessor::INVALID_SHADER)
, _maskID("maskID", "Mask Image ID", "mask", DataNameProperty::READ)
, _maskColor("maskColor", "Mask Color", tgt::vec4(0.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, _maskColor("maskColor", "Mask Color", tgt::vec4(0.f), tgt::vec4(0.f), tgt::vec4(1.f))
, _texUnit(0)
, _maskImage(0)
{
......
......@@ -39,11 +39,11 @@ namespace campvis {
, _enableShading("EnableShading", "Enable Shading", true, AbstractProcessor::INVALID_SHADER | AbstractProcessor::INVALID_RESULT)
, _centralDifferences("CentralDifferences", "Use Central instead of Forward Differences", false, AbstractProcessor::INVALID_SHADER | AbstractProcessor::INVALID_RESULT)
, _lightPosition("LightPosition", "Light Position", tgt::vec3(-8.f), tgt::vec3(-500.f), tgt::vec3(500.f), tgt::vec3(0.1f))
, _ambientColor("AmbientColor", "Ambient Light Color", tgt::vec3(0.5f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, _diffuseColor("DiffuseColor", "Diffuse Light Color", tgt::vec3(0.75f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, _specularColor("SpecularColor", "Specular Light Color", tgt::vec3(0.5f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, _ambientColor("AmbientColor", "Ambient Light Color", tgt::vec3(0.5f), tgt::vec3(0.f), tgt::vec3(1.f))
, _diffuseColor("DiffuseColor", "Diffuse Light Color", tgt::vec3(0.75f), tgt::vec3(0.f), tgt::vec3(1.f))
, _specularColor("SpecularColor", "Specular Light Color", tgt::vec3(0.5f), tgt::vec3(0.f), tgt::vec3(1.f))
, _shininess("Shininess", "Specular Shininess", 4.f, 0.f, 64.f, 0.5f)
, _attenuation("Attenuation", "Attenuation Factors", tgt::vec3(0.f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, _attenuation("Attenuation", "Attenuation Factors", tgt::vec3(0.f), tgt::vec3(0.f), tgt::vec3(1.f))
, _lightUniformName(lightUniformName)
{
}
......
......@@ -50,7 +50,7 @@ namespace campvis {
, p_transferFunction("transferFunction", "Transfer Function", new SimpleTransferFunction(256))
, p_samplingRate("SamplingRate", "Sampling Rate", 2.f, 0.1f, 10.f, 0.1f)
, p_jitterEntryPoints("jitterEntryPoints", "Jitter Entry Points", true)
, p_jitterStepSizeMultiplier("jitterStepSizeMultiplier", "Jitter Step Size Multiplier", .5f, .1f, 1.f, 0.01f)
, p_jitterStepSizeMultiplier("jitterStepSizeMultiplier", "Jitter Step Size Multiplier", .5f, .1f, 1.f)
, _fragmentShaderFilename(fragmentShaderFileName)
, _shader(0)
, _bindEntryExitDepthTextures(bindEntryExitDepthTextures)
......
......@@ -96,7 +96,7 @@ namespace campvis {
const T& value,
const T& minValue,
const T& maxValue,
const T& stepValue,
const T& stepValue = T(0.01f),
const DecimalsType& decimals = DecimalsType(3),
int invalidationLevel = AbstractProcessor::INVALID_RESULT);
......
......@@ -74,7 +74,7 @@ namespace campvis {
, p_view("View", "Image to Render", viewOptions, 12)
, p_confidenceScaling("ConfidenceScaling", "Confidence Scaling", 1.f, .001f, 1000.f, 0.1f)
, p_blurredScaling("BlurredScaling", "Blurred Scaling", 1.f, .001f, 1000.f, 0.1f)
, p_hue("Hue", "Hue for Uncertainty Mapping", .15f, 0.f, 1.f, 0.01f)
, p_hue("Hue", "Hue for Uncertainty Mapping", .15f, 0.f, 1.f)
, p_use3DTexture("Use3DTexture", "Use 3D Texture", false)
, _shader(0)
{
......
......@@ -49,7 +49,7 @@ namespace campvis {
, p_strainId("StrainDataId", "Input Strain Data ID", "gr.strain", DataNameProperty::READ)
, p_renderTargetID("p_renderTargetID", "Output Image", "gr.output", DataNameProperty::WRITE)
, p_camera("camera", "Camera")
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, _shader(0)
{
addDecorator(new ProcessorDecoratorShading());
......
......@@ -56,7 +56,7 @@ namespace campvis {
, p_camera("Camera", "Camera ID")//, "camera", DataNameProperty::READ, AbstractProcessor::INVALID_RESULT, DataNameProperty::CameraData)
, p_lineWidth("LineWidth", "Line width", 3.f, .5f, 10.f, 0.1f)
, p_renderMode("RenderMode", "Render Mode", renderModeOptions, 2, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_SHADER)
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, _shader(0)
{
addDecorator(new ProcessorDecoratorShading());
......
......@@ -40,7 +40,7 @@ namespace campvis {
: RaycastingProcessor(canvasSize, "modules/columbia/glsl/strainraycaster.frag", true)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_enableShadowing("EnableShadowing", "Enable Hard Shadows", false, AbstractProcessor::INVALID_SHADER)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f, 0.01f)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f)
, p_enableAdaptiveStepsize("EnableAdaptiveStepSize", "Enable Adaptive Step Size", true, AbstractProcessor::INVALID_SHADER)
{
addDecorator(new ProcessorDecoratorShading());
......
......@@ -168,7 +168,7 @@ namespace campvis {
, p_targetImageID("OutputConfidenceMap", "Output Confidence Map Image ID", "confidencemap", DataNameProperty::WRITE)
, p_alpha("Alpha", "Alpha Parameter", 2.f, .1f, 10.f, 0.1f)
, p_beta("Beta", "Beta Parameter", 100.f, 1.f, 1000.f, 0.1f)
, p_gamma("Gamma", "Gamma Parameter", .06f, .01f, 1.f, 0.01f)
, p_gamma("Gamma", "Gamma Parameter", .06f, .01f, 1.f)
, p_normalizeValues("NormalizeValues", "Normalize Values", false)
, p_solver("FilterMode", "Filter Mode", solvers, 4)
, p_numSteps("NumSteps", "Number of Solver Steps", 1000, 100, 5000)
......
......@@ -51,8 +51,8 @@ namespace campvis {
, p_sigma("Sigma", "Sigma of Gaussian Filter", 2.f, 0.f, 10.f, 0.1f)
, p_lambda("Lambda", "Strength of Depth Darkening Effect", 10.f, 0.f, 50.f, 0.1f)
, p_useColorCoding("UseColorCoding", "Cold/Warm Color Coding", false, AbstractProcessor::INVALID_SHADER)
, p_coldColor("ColdColor", "Cold Color (Far Objects)", tgt::vec3(0.f, 0.f, 1.f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, p_warmColor("WarmColor", "Warm Color (Near Objects)", tgt::vec3(1.f, 0.f, 0.f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, p_coldColor("ColdColor", "Cold Color (Far Objects)", tgt::vec3(0.f, 0.f, 1.f), tgt::vec3(0.f), tgt::vec3(1.f))
, p_warmColor("WarmColor", "Warm Color (Near Objects)", tgt::vec3(1.f, 0.f, 0.f), tgt::vec3(0.f), tgt::vec3(1.f))
, _shader(0)
{
addProperty(&p_inputImage);
......
......@@ -47,7 +47,7 @@ namespace campvis {
, p_geometryID("geometryID", "Input Geometry ID", "gr.input", DataNameProperty::READ)
, p_renderTargetID("p_renderTargetID", "Output Image", "gr.output", DataNameProperty::WRITE)
, p_camera("camera", "Camera")
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, _shader(0)
{
addDecorator(new ProcessorDecoratorShading());
......
......@@ -57,7 +57,7 @@ namespace campvis {
, p_secondImageId("SecondImageId", "Second Input Image", "", DataNameProperty::READ)
, p_targetImageId("TargetImageId", "Output Image", "", DataNameProperty::WRITE)
, p_compositingMethod("CompositingMethod", "Compositing Method", compositingOptions, 5)
, p_alphaValue("AlphaValue", "AlphaValue", .5f, 0.f, 1.f, 0.01f)
, p_alphaValue("AlphaValue", "AlphaValue", .5f, 0.f, 1.f)
, _shader(0)
{
addProperty(&p_firstImageId);
......
......@@ -40,7 +40,7 @@ namespace campvis {
: RaycastingProcessor(canvasSize, "modules/vis/glsl/simpleraycaster.frag", true)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_enableShadowing("EnableShadowing", "Enable Hard Shadows", false, AbstractProcessor::INVALID_SHADER)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f, 0.01f)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f)
, p_enableAdaptiveStepsize("EnableAdaptiveStepSize", "Enable Adaptive Step Size", true, AbstractProcessor::INVALID_SHADER)
{
addDecorator(new ProcessorDecoratorShading());
......
......@@ -57,11 +57,11 @@ namespace campvis {
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_sliceOrientation("SliceOrientation", "Slice Orientation", compositingOptions, 3)
, p_xSliceNumber("XSliceNumber", "X Slice Number", 0, 0, 0)
, p_xSliceColor("XSliceColor", "X Slice Color", tgt::vec4(1.f, 0.f, 0.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, p_xSliceColor("XSliceColor", "X Slice Color", tgt::vec4(1.f, 0.f, 0.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, p_ySliceNumber("YSliceNumber", "Y Slice Number", 0, 0, 0)
, p_ySliceColor("YSliceColor", "Y Slice Color", tgt::vec4(0.f, 1.f, 0.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, p_ySliceColor("YSliceColor", "Y Slice Color", tgt::vec4(0.f, 1.f, 0.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, p_zSliceNumber("ZSliceNumber", "Z Slice Number", 0, 0, 0)
, p_zSliceColor("ZSliceColor", "Z Slice Color", tgt::vec4(0.f, 0.f, 1.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, p_zSliceColor("ZSliceColor", "Z Slice Color", tgt::vec4(0.f, 0.f, 1.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, p_transferFunction("transferFunction", "Transfer Function", new SimpleTransferFunction(256))
, _shader(0)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment