mirror of
https://github.com/Kugelschieber/go-game.git
synced 2026-01-18 06:40:28 +00:00
Moved types to top of files, started 2D texture mapped font rendering.
This commit is contained in:
14
pos.go
14
pos.go
@@ -8,6 +8,13 @@ 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{}
|
||||
@@ -38,13 +45,6 @@ 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{}
|
||||
|
||||
Reference in New Issue
Block a user