Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

12045 Posts in 1593 Topics- by 593 Members - Latest Member: zhang

26. May 2013, 03:37:34 am
Xith3D CommunityGeneral CategoryNews (Moderators: Marvin Fröhlich, 'n ddrylliog)API changes - update hints
Pages: 1 2 [3] 4 5 ... 7
Print
Author Topic: API changes - update hints  (Read 32262 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #30 on: 27. March 2007, 08:37:30 pm »

All the TextureLoader methods, that accepted a File instance are now converted to accept a URL instead. This way you can easily get the URL from your ResourceLocator and use the TextureLoader the same way you use all the ModelLoaders and Shader loaders.

(Sound Loaders are still to come)

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #31 on: 29. March 2007, 12:04:13 am »

I have moved all the RenderLoop stuff including OperationScheduler to the core library. Previously it was in the package org.xith3d.render.loop, now it is in org.xith3d.loop

All Xith3DEnvironment related stuff has been moved from org.xith3d.render.base (xith-tk) to org.xith3d.base (xith3d).

The package org.xith3d.geometry (xith-tk) has been renamed to org.xith3d.shapes (xith-tk), since it only contains Shape3D extensions.

All InputManager and InputHandler related stuff has been moved into the package org.xith3d.input. Most of it to the core. Only InputHandler implementations (FPIH only so far) is in the same package in the TK.

The Animatable interface has been moved from the org.xith3d.behaviors (xith-tk) package to org.xith3d.loop.opscheduler (xith3d).

Canvas3DWrapper, CanvasPanel and CanvasJPanel have been moved from org.xith3d.render.canvas (xith-tk) to the package org.xith3d.render (xith3d).

Marvin
« Last Edit: 29. March 2007, 12:23:42 am by Marvin Fröhlich » Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #32 on: 05. April 2007, 10:00:43 pm »

The SoundLoader cleanup is now complete. Now you load sounds this way:

Code:
SceneGraph sg = new Xith3DEnvironment( ... );

sg.setSoundDriver( new org.xith3d.sound.drivers.joal.SoundDriverImpl() );

SoundContainer sc = SoundLoader.getInstance().loadSound( resLoc.getResource( "sounds/jog_on_grass.ogg" ) );

PointSound pointSound = new PointSound( sc, 1.0f );

You don't necessarily need to set a SoundDriver, if Java Sound is sufficient (no spacial sound). JOAL supports spatial sound, which will be needed in most games.

SoundLoader.getInstance() returns the singleton instance of ExtensionSoundLoader, which will utilize the singleton instances of OggLoader, WaveLoader or MidiLoader depending on the resource's extension. If you want to load explicitly from an InputStream, then you have to directly use the appropriate loader implementation, since it cannot be determined from the InputStream.

While the OggSoundContainer and WaveSoundContainer can be reused for an arbitrary number of PointSound objects, MidiSound cannot. Simply attach MidiSound to exactly one BackgroundSound instance.

The soundLoaders are fully integrated into the ResourceLoader system. So you can load your SoundContainers the following way:

Code:
ResourceLoader resLoader = new ResourceLoader( ResourceLocator.create( ... ) );

resLoader.addRequest( new SoundRequest( "bla/blub.ogg", "MY_BLA_SOUND" ) );

ResourceBag resBag = resLoader.loadResources( myLoadingScreenUpdater );

...

SoundContainer sc = resBag.getSound( "MY_BLA_SOUND" );
PointSound pointSound = new PointSound( sc );

A shortcut for ResourceBag handling is this:
Code:
ResourceBag.setSingletonInstance( resBag );

...

// now you can utilize the static methods of "ResBag" to access the singleton instance of ResourceBag.
SoundContainer sc = ResBag.getSound( "MY_BLA_SOUND" );

This can also be seen in DigiBots source, though not for Sounds, but for Textures and Models, but it works absolutely the same way.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #33 on: 08. April 2007, 06:10:11 pm »

GLSelect picking now uses quite the same interface as PickingLibrary and exactly the same listeners.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #34 on: 09. April 2007, 11:11:26 pm »

OpenMaLi's vecmath implementation has changed. There're two jars coming from the project now. One jar (vecmath-kh.jar) contains only Kenji Hiranabe's pure vecmath implementation with our fixes (fully API compatible). The other one (openmali.jar) contains the org.openmali.vecmath package, which contains our improved vecmath implementation with all the additions and convenience thingies and javax.vecmath compatilbity methods and constructors. This jar also contains all the other openmali stuff.

To port to the new jar you only need to do a simple project-global text-replace of "javax.vecmath."->"org.openmai.vecmath.". Make sure to only effect the xith stuff, if this is necessary for your project.

Marvin
« Last Edit: 10. April 2007, 05:29:06 pm by Marvin Fröhlich » Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #35 on: 06. May 2007, 09:35:00 pm »

I have removed addChild(), addPerspectiveChild() and addParallelChild() from SceneGRaph/Xith3DEnvironment.

It was too confusing especially for new users, that these methods behaved differently when executed in different orders.

Simply create a BranchGroup, add Nodes to it and add it to the SceneGraph through the addPerspectiveBranch() or addParallelBranch() methods.

Marvin
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #36 on: 19. May 2007, 12:47:33 pm »

Added methods removeKeyboard(KeyboardDevice) and removeMouse(MouseDevice) to InputManager (and implemented it in InputManagerImpl) in order to have a cleaner implementation of Xith3DLogo.

It's not really an "API change", but if you ever wanted to remove a keyboard or a mouse and didn't because you couldn't, well, now you can. Enjoy.
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #37 on: 19. May 2007, 01:04:15 pm »

Now the WidgetManipulator displays info about the manipulated widget only when you click the MIDDLE mouse button. Previously it was with any button, which was very annoying in a HUD Editor, eg. (not that anyone uses it  Grin but it could become useful in the future).
Also the info displayed is now only the line from which the WidgetManipulator has been instantiated, which gives a much cleaner ouput (only one line, if you're in Eclipse you can just click on the hyper-linked File:line text and paste (Ctrl+V) the auto-generated code which has been put especially for you in the clipboard by the WidgetManipulator)
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #38 on: 28. May 2007, 12:41:06 am »

The HIAL API has changed... and Xith followed.

The Changes are all related to the MouseListener. The onMouseButtonPressed() method now has an additional long parameter (lastPressTime), which is the system milli time, when the appropriate button was last pressed. The same for onMouseButtonReleased (lastReleaseTime). The onMouseMoved() and onMouseMovedDelta() methods have an additional int parameter (buttonsState), which is a bitmask for the currently pressed buttons. See class MouseMask for button-mask-constants. And finally the onMouseWheelMoved() method has an additional boolean parameter (isPageMove), that is true, if it is a page-wheel-scroll (only JOGL, always false in LWJGL and SWT).

That's all.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #39 on: 28. May 2007, 11:25:31 pm »

One more change in HIAL: All input events now have an additional "when" parameter (long), which contains the timestamp of the input event.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #40 on: 01. June 2007, 09:08:10 pm »

I have removed the loadModel( Reader ) and loadScene( Reader ) methods from the ModelLoaders.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #41 on: 04. June 2007, 01:39:44 pm »

I have removed the alpha-channel-booleans from all setTexture() methods and constructors in all the classes in org.xith3d.shapes and the HUD.

I have migrated the public static final ints in Texture and TextureComponent into enums. This will most probably not change anything for your, but it might do.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #42 on: 07. June 2007, 02:06:31 pm »

I have moved all classes from org.xith3d.datatypes to JAGaToo (org.jagatoo.datatypes).

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #43 on: 20. June 2007, 11:02:13 am »

Oh, before I forget it...

the GeometicMath class from org.xith3d.utility.math (xith-tk) is now moved to org.xith3d.scenegraph (xith3d) and renamed to StaticTransform (since 3 or 4 days). And the methods have been renamed to something more meaningful for what it is used for (even if the previous names were nor wrong):
  • add() -> translate()
  • multiply() -> scale()
  • rotate() remained the same
And now all methods are working (while they weren't in the past years and months). And they can now directly handle Point3f arrays. Just take a look at the wealth of possibilities of this class.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #44 on: 22. June 2007, 01:12:08 am »

I have streamlined all the Shape3D extensions in org.xith3d.shapes. Previously they were all handled a different way. Now they all follow this constructor scheme:
  • size (radius, length, etc.)
  • precision (slices, stacks)
  • features or
  • Texture, Color or Appearance

Marvin
Logged
Pages: 1 2 [3] 4 5 ... 7
Print
Jump to:  

Theme orange-lt created by panic