2 Demonstrates how to create a mmesh from scratch and to set color per vertex data.
7 def makePyramidMesh(mmesh, side=20.0):
16 vislist = MaxPlus.CreateBoolList([1, 1, 0])
17 mmesh.F(0).MakePoly(3, MaxPlus.CreateIntList([0, 1, 2]), vislist)
18 mmesh.F(1).MakePoly(3, MaxPlus.CreateIntList([0, 2, 3]), vislist)
19 mmesh.F(2).MakePoly(3, MaxPlus.CreateIntList([0, 3, 1]), vislist)
20 mmesh.F(3).MakePoly(3, MaxPlus.CreateIntList([1, 2, 3]), vislist)
26 poly = MaxPlus.PolyObject._CastFrom(geom)
28 makePyramidMesh(mmesh)
37 mmap.F(0).SetTV(MaxPlus.CreateIntList([0, 0, 1]))
38 mmap.F(1).SetTV(MaxPlus.CreateIntList([0, 1, 1]))
39 mmap.F(2).SetTV(MaxPlus.CreateIntList([1, 1, 1]))
40 mmap.F(3).SetTV(MaxPlus.CreateIntList([0, 0, 0]))
41 node.VertexColorMode =
True
43 if __name__ ==
"__main__":