Exemplo n.º 1
0
        public C_VOLUME(Primitive p)
        {
            position = new C_VECTOR3(p.Position);
            rotation = new C_QUATERNION(p.Rotation);
            scale    = new C_VECTOR3(p.Scale);

            if (p as Sphere != null)
            {
                type = volumeType.ball;
            }

            else
            {
                type = volumeType.box;
            }
        }
Exemplo n.º 2
0
        public C_CAMERA(Camera camera)
        {
            Vector2I res = Graphics.RenderResolution;

            resolution = new int2(res.x, res.y);
            fov        = (float)camera.FieldOfView;

            position      = new C_VECTOR3(camera.Malleable.Position);
            rotation      = new C_QUATERNION(camera.Malleable.Rotation);
            mainDirection = new C_VECTOR3(Light.Main.Malleable.Forward);
            farClipPlane  = -(float)camera.ClipPlanes.y;
            precision     = (float)camera.Precision;

            /*volume1 = new C_VOLUME()
             * {
             *  position = new C_VECTOR3(),
             *  rotation = new C_QUATERNION(),
             *  scale = new C_VECTOR3() { x = 1.0F, y = 1.0F, z = 1.0F },
             *  type = volumeType.ball //1
             * };*/
        }