TWL port of JOGL

I have just written JOGL port of TWL:Theme Widget Library.

I am planning to rewrite/replace my own opengl gui library used in my project simPHY: the 2D physics simulator, thats why I compared various available opengl gui libraries like nifty-gui, twl, nuklear etc and I found twl to be best suited for my use especially because of its powerful textarea and theming capability. Sooner or later I may use it or modify my library to incorporate these features.

You can find the maven project at github.

how does it differ from original twl

this jogl port of twl library intended to work with newt in jogl, so main changes madeto library are

  • all keycodes, mouse events are mapped to newt keyevents
  • new jogl renderer is added
  • new jogl input processor is added
  • newt window and jogl animator are used to create display
  • jogl effects rendered is used for twl effects
  • several small tweaks to make it work with jogl

who else can use it

Anyone planning to use full featured opengl gui in jogl (to avoid multithreading conflict on combining swing with opengl). MatthiasMann is kind enough to freely share his awesome library with us. For commmercial use please contact MatthiasMannsince he is the one who holds all rights, there is no restriction in distributing or reusing code from my behalf.

how to use it

  • Download ind install eclipse
  • Download the repo and extract it
  • Open eclipse and import >>Maven >>Existing maven Project
  • Right click on project and click on menu Run As >>Maven install
  • You will see jar jogl-twl-test-1.0-SNAPSHOT.jar inside project folder jogl-twl-maven\jogl-twl-maven\jogl-twl-test\target
  • Run jar and click on test buttons to see demo You should get an idea about using twl in jogl by looking at the source. For tutorials on using twl please visit http://twl.l33tlabs.org/.

Let me know if it is of some use to you.

Serpent Demo in Simphy 5.5

Demonstrates physics behind snake motion. Snake is created by joining many rectangles with revolute and distance joint.
Look at the motion of serpent closely, the joints are behaving like vertebrates.

Simphy Custom forces demo

You can simulate almost any 2D motion of objects by applying custom force to body. Force may be the function of speed, position, mass of object.

SimPhy Fields Demo

SimPhy supports setting up of various fields other than gravity.

  • Gravity:

    The gravitational force on an object is calculated as
    Force = mass x gravity x gravityFactor

  • Electrostatic field:

    Electrostatic field (in N/C)added to the world, apply force on object if and only if it has non zero charge and it is inside bounds of field.

  • Magnetic field:

    The magnetic lorentz force on an object is calculated asForce = charge x speed x magnetic field  and is perpendicular to the velocity

  • Buoyancy and drag:

    Buoyancy can be added to a region representing hypothetical liquid in that region. The density and viscosity of liquid can be changed while adding/editing field.

Simphy Joints Demo

Simphy has a number of ‘joints’ that can be used to connect two bodies together. These joints can be used to simulate interaction between objects to form hinges, pistons, ropes, wheels, pulleys, vehicles, chains, etc. Learning to use joints effectively helps to create a more engaging and interesting scene.

Body Types in Simphy Demo

Demo for various type of bodies that can be added to Simphy. You can also create complex bodies by adding multiple fixtures or using constructive area geometry.

Mouse Gesture Demo

Demonstration of physics simulator Simphy’s new feature called universal tool. Now we can control, edit and create objects and joints simply using mouse gestures. It dynamically recognizes shapes and patterns and adds to simulator.

Create your first Wagon

Demonstrates how easy it to create a wagon controlled by keyboard , using SimPhy 5.0+.

General Usage Demo

The user, using just the mouse and by selecting corresponding tools, can create various physical objects (circles, polygons, gears, etc.) and joints (eg. springs, pulleys etc.) that obey the laws of Physics. This way the user can experiment by creating various scenes/scenarios which can be either simple physics experiments or jus a game demo.