builds a Polygon from the passed in verts. Verts should be relative to 0,0 and contain the outer perimeter of the polygon. A center vert will be added and used to triangulate the polygon. If you need a transform matrix for the Polygon set the position/scale and then fetch the transformMatrix property.
상속: IDisposable
예제 #1
0
        public DeferredLightingRenderer(int renderOrder, int lightLayer, params int[] renderLayers) : base(renderOrder)
        {
            // make sure we have a workable Material for our lighting system
            material = new DeferredSpriteMaterial(nullNormalMapTexture);

            _lightLayer = lightLayer;
            Array.Sort(renderLayers);
            this.renderLayers = renderLayers;

            _lightEffect = new DeferredLightEffect();

            // meshes used for light volumes
            _quadMesh        = new QuadMesh(Core.graphicsDevice);
            _polygonMesh     = PolygonMesh.createSymmetricalPolygon(10);
            _quadPolygonMesh = PolygonMesh.createRectangle();

            // set some sensible defaults
            setAmbientColor(new Color(0.2f, 0.2f, 0.2f))
            .setClearColor(Color.CornflowerBlue);
        }
예제 #2
0
        public DeferredLightingRenderer( int renderOrder, int lightLayer, params int[] renderLayers )
            : base(renderOrder)
        {
            // make sure we have a workable Material for our lighting system
            material = new DeferredSpriteMaterial( nullNormalMapTexture );

            _lightLayer = lightLayer;
            Array.Sort( renderLayers );
            this.renderLayers = renderLayers;

            _lightEffect = new DeferredLightEffect();

            // meshes used for light volumes
            _quadMesh = new QuadMesh( Core.graphicsDevice );
            _polygonMesh = PolygonMesh.createSymmetricalPolygon( 10 );
            _quadPolygonMesh = PolygonMesh.createRectangle();

            // set some sensible defaults
            setAmbientColor( new Color( 0.2f, 0.2f, 0.2f ) )
                .setClearColor( Color.CornflowerBlue );
        }