Documentation ¶
Index ¶
- Constants
- func CalcDistance(x1 float64, y1 float64, x2 float64, y2 float64) float64
- func Hex128(uuid [24]byte) string
- func NextUUId() string
- func ValidHex128(id string) bool
- type AABB
- type AABBNode
- type AABBTree
- type Entity
- func (e *Entity) Compute() bool
- func (e *Entity) Distance(collider *Entity) float64
- func (e *Entity) HasCollision(obj2 *Entity) bool
- func (e *Entity) Invalidate()
- func (e *Entity) Move()
- func (e *Entity) MoveTest() (float64, float64)
- func (e *Entity) SetupCollision(collider *Entity)
- func (e *Entity) SetupInelasticCollision(collider *Entity)
- type Generator
- type IAABB
- type Point
- type Rect
- func (r *Rect) AddTo(x float64, y float64)
- func (r *Rect) AddToX(x float64)
- func (r *Rect) AddToY(y float64)
- func (r *Rect) GetAABB() *AABB
- func (r *Rect) GetCenterX() float64
- func (r *Rect) GetCenterY() float64
- func (r *Rect) GetHeight() float64
- func (r *Rect) GetWidth() float64
- func (r *Rect) GetX() float64
- func (r *Rect) GetY() float64
- func (r *Rect) Intersect(x2 float64, y2 float64, w2 float64, h2 float64) bool
- func (r *Rect) IntersectRect(r2 *Rect) bool
- func (r *Rect) MoveTo(x float64, y float64)
- func (r *Rect) MoveToX(x float64)
- func (r *Rect) MoveToY(y float64)
- func (r *Rect) SetSize(w float64, h float64)
- type Size
Constants ¶
View Source
const AABBNullNode = 0xffffffff
Variables ¶
This section is empty.
Functions ¶
func ValidHex128 ¶
Types ¶
type AABBNode ¶
type AABBNode struct {
// contains filtered or unexported fields
}
func NewAABBNode ¶
func NewAABBNode() *AABBNode
type AABBTree ¶
type AABBTree struct {
// contains filtered or unexported fields
}
func NewAABBTree ¶
func (*AABBTree) InsertObject ¶
func (*AABBTree) QueryOverlaps ¶
func (*AABBTree) RemoveObject ¶
func (*AABBTree) UpdateObject ¶
type Entity ¶
type Entity struct { Rect Id string Mass float64 VxMin float64 Vx float64 VyMin float64 Vy float64 Friction float64 G float64 GForce float64 //breaker *Entity Collider *Entity // contains filtered or unexported fields }
func (*Entity) HasCollision ¶
func (*Entity) Invalidate ¶
func (e *Entity) Invalidate()
func (*Entity) SetupCollision ¶
func (*Entity) SetupInelasticCollision ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func MustNewGenerator ¶
func MustNewGenerator() *Generator
func NewGenerator ¶
type Rect ¶
type Rect struct {
// contains filtered or unexported fields
}
func (*Rect) GetCenterX ¶
func (*Rect) GetCenterY ¶
func (*Rect) IntersectRect ¶
Click to show internal directories.
Click to hide internal directories.