Method: CGLM::Sphere#transform
- Defined in:
- ext/cglm/rb_cglm_sphere.c
#transform(mat4[, dest]) ⇒ dest | new Sphere
Transforms this sphere to put it in the space described by mat4, and
puts the result into dest. If dest is omitted, a new Sphere is created.
8 9 10 11 12 13 14 |
# File 'ext/cglm/rb_cglm_sphere.c', line 8
VALUE rb_cglm_sphere_transform(int argc, VALUE *argv, VALUE self) {
VALUE matrix, dest;
rb_scan_args(argc, argv, "11", &matrix, &dest);
if (NIL_P(dest)) dest = rb_funcall(rb_cSphere, rb_intern("new"), 0);
glm_sphere_transform(VAL2VEC4(self), VAL2MAT4(matrix), VAL2VEC4(dest));
return dest;
}
|