Capsule geometry

This commit is contained in:
bloeys
2022-01-28 02:01:08 +04:00
parent 0997e2ef30
commit 2648e5743e
6 changed files with 56 additions and 6 deletions

View File

@ -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
}