Пример #1
0
        public override Color UVPatternAt(double u, double v, CubeFace face = CubeFace.None)
        {
            switch (face)
            {
            case CubeFace.Left:
                return(left.UVPatternAt(u, v));

            case CubeFace.Right:
                return(right.UVPatternAt(u, v));

            case CubeFace.Front:
                return(front.UVPatternAt(u, v));

            case CubeFace.Back:
                return(back.UVPatternAt(u, v));

            case CubeFace.Up:
                return(up.UVPatternAt(u, v));

            case CubeFace.Down:
                return(down.UVPatternAt(u, v));

            default:
                return(Color.Black);
            }
        }
Пример #2
0
        public override Color PatternAt(Point p)
        {
            var uv = UVMap(p);

            return(_pattern.UVPatternAt(uv.u, uv.v, _mapping == Mapping.Cubical ? CubeMapPattern.FaceFromPoint(p) : CubeFace.None));
        }