Blender V5.0
BPy_FrsNoise.cpp File Reference
#include "BPy_FrsNoise.h"
#include "BPy_Convert.h"
#include "../system/RandGen.h"
#include "BLI_sys_types.h"
#include <sstream>

Go to the source code of this file.

Functions

int FrsNoise_Init (PyObject *module)
 PyDoc_STRVAR (FrsNoise_doc, "Class to provide Perlin noise functionalities.\n" "\n" ".. method:: __init__(seed = -1)\n" "\n" " Builds a Noise object. Seed is an optional argument. The seed value is used\n" " as a seed for random number generation if it is equal to or greater than zero;\n" " otherwise, time is used as a seed.\n" "\n" " :arg seed: Seed for random number generation.\n" " :type seed: int\n")
static int FrsNoise_init (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
static void FrsNoise_dealloc (BPy_FrsNoise *self)
static PyObject * FrsNoise_repr (BPy_FrsNoise *self)
 PyDoc_STRVAR (FrsNoise_turbulence1_doc, ".. method:: turbulence1(v, freq, amp, oct=4)\n" "\n" " Returns a noise value for a 1D element.\n" "\n" " :arg v: One-dimensional sample point.\n" " :type v: float\n" " :arg freq: Noise frequency.\n" " :type freq: float\n" " :arg amp: Amplitude.\n" " :type amp: float\n" " :arg oct: Number of octaves.\n" " :type oct: int\n" " :return: A noise value.\n" " :rtype: float\n")
static PyObject * FrsNoise_drand (BPy_FrsNoise *, PyObject *args, PyObject *kwds)
static PyObject * FrsNoise_turbulence_smooth (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
static PyObject * FrsNoise_turbulence1 (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
 PyDoc_STRVAR (FrsNoise_turbulence2_doc, ".. method:: turbulence2(v, freq, amp, oct=4)\n" "\n" " Returns a noise value for a 2D element.\n" "\n" " :arg v: Two-dimensional sample point.\n" " :type v: :class:`mathutils.Vector` | tuple[float, float] | list[float]\n" " :arg freq: Noise frequency.\n" " :type freq: float\n" " :arg amp: Amplitude.\n" " :type amp: float\n" " :arg oct: Number of octaves.\n" " :type oct: int\n" " :return: A noise value.\n" " :rtype: float\n")
static PyObject * FrsNoise_turbulence2 (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
 PyDoc_STRVAR (FrsNoise_turbulence3_doc, ".. method:: turbulence3(v, freq, amp, oct=4)\n" "\n" " Returns a noise value for a 3D element.\n" "\n" " :arg v: Three-dimensional sample point.\n" " :type v: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]\n" " :arg freq: Noise frequency.\n" " :type freq: float\n" " :arg amp: Amplitude.\n" " :type amp: float\n" " :arg oct: Number of octaves.\n" " :type oct: int\n" " :return: A noise value.\n" " :rtype: float\n")
static PyObject * FrsNoise_turbulence3 (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
 PyDoc_STRVAR (FrsNoise_smoothNoise1_doc, ".. method:: smoothNoise1(v)\n" "\n" " Returns a smooth noise value for a 1D element.\n" "\n" " :arg v: One-dimensional sample point.\n" " :type v: float\n" " :return: A smooth noise value.\n" " :rtype: float\n")
static PyObject * FrsNoise_smoothNoise1 (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
 PyDoc_STRVAR (FrsNoise_smoothNoise2_doc, ".. method:: smoothNoise2(v)\n" "\n" " Returns a smooth noise value for a 2D element.\n" "\n" " :arg v: Two-dimensional sample point.\n" " :type v: :class:`mathutils.Vector` | tuple[float, float] | list[float]\n" " :return: A smooth noise value.\n" " :rtype: float\n")
static PyObject * FrsNoise_smoothNoise2 (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
 PyDoc_STRVAR (FrsNoise_smoothNoise3_doc, ".. method:: smoothNoise3(v)\n" "\n" " Returns a smooth noise value for a 3D element.\n" "\n" " :arg v: Three-dimensional sample point.\n" " :type v: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]\n" " :return: A smooth noise value.\n" " :rtype: float\n")
static PyObject * FrsNoise_smoothNoise3 (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)

Variables

static PyMethodDef BPy_FrsNoise_methods []
PyTypeObject FrsNoise_Type

Function Documentation

◆ FrsNoise_dealloc()

void FrsNoise_dealloc ( BPy_FrsNoise * self)
static

Definition at line 65 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_drand()

PyObject * FrsNoise_drand ( BPy_FrsNoise * ,
PyObject * args,
PyObject * kwds )
static

◆ FrsNoise_Init()

int FrsNoise_Init ( PyObject * module)

Definition at line 23 of file BPy_FrsNoise.cpp.

References FrsNoise_Type, and module.

Referenced by Freestyle_Init().

◆ FrsNoise_init()

int FrsNoise_init ( BPy_FrsNoise * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 52 of file BPy_FrsNoise.cpp.

References seed, and self.

◆ FrsNoise_repr()

PyObject * FrsNoise_repr ( BPy_FrsNoise * self)
static

Definition at line 72 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_smoothNoise1()

PyObject * FrsNoise_smoothNoise1 ( BPy_FrsNoise * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 218 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_smoothNoise2()

PyObject * FrsNoise_smoothNoise2 ( BPy_FrsNoise * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 240 of file BPy_FrsNoise.cpp.

References self, and Vec2f_ptr_from_PyObject().

◆ FrsNoise_smoothNoise3()

PyObject * FrsNoise_smoothNoise3 ( BPy_FrsNoise * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 269 of file BPy_FrsNoise.cpp.

References self, and Vec3f_ptr_from_PyObject().

◆ FrsNoise_turbulence1()

PyObject * FrsNoise_turbulence1 ( BPy_FrsNoise * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 121 of file BPy_FrsNoise.cpp.

References i, and self.

◆ FrsNoise_turbulence2()

PyObject * FrsNoise_turbulence2 ( BPy_FrsNoise * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 150 of file BPy_FrsNoise.cpp.

References i, self, and Vec2f_ptr_from_PyObject().

◆ FrsNoise_turbulence3()

PyObject * FrsNoise_turbulence3 ( BPy_FrsNoise * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 187 of file BPy_FrsNoise.cpp.

References i, self, and Vec3f_ptr_from_PyObject().

◆ FrsNoise_turbulence_smooth()

PyObject * FrsNoise_turbulence_smooth ( BPy_FrsNoise * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 108 of file BPy_FrsNoise.cpp.

References self, and x.

◆ PyDoc_STRVAR() [1/7]

PyDoc_STRVAR ( FrsNoise_doc ,
"Class to provide Perlin noise functionalities.\n" "\n" ".. method:: __init__(seed = -1)\n" "\n" " Builds a Noise object. Seed is an optional argument. The seed value is used\n" " as a seed for random number generation if it is equal to or greater than zero;\n" " otherwise,
time is used as a seed.\n" "\n" " :arg seed:Seed for random number generation.\n" " :type seed:int\n"  )

◆ PyDoc_STRVAR() [2/7]

PyDoc_STRVAR ( FrsNoise_smoothNoise1_doc ,
".. method:: smoothNoise1(v)\n" "\n" " Returns a smooth noise value for a 1D element.\n" "\n" " :arg v: One-dimensional sample point.\n" " :type v: float\n" " :return: A smooth noise value.\n" " :rtype: float\n"  )

◆ PyDoc_STRVAR() [3/7]

PyDoc_STRVAR ( FrsNoise_smoothNoise2_doc ,
".. method:: smoothNoise2(v)\n" "\n" " Returns a smooth noise value for a 2D element.\n" "\n" " :arg v: Two-dimensional sample point.\n" " :type v: :class:`mathutils.Vector` | tuple | list\n" " :return: A smooth noise value.\n" " :rtype: float\n" [float, float][float] )

◆ PyDoc_STRVAR() [4/7]

PyDoc_STRVAR ( FrsNoise_smoothNoise3_doc ,
".. method:: smoothNoise3(v)\n" "\n" " Returns a smooth noise value for a 3D element.\n" "\n" " :arg v: Three-dimensional sample point.\n" " :type v: :class:`mathutils.Vector` | tuple | list\n" " :return: A smooth noise value.\n" " :rtype: float\n" [float, float, float][float] )

◆ PyDoc_STRVAR() [5/7]

PyDoc_STRVAR ( FrsNoise_turbulence1_doc ,
".. method:: turbulence1(v, freq, amp, oct=4)\n" "\n" " Returns a noise value for a 1D element.\n" "\n" " :arg v: One-dimensional sample point.\n" " :type v: float\n" " :arg freq: Noise frequency.\n" " :type freq: float\n" " :arg amp: Amplitude.\n" " :type amp: float\n" " :arg oct: Number of octaves.\n" " :type oct: int\n" " :return: A noise value.\n" " :rtype: float\n"  )

◆ PyDoc_STRVAR() [6/7]

PyDoc_STRVAR ( FrsNoise_turbulence2_doc ,
".. method:: turbulence2(v, freq, amp, oct=4)\n" "\n" " Returns a noise value for a 2D element.\n" "\n" " :arg v: Two-dimensional sample point.\n" " :type v: :class:`mathutils.Vector` | tuple | list\n" " :arg freq: Noise frequency.\n" " :type freq: float\n" " :arg amp: Amplitude.\n" " :type amp: float\n" " :arg oct: Number of octaves.\n" " :type oct: int\n" " :return: A noise value.\n" " :rtype: float\n" [float, float][float] )

◆ PyDoc_STRVAR() [7/7]

PyDoc_STRVAR ( FrsNoise_turbulence3_doc ,
".. method:: turbulence3(v, freq, amp, oct=4)\n" "\n" " Returns a noise value for a 3D element.\n" "\n" " :arg v: Three-dimensional sample point.\n" " :type v: :class:`mathutils.Vector` | tuple | list\n" " :arg freq: Noise frequency.\n" " :type freq: float\n" " :arg amp: Amplitude.\n" " :type amp: float\n" " :arg oct: Number of octaves.\n" " :type oct: int\n" " :return: A noise value.\n" " :rtype: float\n" [float, float, float][float] )

Variable Documentation

◆ BPy_FrsNoise_methods

PyMethodDef BPy_FrsNoise_methods[]
static

Definition at line 297 of file BPy_FrsNoise.cpp.

◆ FrsNoise_Type

PyTypeObject FrsNoise_Type

Definition at line 340 of file BPy_FrsNoise.cpp.

Referenced by FrsNoise_Init().