Merge pull request #213 from ChrisPHP/add-ex-cylinder-bindings
Adds DrawCylinderEx and DrawCylinderWiresEx bindings
This commit is contained in:
commit
3f14ff470c
1 changed files with 22 additions and 0 deletions
|
@ -147,6 +147,17 @@ func DrawCylinder(position Vector3, radiusTop float32, radiusBottom float32, hei
|
|||
C.DrawCylinder(*cposition, cradiusTop, cradiusBottom, cheight, cslices, *ccolor)
|
||||
}
|
||||
|
||||
// DrawCylinderEx - Draw a cylinder with base at startPos and top at endPos
|
||||
func DrawCylinderEx(startPos Vector3, endPos Vector3, startRadius float32, endRadius float32, sides int32, col color.RGBA) {
|
||||
cstartPos := startPos.cptr()
|
||||
cendPos := endPos.cptr()
|
||||
cstartRadius := (C.float)(startRadius)
|
||||
cendRadius := (C.float)(endRadius)
|
||||
csides := (C.int)(sides)
|
||||
ccolor := colorCptr(col)
|
||||
C.DrawCylinderEx(*cstartPos, *cendPos, cstartRadius, cendRadius, csides, *ccolor)
|
||||
}
|
||||
|
||||
// DrawCylinderWires - Draw a cylinder/cone wires
|
||||
func DrawCylinderWires(position Vector3, radiusTop float32, radiusBottom float32, height float32, slices int32, col color.RGBA) {
|
||||
cposition := position.cptr()
|
||||
|
@ -158,6 +169,17 @@ func DrawCylinderWires(position Vector3, radiusTop float32, radiusBottom float32
|
|||
C.DrawCylinderWires(*cposition, cradiusTop, cradiusBottom, cheight, cslices, *ccolor)
|
||||
}
|
||||
|
||||
// DrawCylinderWiresEx - Draw a cylinder wires with base at startPos and top at endPos
|
||||
func DrawCylinderWiresEx(startPos Vector3, endPos Vector3, startRadius float32, endRadius float32, sides int32, col color.RGBA) {
|
||||
cstartPos := startPos.cptr()
|
||||
cendPos := endPos.cptr()
|
||||
cstartRadius := (C.float)(startRadius)
|
||||
cendRadius := (C.float)(endRadius)
|
||||
csides := (C.int)(sides)
|
||||
ccolor := colorCptr(col)
|
||||
C.DrawCylinderWiresEx(*cstartPos, *cendPos, cstartRadius, cendRadius, csides, *ccolor)
|
||||
}
|
||||
|
||||
// DrawCapsule - Draw a capsule with the center of its sphere caps at startPos and endPos
|
||||
func DrawCapsule(startPos, endPos Vector3, radius float32, slices, rings int32, col color.RGBA) {
|
||||
cstartPos := startPos.cptr()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue