Blender  V3.3
Functions | Variables
BPy_FrsNoise.cpp File Reference
#include "BPy_FrsNoise.h"
#include "BPy_Convert.h"
#include "../system/RandGen.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`, list or tuple of 2 real numbers\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`, list or tuple of 3 real numbers\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`, list or tuple of 2 real numbers\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`, list or tuple of 3 real numbers\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 65 of file BPy_FrsNoise.cpp.

◆ FrsNoise_drand()

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

◆ FrsNoise_init()

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

Definition at line 52 of file BPy_FrsNoise.cpp.

References Noise, and seed.

◆ 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_repr()

static PyObject* FrsNoise_repr ( BPy_FrsNoise self)
static

Definition at line 72 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_smoothNoise1()

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

Definition at line 214 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_smoothNoise2()

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

Definition at line 235 of file BPy_FrsNoise.cpp.

References t, and Vec2f_ptr_from_PyObject().

◆ FrsNoise_smoothNoise3()

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

Definition at line 263 of file BPy_FrsNoise.cpp.

References t, and Vec3f_ptr_from_PyObject().

◆ FrsNoise_turbulence1()

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

Definition at line 120 of file BPy_FrsNoise.cpp.

References self.

◆ FrsNoise_turbulence2()

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

Definition at line 148 of file BPy_FrsNoise.cpp.

References t, and Vec2f_ptr_from_PyObject().

◆ FrsNoise_turbulence3()

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

Definition at line 184 of file BPy_FrsNoise.cpp.

References t, and Vec3f_ptr_from_PyObject().

◆ FrsNoise_turbulence_smooth()

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

Definition at line 107 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`  ,
list or tuple of 2 real numbers\n" " :return:A smooth noise value.\n" " :rtype: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`  ,
list or tuple of 3 real numbers\n" " :return:A smooth noise value.\n" " :rtype: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`  ,
list or tuple of 2 real numbers\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() [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`  ,
list or tuple of 3 real numbers\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"   
)

Variable Documentation

◆ BPy_FrsNoise_methods

PyMethodDef BPy_FrsNoise_methods[]
static

Definition at line 281 of file BPy_FrsNoise.cpp.

◆ FrsNoise_Type

PyTypeObject FrsNoise_Type

Definition at line 316 of file BPy_FrsNoise.cpp.

Referenced by FrsNoise_Init().