Samples/Geometry/VertexColor.py
10 from pyfbsdk
import FBMesh, FBModelCube, FBVector3d, FBModelTransformationType, FBModelShadingMode
21 lMesh.VertexInit(4,
False,
False,
True)
23 lMesh.VertexAdd(0, 100, 0)
24 lMesh.VertexAdd(100,100, 0)
25 lMesh.VertexAdd(100, 0, 0)
26 lMesh.VertexAdd(0, 0, 0)
28 lMesh.VertexColorSet(1, 0, 0, 1, 0)
29 lMesh.VertexColorSet(0, 1, 0, 1, 1)
30 lMesh.VertexColorSet(0, 0, 1, 1, 2)
31 lMesh.VertexColorSet(1, 1, 0, 1, 3)
35 lMesh.PolygonVertexAdd(0)
36 lMesh.PolygonVertexAdd(1)
37 lMesh.PolygonVertexAdd(2)
38 lMesh.PolygonVertexAdd(3)
43 lMesh.ComputeVertexNormals(
True)
49 for lIndex
in range(1, 10):
54 lModel.Geometry = lMesh
56 lModel.SetVector(
FBVector3d(120*lIndex - 600, 50, 50 ) )
60 lModel.ShadingMode = FBModelShadingMode.kFBModelShadingWire
62 lModel.ShadingMode = FBModelShadingMode.kFBModelShadingFlat
69 del( lModel, lMesh, FBMesh, FBModelCube, FBVector3d, FBModelTransformationType, FBModelShadingMode )