Пример #1
0
        public bool CullTest(ICuller culler)
        {
            //make sure the world matrix is up to date first
            UpdateWorldMatrix();

            //the model implements ICullableInstance interface, which allows a matrix to be passed in
            //the DepthDrawSorter requires a cull test be performed to sort this actor into front-back rendering order

            return(model.CullTest(culler, ref this.worldMatrix));
        }
Пример #2
0
        public void Draw(DrawState state)
        {
            state.PushWorldMatrix(ref worldMatrix);

            //ModelInstances automatically setup the default material shaders
            //Custom shaders can be used with model.SetShaderOverride(...)

            //ModelData stores accurate bounding box information
            //the ModelInstance uses this to cull the model
            if (model.CullTest(state))
            {
                model.Draw(state);
            }

            state.PopWorldMatrix();
        }
Пример #3
0
        //from here everything is the same as the previous example

        public bool CullTest(ICuller culler)
        {
            return(model.CullTest(culler));
        }
Пример #4
0
 public bool CullTest(ICuller culler)
 {
     return(model.CullTest(culler, ref worldMatrix));
 }