Skip to main content

How I can scale a 3D graph when the windows height changes?

2 replies [Last post]
miguelmu123
Offline
Joined: 2010-05-11

I have a scale problem of a 3D graph, I have a 3D Graph that I have to resize when the window size change, in the View the default Scale Policy is SCALE_SCREEN_SIZE, but this policy only take de physical_screen_width of the window to scale the graph, if i change the height the 3D Graph doesn

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
interactivemesh
Offline
Joined: 2006-06-07

Hi, does the thread [b]'automatic camera positioning'[/b] help http://forums.java.net/jive/thread.jspa?messageID=257458&#257458 ? August

miguelmu123
Offline
Joined: 2010-05-11

Thanks for you response:

I prove it using a specific ViewingPlatform when I create the SimpleUniverse:

SimpleUniverse simpleU = new SimpleUniverse(new MyViewingPlatform(), new Viewer(new OffScreenCanvas3D(config)));,

Where MyViewPlataform() has the reimplmented method:
public double getViewPlatformDistance(BranchGroup scene, Component canvas, View view),

Bit it doesn´t work, i don´t know if I must do something more.

Thanks, best regards.