Sfoglia il codice sorgente

started working on physics

danaugrs 7 anni fa
parent
commit
731f74045b
3 ha cambiato i file con 36 aggiunte e 0 eliminazioni
  1. 7 0
      physics/doc.go
  2. 12 0
      physics/logger.go
  3. 17 0
      physics/rigidbody.go

+ 7 - 0
physics/doc.go

@@ -0,0 +1,7 @@
+// Copyright 2016 The G3N Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package physics implements a basic physics engine.
+package physics
+

+ 12 - 0
physics/logger.go

@@ -0,0 +1,12 @@
+// Copyright 2016 The G3N Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package physics
+
+import (
+	"github.com/g3n/engine/util/logger"
+)
+
+// Package logger
+var log = logger.New("PHYSICS", logger.Default)

+ 17 - 0
physics/rigidbody.go

@@ -0,0 +1,17 @@
+// Copyright 2016 The G3N Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package physics
+
+// RigidBody represents a physics-driven solid body.
+type RigidBody struct {
+	// TODO :)
+}
+
+// NewRigidBody creates and returns a pointer to a new RigidBody.
+func NewRigidBody() *RigidBody {
+
+	b := new(RigidBody)
+	return b
+}