File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,6 +85,18 @@ func TestRotateAndTranslate(t *testing.T) {
8585 triangle .V0 .Position = translationMatrix .MulPosition (triangle .V0 .Position ) // safe to use as func is tested in another place
8686 triangle .V1 .Position = translationMatrix .MulPosition (triangle .V1 .Position )
8787 triangle .V2 .Position = translationMatrix .MulPosition (triangle .V2 .Position )
88+ if triangle .V0 .Normal != nil {
89+ n0 := translationMatrix .MulDirection (* triangle .V0 .Normal )
90+ triangle .V0 .Normal = & n0
91+ }
92+ if triangle .V1 .Normal != nil {
93+ n1 := translationMatrix .MulDirection (* triangle .V1 .Normal )
94+ triangle .V1 .Normal = & n1
95+ }
96+ if triangle .V2 .Normal != nil {
97+ n2 := translationMatrix .MulDirection (* triangle .V2 .Normal )
98+ triangle .V2 .Normal = & n2
99+ }
88100 }
89101 if ! reflect .DeepEqual (result , want ) {
90102 t .Errorf ("Mesh RotateAndTranslate() Output does not match expected" )
You can’t perform that action at this time.
0 commit comments