2018-02-09 16:08:43 +01:00
|
|
|
/**
|
|
|
|
* GameLib.D3.API.Geometry.Tetrahedron
|
|
|
|
* @param apiGeometry
|
|
|
|
* @param radius
|
|
|
|
* @param detail
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
GameLib.D3.API.Geometry.Tetrahedron = function(
|
|
|
|
apiGeometry,
|
|
|
|
radius,
|
|
|
|
detail
|
|
|
|
) {
|
|
|
|
|
|
|
|
if (GameLib.Utils.UndefinedOrNull(apiGeometry)) {
|
|
|
|
apiGeometry = {
|
|
|
|
geometryType: GameLib.D3.API.Geometry.GEOMETRY_TYPE_TETRAHEDRON
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
if (GameLib.Utils.UndefinedOrNull(apiGeometry.geometryType)) {
|
|
|
|
apiGeometry.geometryType = GameLib.D3.API.Geometry.GEOMETRY_TYPE_TETRAHEDRON;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (GameLib.Utils.UndefinedOrNull(radius)) {
|
|
|
|
radius = 1;
|
|
|
|
}
|
|
|
|
this.radius = radius;
|
|
|
|
|
|
|
|
if (GameLib.Utils.UndefinedOrNull(detail)) {
|
|
|
|
detail = 0;
|
|
|
|
}
|
|
|
|
this.detail = detail;
|
|
|
|
|
|
|
|
GameLib.D3.API.Geometry.call(
|
|
|
|
this,
|
|
|
|
apiGeometry.id,
|
|
|
|
apiGeometry.name,
|
|
|
|
apiGeometry.geometryType,
|
2018-02-09 20:37:11 +01:00
|
|
|
|
2018-02-09 16:08:43 +01:00
|
|
|
apiGeometry.parentEntity,
|
|
|
|
apiGeometry.boundingBox,
|
|
|
|
apiGeometry.boundingSphere,
|
|
|
|
apiGeometry.colors,
|
|
|
|
apiGeometry.faces,
|
2018-02-09 20:37:11 +01:00
|
|
|
|
2018-02-09 16:08:43 +01:00
|
|
|
apiGeometry.lineDistances,
|
|
|
|
apiGeometry.morphTargets,
|
|
|
|
apiGeometry.morphNormals,
|
|
|
|
apiGeometry.skinWeights,
|
|
|
|
apiGeometry.skinIndices,
|
|
|
|
apiGeometry.vertices,
|
|
|
|
apiGeometry.verticesNeedsUpdate,
|
|
|
|
apiGeometry.elementsNeedUpdate,
|
|
|
|
apiGeometry.uvsNeedUpdate,
|
|
|
|
apiGeometry.normalsNeedUpdate,
|
|
|
|
apiGeometry.colorsNeedUpdate,
|
|
|
|
apiGeometry.groupsNeedUpdate,
|
|
|
|
apiGeometry.lineDistancesNeedUpdate
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
GameLib.D3.API.Geometry.Tetrahedron.prototype = Object.create(GameLib.D3.API.Geometry.prototype);
|
|
|
|
GameLib.D3.API.Geometry.Tetrahedron.prototype.constructor = GameLib.D3.API.Geometry.Tetrahedron;
|