spline.go 616 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2016 The G3N Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package math32
  5. import (
  6. //"math"
  7. )
  8. type Spline struct {
  9. points []Vector3
  10. }
  11. func NewSpline(points []Vector3) *Spline {
  12. this := new(Spline)
  13. this.points = make([]Vector3, len(points))
  14. copy(this.points, points)
  15. return this
  16. }
  17. func (this *Spline) InitFromArray(a []float32) {
  18. // PEND array of what ?
  19. //this.points = [];
  20. //for ( var i = 0; i < a.length; i ++ ) {
  21. // this.points[ i ] = { x: a[ i ][ 0 ], y: a[ i ][ 1 ], z: a[ i ][ 2 ] };
  22. //}
  23. }