Resize the mesh to given size for each axis.

@param mesh Mesh to be resized.
@param xsize Size for x-axis.
@param ysize Size for y-axis.
@param zsize Size fof z-axis.
2825
public static void resize(GVRMesh mesh, float xsize, float ysize, float zsize) {
        float dim[] = getBoundingSize(mesh);

        scale(mesh, xsize / dim[0], ysize / dim[1], zsize / dim[2]);
    }
1264816
public function setGrid($XSize = 10, $YSize = 10)
    {
        for ($X = 0; $X <= $XSize; $X++) {
            for ($Y = 0; $Y <= $YSize; $Y++) {
                $this->Points[$X][$Y] = UNKNOWN;
            }
        }

        $this->GridSizeX = $XSize;
        $this->GridSizeY = $YSize;
    }
1000961
def bsp_resize(node: tcod.bsp.BSP, x: int, y: int, w: int, h: int) -> None:
    
    node.x = x
    node.y = y
    node.width = w
    node.height = h
1117343
private void resize() {
        width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
        height = getHeight() - getInsets().getTop() - getInsets().getBottom();
        size   = parentWidth < parentHeight ? parentWidth : parentHeight;

        if (ASPECT_RATIO * width > height) {
            width = 1 / (ASPECT_RATIO / height);
        } else if (1 / (ASPECT_RATIO / height) > width) {
            height = ASPECT_RATIO * width;
        }

        if (width > 0 && height > 0) {
            //pane.setMaxSize(width, height);
            //pane.setPrefSize(width, height);
            
            pane.setMaxSize(parentWidth, height * 0.12);
            pane.setPrefSize(parentWidth, height * 0.12);

            drawTriangle();
            
            triangle.setLayoutX(size * 0.05);
            triangle.setLayoutY((height - triangle.getBoundsInLocal().getHeight()) * 0.25);

            nameText.setFont(Fonts.latoRegular(size * 0.06));
            nameText.setX(size * 0.12);
            nameText.setY(0);

            valueText.setFont(Fonts.latoRegular(size * 0.06));
            valueText.setX((parentWidth - size * 0.05) - valueText.getLayoutBounds().getWidth());
            valueText.setY(0);

            separator.setStartX(size * 0.05);
            separator.setStartY(size * 0.1);
            separator.setEndX(parentWidth - size * 0.05);
            separator.setEndY(size * 0.1);

            redraw();
        }
    }
114719
public void resize(int maxSize) {
		this.maxSize = maxSize;
		if (cache.size() > maxSize) {
			int count = 0;
			Iterator<Long> rowIds = cache.keySet().iterator();
			while (rowIds.hasNext()) {
				rowIds.next();
				if (++count > maxSize) {
					rowIds.remove();
				}
			}
		}
	}
432724
public void scale(double s, Vector3d v1) {
        x = s * v1.x;
        y = s * v1.y;
        z = s * v1.z;
    }
970315
function (zMin, zMax, minSize, maxSize) {
		var len,
			i,
			pos,
			zData = this.zData,
			radii = [],
			sizeByArea = this.options.sizeBy !== 'width',
			zRange;
		
		// Set the shape type and arguments to be picked up in drawPoints
		for (i = 0, len = zData.length; i < len; i++) {
			zRange = zMax - zMin;
			pos = zRange > 0 ? // relative size, a number between 0 and 1
				(zData[i] - zMin) / (zMax - zMin) : 
				0.5;
			if (sizeByArea && pos >= 0) {
				pos = Math.sqrt(pos);
			}
			radii.push(math.ceil(minSize + pos * (maxSize - minSize)) / 2);
		}
		this.radii = radii;
	}
1145339
def set_scale(self, xscale=None, yscale=None, zscale=None, reset_camera=True):
        
        if xscale is None:
            xscale = self.scale[0]
        if yscale is None:
            yscale = self.scale[1]
        if zscale is None:
            zscale = self.scale[2]
        self.scale = [xscale, yscale, zscale]

        # Update the camera's coordinate system
        transform = vtk.vtkTransform()
        transform.Scale(xscale, yscale, zscale)
        self.camera.SetModelTransformMatrix(transform.GetMatrix())
        self.parent._render()
        if reset_camera:
            self.update_bounds_axes()
            self.reset_camera()
687992
private void resize() {
        width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
        height = getHeight() - getInsets().getTop() - getInsets().getBottom();
        size   = width < height ? width : height;

        double center = size * 0.5;

        if (width > 0 && height > 0) {
            pane.setMaxSize(size, size);
            pane.setPrefSize(size, size);
            pane.relocate((getWidth() - size) * 0.5, (getHeight() - size) * 0.5);

            ring.setStrokeWidth(size * 0.078125);
            ring.setRadius(center);
            ring.setCenterX(center);
            ring.setCenterY(center);

            dot.setRadius(size * 0.3125);
            dot.setCenterX(center);
            dot.setCenterY(center);

            redraw();
        }
    }
972257
function resize(w, h) {
         this._super(me.Renderable, "resize", [this.repeatX ? Infinity : w, this.repeatY ? Infinity : h]);
       }
765039
public void setMesh(GVRMesh mesh) {
        mMesh = mesh;
        NativeMeshCollider.setMesh(getNative(), mesh.getNative());
    }
166253
private void setSizeRatio(double size) {
        double width = widthHeightRatio * size;
        double height = size / widthHeightRatio;
        if (width <= size) {
            setSize(width, size);
        } else if (height <= size) {
            setSize(size, height);
        } else {
            setSize(size, size);
        }
    }
48010
public void setFrame (XY loc, IDimension size) {
        setFrame(loc.x(), loc.y(), size.width(), size.height());
    }
211957
public void setCacheSize(int cacheSize) {
    this.cacheSize = cacheSize;

    long toDelete = map.size() - this.cacheSize;
    if(toDelete <= 0) {
      return;
    }

    List<Integer> keys = new ArrayList<>(map.keySet());
    Collections.reverse(keys);

    for(Integer id : keys) {
      P page = map.remove(id);
      file.writePage(page);
    }
  }
850413
@SuppressWarnings("unchecked")
  void resize(final int newSize) {
    final Object[] oldKeys = keys;
    final long[] oldValues = values;
    final short[] oldStates = states;
    keys = new Object[newSize];
    values = new long[newSize];
    states = new short[newSize];
    loadThreshold = (int) (newSize * LOAD_FACTOR);
    lgLength = Integer.numberOfTrailingZeros(newSize);
    numActive = 0;
    for (int i = 0; i < oldKeys.length; i++) {
      if (oldStates[i] > 0) {
        adjustOrPutValue((T) oldKeys[i], oldValues[i]);
      }
    }
  }
737504
protected void resize (int newCapacity) {
		@SuppressWarnings("unchecked")
		T[] newItems = (T[])ArrayReflection.newInstance(items.getClass().getComponentType(), newCapacity);
		if (tail > head) {
			System.arraycopy(items, head, newItems, 0, size);
		} else if (size > 0) { // NOTE: when head == tail the buffer can be empty or full
			System.arraycopy(items, head, newItems, 0, items.length - head);
			System.arraycopy(items, 0, newItems, items.length - head, tail);
		}
		head = 0;
		tail = size;
		items = newItems;
	}
545143
function (meshes, applyWorldTransform) {

        if (! meshes.length) {
            return;
        }

        var templateMesh = meshes[0];
        var templateGeo = templateMesh.geometry;
        var material = templateMesh.material;

        var geometry = new Geometry({
            dynamic: false
        });
        geometry.boundingBox = new BoundingBox();

        var attributeNames = templateGeo.getEnabledAttributes();

        for (var i = 0; i < attributeNames.length; i++) {
            var name = attributeNames[i];
            var attr = templateGeo.attributes[name];
            // Extend custom attributes
            if (!geometry.attributes[name]) {
                geometry.attributes[name] = attr.clone(false);
            }
        }

        var inverseTransposeMatrix = mat4.create();
        // Initialize the array data and merge bounding box
        var nVertex = 0;
        var nFace = 0;
        for (var k = 0; k < meshes.length; k++) {
            var currentGeo = meshes[k].geometry;
            if (currentGeo.boundingBox) {
                currentGeo.boundingBox.applyTransform(applyWorldTransform ? meshes[k].worldTransform : meshes[k].localTransform);
                geometry.boundingBox.union(currentGeo.boundingBox);
            }
            nVertex += currentGeo.vertexCount;
            nFace += currentGeo.triangleCount;
        }
        for (var n = 0; n < attributeNames.length; n++) {
            var name = attributeNames[n];
            var attrib = geometry.attributes[name];
            attrib.init(nVertex);
        }
        if (nVertex >= 0xffff) {
            geometry.indices = new Uint32Array(nFace * 3);
        }
        else {
            geometry.indices = new Uint16Array(nFace * 3);
        }

        var vertexOffset = 0;
        var indicesOffset = 0;
        var useIndices = templateGeo.isUseIndices();

        for (var mm = 0; mm < meshes.length; mm++) {
            var mesh = meshes[mm];
            var currentGeo = mesh.geometry;

            var nVertex = currentGeo.vertexCount;

            var matrix = applyWorldTransform ? mesh.worldTransform.array : mesh.localTransform.array;
            mat4.invert(inverseTransposeMatrix, matrix);
            mat4.transpose(inverseTransposeMatrix, inverseTransposeMatrix);

            for (var nn = 0; nn < attributeNames.length; nn++) {
                var name = attributeNames[nn];
                var currentAttr = currentGeo.attributes[name];
                var targetAttr = geometry.attributes[name];
                // Skip the unused attributes;
                if (!currentAttr.value.length) {
                    continue;
                }
                var len = currentAttr.value.length;
                var size = currentAttr.size;
                var offset = vertexOffset * size;
                var count = len / size;
                for (var i = 0; i < len; i++) {
                    targetAttr.value[offset + i] = currentAttr.value[i];
                }
                // Transform position, normal and tangent
                if (name === 'position') {
                    vec3.forEach(targetAttr.value, size, offset, count, vec3.transformMat4, matrix);
                }
                else if (name === 'normal' || name === 'tangent') {
                    vec3.forEach(targetAttr.value, size, offset, count, vec3.transformMat4, inverseTransposeMatrix);
                }
            }

            if (useIndices) {
                var len = currentGeo.indices.length;
                for (var i = 0; i < len; i++) {
                    geometry.indices[i + indicesOffset] = currentGeo.indices[i] + vertexOffset;
                }
                indicesOffset += len;
            }

            vertexOffset += nVertex;
        }

        return new Mesh({
            material: material,
            geometry: geometry
        });
    }