Documentation ¶
Index ¶
- type PhysicalModel
- func (m *PhysicalModel) AddVelocity(x float64, y float64)
- func (m *PhysicalModel) CheckGrowthPower() bool
- func (m *PhysicalModel) CheckGrowthRevers() bool
- func (m *PhysicalModel) CheckHandBrake() bool
- func (m *PhysicalModel) CheckLeftRotate() bool
- func (m *PhysicalModel) CheckRightRotate() bool
- func (m *PhysicalModel) GetAngularDrag() float64
- func (m *PhysicalModel) GetAngularVelocity() float64
- func (m *PhysicalModel) GetChassisType() string
- func (m *PhysicalModel) GetCurrentSpeed() float64
- func (m *PhysicalModel) GetDirection() bool
- func (m *PhysicalModel) GetGeoData() []*obstacle_point.ObstaclePoint
- func (m *PhysicalModel) GetHeight() float64
- func (m *PhysicalModel) GetID() int
- func (m *PhysicalModel) GetLength() float64
- func (m *PhysicalModel) GetMaxReverse() float64
- func (m *PhysicalModel) GetMoveDrag() float64
- func (m *PhysicalModel) GetMoveMaxPower() float64
- func (m *PhysicalModel) GetNeedZ() float64
- func (m *PhysicalModel) GetNextPolygon() *game_math.Polygon
- func (m *PhysicalModel) GetNextPos() (float64, float64)
- func (m *PhysicalModel) GetPhysicalModel() *PhysicalModel
- func (m *PhysicalModel) GetPolygon() *game_math.Polygon
- func (m *PhysicalModel) GetPosFunc() func()
- func (m *PhysicalModel) GetPowerFactor() float64
- func (m *PhysicalModel) GetPowerMove() float64
- func (m *PhysicalModel) GetRadius() int
- func (m *PhysicalModel) GetRealPos() (float64, float64)
- func (m *PhysicalModel) GetReverse() float64
- func (m *PhysicalModel) GetReverseFactor() float64
- func (m *PhysicalModel) GetRotate() float64
- func (m *PhysicalModel) GetTurnSpeed() float64
- func (m *PhysicalModel) GetType() string
- func (m *PhysicalModel) GetVelocity() (float64, float64)
- func (m *PhysicalModel) GetVelocityRotate() float64
- func (m *PhysicalModel) GetWeight() float64
- func (m *PhysicalModel) GetWidth() float64
- func (m *PhysicalModel) GetX() int
- func (m *PhysicalModel) GetY() int
- func (m *PhysicalModel) GetZ() float64
- func (m *PhysicalModel) IsFly() bool
- func (m *PhysicalModel) MultiplyVelocity(x float64, y float64)
- func (m *PhysicalModel) SetAngularVelocity(angularVelocity float64)
- func (m *PhysicalModel) SetHeight(height float64)
- func (m *PhysicalModel) SetNeedZ(needZ float64)
- func (m *PhysicalModel) SetNextPolygon(p *game_math.Polygon)
- func (m *PhysicalModel) SetNextPos(x, y float64)
- func (m *PhysicalModel) SetPolygon(p *game_math.Polygon)
- func (m *PhysicalModel) SetPos(realX, realY, angle float64)
- func (m *PhysicalModel) SetPosFunc(fun func())
- func (m *PhysicalModel) SetPowerMove(powerMove float64)
- func (m *PhysicalModel) SetReverse(reverse float64)
- func (m *PhysicalModel) SetVelocity(x float64, y float64)
- func (m *PhysicalModel) SetWASD(w, a, s, d, sp, st, z bool)
- func (m *PhysicalModel) SetZ(z float64)
- type WASD
- func (wasd *WASD) GetA() bool
- func (wasd *WASD) GetD() bool
- func (wasd *WASD) GetS() bool
- func (wasd *WASD) GetShift() bool
- func (wasd *WASD) GetSpace() bool
- func (wasd *WASD) GetUpdate() int64
- func (wasd *WASD) GetW() bool
- func (wasd *WASD) GetZ() bool
- func (wasd *WASD) Set(w, a, s, d, sp, st, z bool)
- func (wasd *WASD) SetAllFalse()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PhysicalModel ¶
type PhysicalModel struct { RealX float64 `json:"real_x"` RealY float64 `json:"real_y"` NextX float64 `json:"-"` NextY float64 `json:"-"` ChassisType string `json:"-"` X int `json:"x"` Y int `json:"y"` Z float64 `json:"z"` // высота над землей (для наземных целей всегда 0) Rotate float64 `json:"rotate"` // текущий угол поворота PowerMove float64 `json:"power_move"` // силя которая тянет вперед, текущая Reverse float64 `json:"reverse"` // сила которая тянет назад, текущая AngularVelocity float64 `json:"angular_velocity"` // скорость поворота, текущая XVelocity float64 `json:"x_velocity"` // вектор х YVelocity float64 `json:"y_velocity"` // вектор у NeedZ float64 `json:"need_z"` // высота которую должен набрать транспорт Speed float64 `json:"speed"` // -- макс скорость вперед ReverseSpeed float64 `json:"reverse_speed"` // -- макс скорость назад PowerFactor float64 `json:"power_factor"` // -- сила ускорения вперед ReverseFactor float64 `json:"reverse_factor"` // -- сила ускорения назад TurnSpeed float64 `json:"turn_speed"` // -- скорость поворота в радианах WASD WASD `json:"-"` // обьект который говорти когда нажата какая клавиша MoveDrag float64 `json:"-"` // сопротивление земли при движение (XVelocity * MoveDrag), (YVelocity * MoveDrag) AngularDrag float64 `json:"-"` // сопротивление земли при повороте (AngularVelocity * AngularDrag) Weight float64 `json:"-"` // вес Height float64 `json:"height"` // высота обьекта Length float64 `json:"length"` // длинна обьекта Width float64 `json:"width"` // ширина обькта Radius int `json:"radius"` // радиус окружности обьекта GeoData []*obstacle_point.ObstaclePoint `json:"-"` PosFunc func() `json:"-"` // функция для принятия положения в конце сервертика Type string `json:"type"` ID int `json:"id"` Fly bool `json:"-"` // contains filtered or unexported fields }
PhysicalModel структура которая встраивается в обьекты которые должны двигатся
func (*PhysicalModel) AddVelocity ¶
func (m *PhysicalModel) AddVelocity(x float64, y float64)
func (*PhysicalModel) CheckGrowthPower ¶
func (m *PhysicalModel) CheckGrowthPower() bool
func (*PhysicalModel) CheckGrowthRevers ¶
func (m *PhysicalModel) CheckGrowthRevers() bool
func (*PhysicalModel) CheckHandBrake ¶
func (m *PhysicalModel) CheckHandBrake() bool
func (*PhysicalModel) CheckLeftRotate ¶
func (m *PhysicalModel) CheckLeftRotate() bool
func (*PhysicalModel) CheckRightRotate ¶
func (m *PhysicalModel) CheckRightRotate() bool
func (*PhysicalModel) GetAngularDrag ¶
func (m *PhysicalModel) GetAngularDrag() float64
func (*PhysicalModel) GetAngularVelocity ¶
func (m *PhysicalModel) GetAngularVelocity() float64
func (*PhysicalModel) GetChassisType ¶
func (m *PhysicalModel) GetChassisType() string
func (*PhysicalModel) GetCurrentSpeed ¶
func (m *PhysicalModel) GetCurrentSpeed() float64
func (*PhysicalModel) GetDirection ¶
func (m *PhysicalModel) GetDirection() bool
func (*PhysicalModel) GetGeoData ¶
func (m *PhysicalModel) GetGeoData() []*obstacle_point.ObstaclePoint
func (*PhysicalModel) GetHeight ¶
func (m *PhysicalModel) GetHeight() float64
func (*PhysicalModel) GetID ¶
func (m *PhysicalModel) GetID() int
func (*PhysicalModel) GetLength ¶
func (m *PhysicalModel) GetLength() float64
func (*PhysicalModel) GetMaxReverse ¶
func (m *PhysicalModel) GetMaxReverse() float64
func (*PhysicalModel) GetMoveDrag ¶
func (m *PhysicalModel) GetMoveDrag() float64
func (*PhysicalModel) GetMoveMaxPower ¶
func (m *PhysicalModel) GetMoveMaxPower() float64
func (*PhysicalModel) GetNeedZ ¶
func (m *PhysicalModel) GetNeedZ() float64
func (*PhysicalModel) GetNextPolygon ¶
func (m *PhysicalModel) GetNextPolygon() *game_math.Polygon
func (*PhysicalModel) GetNextPos ¶
func (m *PhysicalModel) GetNextPos() (float64, float64)
func (*PhysicalModel) GetPhysicalModel ¶
func (m *PhysicalModel) GetPhysicalModel() *PhysicalModel
func (*PhysicalModel) GetPolygon ¶
func (m *PhysicalModel) GetPolygon() *game_math.Polygon
func (*PhysicalModel) GetPosFunc ¶
func (m *PhysicalModel) GetPosFunc() func()
func (*PhysicalModel) GetPowerFactor ¶
func (m *PhysicalModel) GetPowerFactor() float64
func (*PhysicalModel) GetPowerMove ¶
func (m *PhysicalModel) GetPowerMove() float64
func (*PhysicalModel) GetRadius ¶
func (m *PhysicalModel) GetRadius() int
func (*PhysicalModel) GetRealPos ¶
func (m *PhysicalModel) GetRealPos() (float64, float64)
func (*PhysicalModel) GetReverse ¶
func (m *PhysicalModel) GetReverse() float64
func (*PhysicalModel) GetReverseFactor ¶
func (m *PhysicalModel) GetReverseFactor() float64
func (*PhysicalModel) GetRotate ¶
func (m *PhysicalModel) GetRotate() float64
func (*PhysicalModel) GetTurnSpeed ¶
func (m *PhysicalModel) GetTurnSpeed() float64
func (*PhysicalModel) GetType ¶
func (m *PhysicalModel) GetType() string
func (*PhysicalModel) GetVelocity ¶
func (m *PhysicalModel) GetVelocity() (float64, float64)
func (*PhysicalModel) GetVelocityRotate ¶
func (m *PhysicalModel) GetVelocityRotate() float64
func (*PhysicalModel) GetWeight ¶
func (m *PhysicalModel) GetWeight() float64
func (*PhysicalModel) GetWidth ¶
func (m *PhysicalModel) GetWidth() float64
func (*PhysicalModel) GetX ¶
func (m *PhysicalModel) GetX() int
func (*PhysicalModel) GetY ¶
func (m *PhysicalModel) GetY() int
func (*PhysicalModel) GetZ ¶
func (m *PhysicalModel) GetZ() float64
func (*PhysicalModel) IsFly ¶
func (m *PhysicalModel) IsFly() bool
func (*PhysicalModel) MultiplyVelocity ¶
func (m *PhysicalModel) MultiplyVelocity(x float64, y float64)
func (*PhysicalModel) SetAngularVelocity ¶
func (m *PhysicalModel) SetAngularVelocity(angularVelocity float64)
func (*PhysicalModel) SetHeight ¶
func (m *PhysicalModel) SetHeight(height float64)
func (*PhysicalModel) SetNeedZ ¶
func (m *PhysicalModel) SetNeedZ(needZ float64)
func (*PhysicalModel) SetNextPolygon ¶
func (m *PhysicalModel) SetNextPolygon(p *game_math.Polygon)
func (*PhysicalModel) SetNextPos ¶
func (m *PhysicalModel) SetNextPos(x, y float64)
func (*PhysicalModel) SetPolygon ¶
func (m *PhysicalModel) SetPolygon(p *game_math.Polygon)
func (*PhysicalModel) SetPos ¶
func (m *PhysicalModel) SetPos(realX, realY, angle float64)
func (*PhysicalModel) SetPosFunc ¶
func (m *PhysicalModel) SetPosFunc(fun func())
func (*PhysicalModel) SetPowerMove ¶
func (m *PhysicalModel) SetPowerMove(powerMove float64)
func (*PhysicalModel) SetReverse ¶
func (m *PhysicalModel) SetReverse(reverse float64)
func (*PhysicalModel) SetVelocity ¶
func (m *PhysicalModel) SetVelocity(x float64, y float64)
func (*PhysicalModel) SetWASD ¶
func (m *PhysicalModel) SetWASD(w, a, s, d, sp, st, z bool)
func (*PhysicalModel) SetZ ¶
func (m *PhysicalModel) SetZ(z float64)
type WASD ¶
type WASD struct {
// contains filtered or unexported fields
}
func (*WASD) SetAllFalse ¶
func (wasd *WASD) SetAllFalse()
Click to show internal directories.
Click to hide internal directories.