Code restructuring.

This commit is contained in:
Marvin Blum
2016-08-18 23:58:41 +02:00
parent 6ffa5aa431
commit 69886eff00
10 changed files with 197 additions and 197 deletions

14
pos.go
View File

@@ -8,13 +8,6 @@ type Pos2D struct {
M Mat3
}
// Position component for 3D objects
type Pos3D struct {
Pos, Size, Scale, RotPoint, Rot Vec3
Visible bool
M Mat4
}
// Creates a default initialized Pos2D.
func NewPos2D() *Pos2D {
m := Mat3{}
@@ -45,6 +38,13 @@ func (p *Pos2D) PointInRect(point Vec2) bool {
return point.X > p.Pos.X && point.X < p.Pos.X+p.Size.X*p.Scale.X && point.Y > p.Pos.Y && point.Y < p.Pos.Y+p.Size.Y*p.Scale.Y
}
// Position component for 3D objects
type Pos3D struct {
Pos, Size, Scale, RotPoint, Rot Vec3
Visible bool
M Mat4
}
// Creates a default initialized Pos3D.
func NewPos3D() *Pos3D {
m := Mat4{}