42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
/**
|
|
* R3.D3.API.Geometry.Normal.Polyhedron
|
|
* @param apiComponent
|
|
*
|
|
* @property vertices
|
|
* @property indices
|
|
* @property radius
|
|
* @property detail
|
|
*
|
|
* @constructor
|
|
*/
|
|
R3.D3.API.Geometry.Normal.Polyhedron = function(
|
|
apiComponent
|
|
) {
|
|
|
|
__API_GEOMETRY_NORMAL__;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.vertices)) {
|
|
apiComponent.vertices = [];
|
|
}
|
|
this.vertices = apiComponent.vertices;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.indices)) {
|
|
apiComponent.indices = 1;
|
|
}
|
|
this.indices = apiComponent.indices;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.radius)) {
|
|
apiComponent.radius = 5;
|
|
}
|
|
this.radius = apiComponent.radius;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.detail)) {
|
|
apiComponent.detail = 0;
|
|
}
|
|
this.detail = apiComponent.detail;
|
|
|
|
};
|
|
|
|
R3.D3.API.Geometry.Normal.Polyhedron.prototype = Object.create(R3.D3.API.Geometry.Normal.prototype);
|
|
R3.D3.API.Geometry.Normal.Polyhedron.prototype.constructor = R3.D3.API.Geometry.Normal.Polyhedron;
|