xml parsing - Viewpoint for X3D Centering -


can please me in calculating center of rotation , position of x3d object? i've noticed aopt tool instantreality adds like:

<viewpoint def='aopt_cam' centerofrotation='x y z' position='x y z'/> 

the result nice, object zoomed, centrated , center of rotation somehow "inside" object (x,y,z, center). must avoid using aopt, how can obtain that, (i.e. via javascript) pheraphs looping trough xml coordinate point , doing calculations...? i'm using x3dom render object.

many thanks.

"aopt_cam" name of viewpoint. centerofrotation , position values automatically computed browser (instantreality in case).

in order compute these values need know object size (boundingbox) , math compute viewpoint should located ('position' attribute) in local coordinate system. need know object displacement in coordinate system. if not specified should (0,0,0)


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -