Exemplo n.º 1
0
 public DirectionalLight(SceneGraph graph, Vec3 intensity, Vec3 direction, float maxShadowDepth)
     : base(graph)
 {
     Intensity      = intensity;
     MaxShadowDepth = maxShadowDepth;
     Direction      = direction.Normalized;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 public PointLight(SceneGraph graph, Vec3 intensity, Vec3 position, float linearAttenuation,
                   float quadraticAttenuation) : base(graph)
 {
     Intensity            = intensity;
     Position             = position;
     LinearAttenuation    = linearAttenuation;
     QuadraticAttenuation = quadraticAttenuation;
 }
Exemplo n.º 5
0
 public TransformNode(SceneGraph graph, T node, Vec3 offset, Vec3 orientation, Vec3 scale)
     : base(graph, node)
 {
     _offset      = offset;
     _orientation = orientation;
     _scale       = scale;
     UpdateTransform();
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 7
0
 public Light(SceneGraph graph) : base(graph)
 {
 }
Exemplo n.º 8
0
 public StaticMesh(SceneGraph graph, Geometry <V> geometry, params Texture[] textures)
     : base(graph, geometry, textures)
 {
 }
Exemplo n.º 9
0
 public LineSegment(SceneGraph graph, Path <P, V> path) : base(graph)
 {
     Path = path;
 }
Exemplo n.º 10
0
 public SceneGroup(SceneGraph graph, params SceneNode[] subNodes) : this(graph)
 {
     Add(subNodes);
 }
Exemplo n.º 11
0
 public SceneGroup(SceneGraph graph, IEnumerable <SceneNode> subNodes) : this(graph)
 {
     Add(subNodes);
 }
Exemplo n.º 12
0
 public Mesh(SceneGraph graph, Geometry <V> geometry, params Texture[] textures)
     : base(graph)
 {
     Geometry = geometry;
     Textures = textures;
 }
Exemplo n.º 13
0
 public SceneNode(SceneGraph graph)
 {
     Graph = graph ?? throw new ArgumentNullException("graph");
 }
Exemplo n.º 14
0
 public Panel(SceneGraph graph, bool flipVertically, bool movable, Texture texture)
     : this(graph, flipVertically, movable)
 {
     Texture = texture;
 }
Exemplo n.º 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)));
 }
Exemplo n.º 16
0
 public NodeWrapper(SceneGraph graph, T node) : base(graph)
 {
     Node        = node;
     Node.Parent = this;
 }
Exemplo n.º 17
0
 public SceneGroup(SceneGraph graph) : base(graph)
 {
     _subNodes = new List <SceneNode> ();
 }