1/** 2 * Mandelbulber v2, a 3D fractal generator _%}}i*<. ____ _______ 3 * Copyright (C) 2017 Mandelbulber Team _>]|=||i=i<, / __ \___ ___ ___ / ___/ / 4 * \><||i|=>>%) / /_/ / _ \/ -_) _ \/ /__/ /__ 5 * This file is part of Mandelbulber. )<=i=]=|=i<> \____/ .__/\__/_//_/\___/____/ 6 * The project is licensed under GPLv3, -<>>=|><|||` /_/ 7 * see also COPYING file in this folder. ~+{i%+++ 8 * 9 * Adds Cpixel constant to z vector. Possible to swap Cpixel vector axes. 10 11 * This file has been autogenerated by tools/populateUiInformation.php 12 * from the file "fractal_transf_add_cpixel_axis_swap.cpp" in the folder formula/definition 13 * D O N O T E D I T T H I S F I L E ! 14 */ 15 16REAL4 TransfAddCpixelAxisSwapIteration(REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux) 17{ 18 REAL4 c = aux->const_c; 19 20 REAL4 tempC = c; 21 if (fractal->transformCommon.alternateEnabledFalse) // alternate 22 { 23 tempC = aux->c; 24 switch (fractal->mandelbulbMulti.orderOfXYZ) 25 { 26 case multi_OrderOfXYZCl_xyz: 27 default: tempC = (REAL4){tempC.x, tempC.y, tempC.z, tempC.w}; break; 28 case multi_OrderOfXYZCl_xzy: tempC = (REAL4){tempC.x, tempC.z, tempC.y, tempC.w}; break; 29 case multi_OrderOfXYZCl_yxz: tempC = (REAL4){tempC.y, tempC.x, tempC.z, tempC.w}; break; 30 case multi_OrderOfXYZCl_yzx: tempC = (REAL4){tempC.y, tempC.z, tempC.x, tempC.w}; break; 31 case multi_OrderOfXYZCl_zxy: tempC = (REAL4){tempC.z, tempC.x, tempC.y, tempC.w}; break; 32 case multi_OrderOfXYZCl_zyx: tempC = (REAL4){tempC.z, tempC.y, tempC.x, tempC.w}; break; 33 } 34 aux->c = tempC; 35 } 36 else 37 { 38 switch (fractal->mandelbulbMulti.orderOfXYZ) 39 { 40 case multi_OrderOfXYZCl_xyz: 41 default: tempC = (REAL4){c.x, c.y, c.z, c.w}; break; 42 case multi_OrderOfXYZCl_xzy: tempC = (REAL4){c.x, c.z, c.y, c.w}; break; 43 case multi_OrderOfXYZCl_yxz: tempC = (REAL4){c.y, c.x, c.z, c.w}; break; 44 case multi_OrderOfXYZCl_yzx: tempC = (REAL4){c.y, c.z, c.x, c.w}; break; 45 case multi_OrderOfXYZCl_zxy: tempC = (REAL4){c.z, c.x, c.y, c.w}; break; 46 case multi_OrderOfXYZCl_zyx: tempC = (REAL4){c.z, c.y, c.x, c.w}; break; 47 } 48 } 49 z += tempC * fractal->transformCommon.constantMultiplier111; 50 return z; 51}