Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-09-30 08:17:39 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-09-30 08:17:39 +0400
commit204f48c74e3a6f8a940aefea07f42e2a160d4171 (patch)
tree65244b94c0169095f2ea7402e21b0cc90c325a83 /release/scripts/freestyle/style_modules/Functions1D.py
parent7e3a4c84e42b92c11e61a7102d29c4aa9b61291d (diff)
soc-2008-mxcurioni: sending files in release/scripts/freestyle folder
Diffstat (limited to 'release/scripts/freestyle/style_modules/Functions1D.py')
-rwxr-xr-xrelease/scripts/freestyle/style_modules/Functions1D.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/release/scripts/freestyle/style_modules/Functions1D.py b/release/scripts/freestyle/style_modules/Functions1D.py
new file mode 100755
index 00000000000..308486bc6a7
--- /dev/null
+++ b/release/scripts/freestyle/style_modules/Functions1D.py
@@ -0,0 +1,45 @@
+from freestyle_init import *
+from Functions0D import *
+import string
+
+class pyGetInverseProjectedZF1D(UnaryFunction1DDouble):
+ def getName(self):
+ return "pyGetInverseProjectedZF1D"
+
+ def __call__(self, inter):
+ func = GetProjectedZF1D()
+ z = func(inter)
+ return (1.0 - z)
+
+class pyGetSquareInverseProjectedZF1D(UnaryFunction1DDouble):
+ def getName(self):
+ return "pyGetInverseProjectedZF1D"
+
+ def __call__(self, inter):
+ func = GetProjectedZF1D()
+ z = func(inter)
+ return (1.0 - z*z)
+
+class pyDensityAnisotropyF1D(UnaryFunction1DDouble):
+ def __init__(self,level, integrationType=IntegrationType.MEAN, sampling=2.0):
+ UnaryFunction1DDouble.__init__(self, integrationType)
+ self._func = pyDensityAnisotropyF0D(level)
+ self._integration = integrationType
+ self._sampling = sampling
+ def getName(self):
+ return "pyDensityAnisotropyF1D"
+ def __call__(self, inter):
+ v = integrateDouble(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration)
+ return v
+
+class pyViewMapGradientNormF1D(UnaryFunction1DDouble):
+ def __init__(self,l, integrationType, sampling=2.0):
+ UnaryFunction1DDouble.__init__(self, integrationType)
+ self._func = pyViewMapGradientNormF0D(l)
+ self._integration = integrationType
+ self._sampling = sampling
+ def getName(self):
+ return "pyViewMapGradientNormF1D"
+ def __call__(self, inter):
+ v = integrateDouble(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration)
+ return v