[vtkusers] question about vertex ordering
Luca Pamparana
luca.pamparana at gmail.com
Fri Nov 6 11:02:51 EST 2009
Hello,
I have a question about vertex ordering. I am creating a cube where
one of the faces is created by various polygons and they will have
alternate colours.
An example list of points are as follows:
-1.5 0 -3 // point ID 0
-1.5 4 -3 // point ID 1
-1.5 0 -2.2 // point ID 2
-1.5 4 -2.2 // point ID 3
-1.5 0 -2.2
-1.5 4 -2.2
-1.5 0 -1.4
-1.5 4 -1.4
-1.5 0 -1.4
-1.5 4 -1.4
-1.5 0 -0.6
-1.5 4 -0.6
-1.5 0 -0.6
-1.5 4 -0.6
-1.5 0 0.2
-1.5 4 0.2
-1.5 0 0.2
-1.5 4 0.2
-1.5 0 1
-1.5 4 1
And I fill each of these polygons with various colours using a
vtkActor As you can see they represent the left wall of a cube
(constant in x). Now, when I arrange the points in clockwise direction
(when viewing from inside the room) as (0, 2, 3, 1). I do not see the
colours. The panels get drawn as black boxes. However, when I arrange
them counterclockwise (0, 1, 3, 2), the colours show up fine.
Can someone tell me why this is the case??
Thanks,
Luca
More information about the vtkusers
mailing list