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)
| 232 | // the specified callback function with the value of each vertex. |
| 233 | // The callback function returns false to continue or true to break. |
| 234 | func (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. |
no test coverage detected