Documentation ¶
Index ¶
- func Absi32(n int32) int32
- func Absi64(n int64) int64
- func Isqrt32(square int32) int32
- func Isqrt64(square int64) uint32
- func Square2(p1, p2 []int32) int64
- func Square3(p1, p2 []int32) int64
- type ABRect2
- type ABRect3
- type Circle
- type Convex2
- type Dir2
- func (this Dir2) Add(longitude int16) Dir2
- func (this Dir2) Between(dir Dir2, half uint16) bool
- func (dir Dir2) Dir2Vec(veclen int32) *Vector2
- func (this Dir2) Marshal() *uint32
- func (this *Dir2) Set(longitude uint16)
- func (this Dir2) To3d(latitude uint8) Dir3
- func (this *Dir2) UnMarshal(prot uint32)
- type Dir3
- type Line2
- type Point2
- func (this *Point2) Equal(other *Point2) bool
- func (this *Point2) InRect2(r *ABRect2) bool
- func (this *Point2) Len() int16
- func (this *Point2) Marshal() []int32
- func (this *Point2) Move(dir Dir2, distance int32)
- func (this *Point2) MoveBySpd(dir Dir2, MOV_SPD_PS int32, timesize_ms int32) *Point2
- func (this *Point2) MoveRatio(dst *Point2, molec, denom int64)
- func (src *Point2) P2pVec(dst *Point2) *Vector2
- func (this *Point2) Set(x, y int32)
- func (this *Point2) Setidx(idx int16, v int32)
- func (this *Point2) Square(other *Point2) int64
- func (this *Point2) To3d(z int32) *Point3
- func (this *Point2) UnMarshal(prot []int32)
- type Point3
- func (this *Point3) Equal(other *Point3) bool
- func (this *Point3) InRect3(r *ABRect3) bool
- func (this *Point3) Len() int16
- func (this *Point3) Marshal() []int32
- func (this *Point3) Move(dir Dir3, distance int32)
- func (this *Point3) MoveBySpd(dir Dir3, MOV_SPD_PS int32, timesize_ms int32) *Point3
- func (this *Point3) MoveRatio(dst *Point3, molec, denom int64)
- func (src *Point3) P2pVec(dst *Point3) *Vector3
- func (this *Point3) Set(x, y, z int32)
- func (this *Point3) Setidx(idx int16, v int32)
- func (this *Point3) Square(other *Point3) int64
- func (this *Point3) To2d() *Point2
- func (this *Point3) UnMarshal(prot []int32)
- type Rect2
- type Sector
- type Triangle2
- type Vector2
- func (this *Vector2) Add(o *Vector2) *Vector2
- func (this *Vector2) AngleVs180(o *Vector2) int
- func (this *Vector2) AngleVs90(o *Vector2) int
- func (this *Vector2) CrsMult() *Vector2
- func (this *Vector2) DotMult(o *Vector2) int64
- func (this *Vector2) Move(duration_ms int64, MOV_SPD_PS int64) (delta *Vector2)
- func (this *Vector2) NumMult(n, m int32) *Vector2
- func (this *Vector2) RevsDir() *Vector2
- func (this *Vector2) Scale(newlen int32) *Vector2
- func (this *Vector2) Square() int64
- func (this *Vector2) Sub(o *Vector2) *Vector2
- func (this *Vector2) To3d(z int32) *Vector3
- func (this *Vector2) Vec2Dir() Dir2
- type Vector3
- func (this *Vector3) Add(o *Vector3) *Vector3
- func (this *Vector3) AngleVs90(o *Vector3) int
- func (this *Vector3) CrsMult(o *Vector3) *Vector3
- func (this *Vector3) DotMult(o *Vector3) int64
- func (this *Vector3) Move(duration_ms int64, MOV_SPD_PS int64) (delta *Vector3)
- func (this *Vector3) NumMult(n, m int32) *Vector3
- func (this *Vector3) RevsDir() *Vector3
- func (this *Vector3) Scale(newlen int32) *Vector3
- func (this *Vector3) Square() int64
- func (this *Vector3) Sub(o *Vector3) *Vector3
- func (this *Vector3) To2d() *Vector2
- func (this *Vector3) Vec2Dir() Dir3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dir2 ¶
type Dir2 struct {
Mlongitude uint16 //经度0~359,无效值:999,X轴正方向为0,Y轴正方向90,X轴负方向180,Y负方向270
}
type Point2 ¶
type Point2 struct {
X, Y int32
}
点
func MoveBySpd2 ¶
MoveBySpd2 MOV_SPD_PS-移动速度(cm/s);timesize_ms移动的毫秒数
func NewPoint2p ¶
type Point3 ¶
func MoveBySpd3 ¶
Move3s MOV_SPD_PS-移动速度(cm/s);timesize_ms移动的毫秒数
func NewPoint3p ¶
type Sector ¶
type Sector struct { Centre Point2 //扇形圆心 Radius int32 //扇形半径 HalfAngle int16 //扇形夹角半角度 CentDir Dir2 //扇形中线方向 }
Sector 扇形
type Triangle2 ¶
type Triangle2 struct {
Vertex [3]Point2
}
Triangle2 平面三角形
type Vector2 ¶
type Vector2 Point2 //2d向量
func (*Vector2) AngleVs180 ¶
AngleVs180 向量的夹角判断,向量this往向量o逆时针旋转的角度比较于180°: [<180°ret -1][=180°ret 0][>180°ret 1]
Click to show internal directories.
Click to hide internal directories.