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

Method ReadVertices

geometry/geometry.go:234–242  ·  view source on GitHub ↗

ReadVertices iterates over all the vertices and calls the specified callback function with the value of each vertex. The callback function returns false to continue or true to break.

(cb func(vertex math32.Vector3) bool)

Source from the content-addressed store, hash-verified

232// the specified callback function with the value of each vertex.
233// The callback function returns false to continue or true to break.
234func (g *Geometry) ReadVertices(cb func(vertex math32.Vector3) bool) {
235
236 // Get buffer with position vertices
237 vbo := g.VBO(gls.VertexPosition)
238 if vbo == nil {
239 return
240 }
241 vbo.ReadVectors3(gls.VertexPosition, cb)
242}
243
244// OperateOnVertexNormals iterates over all the vertex normals
245// and calls the specified callback function with a pointer to each normal.

Callers 5

BoundingBoxMethod · 0.95
BoundingSphereMethod · 0.95
ProjectOntoAxisMethod · 0.95
SphereConvexMethod · 0.80
RaycastPointsMethod · 0.80

Calls 2

VBOMethod · 0.95
ReadVectors3Method · 0.80

Tested by

no test coverage detected