Пример #1
0
        public bool frustum_occlude(GMDL.GLMeshVao meshVao, Matrix4 transform)
        {
            if (!culling)
            {
                return(true);
            }

            Vector4 v1, v2;

            v1 = new Vector4(meshVao.metaData.AABBMIN, 1.0f);
            v2 = new Vector4(meshVao.metaData.AABBMAX, 1.0f);

            return(frustum_occlude(v1.Xyz, v2.Xyz, transform));
        }
Пример #2
0
        public Camera(int angle, int program, int mode, bool cull)
        {
            //Set fov on init
            this.setFOV(angle);
            vao          = new GLMeshVao();
            vao.vao      = (new Primitives.Box(1.0f, 1.0f, 1.0f, new Vector3(1.0f), true)).getVAO();
            this.program = program;
            this.type    = mode;
            this.culling = cull;

            //calcCameraOrientation(ref Front, ref Right, ref Up, 0, 0);

            //Initialize the viewmat
            this.updateViewMatrix();
        }