Skip to content

observe3d: auto = TRUE fails when zoomed inside the scene #500

@discoleo

Description

@discoleo

Issue with observer3d( auto = TRUE )

Function observer3d fails after zooming into a scene:

  • Setting auto = TRUE does NOT make the entire bounding box visible;

I would like to make the (x,y)-bounding box visible. Presumably, the computed dimensions are not scaled based on the zoom-factor (just a guess).

How to reproduce:

# Oped file: 3Q0L.pdb
x = read.pdb(file.choose())
visualize(x, type="l")

# Zoom & Rotate so that molecule is partly outside window

translate = function(x, y = 0, z = 0, auto = FALSE) {
	old = observer3d();
	observer3d(old + c(x, y, z), auto=auto);
	invisible(old);
}

translate(-20, -5, 0) # Values may need to be adapted
# Now with auto = TRUE
translate(-20, -5, 0, auto = TRUE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions