2018-04-09 09:35:04 +02:00
|
|
|
/**
|
|
|
|
* R3.D3.API.Geometry.Normal.Polyhedron
|
2019-10-06 21:11:18 +02:00
|
|
|
* @param apiComponent
|
|
|
|
*
|
|
|
|
* @property vertices
|
|
|
|
* @property indices
|
|
|
|
* @property radius
|
|
|
|
* @property detail
|
|
|
|
*
|
2018-04-09 09:35:04 +02:00
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
R3.D3.API.Geometry.Normal.Polyhedron = function(
|
2019-10-06 21:11:18 +02:00
|
|
|
apiComponent
|
2018-04-09 09:35:04 +02:00
|
|
|
) {
|
|
|
|
|
2019-10-06 21:11:18 +02:00
|
|
|
__API_GEOMETRY_NORMAL__;
|
2018-04-09 09:35:04 +02:00
|
|
|
|
2019-10-06 21:11:18 +02:00
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.vertices)) {
|
|
|
|
apiComponent.vertices = [];
|
2018-04-09 09:35:04 +02:00
|
|
|
}
|
2019-10-06 21:11:18 +02:00
|
|
|
this.vertices = apiComponent.vertices;
|
2018-04-09 09:35:04 +02:00
|
|
|
|
2019-10-06 21:11:18 +02:00
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.indices)) {
|
|
|
|
apiComponent.indices = 1;
|
2018-04-09 09:35:04 +02:00
|
|
|
}
|
2019-10-06 21:11:18 +02:00
|
|
|
this.indices = apiComponent.indices;
|
2018-04-09 09:35:04 +02:00
|
|
|
|
2019-10-06 21:11:18 +02:00
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.radius)) {
|
|
|
|
apiComponent.radius = 5;
|
2018-04-09 09:35:04 +02:00
|
|
|
}
|
2019-10-06 21:11:18 +02:00
|
|
|
this.radius = apiComponent.radius;
|
2018-04-09 09:35:04 +02:00
|
|
|
|
2019-10-06 21:11:18 +02:00
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.detail)) {
|
|
|
|
apiComponent.detail = 0;
|
2018-04-09 09:35:04 +02:00
|
|
|
}
|
2019-10-06 21:11:18 +02:00
|
|
|
this.detail = apiComponent.detail;
|
2018-04-09 09:35:04 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|