21 lines
349 B
JavaScript
21 lines
349 B
JavaScript
/**
|
|
* R3.API.Sphere
|
|
* @constructor
|
|
* @param center
|
|
* @param radius
|
|
*/
|
|
R3.API.Sphere = function (
|
|
center,
|
|
radius
|
|
) {
|
|
if (R3.Utils.UndefinedOrNull(center)) {
|
|
center = new R3.API.Vector3(0,0,0);
|
|
}
|
|
this.center = center;
|
|
|
|
if (R3.Utils.UndefinedOrNull(radius)) {
|
|
radius = 1;
|
|
}
|
|
this.radius = radius;
|
|
};
|