25sep10 CmdrZin

Upgrading the Room Loader to Bring in Position and Dimensions

Added <room>.position and <room>.dimensions properties to the MudMain.properties file and entered placeholder information for each room. The values are close, but will need to be tweaked once the 3D view is using them to display rooms that have been visited.
Change MudMain.java::loadRoom()
Added code after the room.setDescription() call to read in and set the position and dimensions of the Room.
 String[] position = properties.getProperty(name + ".position", "10,0,10").split("\\s*,\\s*");
 String[] dimensions = properties.getProperty(name + ".dimensions", "0.5,0.5,0.25").split("\\s*,\\s*");
Now to add the methods to Room.
Change Room.java
Added code (see file)
import javax.vecmath.Vector3f;
    private Vector3f position;
    private Vector3f dimansions;
        position = new Vector3f(0f,0f,0f);
        dimensions = new Vector3f(0.1f,0.1f,0.1f);
    public Vector3f getDimensions() { }
    public Vector3f getPosition() { }
    public void setDimensions(String[] dim) { }
    public void setPosition(String[] pos) { }
Change Door.java::commitCommand()
Added the position and dimensions information to the room description being sent back to the Client.
  String DDP = dest.getDescription()+
Now the Client should display the room description txt and the position and dimensions text.
These can be trimmed off by the Client. Build and copy jar file to tutor folder to test. Also copy the MudMain.properties file to tutorial/conf and clear the data folder so the properties will be redone.
And here it is..too cool. The position and dimensions information is right after the description.

Client with Position and Dimansions data

That's all that is needed for the Server side. Back to the Client.