mirror of
https://github.com/genxium/DelayNoMore
synced 2025-10-09 08:36:52 +00:00
Temp update to remove use of MakeFullWrapper for reducing redundant CPU time in profiling.
This commit is contained in:
@@ -48,6 +48,18 @@ func NewObject(x, y, w, h float64, tags ...string) *Object {
|
||||
return o
|
||||
}
|
||||
|
||||
func (obj *Object) GetData() interface{} {
|
||||
return obj.Data
|
||||
}
|
||||
|
||||
func (obj *Object) GetShape() *Shape {
|
||||
return &(obj.Shape)
|
||||
}
|
||||
|
||||
func (obj *Object) Position() (float64, float64) {
|
||||
return obj.X, obj.Y
|
||||
}
|
||||
|
||||
// Clone clones the Object with its properties into another Object. It also clones the Object's Shape (if it has one).
|
||||
func (obj *Object) Clone() *Object {
|
||||
newObj := NewObject(obj.X, obj.Y, obj.W, obj.H, obj.Tags()...)
|
||||
|
@@ -134,3 +134,15 @@ func (rb *RingBuffer) Clear() {
|
||||
rb.StFrameId = 0
|
||||
rb.EdFrameId = 0
|
||||
}
|
||||
|
||||
func (rb *RingBuffer) GetStFrameId() int32 {
|
||||
return rb.StFrameId
|
||||
}
|
||||
|
||||
func (rb *RingBuffer) GetEdFrameId() int32 {
|
||||
return rb.EdFrameId
|
||||
}
|
||||
|
||||
func (rb *RingBuffer) GetCnt() int32 {
|
||||
return rb.Cnt
|
||||
}
|
||||
|
@@ -331,6 +331,10 @@ func (polygon *ConvexPolygon) PointInside(point Vector) bool {
|
||||
return contactCount == 1
|
||||
}
|
||||
|
||||
func (polygon *ConvexPolygon) GetPoints() []Vector {
|
||||
return polygon.Points
|
||||
}
|
||||
|
||||
type ContactSet struct {
|
||||
Points []Vector // Slice of Points indicating contact between the two Shapes.
|
||||
MTV Vector // Minimum Translation Vector; this is the vector to move a Shape on to move it outside of its contacting Shape.
|
||||
|
Reference in New Issue
Block a user