Merge branch 'gen2brain:master' into master
This commit is contained in:
commit
5c6d0848aa
3 changed files with 12 additions and 1 deletions
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
2D Physics library for videogames.
|
2D Physics library for videogames.
|
||||||
|
|
||||||
A port of Victor Fisac's [physac engine](https://github.com/raysan5/raylib/blob/master/src/physac.h).
|
A port of Victor Fisac's [physac engine](https://github.com/raysan5/physac/blob/master/src/physac.h).
|
||||||
|
|
|
@ -621,6 +621,8 @@ func Grid(bounds rl.Rectangle, text string, spacing float32, subdivs int32, mous
|
||||||
cmouseCell.x = C.float(mouseCell.X)
|
cmouseCell.x = C.float(mouseCell.X)
|
||||||
cmouseCell.y = C.float(mouseCell.Y)
|
cmouseCell.y = C.float(mouseCell.Y)
|
||||||
res := C.GuiGrid(cbounds, ctext, cspacing, csubdivs, &cmouseCell)
|
res := C.GuiGrid(cbounds, ctext, cspacing, csubdivs, &cmouseCell)
|
||||||
|
mouseCell.X = float32(cmouseCell.x)
|
||||||
|
mouseCell.Y = float32(cmouseCell.y)
|
||||||
return int32(res)
|
return int32(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,15 @@ func DrawCircle3D(center Vector3, radius float32, rotationAxis Vector3, rotation
|
||||||
C.DrawCircle3D(*ccenter, cradius, *crotationAxis, crotationAngle, *ccolor)
|
C.DrawCircle3D(*ccenter, cradius, *crotationAxis, crotationAngle, *ccolor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DrawTriangle3D - Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||||
|
func DrawTriangle3D(v1 Vector3, v2 Vector3, v3 Vector3, col color.RGBA) {
|
||||||
|
cv1 := v1.cptr()
|
||||||
|
cv2 := v2.cptr()
|
||||||
|
cv3 := v3.cptr()
|
||||||
|
ccolor := colorCptr(col)
|
||||||
|
C.DrawTriangle3D(*cv1, *cv2, *cv3, *ccolor)
|
||||||
|
}
|
||||||
|
|
||||||
// DrawCube - Draw cube
|
// DrawCube - Draw cube
|
||||||
func DrawCube(position Vector3, width float32, height float32, length float32, col color.RGBA) {
|
func DrawCube(position Vector3, width float32, height float32, length float32, col color.RGBA) {
|
||||||
cposition := position.cptr()
|
cposition := position.cptr()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue