Method: CGLM::Sphere#merge
- Defined in:
- ext/cglm/rb_cglm_sphere.c
#merge(other[, dest]) ⇒ dest | new Sphere
Merges two spheres (self and other) and places the result in dest. If
dest is omitted, a new Sphere will be created.
Both spheres must be in the same space. For instance, if one is in world space then the other must be in world space and not in local space.
othermust be a Sphere or a Vec4 with the layout[x, y, z, radius].
26 27 28 29 30 31 32 |
# File 'ext/cglm/rb_cglm_sphere.c', line 26 VALUE rb_cglm_sphere_merge(int argc, VALUE *argv, VALUE self) { VALUE other, dest; rb_scan_args(argc, argv, "11", &other, &dest); if (NIL_P(dest)) dest = rb_funcall(rb_cSphere, rb_intern("new"), 0); glm_sphere_merge(VAL2VEC4(self), VAL2VEC4(other), VAL2VEC4(dest)); return dest; } |