Package com.ardor3d.math.functions

Examples of com.ardor3d.math.functions.MapperFunction3D


        final Function3D largeSlimeBase = new CloudsFunction3D(Functions.simplexNoise(), 1, 4.0, 0.5, 2.12);
        final Function3D largeSlime = Functions.scaleBias(largeSlimeBase, 1, 0.5);
        final Function3D smallSlimeBase = new CloudsFunction3D(Functions.simplexNoise(), 1, 24.0, 0.5, 2.14);
        final Function3D smallSlime = Functions.scaleBias(smallSlimeBase, 0.5, 0);
        final RidgeFunction3D slimeMap = new RidgeFunction3D(Functions.simplexNoise(), 3, 2.0, 2.207);
        final MapperFunction3D slimeMapper = new MapperFunction3D(slimeMap, -1, 1);
        slimeMapper.addFunction(largeSlime, 0, 0, 0);
        slimeMapper.addFunction(smallSlime, .125, 1, 1);
        slimeMapper.addFunction(largeSlime, 1.75, 0, 0);
        final Function3D finalSlime = new TurbulenceFunction3D(slimeMapper, 1 / 32.0, 2, 8.0);

        final ReadOnlyColorRGBA[] slimeColors = new ReadOnlyColorRGBA[256];
        slimeColors[0] = new ColorRGBA(160 / 255f, 64 / 255f, 42 / 255f, 1);
        slimeColors[127] = new ColorRGBA(64 / 255f, 192 / 255f, 64 / 255f, 1);
View Full Code Here

TOP

Related Classes of com.ardor3d.math.functions.MapperFunction3D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.