Blender V4.3
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")
 
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")
 
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")
 
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")
 
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")
 
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")
 
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")
 
static PyObject * FrsNoise_smoothNoise3 (BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
 

Variables

static PyMethodDef BPy_FrsNoise_methods []
 
PyTypeObject FrsNoise_Type
 

Function Documentation

◆ FrsNoise_dealloc()

static void FrsNoise_dealloc ( BPy_FrsNoise * self)
static

Definition at line 70 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_drand()

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

◆ FrsNoise_Init()

int FrsNoise_Init ( PyObject * module)

Definition at line 27 of file BPy_FrsNoise.cpp.

References FrsNoise_Type, and module.

Referenced by Freestyle_Init().

◆ FrsNoise_init()

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

Definition at line 57 of file BPy_FrsNoise.cpp.

References Noise, seed, and self.

◆ FrsNoise_repr()

static PyObject * FrsNoise_repr ( BPy_FrsNoise * self)
static

Definition at line 77 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_smoothNoise1()

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

Definition at line 227 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_smoothNoise2()

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

Definition at line 250 of file BPy_FrsNoise.cpp.

References self, and Vec2f_ptr_from_PyObject().

◆ FrsNoise_smoothNoise3()

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

Definition at line 280 of file BPy_FrsNoise.cpp.

References self, and Vec3f_ptr_from_PyObject().

◆ FrsNoise_turbulence1()

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

Definition at line 127 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_turbulence2()

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

Definition at line 157 of file BPy_FrsNoise.cpp.

References self, and Vec2f_ptr_from_PyObject().

◆ FrsNoise_turbulence3()

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

Definition at line 195 of file BPy_FrsNoise.cpp.

References self, and Vec3f_ptr_from_PyObject().

◆ FrsNoise_turbulence_smooth()

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

Definition at line 114 of file BPy_FrsNoise.cpp.

References self, and Freestyle::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"  )

◆ 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"  )

◆ 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" [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" [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"  )

◆ 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" [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" [float, float, float][float] )

Variable Documentation

◆ BPy_FrsNoise_methods

PyMethodDef BPy_FrsNoise_methods[]
static

Definition at line 298 of file BPy_FrsNoise.cpp.

◆ FrsNoise_Type

PyTypeObject FrsNoise_Type

Definition at line 333 of file BPy_FrsNoise.cpp.

Referenced by FrsNoise_Init().