MCPcopy
hub / github.com/g3n/engine / ShowWorldFace

Function ShowWorldFace

experimental/physics/debug.go:21–39  ·  view source on GitHub ↗
(scene *core.Node, face []math32.Vector3, color *math32.Color)

Source from the content-addressed store, hash-verified

19}
20
21func ShowWorldFace(scene *core.Node, face []math32.Vector3, color *math32.Color) {
22
23 if len(face) == 0 {
24 return
25 }
26
27 vertices := math32.NewArrayF32(0, 16)
28 for i := range face {
29 vertices.AppendVector3(&face[i])
30 }
31 vertices.AppendVector3(&face[0])
32
33 geom := geometry.NewGeometry()
34 geom.AddVBO(gls.NewVBO(vertices).AddAttrib(gls.VertexPosition))
35
36 mat := material.NewStandard(color)
37 faceGraphic := graphic.NewLineStrip(geom, mat)
38 scene.Add(faceGraphic)
39}
40
41func ShowPenAxis(scene *core.Node, axis *math32.Vector3) { //}, min, max float32) {
42

Callers 1

SphereConvexMethod · 0.85

Calls 9

AppendVector3Method · 0.95
AddVBOMethod · 0.95
NewArrayF32Function · 0.92
NewGeometryFunction · 0.92
NewVBOFunction · 0.92
NewStandardFunction · 0.92
NewLineStripFunction · 0.92
AddAttribMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected