Example #1
0
SceneData::SceneData() :
    fog(nullptr),
    rainbow(nullptr),
    skysphere(nullptr),
    functionContextFactory()
{
    atmosphereIOR = 1.0;
    atmosphereDispersion = 0.0;
    backgroundColour = ToTransColour(RGBFTColour(0.0, 0.0, 0.0, 0.0, 1.0));
    ambientLight = MathColour(1.0);

    iridWavelengths = MathColour::DefaultWavelengths();

    languageVersion = POV_RAY_VERSION_INT;
    languageVersionSet = false;
    languageVersionLate = false;
    warningLevel = 10; // all warnings
    legacyCharset = LegacyCharset::kUnspecified;
    noiseGenerator = kNoiseGen_RangeCorrected;
    explicitNoiseGenerator = false; // scene has not set the noise generator explicitly
    boundingMethod = 0;
    numberOfWaves = 10;
    parsedMaxTraceLevel = MAX_TRACE_LEVEL_DEFAULT;
    parsedAdcBailout = 1.0 / 255.0; // adc bailout sufficient for displays
    workingGamma.reset();
    workingGammaToSRGB.reset();
    inputFileGamma = SRGBGammaCurve::Get();
    gammaMode = kPOVList_GammaMode_None; // default setting for v3.6.2, which in turn is the default for the language

    mmPerUnit = 10;
    useSubsurface = false;
    subsurfaceSamplesDiffuse = 50;
    subsurfaceSamplesSingle = 50;
    subsurfaceUseRadiosity = false;

    bspMaxDepth = 0;
    bspObjectIsectCost = bspBaseAccessCost = bspChildAccessCost = bspMissChance = 0.0f;

    Fractal_Iteration_Stack_Length = 0;
    Max_Blob_Components = 1000; // TODO FIXME - this gets set in the parser but allocated *before* that in the scene data, and if it is 0 here, a malloc may fail there because the memory requested is zero [trf]
    Max_Bounding_Cylinders = 100; // TODO FIXME - see note for Max_Blob_Components
    boundingSlabs = nullptr;

    splitUnions = false;
    removeBounds = true;

    tree = nullptr;
}
Example #2
0
SceneData::SceneData() :
    fog(NULL),
    rainbow(NULL),
    skysphere(NULL),
    functionContextFactory(new FunctionVM())
{
    atmosphereIOR = 1.0;
    atmosphereDispersion = 0.0;
    backgroundColour = ToTransColour(RGBFTColour(0.0, 0.0, 0.0, 0.0, 1.0));
    ambientLight = MathColour(1.0);

    iridWavelengths = MathColour::DefaultWavelengths();

    languageVersion = OFFICIAL_VERSION_NUMBER;
    languageVersionSet = false;
    languageVersionLate = false;
    warningLevel = 10; // all warnings
    stringEncoding = kStringEncoding_ASCII;
    noiseGenerator = kNoiseGen_RangeCorrected;
    explicitNoiseGenerator = false; // scene has not set the noise generator explicitly
    numberOfWaves = 10;
    parsedMaxTraceLevel = MAX_TRACE_LEVEL_DEFAULT;
    parsedAdcBailout = 1.0 / 255.0; // adc bailout sufficient for displays
    workingGamma.reset();
    workingGammaToSRGB.reset();
    inputFileGammaSet = false; // TODO remove for 3.7x
    inputFileGamma = SRGBGammaCurve::Get();

    mmPerUnit = 10;
    useSubsurface = false;
    subsurfaceSamplesDiffuse = 50;
    subsurfaceSamplesSingle = 50;
    subsurfaceUseRadiosity = false;

    bspMaxDepth = 0;
    bspObjectIsectCost = bspBaseAccessCost = bspChildAccessCost = bspMissChance = 0.0f;

    Fractal_Iteration_Stack_Length = 0;
    Max_Blob_Components = 1000; // TODO FIXME - this gets set in the parser but allocated *before* that in the scene data, and if it is 0 here, a malloc may fail there because the memory requested is zero [trf]
    Max_Bounding_Cylinders = 100; // TODO FIXME - see note for Max_Blob_Components
    boundingSlabs = NULL;

    splitUnions = false;
    removeBounds = true;

    tree = NULL;
}
Example #3
0
namespace pov_base
{

#if (NUM_COLOUR_CHANNELS == 3)

    // Approximate dominant wavelengths of primary hues.
    // Source: 3D Computer Graphics by John Vince (Addison Wesely)
    // These are user-adjustable with the irid_wavelength keyword.
    // Red = 700 nm  Grn = 520 nm Blu = 480 nm
    // Divided by 1000 gives: rwl = 0.70;  gwl = 0.52;  bwl = 0.48;
    template<> const MathColour MathColour::mkDefaultWavelengths = MathColour(RGBColour(0.70, 0.52, 0.48));
    template<> const PreciseMathColour PreciseMathColour::mkDefaultWavelengths = PreciseMathColour(PreciseRGBColour(0.70, 0.52, 0.48));

#else

    #error TODO!

#endif

}
Example #4
0
LightSource::LightSource() : CompoundObject(LIGHT_OBJECT)
{
    Set_Flag(this, NO_SHADOW_FLAG);

    colour = MathColour(1.0);

    Direction = Vector3d(0.0, 0.0, 0.0);
    Center    = Vector3d(0.0, 0.0, 0.0);
    Points_At = Vector3d(0.0, 0.0, 1.0);
    Axis1     = Vector3d(0.0, 0.0, 1.0);
    Axis2     = Vector3d(0.0, 1.0, 0.0);

    Coeff   = 0.0;
    Radius  = 0.0;
    Falloff = 0.0;

    Fade_Distance = 0.0;
    Fade_Power    = 0.0;

    Projected_Through_Object= NULL;

    Light_Type = POINT_SOURCE;

    Area_Light = false;
    Use_Full_Area_Lighting = false; // JN2007: Full area lighting
    Jitter     = false;
    Orient     = false;
    Circular   = false;
    Parallel   = false;
    Photon_Area_Light = false;

    Area_Size1 = 0;
    Area_Size2 = 0;

    Adaptive_Level = 100;

    Media_Attenuation = false;
    Media_Interaction = true;
}