Example #1
0
 public DirectionalLight(SceneGraph graph, Vec3 intensity, Vec3 direction, float maxShadowDepth)
     : base(graph)
 {
     Intensity      = intensity;
     MaxShadowDepth = maxShadowDepth;
     Direction      = direction.Normalized;
 }
Example #2
0
 public Camera(SceneGraph graph, Vec3 position, Vec3 target, Vec3 upDirection, ViewingFrustum frustum,
               float aspectRatio) : base(graph)
 {
     Position    = position;
     Target      = target;
     UpDirection = upDirection;
     Frustum     = frustum;
 }
Example #3
0
        public Panel(SceneGraph graph, bool flipVertically, bool movable)
            : base(graph)
        {
            _rectangle = Quadrilateral <V> .Rectangle(1f, 1f).Translate(0.5f, -0.5f);

            _flipVertically = flipVertically;
            _movable        = movable;
        }
Example #4
0
 public PointLight(SceneGraph graph, Vec3 intensity, Vec3 position, float linearAttenuation,
                   float quadraticAttenuation) : base(graph)
 {
     Intensity            = intensity;
     Position             = position;
     LinearAttenuation    = linearAttenuation;
     QuadraticAttenuation = quadraticAttenuation;
 }
Example #5
0
 public TransformNode(SceneGraph graph, T node, Vec3 offset, Vec3 orientation, Vec3 scale)
     : base(graph, node)
 {
     _offset      = offset;
     _orientation = orientation;
     _scale       = scale;
     UpdateTransform();
 }
Example #6
0
        public static void UpdateAll(SceneGraph sceneGraph, GameWindow window, Vec2i viewportSize)
        {
            InputState.Update(window);
            var panels = sceneGraph.Root.Traverse().OfType <Panel <V> > ();

            foreach (var panel in panels)
            {
                panel.Update(viewportSize, window.Mouse);
            }
        }
Example #7
0
 public Light(SceneGraph graph) : base(graph)
 {
 }
Example #8
0
 public StaticMesh(SceneGraph graph, Geometry <V> geometry, params Texture[] textures)
     : base(graph, geometry, textures)
 {
 }
Example #9
0
 public LineSegment(SceneGraph graph, Path <P, V> path) : base(graph)
 {
     Path = path;
 }
Example #10
0
 public SceneGroup(SceneGraph graph, params SceneNode[] subNodes) : this(graph)
 {
     Add(subNodes);
 }
Example #11
0
 public SceneGroup(SceneGraph graph, IEnumerable <SceneNode> subNodes) : this(graph)
 {
     Add(subNodes);
 }
Example #12
0
 public Mesh(SceneGraph graph, Geometry <V> geometry, params Texture[] textures)
     : base(graph)
 {
     Geometry = geometry;
     Textures = textures;
 }
Example #13
0
 public SceneNode(SceneGraph graph)
 {
     Graph = graph ?? throw new ArgumentNullException("graph");
 }
Example #14
0
 public Panel(SceneGraph graph, bool flipVertically, bool movable, Texture texture)
     : this(graph, flipVertically, movable)
 {
     Texture = texture;
 }
Example #15
0
 public static SceneNode Movable(SceneGraph graph, bool flipVertically, Texture texture, Vec2 pos)
 {
     return(new Panel <V> (graph, flipVertically, true, texture)
            .Offset(new Vec3(pos, 0f)));
 }
Example #16
0
 public NodeWrapper(SceneGraph graph, T node) : base(graph)
 {
     Node        = node;
     Node.Parent = this;
 }
Example #17
0
 public SceneGroup(SceneGraph graph) : base(graph)
 {
     _subNodes = new List <SceneNode> ();
 }