mirror of
https://github.com/bloeys/physx-go.git
synced 2025-12-29 07:58:20 +00:00
Capsule geometry
This commit is contained in:
16
pgo/pgo.go
16
pgo/pgo.go
@ -272,6 +272,22 @@ func NewBoxGeometry(hx, hy, hz float32) *BoxGeometry {
|
||||
}
|
||||
}
|
||||
|
||||
type CapsuleGeometry struct {
|
||||
cCg C.struct_CPxCapsuleGeometry
|
||||
}
|
||||
|
||||
func (bg *CapsuleGeometry) ToGeometry() *Geometry {
|
||||
return &Geometry{
|
||||
cG: C.CPxCapsuleGeometry_toCPxGeometry(&bg.cCg),
|
||||
}
|
||||
}
|
||||
|
||||
func NewCapsuleGeometry(radius, halfHeight float32) *CapsuleGeometry {
|
||||
return &CapsuleGeometry{
|
||||
cCg: C.NewCPxCapsuleGeometry(C.float(radius), C.float(halfHeight)),
|
||||
}
|
||||
}
|
||||
|
||||
type Actor struct {
|
||||
cA C.struct_CPxActor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user