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)); }
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(); }
//from here everything is the same as the previous example public bool CullTest(ICuller culler) { return(model.CullTest(culler)); }
public bool CullTest(ICuller culler) { return(model.CullTest(culler, ref worldMatrix)); }