Пример #1
0
/**
 * Returns 4 values for Simplex noise at a 4D location.
 */
VuoPoint4d VuoGradientNoise_simplex_VuoPoint4d_VuoPoint4d(VuoPoint4d point)
{
	return VuoPoint4d_make(VuoGradientNoise_simplex_VuoPoint4d_VuoReal(VuoPoint4d_add(point,VuoPoint4d_make(-1,-1,-1,-1))),
						   VuoGradientNoise_simplex_VuoPoint4d_VuoReal(point),
						   VuoGradientNoise_simplex_VuoPoint4d_VuoReal(VuoPoint4d_add(point,VuoPoint4d_make(1,1,1,1))),
						   VuoGradientNoise_simplex_VuoPoint4d_VuoReal(VuoPoint4d_add(point,VuoPoint4d_make(2,2,2,2))));
}
Пример #2
0
/**
 * Returns 4 values for Simplex noise at a 1D location.
 */
VuoPoint4d VuoGradientNoise_simplex_VuoReal_VuoPoint4d(VuoReal x)
{
	return VuoPoint4d_make(VuoGradientNoise_simplex_VuoReal_VuoReal(x-1),
						   VuoGradientNoise_simplex_VuoReal_VuoReal(x),
						   VuoGradientNoise_simplex_VuoReal_VuoReal(x+1),
						   VuoGradientNoise_simplex_VuoReal_VuoReal(x+2));
}
Пример #3
0
/**
 * Returns 4 values for Perlin noise at a 2D location.
 */
VuoPoint4d VuoGradientNoise_perlin_VuoPoint2d_VuoPoint4d(VuoPoint2d point)
{
	return VuoPoint4d_make(VuoGradientNoise_perlin_VuoPoint2d_VuoReal(VuoPoint2d_add(point,VuoPoint2d_make(-1,-1))),
						   VuoGradientNoise_perlin_VuoPoint2d_VuoReal(point),
						   VuoGradientNoise_perlin_VuoPoint2d_VuoReal(VuoPoint2d_add(point,VuoPoint2d_make(1,1))),
						   VuoGradientNoise_perlin_VuoPoint2d_VuoReal(VuoPoint2d_add(point,VuoPoint2d_make(2,2))));
}
static inline VuoPoint4d addAndMultiply(VuoPoint3d v, VuoPoint3d n, VuoReal d)
{
	return VuoPoint4d_make(	v.x + n.x * d,
							v.y + n.y * d,
							v.z + n.z * d,
							1);
}
/**
 * @file
 * vuo.type.integer.point4d node implementation.
 *
 * @copyright Copyright © 2012–2015 Kosada Incorporated.
 * This code may be modified and distributed under the terms of the MIT License.
 * For more information, see http://vuo.org/license.
 */

#include "node.h"

VuoModuleMetadata({
					 "title" : "Convert Integer to 4D Point",
					 "keywords" : [ ],
					 "version" : "1.0.0"
				 });

void nodeEvent
(
		VuoInputData(VuoInteger, {"default":0}) w,
		VuoOutputData(VuoPoint4d) point4d
)
{
	*point4d = VuoPoint4d_make(0, 0, 0, w);
}
Пример #6
0
/**
 * @file
 * vuo.type.integer.point4d node implementation.
 *
 * @copyright Copyright © 2012–2014 Kosada Incorporated.
 * This code may be modified and distributed under the terms of the MIT License.
 * For more information, see http://vuo.org/license.
 */

#include "node.h"

VuoModuleMetadata({
					 "title" : "Convert Integer to 4D Point",
					 "keywords" : [ ],
					 "version" : "1.0.0"
				 });

void nodeEvent
(
		VuoInputData(VuoInteger, {"default":0}) z,
		VuoOutputData(VuoPoint4d) point4d
)
{
	*point4d = VuoPoint4d_make(0, 0, z, 0);
}
/**
 * @file
 * vuo.type.real.point4d node implementation.
 *
 * @copyright Copyright © 2012–2015 Kosada Incorporated.
 * This code may be modified and distributed under the terms of the MIT License.
 * For more information, see http://vuo.org/license.
 */

#include "node.h"

VuoModuleMetadata({
					 "title" : "Convert Real to 4D Point",
					 "keywords" : [ ],
					 "version" : "1.0.0"
				 });

void nodeEvent
(
		VuoInputData(VuoReal, {"default":0.0}) x,
		VuoOutputData(VuoPoint4d) point4d
)
{
	*point4d = VuoPoint4d_make(x, 0, 0, 0);
}