Exemplo n.º 1
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("Texture");

            var textureParams = new TextureParams(Parameters, Parameters,
                                                  context.GraphicsState.FloatTextures,
                                                  context.GraphicsState.SpectrumTextures);

            switch (TextureType)
            {
            case "float":
            {
                context.GraphicsState.FloatTextures[Name] = Factories.MakeFloatTexture(
                    TextureClass, context.CurrentTransform[0],
                    textureParams);;
                break;
            }

            case "color":
            case "spectrum":
            {
                context.GraphicsState.SpectrumTextures[Name] = Factories.MakeSpectrumTexture(
                    TextureClass, context.CurrentTransform[0],
                    textureParams);;
                break;
            }

            default:
                throw new InvalidOperationException("Texture type '" + TextureType + " ' unknown.");
            }
        }
Exemplo n.º 2
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("ObjectInstance");

            if (context.RenderOptions.CurrentInstance != null)
                throw new InvalidOperationException("ObjectInstance can't be called inside instance definition.");
            if (!context.RenderOptions.Instances.ContainsKey(Name))
                throw new InvalidOperationException("Unable to find instance named '" + Name + "'.");

            var instances = context.RenderOptions.Instances[Name];
            if (instances.Count == 0)
                return;

            if (instances.Count > 1 || !instances[0].CanIntersect)
            {
                // Refine instance primitives and create aggregate.
                var accelerator = Factories.MakeAccelerator(
                    context.RenderOptions.AcceleratorName,
                    context.RenderOptions.AcceleratorParams,
                    instances);
                instances.Clear();
                instances.Add(accelerator);
            }

            var worldToInstance0 = Transform.Invert(context.CurrentTransform[0]);
            var worldToInstance1 = Transform.Invert(context.CurrentTransform[1]);
            var animatedWorldToInstance = new AnimatedTransform(
                worldToInstance0, context.RenderOptions.TransformStartTime,
                worldToInstance1, context.RenderOptions.TransformEndTime);
            context.RenderOptions.Primitives.Add(new TransformedPrimitive(
                instances[0], animatedWorldToInstance));
        }
Exemplo n.º 3
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("Texture");

            var textureParams = new TextureParams(Parameters, Parameters,
                context.GraphicsState.FloatTextures,
                context.GraphicsState.SpectrumTextures);

            switch (TextureType)
            {
                case "float" :
                {
                    context.GraphicsState.FloatTextures[Name] = Factories.MakeFloatTexture(
                        TextureClass, context.CurrentTransform[0],
                        textureParams); ;
                    break;
                }
                case "color" :
                case "spectrum" :
                {
                    context.GraphicsState.SpectrumTextures[Name] = Factories.MakeSpectrumTexture(
                        TextureClass, context.CurrentTransform[0],
                        textureParams); ;
                    break;
                }
                default :
                    throw new InvalidOperationException("Texture type '" + TextureType +" ' unknown.");
            }
        }
 public override void Process(SceneReaderContext context)
 {
     if (context.NamedCoordinateSystems.ContainsKey(Name))
         context.CurrentTransform = context.NamedCoordinateSystems[Name];
     else
         throw new InvalidOperationException("Could not find named coordinate system '" + Name + "'.");
 }
Exemplo n.º 5
0
 public override void Process(SceneReaderContext context)
 {
     context.VerifyWorld("AttributeBegin");
     context.GraphicsStateStack.Push(context.GraphicsState.Clone());
     context.TransformStack.Push(context.CurrentTransform.Clone());
     context.ActiveTransformBitsStack.Push(context.ActiveTransformBits);
 }
Exemplo n.º 6
0
 public override void Process(SceneReaderContext context)
 {
     context.VerifyOptions("WorldBegin");
     context.CurrentState = SceneReaderState.WorldBlock;
     for (var i = 0; i < TransformSet.MaxTransforms; i++)
         context.CurrentTransform[i] = new Transform();
     context.ActiveTransformBits = TransformSet.AllTransformsBits;
     context.NamedCoordinateSystems["world"] = context.CurrentTransform;
 }
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("MakeNamedMaterial");

            var textureParams = new TextureParams(Parameters, context.GraphicsState.MaterialParams,
                context.GraphicsState.FloatTextures, context.GraphicsState.SpectrumTextures);
            context.GraphicsState.NamedMaterials[MaterialName] = Factories.MakeMaterial(
                MaterialType, context.CurrentTransform[0], textureParams);
        }
Exemplo n.º 8
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("WorldEnd");

            if (context.GraphicsStateStack.Count > 0)
                throw new InvalidOperationException("Missing end to AttributeBegin");
            if (context.TransformStack.Count > 0)
                throw new InvalidOperationException("Missing end to TransformBegin");
        }
Exemplo n.º 9
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("ObjectEnd");
            if (context.RenderOptions.CurrentInstance == null)
                throw new InvalidOperationException("ObjectEnd called outside of instance definition.");

            context.RenderOptions.CurrentInstance = null;
            new AttributeEndDirective().Process(context);
        }
Exemplo n.º 10
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("MakeNamedMaterial");

            var textureParams = new TextureParams(Parameters, context.GraphicsState.MaterialParams,
                                                  context.GraphicsState.FloatTextures, context.GraphicsState.SpectrumTextures);

            context.GraphicsState.NamedMaterials[MaterialName] = Factories.MakeMaterial(
                MaterialType, context.CurrentTransform[0], textureParams);
        }
Exemplo n.º 11
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("ObjectBegin");
            new AttributeBeginDirective().Process(context);
            if (context.RenderOptions.CurrentInstance != null)
                throw new InvalidOperationException("ObjectBegin called inside of instance definition.");

            context.RenderOptions.Instances[Name] = new List<Primitive>();
            context.RenderOptions.CurrentInstance = context.RenderOptions.Instances[Name];
        }
Exemplo n.º 12
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("TransformEnd");

            if (context.TransformStack.Count == 0)
                throw new InvalidOperationException("Unmatched TransformEnd encountered.");

            context.CurrentTransform = context.TransformStack.Pop();
            context.ActiveTransformBits = context.ActiveTransformBitsStack.Pop();
        }
Exemplo n.º 13
0
 public override void Process(SceneReaderContext context)
 {
     context.VerifyOptions("WorldBegin");
     context.CurrentState = SceneReaderState.WorldBlock;
     for (var i = 0; i < TransformSet.MaxTransforms; i++)
     {
         context.CurrentTransform[i] = new Transform();
     }
     context.ActiveTransformBits             = TransformSet.AllTransformsBits;
     context.NamedCoordinateSystems["world"] = context.CurrentTransform;
 }
Exemplo n.º 14
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("ObjectEnd");
            if (context.RenderOptions.CurrentInstance == null)
            {
                throw new InvalidOperationException("ObjectEnd called outside of instance definition.");
            }

            context.RenderOptions.CurrentInstance = null;
            new AttributeEndDirective().Process(context);
        }
Exemplo n.º 15
0
 public override void Process(SceneReaderContext context)
 {
     if (context.NamedCoordinateSystems.ContainsKey(Name))
     {
         context.CurrentTransform = context.NamedCoordinateSystems[Name];
     }
     else
     {
         throw new InvalidOperationException("Could not find named coordinate system '" + Name + "'.");
     }
 }
Exemplo n.º 16
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("TransformEnd");

            if (context.TransformStack.Count == 0)
            {
                throw new InvalidOperationException("Unmatched TransformEnd encountered.");
            }

            context.CurrentTransform    = context.TransformStack.Pop();
            context.ActiveTransformBits = context.ActiveTransformBitsStack.Pop();
        }
Exemplo n.º 17
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("ObjectBegin");
            new AttributeBeginDirective().Process(context);
            if (context.RenderOptions.CurrentInstance != null)
            {
                throw new InvalidOperationException("ObjectBegin called inside of instance definition.");
            }

            context.RenderOptions.Instances[Name] = new List <Primitive>();
            context.RenderOptions.CurrentInstance = context.RenderOptions.Instances[Name];
        }
Exemplo n.º 18
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("WorldEnd");

            if (context.GraphicsStateStack.Count > 0)
            {
                throw new InvalidOperationException("Missing end to AttributeBegin");
            }
            if (context.TransformStack.Count > 0)
            {
                throw new InvalidOperationException("Missing end to TransformBegin");
            }
        }
Exemplo n.º 19
0
 public override void Process(SceneReaderContext context)
 {
     switch (Type)
     {
         case ActiveTransformType.All:
             context.ActiveTransformBits = TransformSet.AllTransformsBits;
             break;
         case ActiveTransformType.Start:
             context.ActiveTransformBits = TransformSet.StartTransformBits;
             break;
         case ActiveTransformType.End:
             context.ActiveTransformBits = TransformSet.EndTransformBits;
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
 }
Exemplo n.º 20
0
        public override void Process(SceneReaderContext context)
        {
            switch (Type)
            {
            case ActiveTransformType.All:
                context.ActiveTransformBits = TransformSet.AllTransformsBits;
                break;

            case ActiveTransformType.Start:
                context.ActiveTransformBits = TransformSet.StartTransformBits;
                break;

            case ActiveTransformType.End:
                context.ActiveTransformBits = TransformSet.EndTransformBits;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Exemplo n.º 21
0
        public override void Process(SceneReaderContext context)
        {
            context.VerifyWorld("ObjectInstance");

            if (context.RenderOptions.CurrentInstance != null)
            {
                throw new InvalidOperationException("ObjectInstance can't be called inside instance definition.");
            }
            if (!context.RenderOptions.Instances.ContainsKey(Name))
            {
                throw new InvalidOperationException("Unable to find instance named '" + Name + "'.");
            }

            var instances = context.RenderOptions.Instances[Name];

            if (instances.Count == 0)
            {
                return;
            }

            if (instances.Count > 1 || !instances[0].CanIntersect)
            {
                // Refine instance primitives and create aggregate.
                var accelerator = Factories.MakeAccelerator(
                    context.RenderOptions.AcceleratorName,
                    context.RenderOptions.AcceleratorParams,
                    instances);
                instances.Clear();
                instances.Add(accelerator);
            }

            var worldToInstance0        = Transform.Invert(context.CurrentTransform[0]);
            var worldToInstance1        = Transform.Invert(context.CurrentTransform[1]);
            var animatedWorldToInstance = new AnimatedTransform(
                worldToInstance0, context.RenderOptions.TransformStartTime,
                worldToInstance1, context.RenderOptions.TransformEndTime);

            context.RenderOptions.Primitives.Add(new TransformedPrimitive(
                                                     instances[0], animatedWorldToInstance));
        }
Exemplo n.º 22
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => t * Transform.LookAt(Eye, LookAt, Up));
 }
Exemplo n.º 23
0
 public override void Process(SceneReaderContext context)
 {
     context.NamedCoordinateSystems[Name] = context.CurrentTransform;
 }
Exemplo n.º 24
0
 public override void Process(SceneReaderContext context)
 {
     context.VerifyWorld("NamedMaterial");
     context.GraphicsState.CurrentNamedMaterial = MaterialName;
 }
Exemplo n.º 25
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => t * Transform.Translate(Translation));
 }
Exemplo n.º 26
0
 public override void Process(SceneReaderContext context)
 {
     context.VerifyWorld("ReverseOrientation");
     context.GraphicsState.ReverseOrientation = !context.GraphicsState.ReverseOrientation;
 }
Exemplo n.º 27
0
        private void ProcessShape(SceneReaderContext context)
        {
            Primitive prim = null;
            AreaLight area = null;

            if (!context.CurrentTransform.IsAnimated)
            {
                // Create primitive for static shape.

                var shape = Factories.MakeShape(ImplementationType,
                                                context.CurrentTransform[0], context.GraphicsState.ReverseOrientation,
                                                Parameters);
                var material = context.GraphicsState.CreateMaterial(
                    Parameters, context.CurrentTransform[0]);

                // Possibly create area light for shape.
                if (!string.IsNullOrEmpty(context.GraphicsState.AreaLight))
                {
                    area = Factories.MakeAreaLight(
                        context.GraphicsState.AreaLight,
                        context.CurrentTransform[0],
                        context.GraphicsState.AreaLightParams,
                        shape);
                }
                prim = new GeometricPrimitive(shape, material, area);
            }
            else
            {
                // Create primitive for animated shape.

                var shape = Factories.MakeShape(ImplementationType, new Transform(),
                                                context.GraphicsState.ReverseOrientation, Parameters);
                var material = context.GraphicsState.CreateMaterial(
                    Parameters, context.CurrentTransform[0]);

                // Get animatedWorldToObject transform for shape.
                var worldToObj0           = Transform.Invert(context.CurrentTransform[0]);
                var worldToObj1           = Transform.Invert(context.CurrentTransform[1]);
                var animatedWorldToObject = new AnimatedTransform(
                    worldToObj0, context.RenderOptions.TransformStartTime,
                    worldToObj1, context.RenderOptions.TransformEndTime);

                Primitive basePrim = new GeometricPrimitive(shape, material, null);
                if (!basePrim.CanIntersect)
                {
                    // Refine animated shape and create BVH if more than one shape created.
                    var refinedPrimitives = basePrim.FullyRefine();
                    if (refinedPrimitives.Count == 0)
                    {
                        return;
                    }
                    basePrim = (refinedPrimitives.Count > 1)
                        ? new BoundingVolumeHierarchyAccelerator(refinedPrimitives)
                        : refinedPrimitives[0];
                }
                prim = new TransformedPrimitive(basePrim, animatedWorldToObject);
            }

            // Add primitive to scene or current instance.
            if (context.RenderOptions.CurrentInstance != null)
            {
                context.RenderOptions.CurrentInstance.Add(prim);
            }
            else
            {
                context.RenderOptions.Primitives.Add(prim);
                if (area != null)
                {
                    context.RenderOptions.Lights.Add(area);
                }
            }
        }
Exemplo n.º 28
0
        private void ProcessShape(SceneReaderContext context)
        {
            Primitive prim = null;
            AreaLight area = null;
            if (!context.CurrentTransform.IsAnimated)
            {
                // Create primitive for static shape.

                var shape = Factories.MakeShape(ImplementationType,
                    context.CurrentTransform[0], context.GraphicsState.ReverseOrientation,
                    Parameters);
                var material = context.GraphicsState.CreateMaterial(
                    Parameters, context.CurrentTransform[0]);

                // Possibly create area light for shape.
                if (!string.IsNullOrEmpty(context.GraphicsState.AreaLight))
                    area = Factories.MakeAreaLight(
                        context.GraphicsState.AreaLight,
                        context.CurrentTransform[0],
                        context.GraphicsState.AreaLightParams,
                        shape);
                prim = new GeometricPrimitive(shape, material, area);
            }
            else
            {
                // Create primitive for animated shape.

                var shape = Factories.MakeShape(ImplementationType, new Transform(),
                    context.GraphicsState.ReverseOrientation, Parameters);
                var material = context.GraphicsState.CreateMaterial(
                    Parameters, context.CurrentTransform[0]);

                // Get animatedWorldToObject transform for shape.
                var worldToObj0 = Transform.Invert(context.CurrentTransform[0]);
                var worldToObj1 = Transform.Invert(context.CurrentTransform[1]);
                var animatedWorldToObject = new AnimatedTransform(
                    worldToObj0, context.RenderOptions.TransformStartTime,
                    worldToObj1, context.RenderOptions.TransformEndTime);

                Primitive basePrim = new GeometricPrimitive(shape, material, null);
                if (!basePrim.CanIntersect)
                {
                    // Refine animated shape and create BVH if more than one shape created.
                    var refinedPrimitives = basePrim.FullyRefine();
                    if (refinedPrimitives.Count == 0)
                        return;
                    basePrim = (refinedPrimitives.Count > 1)
                        ? new BoundingVolumeHierarchyAccelerator(refinedPrimitives) 
                        : refinedPrimitives[0];
                }
                prim = new TransformedPrimitive(basePrim, animatedWorldToObject);
            }

            // Add primitive to scene or current instance.
            if (context.RenderOptions.CurrentInstance != null)
            {
                context.RenderOptions.CurrentInstance.Add(prim);
            }
            else
            {
                context.RenderOptions.Primitives.Add(prim);
                if (area != null)
                    context.RenderOptions.Lights.Add(area);
            }
        }
Exemplo n.º 29
0
 public abstract void Process(SceneReaderContext context);
Exemplo n.º 30
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => t * Transform.Rotate(Angle, Axis));
 }
Exemplo n.º 31
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => t * Transform.Translate(Translation));
 }
Exemplo n.º 32
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => t * Transform.Scale(Scale.X, Scale.Y, Scale.Z));
 }
Exemplo n.º 33
0
 public override void Process(SceneReaderContext context)
 {
     switch (DirectiveType)
     {
         case StandardDirectiveType.Accelerator:
             context.VerifyOptions("Accelerator");
             context.RenderOptions.AcceleratorName = ImplementationType;
             context.RenderOptions.AcceleratorParams = Parameters;
             break;
         case StandardDirectiveType.AreaLightSource:
             context.VerifyWorld("AreaLightSource");
             context.GraphicsState.AreaLight = ImplementationType;
             context.GraphicsState.AreaLightParams = Parameters;
             break;
         case StandardDirectiveType.Camera:
             context.VerifyOptions("Camera");
             context.RenderOptions.CameraName = ImplementationType;
             context.RenderOptions.CameraParams = Parameters;
             context.RenderOptions.CameraToWorld = TransformSet.Invert(context.CurrentTransform);
             context.NamedCoordinateSystems["camera"] = context.RenderOptions.CameraToWorld;
             break;
         case StandardDirectiveType.Film:
             context.VerifyOptions("Film");
             context.RenderOptions.FilmName = ImplementationType;
             context.RenderOptions.FilmParams = Parameters;
             break;
         case StandardDirectiveType.LightSource:
             context.VerifyWorld("LightSource");
             context.RenderOptions.Lights.Add(Factories.MakeLight(
                 ImplementationType, context.CurrentTransform[0], Parameters));
             break;
         case StandardDirectiveType.Material:
             context.VerifyWorld("Material");
             context.GraphicsState.Material = ImplementationType;
             context.GraphicsState.MaterialParams = Parameters;
             context.GraphicsState.CurrentNamedMaterial = "";
             break;
         case StandardDirectiveType.PixelFilter:
             context.VerifyOptions("PixelFilter");
             context.RenderOptions.FilterName = ImplementationType;
             context.RenderOptions.FilterParams = Parameters;
             break;
         case StandardDirectiveType.Renderer:
             context.VerifyOptions("Renderer");
             context.RenderOptions.RendererName = ImplementationType;
             context.RenderOptions.RendererParams = Parameters;
             break;
         case StandardDirectiveType.Sampler:
             context.VerifyOptions("Sampler");
             context.RenderOptions.SamplerName = ImplementationType;
             context.RenderOptions.SamplerParams = Parameters;
             break;
         case StandardDirectiveType.Shape:
             context.VerifyWorld("Shape");
             ProcessShape(context);
             break;
         case StandardDirectiveType.SurfaceIntegrator:
             context.VerifyOptions("SurfaceIntegrator");
             context.RenderOptions.SurfaceIntegratorName = ImplementationType;
             context.RenderOptions.SurfaceIntegratorParams = Parameters;
             break;
         case StandardDirectiveType.Volume:
             context.VerifyWorld("Volume");
             context.RenderOptions.VolumeRegions.Add(Factories.MakeVolumeRegion(
                 ImplementationType, context.CurrentTransform[0], Parameters));
             break;
         case StandardDirectiveType.VolumeIntegrator:
             context.VerifyOptions("VolumeIntegrator");
             context.RenderOptions.VolumeIntegratorName = ImplementationType;
             context.RenderOptions.VolumeIntegratorParams = Parameters;
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
 }
Exemplo n.º 34
0
        public override void Process(SceneReaderContext context)
        {
            switch (DirectiveType)
            {
            case StandardDirectiveType.Accelerator:
                context.VerifyOptions("Accelerator");
                context.RenderOptions.AcceleratorName   = ImplementationType;
                context.RenderOptions.AcceleratorParams = Parameters;
                break;

            case StandardDirectiveType.AreaLightSource:
                context.VerifyWorld("AreaLightSource");
                context.GraphicsState.AreaLight       = ImplementationType;
                context.GraphicsState.AreaLightParams = Parameters;
                break;

            case StandardDirectiveType.Camera:
                context.VerifyOptions("Camera");
                context.RenderOptions.CameraName         = ImplementationType;
                context.RenderOptions.CameraParams       = Parameters;
                context.RenderOptions.CameraToWorld      = TransformSet.Invert(context.CurrentTransform);
                context.NamedCoordinateSystems["camera"] = context.RenderOptions.CameraToWorld;
                break;

            case StandardDirectiveType.Film:
                context.VerifyOptions("Film");
                context.RenderOptions.FilmName   = ImplementationType;
                context.RenderOptions.FilmParams = Parameters;
                break;

            case StandardDirectiveType.LightSource:
                context.VerifyWorld("LightSource");
                context.RenderOptions.Lights.Add(Factories.MakeLight(
                                                     ImplementationType, context.CurrentTransform[0], Parameters));
                break;

            case StandardDirectiveType.Material:
                context.VerifyWorld("Material");
                context.GraphicsState.Material             = ImplementationType;
                context.GraphicsState.MaterialParams       = Parameters;
                context.GraphicsState.CurrentNamedMaterial = "";
                break;

            case StandardDirectiveType.PixelFilter:
                context.VerifyOptions("PixelFilter");
                context.RenderOptions.FilterName   = ImplementationType;
                context.RenderOptions.FilterParams = Parameters;
                break;

            case StandardDirectiveType.Renderer:
                context.VerifyOptions("Renderer");
                context.RenderOptions.RendererName   = ImplementationType;
                context.RenderOptions.RendererParams = Parameters;
                break;

            case StandardDirectiveType.Sampler:
                context.VerifyOptions("Sampler");
                context.RenderOptions.SamplerName   = ImplementationType;
                context.RenderOptions.SamplerParams = Parameters;
                break;

            case StandardDirectiveType.Shape:
                context.VerifyWorld("Shape");
                ProcessShape(context);
                break;

            case StandardDirectiveType.SurfaceIntegrator:
                context.VerifyOptions("SurfaceIntegrator");
                context.RenderOptions.SurfaceIntegratorName   = ImplementationType;
                context.RenderOptions.SurfaceIntegratorParams = Parameters;
                break;

            case StandardDirectiveType.Volume:
                context.VerifyWorld("Volume");
                context.RenderOptions.VolumeRegions.Add(Factories.MakeVolumeRegion(
                                                            ImplementationType, context.CurrentTransform[0], Parameters));
                break;

            case StandardDirectiveType.VolumeIntegrator:
                context.VerifyOptions("VolumeIntegrator");
                context.RenderOptions.VolumeIntegratorName   = ImplementationType;
                context.RenderOptions.VolumeIntegratorParams = Parameters;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Exemplo n.º 35
0
 public override void Process(SceneReaderContext context)
 {
     context.VerifyOptions("TransformTimes");
     context.RenderOptions.TransformStartTime = Start;
     context.RenderOptions.TransformEndTime = End;
 }
Exemplo n.º 36
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => t * Transform.Scale(Scale.X, Scale.Y, Scale.Z));
 }
Exemplo n.º 37
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => t * Transform.LookAt(Eye, LookAt, Up));
 }
Exemplo n.º 38
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => new Transform(Transform));
 }
Exemplo n.º 39
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => new Transform(Transform));
 }
Exemplo n.º 40
0
 public override void Process(SceneReaderContext context)
 {
     context.NamedCoordinateSystems[Name] = context.CurrentTransform;
 }
Exemplo n.º 41
0
 public override void Process(SceneReaderContext context)
 {
     context.VerifyOptions("TransformTimes");
     context.RenderOptions.TransformStartTime = Start;
     context.RenderOptions.TransformEndTime   = End;
 }
Exemplo n.º 42
0
 public override void Process(SceneReaderContext context)
 {
     context.ForActiveTransforms(t => t * Transform.Rotate(Angle, Axis));
 }
Exemplo n.º 43
0
 public override void Process(SceneReaderContext context)
 {
     context.VerifyWorld("NamedMaterial");
     context.GraphicsState.CurrentNamedMaterial = MaterialName;
 }