blob: 33466ed5a33b3375150285bbb112c9b0cb9fd976 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
from Blender.Freestyle import *
class AndUP1D(UnaryPredicate1D):
def __init__(self, pred1, pred2):
UnaryPredicate1D.__init__(self)
self.__pred1 = pred1
self.__pred2 = pred2
def getName(self):
return "AndUP1D"
def __call__(self, inter):
return self.__pred1(inter) and self.__pred2(inter)
class OrUP1D(UnaryPredicate1D):
def __init__(self, pred1, pred2):
UnaryPredicate1D.__init__(self)
self.__pred1 = pred1
self.__pred2 = pred2
def getName(self):
return "OrUP1D"
def __call__(self, inter):
return self.__pred1(inter) or self.__pred2(inter)
class NotUP1D(UnaryPredicate1D):
def __init__(self, pred):
UnaryPredicate1D.__init__(self)
self.__pred = pred
def getName(self):
return "NotUP1D"
def __call__(self, inter):
return self.__pred(inter) == 0
|