(scene *core.Node, axis *math32.Vector3)
| 39 | } |
| 40 | |
| 41 | func ShowPenAxis(scene *core.Node, axis *math32.Vector3) { //}, min, max float32) { |
| 42 | |
| 43 | vertices := math32.NewArrayF32(0, 16) |
| 44 | |
| 45 | size := float32(100) |
| 46 | minPoint := axis.Clone().MultiplyScalar(size) |
| 47 | maxPoint := axis.Clone().MultiplyScalar(-size) |
| 48 | //vertices.AppendVector3(minPoint.Clone().SetX(minPoint.X - size)) |
| 49 | //vertices.AppendVector3(minPoint.Clone().SetX(minPoint.X + size)) |
| 50 | //vertices.AppendVector3(minPoint.Clone().SetY(minPoint.Y - size)) |
| 51 | //vertices.AppendVector3(minPoint.Clone().SetY(minPoint.Y + size)) |
| 52 | //vertices.AppendVector3(minPoint.Clone().SetZ(minPoint.Z - size)) |
| 53 | //vertices.AppendVector3(minPoint.Clone().SetZ(minPoint.Z + size)) |
| 54 | vertices.AppendVector3(minPoint) |
| 55 | //vertices.AppendVector3(maxPoint.Clone().SetX(maxPoint.X - size)) |
| 56 | //vertices.AppendVector3(maxPoint.Clone().SetX(maxPoint.X + size)) |
| 57 | //vertices.AppendVector3(maxPoint.Clone().SetY(maxPoint.Y - size)) |
| 58 | //vertices.AppendVector3(maxPoint.Clone().SetY(maxPoint.Y + size)) |
| 59 | //vertices.AppendVector3(maxPoint.Clone().SetZ(maxPoint.Z - size)) |
| 60 | //vertices.AppendVector3(maxPoint.Clone().SetZ(maxPoint.Z + size)) |
| 61 | vertices.AppendVector3(maxPoint) |
| 62 | |
| 63 | geom := geometry.NewGeometry() |
| 64 | geom.AddVBO(gls.NewVBO(vertices).AddAttrib(gls.VertexPosition)) |
| 65 | |
| 66 | mat := material.NewStandard(&math32.Color{1, 1, 1}) |
| 67 | faceGraphic := graphic.NewLines(geom, mat) |
| 68 | scene.Add(faceGraphic) |
| 69 | } |
| 70 | |
| 71 | func ShowContact(scene *core.Node, contact *collision.Contact) { |
| 72 |
no test coverage detected