@@ -551,7 +551,15 @@ function coordinates(rect::Rect3D, nvertices=nothing)
551
551
# TODO use n
552
552
w = widths (rect)
553
553
o = origin (rect)
554
- return (ntuple (j-> o[j] + ((i >> (j - 1 )) & 1 ) * w[j], 3 ) for i in 0 : 7 )
554
+ return map (x -> Point3f0 (x .* w .+ o), [
555
+ [0 , 0 , 0 ], [0 , 0 , 1 ], [0 , 1 , 1 ], [0 , 1 , 0 ],
556
+ [0 , 0 , 0 ], [1 , 0 , 0 ], [1 , 0 , 1 ], [0 , 0 , 1 ],
557
+ [0 , 0 , 0 ], [0 , 1 , 0 ], [1 , 1 , 0 ], [1 , 0 , 0 ],
558
+
559
+ [1 , 1 , 1 ], [0 , 1 , 1 ], [0 , 0 , 1 ], [1 , 0 , 1 ],
560
+ [1 , 1 , 1 ], [1 , 0 , 1 ], [1 , 0 , 0 ], [1 , 1 , 0 ],
561
+ [1 , 1 , 1 ], [1 , 1 , 0 ], [0 , 1 , 0 ], [0 , 1 , 1 ]
562
+ ])
555
563
end
556
564
557
565
function texturecoordinates (rect:: Rect3D , nvertices= 1 )
@@ -560,11 +568,11 @@ end
560
568
561
569
function faces (rect:: Rect3D , nvertices= 1 )
562
570
return QuadFace{Int}[
563
- (1 ,3 ,4 , 2 ),
564
- (2 , 4 , 8 , 6 ),
565
- (4 , 3 , 7 , 8 ),
566
- (1 , 5 , 7 , 3 ),
567
- (1 , 2 , 6 , 5 ),
568
- (5 , 6 , 8 , 7 ),
571
+ (1 ,2 , 3 ,4 ),
572
+ (5 , 6 , 7 , 8 ),
573
+ (9 , 10 , 11 , 12 ),
574
+ (13 , 14 , 15 , 16 ),
575
+ (17 , 18 , 19 , 20 ),
576
+ (21 , 22 , 23 , 24 ),
569
577
]
570
578
end
0 commit comments