Documentation
¶
Index ¶
- type Mat3
- type Mat4
- func Mat4Frustum(left, right, top, bottom, near, far float32) Mat4
- func Mat4Ident() Mat4
- func Mat4LookAt(eye Vec3, lookAt Vec3, up Vec3) (m Mat4)
- func Mat4OrthoYDown(left, right, top, bottom, near, far float32) Mat4
- func Mat4OrthoYUp(left, right, top, bottom, near, far float32) Mat4
- func Mat4Persp(fovYRadian, aspectXtoY, near, far float32) (m Mat4)
- func Mat4Rot(rad float32, x float32, y float32, z float32) (rot Mat4)
- func Mat4RotX(rad float32) (rot Mat4)
- func Mat4RotY(rad float32) (rot Mat4)
- func Mat4RotZ(rad float32) (rot Mat4)
- func Mat4Scale(sx float32, sy float32, sz float32) (scale Mat4)
- func Mat4Trans(dx float32, dy float32, dz float32) (trans Mat4)
- type Mat4Stack
- type Point2
- type Range2
- func (a Range2) Center() Point2
- func (a Range2) Contains(b Range2) bool
- func (a Range2) ContainsPoint(pt Point2) bool
- func (a Range2) ContainsRect(b Rect2) bool
- func (a Range2) Deflate(d RangeDelta2) Range2
- func (a Range2) Dx() float32
- func (a Range2) Dy() float32
- func (a Range2) Inflate(d RangeDelta2) Range2
- func (a Range2) Intersect(b Range2) Range2
- func (a Range2) IsPositive() bool
- func (a Range2) Normalize() (b Range2)
- func (a Range2) Rect() Rect2
- func (a Range2) Round() Rect2
- func (a Range2) Union(b Range2) Range2
- func (a Range2) X() float32
- func (a Range2) X0() float32
- func (a Range2) X1() float32
- func (a Range2) Y() float32
- func (a Range2) Y0() float32
- func (a Range2) Y1() float32
- type RangeDelta2
- type Rect2
- func (a Rect2) Center() Point2
- func (a Rect2) Contains(b Rect2) bool
- func (a Rect2) ContainsPoint(pt Point2) bool
- func (a Rect2) ContainsRange(b Range2) bool
- func (a Rect2) Deflate(d RangeDelta2) Rect2
- func (a Rect2) Dx() float32
- func (a Rect2) Dy() float32
- func (a Rect2) Inflate(d RangeDelta2) Rect2
- func (a Rect2) Intersect(b Rect2) Rect2
- func (a Rect2) IsPositive() bool
- func (a Rect2) Positive() (b Rect2)
- func (a Rect2) Range() Range2
- func (a Rect2) Round() Rect2
- func (a Rect2) Union(b Rect2) Rect2
- func (a Rect2) X() float32
- func (a Rect2) X0() float32
- func (a Rect2) X1() float32
- func (a Rect2) Y() float32
- func (a Rect2) Y0() float32
- func (a Rect2) Y1() float32
- type Size2
- type Vec2
- type Vec3
- type Vec4
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mat4 ¶
type Mat4 [4][4]float32
Mat4 is 4x4 matrix
func Mat4Frustum ¶
Mt4Frustum construct projection matrix for Vulkan. normaly left, right, top, bottom, near and far are all positive. EYE space X-right, Y-up, Z-back. NDC space X-right, Y-down, Z-forword. NDC range x => [-1, +1], y => [-1, +1], z => [0, +1].
func Mat4OrthoYDown ¶
func Mat4OrthoYUp ¶
type Range2 ¶
type Range2 [4]float32
Range2 (x0, y0, x1, y1)
func (Range2) ContainsPoint ¶
func (a Range2) Equals(b Range2) bool {
return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3]
}
func (Range2) ContainsRect ¶
func (Range2) Deflate ¶
func (a Range2) Deflate(d RangeDelta2) Range2
func (Range2) Inflate ¶
func (a Range2) Inflate(d RangeDelta2) Range2
func (Range2) IsPositive ¶
type RangeDelta2 ¶
type RangeDelta2 [4]float32
RangeDelta2 (dx0, dy0, dx1, dy1)
func (RangeDelta2) Dx ¶
func (a RangeDelta2) Dx() float32
func (RangeDelta2) Dx0 ¶
func (a RangeDelta2) Dx0() float32
func (RangeDelta2) Dx1 ¶
func (a RangeDelta2) Dx1() float32
func (RangeDelta2) Dy ¶
func (a RangeDelta2) Dy() float32
func (RangeDelta2) Dy0 ¶
func (a RangeDelta2) Dy0() float32
func (RangeDelta2) Dy1 ¶
func (a RangeDelta2) Dy1() float32
func (RangeDelta2) Round ¶
func (a RangeDelta2) Round() RangeDelta2
type Rect2 ¶
type Rect2 [4]float32
Rect2 (x, y, width, height)
func (Rect2) ContainsPoint ¶
func (a Rect2) Equals(b Rect2) bool {
return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3]
}
func (Rect2) ContainsRange ¶
func (Rect2) Deflate ¶
func (a Rect2) Deflate(d RangeDelta2) Rect2
func (Rect2) Inflate ¶
func (a Rect2) Inflate(d RangeDelta2) Rect2
func (Rect2) IsPositive ¶
Click to show internal directories.
Click to hide internal directories.