#31 current scene dimensions

feature request
Bruce Sherwood

I need some way to find out the real-world dimensions of the current display (I ran across this in wanting to wrap the motion of an object when it reached the edge of the screen.)

A possible syntax would be scene.min and scene.max, which would give pos info on the lower left and upper right corners of the midplane (the plane passing through center, and perpendicular to the view).


  • David Scherer
    David Scherer

    I've experimented with a scene.project that does forward projection (world-space position to screen space) and found it wanting for this sort of thing, because it's hard to tell which way the object has gone off screen.

    The suggested .min and .max attributes will not be useful except in the simplest (orthogonal 2D) case.

    The "right" solution is probably plane equations for the four edges of the screen (vector v and scalar d such that v*p > d offscreen). Is that too complicated?

    Is there a way to support "wrapping" spaces even in full 3D with rotation and perspective? Plane equations would be good enough to detect the object leaving the screen, but where do you wrap it to?