44 |
) |
) |
45 |
def scene(self, vs): |
def scene(self, vs): |
46 |
vs.put( background((.5,1,.2))) |
vs.put( background((.5,1,.2))) |
|
vs.put(getDListNocoords(""" |
|
|
PushAttrib POLYGON_BIT |
|
|
Enable DEPTH_TEST |
|
|
DepthFunc LEQUAL |
|
|
LineWidth 1 |
|
|
PolygonOffset -100 -100 |
|
|
ShadeModel SMOOTH |
|
|
""")) |
|
|
|
|
|
if self.lines: |
|
|
vs.put(getDListNocoords("PolygonMode FRONT_AND_BACK LINE")) |
|
47 |
|
|
48 |
#angle = vs.orthoCS(0, "Ang", 0, self.angle, 0, 0, 0); |
#angle = vs.orthoCS(0, "Ang", 0, self.angle, 0, 0, 0); |
49 |
|
|
56 |
vs.matcher.add(thick, "Thi") |
vs.matcher.add(thick, "Thi") |
57 |
vs.matcher.add(angle, "Ang") |
vs.matcher.add(angle, "Ang") |
58 |
|
|
|
border = 2 |
|
|
conns = GLRen.createSortedConnections( |
|
|
GLRen.createFilletSpan2(border, self.dice, |
|
|
1 + |
|
|
4 * self.depthColor + |
|
|
16 * self.ellipses + |
|
|
64 * self.stretched + |
|
|
128 * self.sectors), |
|
|
2) |
|
|
conns_l = GLRen.createSortedConnections( |
|
|
GLRen.createFilletSpan2(border, self.dice, |
|
|
2 + |
|
|
4 * self.depthColor + |
|
|
16 * self.ellipses + |
|
|
64 * self.stretched + |
|
|
128 * self.sectors), |
|
|
2) |
|
|
conns_c = GLRen.createSortedConnections( |
|
|
GLRen.createFilletSpan2(1000, self.dice, |
|
|
2 + |
|
|
4 * self.depthColor + |
|
|
16 * self.ellipses + |
|
|
32 + |
|
|
64 * self.stretched + |
|
|
128 * self.sectors), |
|
|
2) |
|
|
|
|
59 |
N = 10 |
N = 10 |
60 |
|
|
61 |
a = [vs.orthoBoxCS(0, "A%s" % i, 0, 100, 100+100*i, |
a = [vs.orthoBoxCS(0, "A%s" % i, 0, 100, 100+100*i, |
72 |
vs.put(conns, [thick, angle, b[i], a[i]]); |
vs.put(conns, [thick, angle, b[i], a[i]]); |
73 |
|
|
74 |
|
|
75 |
vs.put(getDListNocoords(""" |
light3d.drawFillets(self, vs, pc) |
|
Color 1 1 1 |
|
|
""")) |
|
|
if self.drawInside: pc(conns) |
|
|
vs.put(getDListNocoords(""" |
|
|
Color 0 0 0 |
|
|
""")) |
|
|
if self.drawEdge: pc(conns_l) |
|
|
|
|
|
if self.curvature : pc(conns_c) |
|
|
|
|
|
vs.put(getDListNocoords(""" |
|
|
PopAttrib |
|
|
""")) |
|
76 |
|
|