Skip to content

Commit

Permalink
- Fixed bug in Quaternion..ctor
Browse files Browse the repository at this point in the history
- Updated WhittedIntegrator
  • Loading branch information
Kintaro committed Mar 17, 2010
1 parent 879491f commit 2cfeb08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Hyperion.Core/Geometry/Quaternion.cs
Expand Up @@ -22,6 +22,7 @@ public Quaternion (Vector v, double w)

public Quaternion (Transform t)
{
v = new Vector ();
Matrix m = t.Matrix;
double trace = m.m[0] + m.m[5] + m.m[10];
if (trace > 0.0)
Expand Down
3 changes: 2 additions & 1 deletion Hyperion.Core/RenderOptions.cs
Expand Up @@ -23,7 +23,7 @@ public sealed class RenderOptions
public ParameterSet SurfaceIntegratorParameters;
public string VolumeIntegratorName;
public ParameterSet VolumeIntegratorParameters;
public AnimatedTransform WorldToCamera;
public AnimatedTransform WorldToCamera = new AnimatedTransform (new Transform (), 0.0, new Transform (), 0.0);
public List<IPrimitive> Primitives = new List<IPrimitive> ();
public List<IVolumeRegion> VolumeRegions = new List<IVolumeRegion> ();
public List<ILight> Lights = new List<ILight> ();
Expand All @@ -44,6 +44,7 @@ public RenderOptions ()
FilterParameters = new ParameterSet ();
FilmParameters = new ParameterSet ();
SamplerParameters = new ParameterSet ();
CameraParameters = new ParameterSet ();
}

public Scene CreateScene ()
Expand Down
7 changes: 7 additions & 0 deletions Integrators/Hyperion.Integrators.Whitted/Whitted.cs
Expand Up @@ -4,6 +4,7 @@
using Hyperion.Core.Interfaces;
using Hyperion.Core.Geometry;
using Hyperion.Core.Reflection;
using Hyperion.Core.Tools;

namespace Hyperion.Integrators.Whitted
{
Expand Down Expand Up @@ -50,5 +51,11 @@ public override Spectrum Li (Scene scene, IRenderer renderer, RayDifferential ra

return L;
}

public static ISurfaceIntegrator CreateSurfaceIntegrator (ParameterSet parameters)
{
int maxDepth = parameters.FindOneInt ("maxdepth", 5);
return new Whitted (maxDepth);
}
}
}

0 comments on commit 2cfeb08

Please sign in to comment.