/** * R3.D3.API.Mesh.Box * @constructor * @param apiMesh * @param width * @param height * @param depth */ R3.D3.API.Mesh.Box = function( apiMesh, width, height, depth ) { if (R3.Utils.UndefinedOrNull(apiMesh)) { apiMesh = { meshType : R3.D3.API.Mesh.MESH_TYPE_BOX }; } if (R3.Utils.UndefinedOrNull(apiMesh.meshType)) { apiMesh.meshType = R3.D3.API.Mesh.MESH_TYPE_BOX; } if (R3.Utils.UndefinedOrNull(width)) { width = 1; } this.width = width; if (R3.Utils.UndefinedOrNull(height)) { height = 1; } this.height = height; if (R3.Utils.UndefinedOrNull(depth)) { depth = 1; } this.depth = depth; R3.D3.API.Mesh.call( this, apiMesh.id, apiMesh.name, apiMesh.meshType, apiMesh.excludeFromEnvironment, apiMesh.vertices, apiMesh.faces, apiMesh.materials, apiMesh.parentMesh, apiMesh.parentScene, apiMesh.skeleton, apiMesh.skinIndices, apiMesh.skinWeights, apiMesh.position, apiMesh.quaternion, apiMesh.rotation, apiMesh.scale, apiMesh.up, apiMesh.modelMatrix, apiMesh.renderOrder, apiMesh.isBufferMesh, apiMesh.useQuaternion, apiMesh.visible, apiMesh.castShadow, apiMesh.receiveShadow, apiMesh.parentEntity ); }; R3.D3.API.Mesh.Box.prototype = Object.create(R3.D3.API.Mesh.prototype); R3.D3.API.Mesh.Box.prototype.constructor = R3.D3.API.Mesh.Box;