示例#1
0
    public void UpdateMesh(ModularMesh mesh)
    {
        if (laneSurface != null)
        {
            laneSurface.RemoveFromMesh(mesh, MaterialManager.GetMaterial("diffuseGray"));
        }

        rightOutline = leftOutline.Inset(width);
        laneSurface  = new TriangleStrip(leftOutline, rightOutline, mesh, MaterialManager.GetMaterial("diffuseGray"));
    }
示例#2
0
    public void UpdateMesh(ModularMesh mesh)
    {
        if (curbFace != null)
        {
            curbFace.RemoveFromMesh(mesh, MaterialManager.GetMaterial("diffuseCheckerboard"));
        }
        if (curbSurface != null)
        {
            curbSurface.RemoveFromMesh(mesh, MaterialManager.GetMaterial("diffuseCheckerboard"));
        }

        curbedge     = leftOutline.Translate(Vector3.up * height);
        rightOutline = curbedge.Inset(width);

        curbFace    = new TriangleStrip(leftOutline, curbedge, mesh, MaterialManager.GetMaterial("diffuseCheckerboard"));
        curbSurface = new TriangleStrip(curbedge, rightOutline, mesh, MaterialManager.GetMaterial("diffuseCheckerboard"));
    }