Documentation
¶
Overview ¶
Package geometry handle components with geometry concepts
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Get = gets{ Point: func(e *goecs.Entity) Point { return e.Get(TYPE.Point).(Point) }, }
Get a geometry component
View Source
var TYPE = types{ Point: reflect.TypeOf(Point{}), }
TYPE hold the reflect.Type for our geometry components
Functions ¶
This section is empty.
Types ¶
type Rect ¶
type Rect struct { From Point // From is the origin of the area Size Size // Size is the size of the area }
Rect is a rectangular area
func (Rect) Collides ¶ added in v0.1.7
Collides return if a given geometry.Rect collides with this geometry.Rect
func (Rect) IsPointInRect ¶
IsPointInRect return if a given geometry.Point is inside the geometry.Rect
type Scale ¶
type Scale struct { Point Point // Point is the scale per point Min float32 // Min is the minimum scale between X and Y Max float32 // Max is the maximum scale between X and Y }
Scale is the current scale between two Size
Click to show internal directories.
Click to hide internal directories.