Question n. 1 (999.999 following): viewer camera

I started playing a bit with jmp trying to add a “scene location bookmark” panel. The plugin panel in on the right.







The question is: how to move the camera used by the SceneViewer module? I made few attempts with SceneApplication but the camera returned by its “getCamera” method is always null.

Yay, happy to see the first platform user :smiley:



First you have to send a SceneRequest to the SceneViewer to tell it you want to use the scene. It has got to contain a JmeNode (create with NodeUtility.createNode(Node node)) and some info about yourself. Then register as a SceneListener to the scene. as soon as you get your own request back you are the owner of the scene and can do anything to the cam (as long as you do it on the render thread).



SceneComposer is the first actual plugin for jMP, so you can look how its done there. All WIP and input welcome.



Cheers,

Normen

Ah but I see that your plugin is meant for something else… You dont want to load a scene but you want to modify the cam position for a scene that is loaded… Hm, this would only work for plugins owning the scene that dont update the cam position each frame but only when the mouse is moved or smth… Like it is now it would either better fit as an extension to to the scenecomposer plugin or its a general list that plugins could tap into (but then each plugin has to build in the funtionality)

One of the coolest thing of jmp for me is the fact that it is built on top of a magnificent code editor.



So the use case i had in mind was more or less this:



I create a new JME project, i code part of it, i put something here and there, then i start the program, it runs inside the SceneViewer and with the camera bookmark plugin i go to different locations of the scene i've built, maybe i mark some other "point of interest", maybe i use the scene composer to add something to the scene, then i shut down the program, add more core, run again, go here and there, add, remove… well, crazyness like that.



Mixing code and visual editing in short.



I'll try the scenerequest (well, after finishing a second plug-in i have in mind…)

pgi said:

One of the coolest thing of jmp for me is the fact that it is built on top of a magnificent code editor.

So the use case i had in mind was more or less this:

I create a new JME project, i code part of it, i put something here and there, then i start the program, it runs inside the SceneViewer and with the camera bookmark plugin i go to different locations of the scene i've built, maybe i mark some other "point of interest", maybe i use the scene composer to add something to the scene, then i shut down the program, add more core, run again, go here and there, add, remove... well, crazyness like that.

Mixing code and visual editing in short.

I'll try the scenerequest (well, after finishing a second plug-in i have in mind...)


Its just the same that NetBeans doesn't have the same look and feel as that sweet black and purple you had in Jupiter ;)

Unless... can NB platform projects have standard Swing L&F's applied?
sbook said:

Unless... can NB platform projects have standard Swing L&F's applied?

Sure thing :)
pgi said:

I create a new JME project, i code part of it, i put something here and there, then i start the program, it runs inside the SceneViewer and with the camera bookmark plugin i go to different locations of the scene i've built, maybe i mark some other "point of interest", maybe i use the scene composer to add something to the scene, then i shut down the program, add more core, run again, go here and there, add, remove... well, crazyness like that.


What you want to do is currently possible in a way:
You can edit a j3o file in SceneComposer, so all that fits in a binary you can edit. Then when you code/run the software you can load that j3o and put game logic in.

The game does not run in the SceneViewer though, I do not really see the sense in doing so, except for seeing live SceneGraph changes which would probably mean overhead. But maybe I will create a class that one can use in an application to use the SceneViewer instead of an application window.

Edit: A short hint: to open the scenecomposer, you will need a j3o file first, easiest way is to convert a ogrexml file, see the manuals for jMP here, especially "importing models" and "simple scene composition".

The opposition of the NetPains Platform to my will is quite fierce. I've also done something very very bad (probably between the flash player and the look and feel) because now it keeps yelling that "Xmx512" is not a file.



I need to study this platform thing a bit more…

pgi said:

The opposition of the NetPains Platform to my will is quite fierce. I've also done something very very bad (probably between the flash player and the look and feel) because now it keeps yelling that "Xmx512" is not a file.

I need to study this platform thing a bit more...

the java jvm settings are in the nbproject/project.properties file