BIMsurfer icon indicating copy to clipboard operation
BIMsurfer copied to clipboard

Nothing is rendered using orthogonal projection

Open muren400 opened this issue 5 years ago • 0 comments

Hi,

currently it's not really possible to set an orthogonal projection.

In camera.js in the function setModelBounds(bounds), the bounds array/vector ist cloned using vec3.clone(). Since bounds has six entries (minX, minY, minZ, maxX, maxY, maxZ) we lose some information and end up with three entries. This results in an invalid projection matrix and the model can't be rendered.

setModelBounds(bounds) { // <-- takes an array with six entries
    this._modelBounds = [];

    this.perspective.setModelBounds(vec3.clone(bounds)); // <-- creates an array with three entries
    this.orthographic.setModelBounds(vec3.clone(bounds));

Thanks

muren400 avatar Mar 31 '21 12:03 muren400