You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
(26) |
Aug
(85) |
Sep
(141) |
Oct
(85) |
Nov
(60) |
Dec
(29) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(38) |
Feb
(78) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ian...@us...> - 2007-10-27 23:33:45
|
Revision: 543
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=543&view=rev
Author: iansmith
Date: 2007-10-27 16:33:47 -0700 (Sat, 27 Oct 2007)
Log Message:
-----------
More comet support, currently turned off. No external effect.
Modified Paths:
--------------
maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/VerifyEnvironmentMojo.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/MeasPerfClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/AsyncProtoFactory.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/AsyncProtoInfo.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/SimpleSocketInfo.java
maven/trunk/ogoglio-server/pom.xml
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/AsyncProtoServerFactory.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/CometServlet.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/MeasPerfServer.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/NetworkChannelServer.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/SimpleSocketAsyncServer.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/MessageProxy.java
Added Paths:
-----------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometInfo.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometProto.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/CometChannelManager.java
Modified: maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/VerifyEnvironmentMojo.java
===================================================================
--- maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/VerifyEnvironmentMojo.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/VerifyEnvironmentMojo.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -8,7 +8,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import nanoxml.XMLElement;
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -57,6 +57,8 @@
public class SpaceClient implements UserInputListener, Space.Context {
+ private static final long START_UP_WAIT_MS = 15000;
+
private Listener listener = null;
private WebAPIClient webClient = null;
@@ -104,11 +106,11 @@
//create the event channel and start queuing events
Object selector = AsyncProtoFactory.getDefaultInfo().getProxySpecificSelector();
- messageChannel = new TCPChannel(AsyncProtoFactory.getDefaultClient(serviceURI.getHost(), selector), messenger, true, new ChannelListener());
+ messageChannel = new TCPChannel(AsyncProtoFactory.getDefaultClient(serviceURI.getHost(), selector), messenger, true, new ChannelListener(), true);
messenger.authenticate(authCookie);
long startWait = System.currentTimeMillis();
- while (System.currentTimeMillis() < startWait + 45000 && messenger.authStatus == messenger.INIT_STATUS) {
+ while (System.currentTimeMillis() < startWait + START_UP_WAIT_MS && messenger.authStatus == messenger.INIT_STATUS) {
try {
Thread.sleep(100);
} catch (Exception e) {
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/MeasPerfClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/MeasPerfClient.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/MeasPerfClient.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -38,7 +38,8 @@
try {
for (int i = 0; i < n; ++i) {
- AsyncProto proto=AsyncProtoFactory.getDefaultClient(argv[1], AsyncProtoFactory.getDefaultInfo().getSimSpecificSelector());
+// AsyncProto proto=AsyncProtoFactory.getDefaultClient(argv[1], AsyncProtoFactory.getDefaultInfo().getSimSpecificSelector());
+ AsyncProto proto=AsyncProtoFactory.getDefaultClient(argv[1], "/fart/poop");
Thread t =new MeasPerfClient(proto);
t.start();
try {
@@ -53,7 +54,8 @@
}
public MeasPerfClient(AsyncProto proto) {
- channel = new TCPChannel(proto,this,false,this);
+ System.out.println("FOUND A CLIENT PROTO:"+(proto!=null));
+ channel = new TCPChannel(proto,this,false,this,true);
}
public void run() {
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -15,8 +15,6 @@
package com.ogoglio.message;
import java.io.IOException;
-import java.io.OutputStream;
-import java.net.Socket;
import com.ogoglio.message.proto.AsyncProto;
import com.ogoglio.util.BlockingQueue;
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -14,13 +14,9 @@
package com.ogoglio.message;
-import java.io.IOException;
-
import com.ogoglio.message.proto.AsyncProto;
-import com.ogoglio.message.proto.AsyncProtoFactory;
import com.ogoglio.message.proto.Locator;
import com.ogoglio.util.Log;
-import com.ogoglio.util.NetworkUtils;
import com.ogoglio.util.BlockingQueue.QueueClosedException;
import com.ogoglio.util.BlockingQueue.QueueOverflowException;
@@ -44,11 +40,8 @@
private boolean ensureOrigin = false;
- public TCPChannel(String remoteHost, Object selector, MessageHandler messageHandler, boolean ensureOrigin, Listener listener) throws IOException {
- this(AsyncProtoFactory.getDefaultClient(remoteHost, selector), messageHandler, ensureOrigin, listener);
- }
-
- public TCPChannel(AsyncProto proto, MessageHandler message_handler, boolean ensureOrigin, Listener listener) {
+ public TCPChannel(AsyncProto proto, MessageHandler message_handler, boolean ensureOrigin,
+ Listener listener, boolean needAReaderThread) {
this.clientProto= proto;
//remoteHostName = clientProto.getRemoteAddress().getAddress().getHostAddress();
//remoteHostPort = clientProto.getRemoteAddress().getPort();
@@ -66,9 +59,16 @@
senderQueue = new SenderQueue(clientProto, 1000); //TODO what should the max queue size be?
senderQueue.start();
- readerThread = new TCPMessageReader(clientProto, message_handler, this);
- readerThread.start();
+ //this is a wee bit hairy. all clients need a reader thread. servers need a reader
+ //thread depending on their protocol.
+ Log.info("Comet got into a TCP channel:"+needAReaderThread);
+ if (needAReaderThread) {
+ readerThread = new TCPMessageReader(clientProto, message_handler, this);
+ readerThread.start();
+ }
+
+
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/AsyncProtoFactory.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/AsyncProtoFactory.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/AsyncProtoFactory.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -6,13 +6,12 @@
* This is a factory for other classes to get a handle on our async protocol handler and so
* we can "throw the switch" in exactly one place if we want to switch protocols.
*
- * Clients call the getDefaultClient() routine and servers call the waitForClient() routine.
- *
* @author iansmith
*
*/
public class AsyncProtoFactory {
-
+ //this is the magic switch
+ private static final boolean USE_SIMPLE_SOCKET=true;
/**
* Get a handler for this protocol. This is the client side call. This fails if the connection
* cannot be made. It returns a connected proto object.
@@ -23,10 +22,38 @@
* @throws IOException
*/
public static AsyncProto getDefaultClient(String host, Object selector) throws IOException {
+ if (USE_SIMPLE_SOCKET) {
+ return simpleSocketProto(host, selector);
+ } else {
+ return cometProto(host,(String)selector);
+ }
+ }
+
+ private static AsyncProto cometProto(String host, String selector) throws IOException {
+ return new CometClient(host,selector).getProto();
+ }
+
+ private static AsyncProto simpleSocketProto(String host, Object selector) throws IOException {
+ if (USE_SIMPLE_SOCKET) {
+ return simpleSocketInfo(host, selector);
+ } else {
+ return cometProto(host,(String)selector);
+ }
+ }
+
+ private static AsyncProtoInfo cometInfo() {
+ return new CometInfo();
+ }
+
+ private static AsyncProto simpleSocketInfo(String host, Object selector) throws IOException {
return new SimpleSocketAsync(host, ((Integer)selector).intValue());
}
public static AsyncProtoInfo getDefaultInfo() {
- return new SimpleSocketInfo();
+ if (USE_SIMPLE_SOCKET) {
+ return new SimpleSocketInfo();
+ } else {
+ return new CometInfo();
+ }
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/AsyncProtoInfo.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/AsyncProtoInfo.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/AsyncProtoInfo.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -1,7 +1,5 @@
package com.ogoglio.message.proto;
-import java.net.URI;
-import java.net.URISyntaxException;
/**
* The intention of this interface is to hide various specifics about how the underlying async
@@ -13,7 +11,5 @@
public interface AsyncProtoInfo {
public String getScheme();
public Object getProxySpecificSelector();
- public Object getSimSpecificSelector();
-
- public URI getURI(String host, Object selector) throws URISyntaxException;
+ public Object getSimSpecificSelector();
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometClient.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometClient.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -7,7 +7,9 @@
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
+import java.io.Writer;
import java.net.HttpURLConnection;
+import java.net.InetSocketAddress;
import java.net.Socket;
import com.ogoglio.message.MessageHandler;
@@ -25,13 +27,49 @@
private static final String CRLF="\r\n";
private static final String EOC = "0"+CRLF+CRLF; //end of chunk
+ public static final int XXX_PORT=8080;
+ public static final String XXX_MOUNT_POINT="/og/comet";
+
+ private Locator remote;
+ private Locator local;
+
+ public CometClient(String remoteHost, String selector) throws IOException {
+ Socket socket=new Socket(remoteHost,XXX_PORT); ///UGH
+ is = socket.getInputStream();
+ os = socket.getOutputStream();
+
+ StringBuffer buff=new StringBuffer();
+ buff.append("POST "+XXX_MOUNT_POINT+selector+" HTTP/1.1"+CRLF);
+ buff.append("content-type: text/plain"+CRLF);
+ buff.append("host: "+remoteHost+":"+XXX_PORT+CRLF);
+ buff.append("connection: keep-alive"+CRLF);
+ buff.append("user-agent: ogoglio/viewer"+CRLF);
+ //if you omit this, the server generates the "end" immediately
+ buff.append("content-length: 17"+CRLF);
+ //buff.append("accept= text/plain"+CRLF);
+ buff.append("method: POST"+CRLF);
+ //buff.append("transfer-encoding= chunked"+CRLF);
+ buff.append(CRLF);
+ os.write(buff.toString().getBytes());
+ os.flush();
+
+ String scheme = new CometInfo().getScheme();
+ remote = new Locator(scheme+"://"+remoteHost+":"+XXX_PORT+XXX_MOUNT_POINT+selector);
+ InetSocketAddress addr=(InetSocketAddress)socket.getLocalSocketAddress();
+ local = new Locator(scheme+"://UNKNOWN@"+addr.getHostName()+":"+addr.getPort()+"/");
+ }
+
+ public CometProto getProto() {
+ return new CometProto(new PrintWriter(os), is, remote, local);
+ }
+
public CometClient(String remoteHost, int remotePort, MessageHandler messageHandler, boolean ensureOrigin, Listener listener) throws IOException {
Socket socket=new Socket(remoteHost,remotePort);
is = socket.getInputStream();
os = socket.getOutputStream();
StringBuffer buff=new StringBuffer();
- buff.append("POST /og/comet HTTP/1.1"+CRLF);
+ buff.append("POST /og/comet/fart/poop HTTP/1.1"+CRLF);
buff.append("content-type: text/plain"+CRLF);
buff.append("host: "+remoteHost+":"+remotePort+CRLF);
buff.append("connection: keep-alive"+CRLF);
Added: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometInfo.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometInfo.java (rev 0)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometInfo.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -0,0 +1,21 @@
+package com.ogoglio.message.proto;
+
+
+public class CometInfo implements AsyncProtoInfo {
+
+ public CometInfo() {
+ }
+
+ public Object getProxySpecificSelector() {
+ return "/proxy";
+ }
+
+ public String getScheme() {
+ return "comet";
+ }
+
+ public Object getSimSpecificSelector() {
+ return "/sim";
+ }
+
+}
Added: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometProto.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometProto.java (rev 0)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/CometProto.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -0,0 +1,88 @@
+package com.ogoglio.message.proto;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+
+import com.ogoglio.util.Log;
+
+public class CometProto implements AsyncProto {
+ private Writer writer;
+ private InputStream input;
+ private Locator local;
+ private Locator remote;
+
+ private StringBuffer waiting=new StringBuffer();
+
+ public CometProto(Writer writer, InputStream input, Locator remote, Locator local) {
+ this.writer=writer;
+ this.input=input;
+ this.local=local;
+ this.remote=remote;
+ }
+
+ public Locator getLocalLocator() {
+ return local;
+ }
+
+ public Locator getRemoteLocator() {
+ return remote;
+ }
+
+ public void prepareInput() throws IOException {
+ //no effect in comet
+ }
+
+ public void prepareOutput() throws IOException {
+ //no effect in comment
+ }
+
+ public String readLine() throws IOException {
+ byte[] buf = new byte[512];
+ waiting.delete(0, waiting.length());
+ do {
+ int n = input.read(buf); //can throw an IOException
+ if (n > 0) {
+ waiting.append(new String(buf, 0, n));
+ } else if (n < 0) {
+ Log.error("Unable to read from stream! Error: read returned < 0:"+n);
+ throw new IOException("Can't read from stream [<0 in read()]");
+ }
+ } while (input.available() >0);
+
+ if (waiting.indexOf("\n")!=waiting.length()) {
+ Log.error("Did not get a single string terminated by a newline!");
+ }
+ return waiting.toString();
+ }
+
+ public String readString(int length) throws IOException {
+ byte[] buf = new byte[512];
+ waiting.delete(0, waiting.length());
+ do {
+ int n = input.read(buf); //can throw an IOException
+ if (n > 0) {
+ waiting.append(new String(buf,0,n));
+ } else if (n < 0) {
+ Log.error("Unable to read from stream! Error: read returned < 0:"+n);
+ throw new IOException("Can't read from stream [<0 in read()]");
+ }
+ } while (waiting.length()<length);
+ return waiting.toString();
+ }
+
+ public void sendMessage(String command, String message) throws IOException {
+ writer.write(command + "\n");
+ writer.write(message);
+ }
+
+ public void shutdown() {
+ try {
+ input.close();
+ writer.close();
+ } catch (IOException e) {
+ Log.error("Error closing input/output streams of comet!",e);
+ }
+ }
+
+}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/SimpleSocketInfo.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/SimpleSocketInfo.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/proto/SimpleSocketInfo.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -23,8 +23,4 @@
return new Integer(DEFAULT_SIM_PORT);
}
- public URI getURI(String host, Object selector) throws URISyntaxException {
- return new URI(getScheme() + "://" + host + ":" + selector+ "/");
- }
-
}
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-server/pom.xml 2007-10-27 23:33:47 UTC (rev 543)
@@ -196,6 +196,7 @@
<!-- these are for the populate -->
<configuration>
+
<serviceURI>${ogoglio.baseURL}</serviceURI>
<username>${ogoglio.bootstrapUser}</username>
<password>${ogoglio.bootstrapUserPW}</password>
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/AsyncProtoServerFactory.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/AsyncProtoServerFactory.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/AsyncProtoServerFactory.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -1,12 +1,22 @@
package com.ogoglio.message.server;
import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import com.ogoglio.message.MessageHandler;
import com.ogoglio.message.proto.AsyncProtoInfo;
+import com.ogoglio.message.proto.CometInfo;
import com.ogoglio.message.proto.SimpleSocketInfo;
+import com.ogoglio.util.Log;
public class AsyncProtoServerFactory {
+ //this is the magic switch
+ private static final boolean USE_SIMPLE_SOCKET=true;
+ private static Map selectorToChannelManager = Collections.synchronizedMap(new HashMap());
+
/**
* Become a server who waits for connections.
*
@@ -17,11 +27,19 @@
* used when you want to not be a server anymore and want to clean up the resources.
*/
public static AsyncProtoShutdownHandle waitForClient(Object serverSelector, AsyncClientReady ready) throws IOException {
- return simpleSocketImpl(((Integer)serverSelector).intValue(),ready);
+ if (USE_SIMPLE_SOCKET) {
+ return simpleSocketImpl(((Integer)serverSelector).intValue(),ready);
+ } else {
+ return cometImpl(serverSelector, ready);
+ }
}
public static AsyncProtoInfo getInfo() {
- return simpleSocketInfo();
+ if (USE_SIMPLE_SOCKET) {
+ return simpleSocketInfo();
+ } else {
+ return cometInfo();
+ }
}
private static AsyncProtoInfo simpleSocketInfo() {
@@ -34,4 +52,33 @@
return waiter.getShutdownHandle();
}
+ private static AsyncProtoInfo cometInfo() {
+ return new CometInfo();
+ }
+
+ private static AsyncProtoShutdownHandle cometImpl(Object serverSelector, AsyncClientReady ready) {
+ String urlPart = (String)serverSelector;
+ CometChannelManager mgr = new CometChannelManager(urlPart,ready);
+ selectorToChannelManager.put(serverSelector, mgr);
+ return mgr;
+ }
+
+ public static boolean needsReaderThreadsOnServerSide() {
+ return USE_SIMPLE_SOCKET;
+ }
+
+ public static void registerMessageHandler(Object serverSelector, MessageHandler messageHandler) {
+ if (USE_SIMPLE_SOCKET) {
+ Log.error("Should NEVER call registerMessageHandler with simple socket proto!");
+ return;
+ }
+
+ if (!selectorToChannelManager.containsKey(serverSelector)) {
+ throw new IllegalArgumentException("Bad server selector provided to registerMessageHandler:"+serverSelector.getClass().getCanonicalName());
+ }
+
+ CometChannelManager mgr = (CometChannelManager) selectorToChannelManager.get(serverSelector);
+ mgr.setMessageHandler(messageHandler);
+ }
+
}
Added: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/CometChannelManager.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/CometChannelManager.java (rev 0)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/CometChannelManager.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -0,0 +1,56 @@
+package com.ogoglio.message.server;
+
+import com.ogoglio.message.MessageHandler;
+import com.ogoglio.message.proto.CometClient;
+import com.ogoglio.message.proto.CometInfo;
+import com.ogoglio.message.proto.CometProto;
+import com.ogoglio.message.proto.Locator;
+import com.ogoglio.util.Log;
+
+public class CometChannelManager implements AsyncProtoShutdownHandle {
+
+ private AsyncClientReady ready;
+ private CometProto proto;
+ private StringBuffer buffer=new StringBuffer();
+ private String urlPart;
+ private MessageHandler messageHandler;
+
+ public CometChannelManager(String urlPart, AsyncClientReady ready) {
+ this.ready=ready;
+ this.urlPart=urlPart;
+ CometServlet.addChannel(urlPart, this);
+ }
+
+ public Locator getLocalLocator() {
+ if (proto==null) {
+ String XXX_localMachine = "localhost";
+ String scheme = new CometInfo().getScheme();
+ String cometURL=scheme+"://"+XXX_localMachine+":"+CometClient.XXX_PORT+CometClient.XXX_MOUNT_POINT+urlPart;
+ return new Locator(cometURL);
+ }
+ return proto.getLocalLocator();
+ }
+
+ public AsyncClientReady getReady() {
+ return ready;
+ }
+
+ public void setConn(CometProto proto) {
+ this.proto=proto;
+ }
+ public void shutdown() {
+ if (proto!=null) {
+ proto.shutdown();
+ }
+ }
+ public void addData(byte[] buf, int n) {
+ //ugh, stupid inefficiency
+ String tmp=new String(buf,0,n);
+ buffer.append(tmp);
+ Log.info("COMET: Got some data in the buffer:"+buffer);
+ }
+
+ public void setMessageHandler(MessageHandler messageHandler) {
+ this.messageHandler=messageHandler;
+ }
+}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/CometServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/CometServlet.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/CometServlet.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -2,8 +2,14 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -12,28 +18,51 @@
import org.apache.catalina.CometEvent;
import org.apache.catalina.CometProcessor;
+import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;
+import com.ogoglio.message.proto.CometProto;
+import com.ogoglio.message.proto.Locator;
import com.ogoglio.util.Log;
public class CometServlet extends HttpServlet implements CometProcessor {
- protected ArrayList connections = new ArrayList();
- protected MessageSender messageSender = null;
-
public void init() throws ServletException {
- messageSender = new MessageSender();
- Thread messageSenderThread = new Thread(messageSender, "MessageSender[" + getServletContext() + "]");
- messageSenderThread.setDaemon(true);
- messageSenderThread.start();
+ //TEMP
+ //MeasPerfServer measServer=new MeasPerfServer();
+ //NetworkChannelServer ncs=new NetworkChannelServer(measServer,"/fart/poop",false,measServer);
+ //measServer.channelServer(ncs);
}
public void destroy() {
- connections.clear();
- messageSender.stop();
- messageSender = null;
+ for (Iterator iterator = clientChannelMap.keySet().iterator(); iterator.hasNext();) {
+ String subspace = (String) iterator.next();
+ List mgrList = (List)clientChannelMap.get(subspace);
+ for (Iterator iterator2 = mgrList.iterator(); iterator2.hasNext();) {
+ CometChannelManager mgr = (CometChannelManager) iterator2.next();
+ mgr.shutdown();
+ }
+ }
}
+ private static Map clientChannelMap=Collections.synchronizedMap(new HashMap());
+ public static void addChannel(String subspace, CometChannelManager mgr) {
+ if (!clientChannelMap.containsKey(subspace)) {
+ clientChannelMap.put(subspace, Collections.synchronizedList(new ArrayList()));
+ Log.info("Comet listener on space:"+subspace);
+ }
+ List clienChannList = (List)clientChannelMap.get(subspace);
+ clienChannList.add(mgr);
+ }
+ public static void removeChannel(String subspace, CometChannelManager mgr) {
+ if (!clientChannelMap.containsKey(subspace)) {
+ Log.error("Tried to remove a channel for a subspace we don't have in CometServlet:"+subspace);
+ } else {
+ List clientChannList = (List)clientChannelMap.get(subspace);
+ clientChannList.remove(mgr);
+ }
+ }
+
/**
* Process the given Comet event.
*
@@ -47,119 +76,79 @@
if (event.getEventType() == CometEvent.EventType.BEGIN) {
//event.setTimeout(60000);
Log.info("Begin for session: " + request.getSession(true).getId());
- PrintWriter writer = response.getWriter();
- response.setContentType("text/plain");
- writer.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">");
- writer.println("<head><title>JSP Chat</title></head><body bgcolor=\"#FFFFFF\">");
- writer.flush();
- synchronized (connections) {
- connections.add(response);
+ String path = request.getPathInfo();
+ if (clientChannelMap.containsKey(path)) {
+ List channList = (List)clientChannelMap.get(path);
+ for (Iterator iterator = channList.iterator(); iterator.hasNext();) {
+ CometChannelManager mgr= (CometChannelManager)iterator.next();
+ prepareComet(request, response, mgr);
+ }
+ } else {
+ Log.warn("Path "+path+" request for comet but nobody interested....");
+ Log.info("Paths of interest to somebody in comet:");
+ Iterator iterator=clientChannelMap.keySet().iterator();
+ while (iterator.hasNext()) {
+ String p= (String ) iterator.next();
+ Log.info("Interested in comet path:"+p);
+ }
}
- //drainDataBuffer(event, request);
} else if (event.getEventType() == CometEvent.EventType.ERROR) {
Log.error("Error for session: " + request.getSession(true).getId()+"-->"+event.getEventSubType());
if (event.getEventSubType()==CometEvent.EventSubType.TIMEOUT) {
Log.info("Timeout ignored!");
return;
}
- synchronized (connections) {
- connections.remove(response);
- }
event.close();
} else if (event.getEventType() == CometEvent.EventType.END) {
Log.info("End for session: " + request.getSession(true).getId());
- synchronized (connections) {
- connections.remove(response);
- }
- PrintWriter writer = response.getWriter();
- writer.println("</body></html>");
event.close();
} else if (event.getEventType() == CometEvent.EventType.READ) {
+ Log.error("Comet: READ ready: "+request.getPathInfo());
drainDataBuffer(event, request);
}
}
+ private void prepareComet(HttpServletRequest request, HttpServletResponse response, CometChannelManager mgr) throws IOException {
+ String localString = AsyncProtoServerFactory.getInfo().getScheme() +"://" +
+ request.getServerName() + ":" +
+ request.getServerPort()+
+ request.getContextPath()+
+ request.getServletPath()+
+ request.getPathInfo();
+ String user;
+ if (request.getRemoteUser()==null) {
+ user="UNKNOWN";
+ } else {
+ user =request.getRemoteUser();
+ }
+ String remoteString = AsyncProtoServerFactory.getInfo().getScheme() +"://" +
+ user+"@"+
+ request.getRemoteHost() + ":" +
+ request.getRemotePort()+"/";
+ Locator local=new Locator(localString);
+ Locator remote=new Locator(remoteString);
+ CometProto proto=new CometProto(response.getWriter(),request.getInputStream(), remote, local);
+ AsyncClientReady ready=mgr.getReady();
+ mgr.setConn(proto);
+ ready.clientReady(proto);
+ }
+
private void drainDataBuffer(CometEvent event, HttpServletRequest request) throws IOException {
InputStream is = request.getInputStream();
byte[] buf = new byte[512];
do {
+ List mgrList = (List)clientChannelMap.get(request.getPathInfo());
int n = is.read(buf); //can throw an IOException
if (n > 0) {
- Log.info("Read " + n + " bytes: " + new String(buf, 0, n) + " for session: " + request.getSession(true).getId());
- String msg=new String(buf);
- String sender=msg.substring(0,msg.indexOf(':'));
- String message=msg.substring(msg.indexOf(':')+1);
- messageSender.send(sender, message);
+ Log.info("Read " + n + " bytes for session: " + request.getSession(true).getId());
+ for (Iterator iterator = mgrList.iterator(); iterator.hasNext();) {
+ CometChannelManager mgr = (CometChannelManager) iterator.next();
+ mgr.addData(buf,n);
+ }
} else if (n < 0) {
Log.error("Read error:"+event.getEventType()+"," +request.getRequestURI()+","+n);
return;
}
} while (is.available() > 0);
}
-
- public class MessageSender implements Runnable {
-
- protected boolean running = true;
-
- protected ArrayList messages = new ArrayList();
-
- public MessageSender() {
- }
-
- public void stop() {
- running = false;
- }
-
- /**
- * Add message for sending.
- */
- public void send(String user, String message) {
- Log.info("FART:adding"+message +" from "+user);
- synchronized (messages) {
- messages.add("[" + user + "]: " + message);
- messages.notify();
- }
- }
-
- public void run() {
-
- while (running) {
-
- if (messages.size() == 0) {
- try {
- synchronized (messages) {
- messages.wait();
- }
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- synchronized (connections) {
- String[] pendingMessages = null;
- synchronized (messages) {
- pendingMessages = (String[]) messages.toArray(new String[0]);
- messages.clear();
- }
- // Send any pending message on all the open connections
- Log.info("FART currently need to send on "+connections.size()+" connections with "+pendingMessages.length);
- for (int i = 0; i < connections.size(); i++) {
- try {
- PrintWriter writer = ((HttpServletResponse) connections.get(i)).getWriter();
- for (int j = 0; j < pendingMessages.length; j++) {
- writer.println(pendingMessages[j] + "<br>");
- }
- writer.flush();
- } catch (IOException e) {
- Log.error("IOExeption sending message", e);
- }
- }
- }
-
- }
-
- }
-
- }
-
}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/MeasPerfServer.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/MeasPerfServer.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/MeasPerfServer.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -5,7 +5,6 @@
import com.ogoglio.message.NoSuchDestinationException;
import com.ogoglio.message.TCPChannel;
import com.ogoglio.message.proto.AsyncProtoInfo;
-import com.ogoglio.message.server.NetworkChannelServer.Listener;
public class MeasPerfServer implements MessageHandler, NetworkChannelServer.Listener {
@@ -39,10 +38,14 @@
}
public void channelAdded(TCPChannel channel) {
- System.out.println("Added a TCP Channel:"+channel.getRemoteLocator()+" ["+ncs.getChannels().length+"]");
+ System.out.println("Added a TCP Channel:"+channel.getRemoteLocator() + " [of "+ncs.getChannels().length+"]");
}
public void channelRemoved(TCPChannel channel) {
- System.out.println("Removed a TCP Channel:"+channel.getRemoteLocator()+" ["+ncs.getChannels().length+"]");
+ System.out.println("Removed a TCP Channel:"+channel.getRemoteLocator() + " [of "+ncs.getChannels().length+"]");
}
+
+ public void channelServer(NetworkChannelServer server) {
+ ncs=server;
+ }
}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/NetworkChannelServer.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/NetworkChannelServer.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/NetworkChannelServer.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -26,7 +26,6 @@
import com.ogoglio.message.proto.Locator;
import com.ogoglio.util.BlockingQueue;
import com.ogoglio.util.Log;
-import com.ogoglio.util.NetworkUtils;
public class NetworkChannelServer implements TCPChannel.Listener, AsyncClientReady {
@@ -40,14 +39,18 @@
private Listener listener;
+ private Object serverSelector;
+
public NetworkChannelServer(MessageHandler messageHandler, Object serverSelector, boolean ensureOrigin, Listener listener) {
try {
+ Log.info("Network channel server started up with comet selector:"+serverSelector);
handle=AsyncProtoServerFactory.waitForClient(serverSelector, this);
} catch (IOException e) {
throw new IllegalStateException("Could not open a server socket: " + e);
}
this.messageHandler = messageHandler;
this.ensureOrigin = ensureOrigin;
+ this.serverSelector = serverSelector;
if (listener == null) {
throw new IllegalArgumentException("bad listener " + listener);
}
@@ -124,8 +127,15 @@
}
public void clientReady(AsyncProto clientProto) {
- TCPChannel channel = new TCPChannel(clientProto, messageHandler, ensureOrigin, NetworkChannelServer.this);
+ boolean spawnThread = AsyncProtoServerFactory.needsReaderThreadsOnServerSide();
+ TCPChannel channel = new TCPChannel(clientProto, messageHandler, ensureOrigin, NetworkChannelServer.this,
+ spawnThread);
addChannel(channel);
+ if (!spawnThread) {
+ //if the protocol needed us to spawn a thread, we would have done so inside the
+ //tcp channel creation above. if not, register the handler here
+ AsyncProtoServerFactory.registerMessageHandler(serverSelector,messageHandler);
+ }
listener.channelAdded(channel);
}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/SimpleSocketAsyncServer.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/SimpleSocketAsyncServer.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/message/server/SimpleSocketAsyncServer.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -9,7 +9,6 @@
import com.ogoglio.message.proto.Locator;
import com.ogoglio.message.proto.SimpleSocketAsync;
import com.ogoglio.util.Log;
-import com.ogoglio.util.NetworkUtils;
/*
* This is never visible to the outside world, it just makes it simpler to understand how
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/MessageProxy.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/MessageProxy.java 2007-10-22 23:58:51 UTC (rev 542)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/MessageProxy.java 2007-10-27 23:33:47 UTC (rev 543)
@@ -298,7 +298,7 @@
try {
Object selector=AsyncProtoFactory.getDefaultInfo().getSimSpecificSelector();
AsyncProto proto=AsyncProtoFactory.getDefaultClient(uri.getHost(), selector);
- simChannel = new TCPChannel(proto, simMessageHandler, false, simMessageHandler);
+ simChannel = new TCPChannel(proto, simMessageHandler, false, simMessageHandler, true);
} catch (IOException e) {
e.printStackTrace();
throw new NoSuchDestinationException("Could not open a channel to " + uri);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 23:58:47
|
Revision: 542
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=542&view=rev
Author: trevorolio
Date: 2007-10-22 16:58:51 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
In lieu of an all-in-one installer, tweaked the browser tests to send folks to the slick Java installer and directly to the Windows Java3D installer.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js 2007-10-22 23:44:09 UTC (rev 541)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js 2007-10-22 23:58:51 UTC (rev 542)
@@ -20,7 +20,12 @@
}
requirementTests[requirementTests.length] = new PlatformTest("Checking that Javascript is enabled", "", "You must enable Javascript.", testJavascript);
+var javaErrorMessage = "<br/><br/>Please check that Java support is enabled in your browser preferences.<br/>";
+javaErrorMessage += "<br/>If your computer needs Java, use the free installer from <a href='http://java.com/en/download/'>Java.com</a>.<br/>";
+var java3DErrorMessage = "<br/>If your computer needs Java3D, a free installer is available <a href='/og/java3d-1_5_1-windows-i586.exe'>here</a>.";
+
+
function testJava(testSpan){
try {
var jarURI = getServiceURI() + "/ogoglio-test-applet.jar";
@@ -44,14 +49,14 @@
if(!document.testApplet.hasJava3D()){
var j3dVersion = document.testApplet.getJava3DVersion();
if(j3dVersion == null){
- requirementTests[1].failureMessage = "Unfortunately, you do not have Java3D installed.<br/>" + javaErrorMessage;
+ requirementTests[1].failureMessage = "Unfortunately, you do not have Java3D installed.<br/>" + javaErrorMessage + java3DErrorMessage;
} else {
- requirementTests[1].failureMessage = "Unfortunately, this version of Java3D is not supported: " + j3dVersion + javaErrorMessage + "<br/>";
+ requirementTests[1].failureMessage = "Unfortunately, this version of Java3D is not supported: " + j3dVersion + javaErrorMessage + java3DErrorMessage + "<br/>";
}
return false;
}
if(!document.testApplet.canStartJava3D()){
- requirementTests[1].failureMessage = "Unfortunately, you have Java3D but it can not initialize." + javaErrorMessage + "<br/>";
+ requirementTests[1].failureMessage = "Unfortunately, you have Java3D but it can not initialize." + javaErrorMessage + java3DErrorMessage + "<br/>";
}
return true;
} catch (error){
@@ -60,9 +65,6 @@
}
return false;
}
-var javaErrorMessage = "<br/><br/>Please check that Java support is enabled in your browser preferences.<br/>";
-javaErrorMessage += "<br/>If your computer needs Java, use the free installer from <a href='http://java.com/en/download/'>Java.com</a>.<br/>";
-javaErrorMessage += "<br/>If your computer needs Java3D, a free installer is available <a href='java3d-1_5_1-windows-i586.exe'>here</a>.";
requirementTests[requirementTests.length] = new PlatformTest("Checking for Java support", "Java displays the 3D views.", javaErrorMessage, testJava);
var currentTestIndex = -1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 23:44:06
|
Revision: 541
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=541&view=rev
Author: trevorolio
Date: 2007-10-22 16:44:09 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
In lieu of an all-in-one installer, tweaked the browser tests to send folks to the slick Java installer and directly to the Windows Java3D installer.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
Added Paths:
-----------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/java3d-1_5_1-windows-i586.exe
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js 2007-10-22 23:43:01 UTC (rev 540)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js 2007-10-22 23:44:09 UTC (rev 541)
@@ -60,9 +60,9 @@
}
return false;
}
-var javaErrorMessage = "<br/><br/>Please check that Java support is enabled in your browser preferences.";
-javaErrorMessage += "<br/>If your computer needs Java, use the online installer from <a href='http://java.com/en/download/manual.jsp'>Java.com</a>.<br/>";
-javaErrorMessage += "<br/>If your computer needs Java3D, a quick installer is available <a href='http://java.sun.com/products/java-media/3D/download.html'>here</a>.";
+var javaErrorMessage = "<br/><br/>Please check that Java support is enabled in your browser preferences.<br/>";
+javaErrorMessage += "<br/>If your computer needs Java, use the free installer from <a href='http://java.com/en/download/'>Java.com</a>.<br/>";
+javaErrorMessage += "<br/>If your computer needs Java3D, a free installer is available <a href='java3d-1_5_1-windows-i586.exe'>here</a>.";
requirementTests[requirementTests.length] = new PlatformTest("Checking for Java support", "Java displays the 3D views.", javaErrorMessage, testJava);
var currentTestIndex = -1;
Added: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/java3d-1_5_1-windows-i586.exe
===================================================================
(Binary files differ)
Property changes on: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/java3d-1_5_1-windows-i586.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-10-22 23:43:01 UTC (rev 540)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-10-22 23:44:09 UTC (rev 541)
@@ -84,7 +84,7 @@
var serviceURI = getServiceURI();
- var html = "<applet id='viewer' archive='ogoglio-common.jar,ogoglio-viewer-applet.jar' codebase='" + serviceURI + "' code='com.ogoglio.viewer.applet.ViewerApplet' archive='/ogoglio-viewer-applet-0.0.1.jar' width='" + viewerWidth + "' height='" + viewerHeight + "' mayscript='true'>";
+ var html = "<applet id='viewer' archive='ogoglio-common.jar,ogoglio-viewer-applet.jar' codebase='" + serviceURI + "' code='com.ogoglio.viewer.applet.ViewerApplet' width='" + viewerWidth + "' height='" + viewerHeight + "' mayscript='true'>";
html += "<param name='loginCookie' value='" + loginCookie + "' />";
html += "<param name='serviceURI' value='" + serviceURI + "' />";
html += "<param name='spaceID' value='" + locationParameters['spaceID'] + "' />";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 23:42:59
|
Revision: 539
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=539&view=rev
Author: trevorolio
Date: 2007-10-22 16:42:59 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
In lieu of an all-in-one installer, tweaked the browser tests to send folks to the slick Java installer and directly to the Windows Java3D installer.
Modified Paths:
--------------
maven/trunk/ogoglio-test-applet/src/main/java/com/ogoglio/testapplet/TestApplet.java
Modified: maven/trunk/ogoglio-test-applet/src/main/java/com/ogoglio/testapplet/TestApplet.java
===================================================================
--- maven/trunk/ogoglio-test-applet/src/main/java/com/ogoglio/testapplet/TestApplet.java 2007-10-22 20:34:44 UTC (rev 538)
+++ maven/trunk/ogoglio-test-applet/src/main/java/com/ogoglio/testapplet/TestApplet.java 2007-10-22 23:42:59 UTC (rev 539)
@@ -35,7 +35,7 @@
}
try {
float version = Float.parseFloat(versionProp);
- return version >= 1.4;
+ return version >= 1.5;
} catch (NumberFormatException e) {
System.err.println("UNPARSED VERSION: " + versionProp);
return false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 23:42:59
|
Revision: 540
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=540&view=rev
Author: trevorolio
Date: 2007-10-22 16:43:01 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
In lieu of an all-in-one installer, tweaked the browser tests to send folks to the slick Java installer and directly to the Windows Java3D installer.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-10-22 23:42:59 UTC (rev 539)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-10-22 23:43:01 UTC (rev 540)
@@ -493,7 +493,6 @@
if (accountDoc.getUsername().equals(event.getStringProperty(SpaceEvent.USERNAME))) {
return;
}
- System.out.println(event);
User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
if (user == null) {
Log.error("Got a sit event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 20:34:39
|
Revision: 538
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=538&view=rev
Author: trevorolio
Date: 2007-10-22 13:34:44 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
Now guests can enter a display name, so we can finally get "Guest Gandalfs" at every event.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AuthServlet.java
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AuthServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AuthServlet.java 2007-10-22 20:34:39 UTC (rev 537)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AuthServlet.java 2007-10-22 20:34:44 UTC (rev 538)
@@ -227,7 +227,8 @@
}
public void doPost(HttpServletRequest request, HttpServletResponse response, String[] pathElements) throws ServletException, IOException {
- String cookie = generateGuestCookie();
+ String requestedGuestNameParameter = request.getParameter(WebConstants.REQUESTED_GUEST_NAME_PARAMETER);
+ String cookie = generateGuestCookie(requestedGuestNameParameter);
Cookie newCookie = new Cookie(WebConstants.AUTH_COOKIE, cookie);
newCookie.setPath("/");
newCookie.setMaxAge(-1);
@@ -243,17 +244,46 @@
public static final String COOKIE_CHARS = "abcdefghijklmnopqrstuvwxyz1234567890";
- public static final String[] GUEST_NAMES = { "Moon", "Spoon", "Plume", "Bloom", "Thyme", "Rhyme", "Steel", "Boat", "Vase", "Book", "Screen", "Fenestra", "Farmer", "Door", "Squid", "Rocket", "Picker", "Page", "Lawn", "Food", "Plate", "Bean", "Horse", "Cat", "Fireplace", "Frame", "Chair", "Table", "Sofa", "Stair", "Counter", "Shelf", "Phone", "Robot", "Tree", "Key" };
+ public static final String[] GUEST_NAMES = { "Moon", "Spoon", "Plume", "Bloom", "Thyme", "Rhyme", "Steel", "Boat", "Vase", "Book", "Screen", "Fenestra", "Farmer", "Door", "Squid", "Rocket", "Picker", "Page", "Lawn", "Food", "Plate", "Bean", "Horse", "Cat", "Fireplace", "Frame", "Chair", "Table", "Sofa", "Stair", "Counter", "Shelf", "Phone", "Robot", "Tree", "Key", "Pony"};
- private String generateGuestCookie() {
+ private String generateGuestCookie(String requestedGuestName) {
StringBuffer result = new StringBuffer();
result.append(WebConstants.GUEST_COOKIE_PREFIX);
for (int i = 0; i < 3; i++) {
result.append("_" + GUEST_NAMES[Math.abs(random.nextInt()) % GUEST_NAMES.length]);
}
+ String cleanedGuestName = cleanGuestName(requestedGuestName);
+ if(cleanedGuestName != null){
+ result.append("_" + cleanedGuestName);
+ }
return result.toString();
}
+ private String cleanGuestName(String requestedGuestName) {
+ if(requestedGuestName == null){
+ return null;
+ }
+ requestedGuestName = requestedGuestName.trim();
+ StringBuffer result = new StringBuffer();
+
+ int numNonWhitespace = 0;
+ for (int i = 0; i < requestedGuestName.length(); i++) {
+ if(Character.isDigit(requestedGuestName.charAt(i))){
+ numNonWhitespace++;
+ result.append(requestedGuestName.charAt(i));
+ } else if(Character.isLetter(requestedGuestName.charAt(i))){
+ result.append(requestedGuestName.charAt(i));
+ numNonWhitespace++;
+ } else if(Character.isWhitespace(requestedGuestName.charAt(i))){
+ result.append("_");
+ }
+ }
+ if(numNonWhitespace == 0){
+ return null;
+ }
+ return result.toString();
+ }
+
private String generateAuthCookie(boolean guest) {
StringBuffer result = new StringBuffer(14);
if (guest) {
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js 2007-10-22 20:34:39 UTC (rev 537)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js 2007-10-22 20:34:44 UTC (rev 538)
@@ -1,5 +1,7 @@
var appPath = "/og"; //do not put a slash on the end
var loginCookieName = "loginCookie";
+var guestCookiePrefix = "guest_";
+var guestDisplayNamePrefix = "Guest ";
function getServiceURI(){
var locLink = document.location;
@@ -454,12 +456,33 @@
new XMLRequestManager(appPath + "/auth/me", new BasicHTTPListener(listener)).send();
}
-function requestGuestCookie(listener){
- var manager = new XMLRequestManager(appPath + "/auth/guest", new BasicHTTPListener(listener));
+function requestGuestCookie(suggestedGuestName, listener){
+ var guestNameParameter = ""
+ if(suggestedGuestName != null && suggestedGuestName.length > 0){
+ guestNameParameter = "?requestedGuestName=" + escape(suggestedGuestName);
+ }
+ var manager = new XMLRequestManager(appPath + "/auth/guest" + guestNameParameter, new BasicHTTPListener(listener));
manager.setMethod("POST");
manager.send();
}
+// there are always at least three random tokens separated by _ after "guest_"
+// a guest cookie which looks like guest_Moon_Unit_Zappa will return like so "Guest Moon Unit Zappa"
+// if there are more than three (as when a user suggests a guest name) the tokens > 3 will be used
+// a guest cookie which looks like guest_Moon_Unit_Zappa_Kurt_Vonnegut will return like so "Guest Kurt Vonnegut"
+function convertGuestCookieToDisplayName(guestCookie){
+ if(guestCookie == null || guestCookie.indexOf(guestCookiePrefix) != 0){
+ return null;
+ }
+ var username = guestDisplayNamePrefix;
+ var tokens = guestCookie.substring(6).split("_");
+ var startIndex = tokens.length > 3 ? 3 : 0;
+ for(var i=startIndex; i < tokens.length; i++){
+ username += " " + tokens[i];
+ }
+ return username;
+}
+
// BEGIN ACCOUNT UTILS
function createAccount(username, email, password, listener){
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-10-22 20:34:39 UTC (rev 537)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-10-22 20:34:44 UTC (rev 538)
@@ -21,13 +21,22 @@
var allowsGuests = parseInt(xml.getAttribute("maxguests")) > 0;
if(authedUsername == null){
if(allowsGuests && typeof autoGuest != "undefined" && autoGuest){
- if(getLoginCookie() != null && getLoginCookie().indexOf("guest_") == 0){
+ if(getLoginCookie() != null && getLoginCookie().indexOf(guestCookiePrefix) == 0){
enterTheSpace();
return;
}
- enterAsGuest();
+ enterAsGuest(null);
} else if(allowsGuests){
- spaceDiv.innerHTML = "<div style='width: 100%; text-align: center; margin-top: 20px; font-weight: bold; color: #000;'>Would you like to <a href='signin.html'>sign in</a> or <a href='space.html' onclick='enterAsGuest(); return false;'>enter as a guest</a>?";
+ var guestMessage = "<div style='width: 100%; text-align: center; margin-top: 20px; font-weight: bold; color: #000;'>";
+ guestMessage += "<a href='signin.html'>Click here to login</a>";
+ guestMessage += "<h1>or</h1>";
+ guestMessage += "Enter a name: ";
+ guestMessage += "<form action='index.html' onsubmit='enterAsGuest(this.guestNameInput.value); return false;'>";
+ guestMessage += "<input type='text' name='guestNameInput' id='guestNameInput' size='12' />";
+ guestMessage += "<input type='submit' value='enter as a guest' />";
+ guestMessage += "</form>";
+ guestMessage += "</div>";
+ spaceDiv.innerHTML = guestMessage;
} else {
spaceDiv.innerHTML = "You must <a href='signin.html'>sign in</a> to enter this space." ;
}
@@ -36,8 +45,8 @@
}
}
-function enterAsGuest(){
- requestGuestCookie(guestCookieHandler);
+function enterAsGuest(guestNameInput){
+ requestGuestCookie(guestNameInput, guestCookieHandler);
}
function guestCookieHandler(guestCookie){
@@ -127,12 +136,10 @@
var text = null;
if(message.indexOf(":") != -1){
username = message.substring(0, message.indexOf(":"));
- if(username.indexOf("guest_") == 0){
- username = "Guest " + username.substring(6);
- while(username.indexOf('_') != -1){
- username = username.substring(0, username.indexOf('_')) + " " + username.substring(username.indexOf('_') + 1);
- }
+ if(username.indexOf(guestCookiePrefix) == 0){
+ username = convertGuestCookieToDisplayName(username);
}
+
text = message.substring(message.indexOf(":") + 1);
} else {
username = "system";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 20:34:35
|
Revision: 537
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=537&view=rev
Author: trevorolio
Date: 2007-10-22 13:34:39 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
Now guests can enter a display name, so we can finally get "Guest Gandalfs" at every event.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/WebConstants.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/WebConstants.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/WebConstants.java 2007-10-22 12:01:32 UTC (rev 536)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/WebConstants.java 2007-10-22 20:34:39 UTC (rev 537)
@@ -11,4 +11,8 @@
public static final String SPACE_INCLUDE_CHILDREN_PARAM = "children";
public static final String GUEST_COOKIE_PREFIX = "guest";
+
+ public static final String REQUESTED_GUEST_NAME_PARAMETER = "requestedGuestName";
+
+ public static final String GUEST_DISPLAY_NAME_PREFIX = "Guest";
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-10-22 12:01:32 UTC (rev 536)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-10-22 20:34:39 UTC (rev 537)
@@ -53,6 +53,7 @@
import com.ogoglio.util.BodyConstants;
import com.ogoglio.util.Log;
import com.ogoglio.util.UIConstants;
+import com.ogoglio.util.WebConstants;
import com.ogoglio.viewer.render.Camera;
import com.ogoglio.viewer.render.ClickTarget;
import com.ogoglio.viewer.render.DoorRenderable;
@@ -677,7 +678,10 @@
throw new IllegalStateException("Cannot load body data");
}
- BufferedImage customSkin = dataManager.getBodyTexture(user.getUsername(), bodyConfig.getBodyConfigurationID());
+ BufferedImage customSkin = null;
+ if(!offScreen && !user.getUsername().startsWith(WebConstants.GUEST_COOKIE_PREFIX)){
+ customSkin = dataManager.getBodyTexture(user.getUsername(), bodyConfig.getBodyConfigurationID());
+ }
boolean isLocalUser = !offScreen && username != null && user.getUsername().equals(username);
final J3DUserRenderable renderable = new J3DUserRenderable(user, bodyData, customSkin);
@@ -694,10 +698,11 @@
getCanvas().addMouseListener(motionHandler);
getCanvas().addMouseMotionListener(motionHandler);
} else if (!offScreen) {
- String displayName = user.getUsername().replaceAll("_", " ");
- if (displayName.startsWith("guest")) {
- displayName = displayName.substring(0, 1).toUpperCase() + displayName.substring(1);
+ String displayName = user.getUsername();
+ if (displayName.startsWith(WebConstants.GUEST_COOKIE_PREFIX)) {
+ displayName = J3DUserRenderable.convertGuestCookieToDisplayName(displayName);
}
+ System.out.println("Setting name tag: " + displayName);
renderable.setNameTag(displayName);
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java 2007-10-22 12:01:32 UTC (rev 536)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java 2007-10-22 20:34:39 UTC (rev 537)
@@ -16,6 +16,7 @@
import java.awt.Font;
import java.awt.image.BufferedImage;
+import java.util.regex.Pattern;
import javax.media.j3d.Billboard;
import javax.media.j3d.BoundingSphere;
@@ -29,6 +30,7 @@
import com.ogoglio.client.model.User;
import com.ogoglio.util.ArgumentUtils;
import com.ogoglio.util.BodyConstants;
+import com.ogoglio.util.WebConstants;
import com.ogoglio.viewer.j3d.body.BodyAnimator;
import com.ogoglio.viewer.j3d.body.Skeleton;
import com.ogoglio.viewer.j3d.body.SkeletonLoader;
@@ -285,4 +287,21 @@
animator = new BodyAnimator(skeleton, animation, skin, bodyAnimatorListener);
animator.animate(loop);
}
+
+ public static String convertGuestCookieToDisplayName(String displayName) {
+ if(displayName == null || !displayName.startsWith(WebConstants.GUEST_COOKIE_PREFIX)){
+ return displayName;
+ }
+ displayName = displayName.substring(WebConstants.GUEST_COOKIE_PREFIX.length() + 1);
+ StringBuffer result = new StringBuffer(WebConstants.GUEST_DISPLAY_NAME_PREFIX);
+ String[] tokens = displayName.split(Pattern.quote("_"));
+ for (int i = 0; i < tokens.length; i++) {
+ System.out.println("TOKEN " + tokens[i]);
+ }
+ int startIndex = tokens.length > 3 ? 3 : 0;
+ for (int i = startIndex; i < tokens.length; i++) {
+ result.append(" " + tokens[i]);
+ }
+ return result.toString();
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 12:01:28
|
Revision: 536
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=536&view=rev
Author: trevorolio
Date: 2007-10-22 05:01:32 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
More help information.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-10-22 11:43:50 UTC (rev 535)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-10-22 12:01:32 UTC (rev 536)
@@ -139,7 +139,7 @@
text = message;
}
- chatHistory.innerHTML += "<strong>" + username + "</strong>: " + markupChatMessage(text) + "<br />";
+ chatHistory.innerHTML += "<span class='chatUsername'>" + username + "</span>: " + markupChatMessage(text) + "<br />";
chatHistory.scrollTop = chatHistory.scrollHeight;
focusCommandField();
}
@@ -201,9 +201,10 @@
}
function getHelpMessage(){
- var helpMessage = "Help: Drag the mouse up/down and left/right to move your camera.<br/>";
- helpMessage += "Press the \"escape\" key resets your camera.<br/>"
- helpMessage += "PageUp/PageDown tilts the camera.";
+ var helpMessage = "Help: Click the 3D scene and use your arrow keys to explore.<br/>"
+ helpMessage += "Drag the mouse up/down and left/right to move your camera.<br/>";
+ helpMessage += "Press the escape key to reset your camera.<br/>"
+ helpMessage += "PageUp/PageDown tilts your camera.";
return helpMessage;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 11:43:45
|
Revision: 535
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=535&view=rev
Author: trevorolio
Date: 2007-10-22 04:43:50 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
Added a /help command which lists camera controls.
Fixed a sitting bug when switching straight from one seat to another.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-10-22 11:43:45 UTC (rev 534)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2007-10-22 11:43:50 UTC (rev 535)
@@ -192,10 +192,21 @@
if(commandValue == null || trim(commandValue).length == 0){
return;
}
+ form.commandInput.value = "";
+ if(commandValue == "/help"){
+ displayChatMessage(getHelpMessage());
+ return;
+ }
document.viewer.sendChatMessage(commandValue);
- form.commandInput.value = "";
}
+function getHelpMessage(){
+ var helpMessage = "Help: Drag the mouse up/down and left/right to move your camera.<br/>";
+ helpMessage += "Press the \"escape\" key resets your camera.<br/>"
+ helpMessage += "PageUp/PageDown tilts the camera.";
+ return helpMessage;
+}
+
function initSpaceUI(){
spaceDiv = document.getElementById('spaceDiv');
chatHistory = document.getElementById('chatHistory');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 11:43:40
|
Revision: 534
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=534&view=rev
Author: trevorolio
Date: 2007-10-22 04:43:45 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
Added a /help command which lists camera controls.
Fixed a sitting bug when switching straight from one seat to another.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/User.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-10-22 10:58:49 UTC (rev 533)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-10-22 11:43:45 UTC (rev 534)
@@ -493,7 +493,7 @@
if (accountDoc.getUsername().equals(event.getStringProperty(SpaceEvent.USERNAME))) {
return;
}
-
+ System.out.println(event);
User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
if (user == null) {
Log.error("Got a sit event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/User.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/User.java 2007-10-22 10:58:49 UTC (rev 533)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/User.java 2007-10-22 11:43:45 UTC (rev 534)
@@ -107,11 +107,12 @@
return;
}
- Thing oldSeat = this.seatThing;
+ if(this.seatThing != null){
+ space.notifyUserStood(this, this.seatThing);
+ }
+
this.seatThing = seatThing;
- if (seatThing == null) {
- space.notifyUserStood(this, oldSeat);
- } else {
+ if (seatThing != null) {
space.notifyUserSat(this, seatThing);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 10:58:49
|
Revision: 533
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=533&view=rev
Author: trevorolio
Date: 2007-10-22 03:58:49 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
Reset the camera reset flag after use.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java 2007-10-22 10:53:31 UTC (rev 532)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java 2007-10-22 10:58:49 UTC (rev 533)
@@ -86,6 +86,7 @@
if (cameraDirty) {
cameraDirty = false;
if (cameraReset) {
+ cameraReset = false;
renderer.getCamera().setToDefaultLocation();
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-22 10:53:28
|
Revision: 532
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=532&view=rev
Author: trevorolio
Date: 2007-10-22 03:53:31 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
Added the camera controls from the body editor to the viewer.
Left/right mouse drags rotate the camera.
Up/down mouse drags zoom to and from your camera's default location.
Pressing the "escape" key resets your camera to the location.
Page Up/Down tilts the camera up and down from default position.
This commit is for all the people who just can't get enough of looking at themselves and in support of sitting without locking your viewpoint straight ahead.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DCamera.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/render/Camera.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DCamera.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DCamera.java 2007-10-21 23:55:25 UTC (rev 531)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DCamera.java 2007-10-22 10:53:31 UTC (rev 532)
@@ -37,6 +37,8 @@
private TransformGroup rootTransformGroup = new TransformGroup();
+ private Transform3D defaultLocation = new Transform3D();
+
private Transform3D location = new Transform3D();
private ViewPlatform platform = new ViewPlatform();
@@ -113,4 +115,13 @@
public Node getNode() {
return rootTransformGroup;
}
+
+ public void setDefaultLocation(Vector3f location) {
+ defaultLocation.setIdentity();
+ defaultLocation.setTranslation(location);
+ }
+
+ public void setToDefaultLocation(){
+ rootTransformGroup.setTransform(defaultLocation);
+ }
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-10-21 23:55:25 UTC (rev 531)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-10-22 10:53:31 UTC (rev 532)
@@ -685,7 +685,9 @@
if (isLocalUser) {
float cameraHeight = (float) (renderable.getHeight() - renderable.getHeight() / 5);
- camera.setLocation(new Vector3f(0f, cameraHeight, 0f));
+ Vector3f defaultCameraLocation = new Vector3f(0f, cameraHeight, 0f);
+ camera.setDefaultLocation(defaultCameraLocation);
+ camera.setLocation(defaultCameraLocation);
renderable.setCamera(camera);
motionHandler = new MotionInputHandler(this, renderable, userInputListener);
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java 2007-10-21 23:55:25 UTC (rev 531)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java 2007-10-22 10:53:31 UTC (rev 532)
@@ -182,6 +182,13 @@
}
this.camera = (J3DCamera) camera;
transformGroup.addChild(this.camera.getNode());
+
+ TransformGroup cameraTransformGroup = ((J3DCamera)camera).getTransformGroup();
+ J3DCameraMotionBehavior zoomBehavior = new J3DCameraMotionBehavior(cameraTransformGroup, 1.1);
+ zoomBehavior.setTransformGroup(cameraTransformGroup);
+ cameraTransformGroup.addChild(zoomBehavior);
+ zoomBehavior.setSchedulingBounds(new BoundingSphere());
+
}
public Skin getSkin() {
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java 2007-10-21 23:55:25 UTC (rev 531)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java 2007-10-22 10:53:31 UTC (rev 532)
@@ -67,6 +67,8 @@
private UserRenderable userRenderable = null;
+ private boolean cameraReset = false;
+
public MotionInputHandler(Renderer renderer, UserRenderable userGroup, UserInputListener inputListener) {
ArgumentUtils.assertNotNull(renderer);
this.renderer = renderer;
@@ -83,6 +85,10 @@
if (cameraDirty) {
cameraDirty = false;
+ if (cameraReset) {
+ renderer.getCamera().setToDefaultLocation();
+ return;
+ }
renderer.getCamera().setRotation(cameraTilt, 0, 0);
}
@@ -91,18 +97,18 @@
}
dirty = false;
- if(userRenderable.getUser().getSeat() != null){
+ if (userRenderable.getUser().getSeat() != null) {
Transform3D standingPosition = new Transform3D();
standingPosition.set(userRenderable.getUser().getSeat().getPosition());
Quat4d seatRotation = userRenderable.getUser().getSeat().getTemplate().getSeatRotation();
Transform3D rotateTransform = new Transform3D();
rotateTransform.set(seatRotation);
standingPosition.mul(rotateTransform);
-
+
userInputListener.viewpointMotionStopped(standingPosition);
return;
}
-
+
Transform3D position = new Transform3D();
userRenderable.getPosition(position);
@@ -111,7 +117,7 @@
float forwardSpeed = (moveForward ? 1 : 0) + (moveBackward ? -1 : 0);
float strafeSpeed = (strafeLeft ? 1 : 0) + (strafeRight ? -1 : 0);
if (turn != 0 || forwardSpeed != 0 || strafeSpeed != 0) {
- path = J3DSplinePath.getSplinePath(position, forwardSpeed, turn, strafeSpeed, (float)userRenderable.getHeight());
+ path = J3DSplinePath.getSplinePath(position, forwardSpeed, turn, strafeSpeed, (float) userRenderable.getHeight());
userInputListener.viewpointMotionChanged(path);
return;
} else {
@@ -160,6 +166,9 @@
} else if (e.getKeyCode() == KeyEvent.VK_PAGE_DOWN) {
cameraDirty = true;
cameraTilt -= 0.1;
+ } else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ cameraDirty = true;
+ cameraReset = true;
}
reevaluate();
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/render/Camera.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/render/Camera.java 2007-10-21 23:55:25 UTC (rev 531)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/render/Camera.java 2007-10-22 10:53:31 UTC (rev 532)
@@ -15,4 +15,6 @@
public interface Camera {
public void setRotation(double xRot, double yRot, double zRot);
+
+ public void setToDefaultLocation();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-21 23:55:22
|
Revision: 531
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=531&view=rev
Author: trevorolio
Date: 2007-10-21 16:55:25 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
Tweaked name tag height.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java 2007-10-21 21:31:38 UTC (rev 530)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DUserRenderable.java 2007-10-21 23:55:25 UTC (rev 531)
@@ -159,7 +159,7 @@
nameGroup.addChild(billboard);
Transform3D nameTransform = new Transform3D();
- nameTransform.setTranslation(new Vector3d(0, 2, 0));
+ nameTransform.setTranslation(new Vector3d(0, 1, 0));
nameGroup.setTransform(nameTransform);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-21 21:31:34
|
Revision: 530
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=530&view=rev
Author: trevorolio
Date: 2007-10-21 14:31:38 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
Remove custom textures for a user when they exit a space.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.html
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.html
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.html 2007-10-21 21:31:36 UTC (rev 529)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.html 2007-10-21 21:31:38 UTC (rev 530)
@@ -181,6 +181,35 @@
return true;
}
+function startedTextureForm() {
+ return true;
+}
+
+function completedTextureForm(response) {
+ repaintTexture();
+}
+
+function handleTextureForm(){
+ AIM.submit(textureForm, {'onStart' : startedTextureForm, 'onComplete' : completedTextureForm})
+ return true;
+}
+
+function textureDeleteGo(){
+ if(bodyXML == null){
+ return;
+ }
+ deleteBodyTexture(authedUsername, bodyXML.getAttribute("bodyconfigurationid"), handleTextureDelete);
+}
+
+function handleTextureDelete(){
+ repaintTexture();
+}
+
+function repaintTexture(){
+ var ogViewer = document.getElementById("viewer");
+ ogViewer.updateTextures();
+}
+
function playAnimation(animationName){
var editor = document.getElementById("viewer");
editor.playAnimation(animationName);
@@ -215,35 +244,6 @@
appletDiv.innerHTML = html;
}
-function startedTextureForm() {
- return true;
-}
-
-function completedTextureForm(response) {
- repaintTexture();
-}
-
-function handleTextureForm(){
- AIM.submit(textureForm, {'onStart' : startedTextureForm, 'onComplete' : completedTextureForm})
- return true;
-}
-
-function textureDeleteGo(){
- if(bodyXML == null){
- return;
- }
- deleteBodyTexture(authedUsername, bodyXML.getAttribute("bodyconfigurationid"), handleTextureDelete);
-}
-
-function handleTextureDelete(){
- repaintTexture();
-}
-
-function repaintTexture(){
- var ogViewer = document.getElementById("viewer");
- ogViewer.updateTextures();
-}
-
function doSave(){
var editor = document.getElementById("viewer");
if(editor == null){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-21 21:31:34
|
Revision: 529
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=529&view=rev
Author: trevorolio
Date: 2007-10-21 14:31:36 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
Remove custom textures for a user when they exit a space.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-10-21 16:11:46 UTC (rev 528)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-10-21 21:31:36 UTC (rev 529)
@@ -495,6 +495,7 @@
public void userRemoved(User user) {
UserRenderable renderable = getUserRenderable(user.getUsername());
removeUserRenderable(renderable);
+ dataManager.removeBodyTexture(user.getUsername(), user.getBodyConfiguration().getBodyConfigurationID());
}
public void doorMotionStarted(Door door, SplinePath path) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-21 16:11:41
|
Revision: 528
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=528&view=rev
Author: trevorolio
Date: 2007-10-21 09:11:46 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
INCLUDES A NEW DB SCHEMA. Dump your old db and make clean.
For those who don't want to break out photoshop to get a new look, added the capability to select from a set of textures included in the body data jar.
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-10-21 16:11:42 UTC (rev 527)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-10-21 16:11:46 UTC (rev 528)
@@ -261,6 +261,14 @@
configDoc = basicWebClient.updateBodyConfiguration(configDoc);
assertEquals(0, configDoc.getBodySettingDocuments().length);
+ assertNull(configDoc.getBaseTextureName());
+ configDoc.setBaseTextureName("La Texture Base.jpg");
+ configDoc = basicWebClient.updateBodyConfiguration(configDoc);
+ assertEquals("La Texture Base.jpg", configDoc.getBaseTextureName());
+ configDoc.setBaseTextureName(null);
+ configDoc = basicWebClient.updateBodyConfiguration(configDoc);
+ assertNull(configDoc.getBaseTextureName());
+
InputStream textureData = UIConstants.getResource(mikeBodyTextureResourcePath);
assertNotNull(textureData);
basicWebClient.setBodyTexture(basicAuthenticator.getUsername(), configDoc.getBodyConfigurationID(), textureData, "image/jpeg");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-21 16:11:39
|
Revision: 527
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=527&view=rev
Author: trevorolio
Date: 2007-10-21 09:11:42 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
INCLUDES A NEW DB SCHEMA. Dump your old db and make clean.
For those who don't want to break out photoshop to get a new look, added the capability to select from a set of textures included in the body data jar.
Modified Paths:
--------------
maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java
Modified: maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java
===================================================================
--- maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java 2007-10-21 16:11:36 UTC (rev 526)
+++ maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java 2007-10-21 16:11:42 UTC (rev 527)
@@ -22,6 +22,7 @@
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Panel;
+import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
@@ -65,7 +66,6 @@
import com.ogoglio.xml.AccountDocument;
import com.ogoglio.xml.BodyConfigurationDocument;
import com.ogoglio.xml.BodyDataDocument;
-import com.sun.j3d.utils.behaviors.mouse.MouseRotate;
public class BodyEditorApplet extends Applet {
@@ -98,7 +98,25 @@
return;
}
dataManager.removeBodyTexture(user.getUsername(), user.getBodyConfiguration().getBodyConfigurationID());
- bodyPanel.renderable.setSkinTexture(dataManager.getBodyTexture(user.getUsername(), user.getBodyConfiguration().getBodyConfigurationID()));
+ BufferedImage bodyTexture = dataManager.getBodyTexture(user.getUsername(), user.getBodyConfiguration().getBodyConfigurationID());
+ if (bodyTexture != null) {
+ bodyPanel.renderable.setSkinTexture(bodyTexture);
+ bodyPanel.renderable.repaintSkinTexture();
+ return;
+ }
+ if (user.getBodyConfiguration().getBaseTextureName() == null) {
+ bodyPanel.renderable.setSkinTexture(bodyPanel.bodyData.getDefaultBaseTexture().getImage());
+ bodyPanel.renderable.repaintSkinTexture();
+ return;
+ }
+ J3DBodyData.BaseTexture baseTexture = bodyPanel.bodyData.getBaseTexture(user.getBodyConfiguration().getBaseTextureName());
+ if (baseTexture != null) {
+ bodyPanel.renderable.setSkinTexture(baseTexture.getImage());
+ bodyPanel.renderable.repaintSkinTexture();
+ return;
+ }
+
+ bodyPanel.renderable.setSkinTexture(bodyPanel.bodyData.getDefaultBaseTexture().getImage());
bodyPanel.renderable.repaintSkinTexture();
}
@@ -155,7 +173,28 @@
return new BodyConfigurationDocument(user.getBodyConfiguration()).toElement().toString();
}
- public void saveBodyConfiguration(){
+ public String[] getBaseTextureNames() {
+ if (user == null || bodyPanel == null || bodyPanel.bodyData == null) {
+ return null;
+ }
+ J3DBodyData.BaseTexture[] baseTextures = bodyPanel.bodyData.getBaseTextures();
+ String[] results = new String[baseTextures.length];
+ for (int i = 0; i < results.length; i++) {
+ results[i] = baseTextures[i].getName();
+ }
+ return results;
+ }
+
+ public void setBaseTexture(String baseTextureName) {
+ if (user == null || bodyPanel == null || bodyPanel.bodyData == null) {
+ return;
+ }
+ user.getBodyConfiguration().setBaseTextureName(baseTextureName);
+ saveBodyConfiguration();
+ updateTextures();
+ }
+
+ public void saveBodyConfiguration() {
if (user == null || bodyPanel == null || bodyPanel.renderable == null) {
return;
}
@@ -165,7 +204,7 @@
e.printStackTrace();
}
}
-
+
private class SpacelessUser extends User {
public SpacelessUser(String username, BodyConfigurationDocument bodyConfigDoc) {
super(new Space(new SpacelessContext(), 1, "Space", "nobody", false, 0), username, new Transform3D(), new BodyConfiguration(bodyConfigDoc), null);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-21 16:11:39
|
Revision: 526
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=526&view=rev
Author: trevorolio
Date: 2007-10-21 09:11:36 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
INCLUDES A NEW DB SCHEMA. Dump your old db and make clean.
For those who don't want to break out photoshop to get a new look, added the capability to select from a set of textures included in the body data jar.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyConfigurationRecord.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyPersistTasks.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/xml/server/DocumentFactory.java
maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.html
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js
maven/trunk/ogoglio-server/src/test/java/com/ogoglio/sim/script/test/ScriptTest.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java 2007-10-21 16:11:36 UTC (rev 526)
@@ -143,7 +143,7 @@
if(bodyDataRecords.length == 0){
throw new IllegalStateException("No body data records!");
}
- BodyConfigurationRecord bodyConfRecord = new BodyConfigurationRecord(username, "Body", bodyDataRecords[0].getBodyDataID());
+ BodyConfigurationRecord bodyConfRecord = new BodyConfigurationRecord(username, "Body", bodyDataRecords[0].getBodyDataID(), null);
hibernateSession.save(bodyConfRecord);
record = new AccountRecord(username, accountlevel, email, bodyConfRecord.getBodyConfigurationID());
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyConfigurationRecord.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyConfigurationRecord.java 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyConfigurationRecord.java 2007-10-21 16:11:36 UTC (rev 526)
@@ -12,16 +12,19 @@
private long bodyDataID = -1;
+ private String baseTextureName = null;
+
public BodyConfigurationRecord(){
}
- public BodyConfigurationRecord(String ownerUsername, String displayName, long bodyDataID){
+ public BodyConfigurationRecord(String ownerUsername, String displayName, long bodyDataID, String baseTextureName){
ArgumentUtils.assertNotEmpty(ownerUsername);
this.ownerUsername = ownerUsername;
ArgumentUtils.assertNotEmpty(displayName);
this.displayName = displayName;
ArgumentUtils.assertNotNegative(bodyDataID);
this.bodyDataID = bodyDataID;
+ this.baseTextureName = baseTextureName;
}
public long getBodyConfigurationID() {
@@ -40,6 +43,14 @@
this.ownerUsername = ownerUsername;
}
+ public String getBaseTextureName() {
+ return baseTextureName;
+ }
+
+ public void setBaseTextureName(String baseTextureName) {
+ this.baseTextureName = baseTextureName;
+ }
+
public String getDisplayName() {
return displayName;
}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyPersistTasks.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyPersistTasks.java 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyPersistTasks.java 2007-10-21 16:11:36 UTC (rev 526)
@@ -72,7 +72,7 @@
public static BodyConfigurationRecord createBodyConfiguration(final String username, final String displayName, final long bodyDataID, SessionFactory sessionFactory) throws PersistException {
HibernateTask task = new HibernateTask() {
public Object run(Session session) throws PersistException {
- BodyConfigurationRecord record = new BodyConfigurationRecord(username, displayName, bodyDataID);
+ BodyConfigurationRecord record = new BodyConfigurationRecord(username, displayName, bodyDataID, null);
session.save(record);
return record;
}
@@ -188,7 +188,7 @@
if(username.startsWith(WebConstants.GUEST_COOKIE_PREFIX)){ //fake up a configuration for our guests
Query bodyDataQuery = session.getNamedQuery(BODY_DATA);
BodyDataRecord[] bodyDataRecs = (BodyDataRecord[])bodyDataQuery.list().toArray(new BodyDataRecord[0]);
- BodyConfigurationDocument doc = new BodyConfigurationDocument(0, username, "Guest Body", bodyDataRecs[0].getBodyDataID());
+ BodyConfigurationDocument doc = new BodyConfigurationDocument(0, username, "Guest Body", bodyDataRecs[0].getBodyDataID(), null);
return doc;
}
@@ -239,6 +239,16 @@
dirty = true;
configRec.setBodyDataID(proposedDoc.getBodyDataID());
}
+ if((configRec.getBaseTextureName() == null && proposedDoc.getBaseTextureName() != null) || (configRec.getBaseTextureName() != null && proposedDoc.getBaseTextureName() == null)){
+ dirty = true;
+ configRec.setBaseTextureName(proposedDoc.getBaseTextureName());
+ } else if(configRec.getBaseTextureName() != null && !configRec.getBaseTextureName().equals(proposedDoc.getBaseTextureName())){
+ dirty = true;
+ configRec.setBaseTextureName(proposedDoc.getBaseTextureName());
+ } else if(proposedDoc.getBaseTextureName() != null && !proposedDoc.getBaseTextureName().equals(configRec.getBaseTextureName())){
+ dirty = true;
+ configRec.setBaseTextureName(proposedDoc.getBaseTextureName());
+ }
if(dirty){
session.update(configRec);
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-10-21 16:11:36 UTC (rev 526)
@@ -1023,7 +1023,7 @@
private class SimBodyConfiguration extends BodyConfiguration {
public SimBodyConfiguration() {
- super(1, "Sim Body", 1);
+ super(1, "Sim Body", 1, null);
}
}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2007-10-21 16:11:36 UTC (rev 526)
@@ -229,27 +229,6 @@
return;
}
- public void doHead(HttpServletRequest request, HttpServletResponse response, String[] pathElements, AccountRecord authedAccount) throws ServletException, IOException, PersistException {
- BodyConfigurationRecord configRecord = getBodyConfigurationRecord(request, authedAccount, pathElements);
- if (configRecord == null) {
- response.setStatus(HttpServletResponse.SC_NOT_FOUND);
- return;
- }
-
- String mediaName = MediaService.getBodyTextureName(configRecord.getBodyConfigurationID());
- long length = getMediaService().getSize(mediaName);
- if (length == -1) {
- response.setStatus(HttpServletResponse.SC_NOT_FOUND);
- return;
- }
-
- long lastModified = getMediaService().getLastModified(mediaName);
- setCachable(response);
- response.setStatus(HttpServletResponse.SC_OK);
- response.setContentLength((int) length);
- response.setDateHeader("Last-Modified", lastModified);
- }
-
public void doGet(HttpServletRequest request, HttpServletResponse response, String[] pathElements, AccountRecord authedAccount) throws PersistException, IOException {
BodyConfigurationRecord configRecord = getBodyConfigurationRecord(request, authedAccount, pathElements);
if (configRecord == null) {
@@ -262,7 +241,6 @@
return;
}
response.setStatus(HttpServletResponse.SC_OK);
- setCachable(response);
if (data.getMimeType() != null) {
response.setContentType(data.getMimeType());
}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/xml/server/DocumentFactory.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/xml/server/DocumentFactory.java 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/xml/server/DocumentFactory.java 2007-10-21 16:11:36 UTC (rev 526)
@@ -78,7 +78,7 @@
}
public static BodyConfigurationDocument documentFromRecord(BodyConfigurationRecord record, BodySettingRecord[] settingRecords) {
- BodyConfigurationDocument doc = new BodyConfigurationDocument(record.getBodyConfigurationID(), record.getOwnerUsername(), record.getDisplayName(), record.getBodyDataID());
+ BodyConfigurationDocument doc = new BodyConfigurationDocument(record.getBodyConfigurationID(), record.getOwnerUsername(), record.getDisplayName(), record.getBodyDataID(), record.getBaseTextureName());
for (int i = 0; i < settingRecords.length; i++) {
doc.addBodySetting(settingRecords[i].getSettingName(), settingRecords[i].getSetting());
}
Modified: maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml 2007-10-21 16:11:36 UTC (rev 526)
@@ -156,6 +156,7 @@
<property name="ownerUsername" not-null="true" />
<property name="displayName" not-null="true" />
<property name="bodyDataID" />
+ <property name="baseTextureName" />
</class>
<class name="com.ogoglio.persist.BodySettingRecord"
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.html
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.html 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/body.html 2007-10-21 16:11:36 UTC (rev 526)
@@ -4,6 +4,7 @@
<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="/og/ogoglio.js"></script>
<script type="text/javascript" src="site.js"></script>
+<script type="text/javascript" src="webtoolkit.aim.js"></script>
<title>Ogoglio Example: body</title>
<style type="text/css">
@@ -78,6 +79,7 @@
var leftControlDiv = null;
var rightControlDiv = null;
var bottomControlDiv = null;
+var textureSelectionDiv = null;
var textureForm = null;
var morphControls = null;
var animationControls = null;
@@ -143,8 +145,42 @@
animationHTML += "<form onsubmit='playAnimation(\"" + animationNames[i] + "\"); return false;'><input type='submit' value='" + animationNames[i] + "'/></form>";
}
animationControls.innerHTML = animationHTML;
+
+ var textureNames = editor.getBaseTextureNames();
+ var baseTextureName = bodyXML.getAttribute("basetexturename");
+
+ var textureHTML = "<form id='textureSelectForm' action='body.html' method='get' onsubmit='return false;'>";
+ textureHTML += "<select id='textureSelect' onchange='textureSelectGo();' name='textureSelect'>";
+ if(baseTextureName == null){
+ textureHTML += "<option selected='selected' value='Default'>Default</option>";
+ } else {
+ textureHTML += "<option value='Default'>Default</option>";
+ }
+ for(var i=0; i < textureNames.length; i++){
+ var selectedText = textureNames[i] == baseTextureName ? "selected='selected'" : "";
+ textureHTML += "<option " + selectedText + " value='" + textureNames[i] + "'>" + textureNames[i] + "</option>";
+ }
+ textureHTML += "</select></form>";
+ textureSelectionDiv.innerHTML = textureHTML;
}
+function textureSelectGo(){
+ var textureSelectForm = document.getElementById("textureSelectForm");
+ var selectedTextureName = textureSelectForm.textureSelect.options[textureSelectForm.textureSelect.selectedIndex].value;
+ var currentTextureName = bodyXML.getAttribute("basetexturename");
+ if(currentTextureName == selectedTextureName || (currentTextureName == null && selectedTextureName == "Default")){
+ return;
+ }
+ var editor = document.getElementById("viewer");
+ if(selectedTextureName == "Default"){
+ editor.setBaseTexture(null);
+ } else {
+ editor.setBaseTexture(selectedTextureName);
+ }
+ requestDefaultBodyDocument(authedUsername, handleBodyConfiguration);
+ return true;
+}
+
function playAnimation(animationName){
var editor = document.getElementById("viewer");
editor.playAnimation(animationName);
@@ -179,11 +215,30 @@
appletDiv.innerHTML = html;
}
+function startedTextureForm() {
+ return true;
+}
+
+function completedTextureForm(response) {
+ repaintTexture();
+}
+
function handleTextureForm(){
- setTimeout("repaintTexture();", 5000);
+ AIM.submit(textureForm, {'onStart' : startedTextureForm, 'onComplete' : completedTextureForm})
return true;
}
+function textureDeleteGo(){
+ if(bodyXML == null){
+ return;
+ }
+ deleteBodyTexture(authedUsername, bodyXML.getAttribute("bodyconfigurationid"), handleTextureDelete);
+}
+
+function handleTextureDelete(){
+ repaintTexture();
+}
+
function repaintTexture(){
var ogViewer = document.getElementById("viewer");
ogViewer.updateTextures();
@@ -206,6 +261,7 @@
leftControlDiv = document.getElementById("leftControlDiv");
rightControlDiv = document.getElementById("rightControlDiv");
bottomControlDiv = document.getElementById("bottomControlDiv");
+ textureSelectionDiv = document.getElementById("textureSelectionDiv");
textureForm = document.getElementById("textureForm");
morphControls = document.getElementById("morphControls");
animationControls = document.getElementById("animationControls");
@@ -233,10 +289,13 @@
<div id="rightControlDiv">
<div id="animationControls"> </div>
+ <div id="textureSelectionDiv"> </div>
+
<form id="textureForm" onsubmit="handleTextureForm();" target="textureTargetFrame" action="" enctype="multipart/form-data" method="post">
<input type="file" size="7" name="textureData" />
<input type="submit" value="upload custom skin" />
</form>
+ <form id="textureDeleteForm" onsubmit="textureDeleteGo(); return false;"><input type="submit" value="delete custom skin"/></form>
<iframe id="textureTargetFrame" name="textureTargetFrame" style="width: 1px; height: 1px;"></iframe>
</div>
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js 2007-10-21 16:11:36 UTC (rev 526)
@@ -781,6 +781,12 @@
manager.send(xmlString);
}
+function deleteBodyTexture(username, bodyID, listener){
+ var manager = new XMLRequestManager(appPath + "/account/" + username + "/body/" + bodyID + "/texture", new BasicHTTPListener(listener));
+ manager.setMethod("DELETE");
+ manager.send();
+}
+
// BEGIN POSSESSION UTILS
function requestPossession(username, possessionID, listener){
Modified: maven/trunk/ogoglio-server/src/test/java/com/ogoglio/sim/script/test/ScriptTest.java
===================================================================
--- maven/trunk/ogoglio-server/src/test/java/com/ogoglio/sim/script/test/ScriptTest.java 2007-10-21 16:11:31 UTC (rev 525)
+++ maven/trunk/ogoglio-server/src/test/java/com/ogoglio/sim/script/test/ScriptTest.java 2007-10-21 16:11:36 UTC (rev 526)
@@ -128,7 +128,7 @@
}
public BodyConfigurationDocument getDefaultBodyConfigurationDocument(String username) {
- return new BodyConfigurationDocument(1, username, "Script Test Body", 1);
+ return new BodyConfigurationDocument(1, username, "Script Test Body", 1, null);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-21 16:11:27
|
Revision: 525
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=525&view=rev
Author: trevorolio
Date: 2007-10-21 09:11:31 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
INCLUDES A NEW DB SCHEMA. Dump your old db and make clean.
For those who don't want to break out photoshop to get a new look, added the capability to select from a set of textures included in the body data jar.
Added Paths:
-----------
maven/trunk/ogoglio-bodies/ogoglio-body-mike/src/main/resources/texture/Blue Skin.jpg
maven/trunk/ogoglio-bodies/ogoglio-body-mike/src/main/resources/texture/Meet Us In Orbit.jpg
Added: maven/trunk/ogoglio-bodies/ogoglio-body-mike/src/main/resources/texture/Blue Skin.jpg
===================================================================
(Binary files differ)
Property changes on: maven/trunk/ogoglio-bodies/ogoglio-body-mike/src/main/resources/texture/Blue Skin.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: maven/trunk/ogoglio-bodies/ogoglio-body-mike/src/main/resources/texture/Meet Us In Orbit.jpg
===================================================================
(Binary files differ)
Property changes on: maven/trunk/ogoglio-bodies/ogoglio-body-mike/src/main/resources/texture/Meet Us In Orbit.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-21 16:11:21
|
Revision: 524
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=524&view=rev
Author: trevorolio
Date: 2007-10-21 09:11:23 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
INCLUDES A NEW DB SCHEMA. Dump your old db and make clean.
For those who don't want to break out photoshop to get a new look, added the capability to select from a set of textures included in the body data jar.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/BodyConfiguration.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DBodyData.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DDataManager.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/body/SkinLoader.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyConfigurationDocument.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-10-20 12:21:41 UTC (rev 523)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-10-21 16:11:23 UTC (rev 524)
@@ -164,11 +164,11 @@
BodyConfigurationDocument bodyConfDoc = null;
if (userDocs[i].getUsername().startsWith(WebConstants.GUEST_COOKIE_PREFIX)) {
System.out.println("Need to handle guest bodies correctly");
- bodyConfDoc = new BodyConfigurationDocument(0, userDocs[i].getUsername(), "Body", 1);
+ bodyConfDoc = new BodyConfigurationDocument(0, userDocs[i].getUsername(), "Body", 1, null);
} else {
bodyConfDoc = webClient.getBodyConfiguration(userDocs[i].getUsername(), userDocs[i].getBodyConfigurationID());
}
- BodyConfiguration bodyConfig = new BodyConfiguration(bodyConfDoc.getBodyConfigurationID(), bodyConfDoc.getDisplayName(), bodyConfDoc.getBodyDataID());
+ BodyConfiguration bodyConfig = new BodyConfiguration(bodyConfDoc);
Thing seatThing = null;
if (userDocs[i].getSeatThingID() != -1) {
seatThing = space.getThing(userDocs[i].getSeatThingID());
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java 2007-10-20 12:21:41 UTC (rev 523)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java 2007-10-21 16:11:23 UTC (rev 524)
@@ -504,7 +504,7 @@
}
public BodyConfigurationDocument createBodyConfiguration(String username, String displayName, long bodyDataID) throws IOException {
- BodyConfigurationDocument configDoc = new BodyConfigurationDocument(-1, username, displayName, bodyDataID);
+ BodyConfigurationDocument configDoc = new BodyConfigurationDocument(-1, username, displayName, bodyDataID, null);
return new BodyConfigurationDocument(wire.postAuthenticatedXML(descriptor.getBodyConfigurationsURI(username), configDoc.toString(), authenticator.getAuthCookie()));
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/BodyConfiguration.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/BodyConfiguration.java 2007-10-20 12:21:41 UTC (rev 523)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/BodyConfiguration.java 2007-10-21 16:11:23 UTC (rev 524)
@@ -16,23 +16,26 @@
private long bodyDataID = -1;
+ private String baseTextureName = null; //try custom, then named texture (ignoring if null), then default
+
private HashMap settings = new HashMap();
public BodyConfiguration(BodyConfigurationDocument configDoc) {
- this(configDoc.getBodyConfigurationID(), configDoc.getDisplayName(), configDoc.getBodyDataID());
+ this(configDoc.getBodyConfigurationID(), configDoc.getDisplayName(), configDoc.getBodyDataID(), configDoc.getBaseTextureName());
BodySettingDocument[] settingDocs = configDoc.getBodySettingDocuments();
for (int i = 0; i < settingDocs.length; i++) {
addSetting(settingDocs[i].getSettingName(), settingDocs[i].getSetting());
}
}
- public BodyConfiguration(long bodyConfigurationID, String displayName, long bodyDataID) {
+ public BodyConfiguration(long bodyConfigurationID, String displayName, long bodyDataID, String baseTextureName) {
ArgumentUtils.assertNotNegative(bodyConfigurationID);
this.bodyConfigurationID = bodyConfigurationID;
ArgumentUtils.assertNotEmpty(displayName);
this.displayName = displayName;
ArgumentUtils.assertNotNegative(bodyDataID);
this.bodyDataID = bodyDataID;
+ this.baseTextureName = baseTextureName;
}
public void setUser(User user) {
@@ -86,4 +89,12 @@
public String[] getSettingNames() {
return (String[]) settings.keySet().toArray(new String[0]);
}
+
+ public String getBaseTextureName(){
+ return baseTextureName;
+ }
+
+ public void setBaseTextureName(String baseTextureName) {
+ this.baseTextureName = baseTextureName;
+ }
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DBodyData.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DBodyData.java 2007-10-20 12:21:41 UTC (rev 523)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DBodyData.java 2007-10-21 16:11:23 UTC (rev 524)
@@ -19,21 +19,25 @@
private SkinMap skinMap = null;
- private BufferedImage baseTexture = null;
+ private BaseTexture defaultBaseTexture = null;
+ private BaseTexture[] baseTextures = null;
+
private Bvh defaultAnimation = null;
private MorphDeltaMap[] morphDeltaMaps = null;
- public J3DBodyData(IndexedTriangleArray bodyGeometry, Bvh[] animations, SkinMap skinMap, BufferedImage baseTexture, MorphDeltaMap[] morphDeltaMaps) {
+ public J3DBodyData(IndexedTriangleArray bodyGeometry, Bvh[] animations, SkinMap skinMap, BaseTexture defaultBaseTexture, BaseTexture[] baseTextures, MorphDeltaMap[] morphDeltaMaps) {
ArgumentUtils.assertNotNull(bodyGeometry);
this.bodyGeometry = bodyGeometry;
ArgumentUtils.assertNotNull(animations);
this.animations = animations;
ArgumentUtils.assertNotNull(skinMap);
this.skinMap = skinMap;
- ArgumentUtils.assertNotNull(baseTexture);
- this.baseTexture = baseTexture;
+ ArgumentUtils.assertNotNull(defaultBaseTexture);
+ this.defaultBaseTexture = defaultBaseTexture;
+ ArgumentUtils.assertNotNull(baseTextures);
+ this.baseTextures = baseTextures;
ArgumentUtils.assertNotNull(morphDeltaMaps);
this.morphDeltaMaps = morphDeltaMaps;
@@ -47,6 +51,27 @@
}
}
+ public static class BaseTexture {
+
+ String name = null;
+ BufferedImage image = null;
+
+ public BaseTexture(String name, BufferedImage image){
+ ArgumentUtils.assertNotNull(name);
+ this.name = name;
+ ArgumentUtils.assertNotNull(image);
+ this.image = image;
+ }
+
+ public String getName(){
+ return name;
+ }
+
+ public BufferedImage getImage(){
+ return image;
+ }
+ }
+
public GeometryArray cloneBodyGeometry(){
float[] vertexArray = bodyGeometry.getCoordRefFloat();
@@ -84,7 +109,7 @@
bodyGeometry = null;
animations = null;
skinMap = null;
- baseTexture = null;
+ defaultBaseTexture = null;
}
public Bvh[] getAnimations() {
@@ -98,12 +123,16 @@
return skinMap;
}
- public BufferedImage getBaseTexture() {
- return baseTexture;
+ public BaseTexture getDefaultBaseTexture() {
+ return defaultBaseTexture;
}
+ public BaseTexture[] getBaseTextures(){
+ return baseTextures;
+ }
+
public String toString() {
- return "BodyData (" + bodyGeometry + ", " + skinMap + ", " + baseTexture + ")";
+ return "BodyData (" + bodyGeometry + ", " + skinMap + ", " + defaultBaseTexture + ")";
}
public Bvh getDefaultAnimation() {
@@ -113,4 +142,13 @@
public MorphDeltaMap[] getMorphDeltaMaps(){
return morphDeltaMaps;
}
+
+ public BaseTexture getBaseTexture(String baseTextureName) {
+ for (int i = 0; i < baseTextures.length; i++) {
+ if(baseTextures[i].getName().equals(baseTextureName)){
+ return baseTextures[i];
+ }
+ }
+ return null;
+ }
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DDataManager.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DDataManager.java 2007-10-20 12:21:41 UTC (rev 523)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DDataManager.java 2007-10-21 16:11:23 UTC (rev 524)
@@ -89,13 +89,13 @@
this.bodyDataProvider = bodyDataProvider;
}
- public BufferedImage getBodyTexture(String username, long bodyConfigurationID){
+ public BufferedImage getBodyTexture(String username, long bodyConfigurationID) {
BufferedImage image = dataCache.getBodyTexture(bodyConfigurationID);
- if(image != null){
+ if (image != null) {
return image;
}
InputStream imageStream = bodyDataProvider.getBodyTexture(username, bodyConfigurationID);
- if(imageStream == null){
+ if (imageStream == null) {
return null;
}
try {
@@ -137,7 +137,8 @@
SkinMap skinMap = null;
Vector animations = new Vector();
Vector morphDeltas = new Vector();
- BufferedImage baseTexture = null;
+ J3DBodyData.BaseTexture defaultBaseTexture = null;
+ Vector baseTextures = new Vector();
try {
ZipEntry entry = null;
while ((entry = bodyDataStream.getNextEntry()) != null) {
@@ -157,7 +158,11 @@
BvhParser parser = new BvhParser(name, entryStream);
animations.add(parser.parse());
} else if (entry.getName().equals("texture/body.jpg")) {
- baseTexture = ImageIO.read(entryStream);
+ defaultBaseTexture = new J3DBodyData.BaseTexture("Default", ImageIO.read(entryStream));
+ } else if (entry.getName().startsWith("texture/") && entry.getName().endsWith(".jpg")) {
+ String name = entry.getName().substring(8, entry.getName().length() - 4);
+ J3DBodyData.BaseTexture baseTexture = new J3DBodyData.BaseTexture(name, ImageIO.read(entryStream));
+ baseTextures.add(baseTexture);
} else { //discard the data
StreamUtils.discardInput(new LimitedInputStream(bodyDataStream, (int) entry.getSize()));
}
@@ -176,44 +181,44 @@
sortMorphDeltas(morphDeltas);
- return new J3DBodyData(array, (Bvh[]) animations.toArray(new Bvh[0]), skinMap, baseTexture, (MorphDeltaMap[]) morphDeltas.toArray(new MorphDeltaMap[0]));
+ return new J3DBodyData(array, (Bvh[]) animations.toArray(new Bvh[0]), skinMap, defaultBaseTexture, (J3DBodyData.BaseTexture[]) baseTextures.toArray(new J3DBodyData.BaseTexture[0]), (MorphDeltaMap[]) morphDeltas.toArray(new MorphDeltaMap[0]));
}
/**
* arranges the morph delta maps in depth first order
*/
private void sortMorphDeltas(Vector morphDeltas) {
- if(morphDeltas.size() == 0){
+ if (morphDeltas.size() == 0) {
return;
}
MorphDeltaMap[] deltas = (MorphDeltaMap[]) morphDeltas.toArray(new MorphDeltaMap[0]);
-
+
HashMap nodeMap = new HashMap();
for (int i = 0; i < deltas.length; i++) {
nodeMap.put(deltas[i].getName(), new MorphTreeNode(deltas[i]));
}
MorphTreeNode rootNode = null;
for (int i = 0; i < deltas.length; i++) {
- if(deltas[i].getParentName() == null){
- if(rootNode == null){
- rootNode = (MorphTreeNode)nodeMap.get(deltas[i].getName());
+ if (deltas[i].getParentName() == null) {
+ if (rootNode == null) {
+ rootNode = (MorphTreeNode) nodeMap.get(deltas[i].getName());
} else {
Log.warn("Found multiple morph delta maps with no parent, adding " + deltas[i].getName() + " to " + rootNode.map.getName());
rootNode.children.add(nodeMap.get(deltas[i].getName()));
}
} else {
- MorphTreeNode parentNode = (MorphTreeNode)nodeMap.get(deltas[i].getParentName());
- if(parentNode == null){
+ MorphTreeNode parentNode = (MorphTreeNode) nodeMap.get(deltas[i].getParentName());
+ if (parentNode == null) {
Log.warn("MorphDeltaMap (" + deltas[i].getName() + ") has unknown parent: " + deltas[i].getParentName() + ", ignoring.");
} else {
parentNode.children.add(nodeMap.get(deltas[i].getName()));
}
}
}
- if(rootNode == null){
+ if (rootNode == null) {
throw new IllegalStateException("Cannot have a morph tree with no root");
}
-
+
morphDeltas.clear();
serializeMorphTree(0, rootNode, morphDeltas);
}
@@ -223,12 +228,12 @@
*/
private void serializeMorphTree(int depth, MorphTreeNode node, Vector morphDeltas) {
depth++;
- if(depth > 30){
+ if (depth > 30) {
Log.error("Morph tree depth was greater than 30, which probably indicates a cyclic tree. Aborting");
return;
}
for (int i = 0; i < node.children.size(); i++) {
- serializeMorphTree(depth, (MorphTreeNode)node.children.get(i), morphDeltas);
+ serializeMorphTree(depth, (MorphTreeNode) node.children.get(i), morphDeltas);
}
morphDeltas.add(node.map);
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/body/SkinLoader.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/body/SkinLoader.java 2007-10-20 12:21:41 UTC (rev 523)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/body/SkinLoader.java 2007-10-21 16:11:23 UTC (rev 524)
@@ -23,7 +23,7 @@
import com.ogoglio.viewer.j3d.J3DBodyData;
public class SkinLoader {
-
+
public static final float AVATAR_SIZE = 2; //this will eventually be changable
private GeometryArray geometry = null;
@@ -37,8 +37,18 @@
public SkinLoader(J3DBodyData bodyData, BodyConfiguration bodyConfiguration, BufferedImage customSkin) {
this.geometry = bodyData.cloneBodyGeometry();
this.morphDeltaMaps = bodyData.getMorphDeltaMaps();
- if(customSkin == null){
- this.baseImage = bodyData.getBaseTexture();
+ if (customSkin == null) {
+ if (bodyConfiguration.getBaseTextureName() == null) {
+ this.baseImage = bodyData.getDefaultBaseTexture().getImage();
+ } else {
+ J3DBodyData.BaseTexture baseTexture = bodyData.getBaseTexture(bodyConfiguration.getBaseTextureName());
+ if(baseTexture == null){
+ System.err.println("Could not find base texture by name: " + bodyConfiguration.getBaseTextureName());
+ this.baseImage = bodyData.getDefaultBaseTexture().getImage();
+ } else {
+ this.baseImage = baseTexture.getImage();
+ }
+ }
} else {
this.baseImage = customSkin;
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyConfigurationDocument.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyConfigurationDocument.java 2007-10-20 12:21:41 UTC (rev 523)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyConfigurationDocument.java 2007-10-21 16:11:23 UTC (rev 524)
@@ -30,9 +30,11 @@
public static final String BODY_DATA_ID = "bodydataid";
+ public static final String BASE_TEXTURE_NAME = "basetexturename";
+
private XMLElement data = null;
- public BodyConfigurationDocument(long bodyConfigurationID, String ownerUsername, String displayName, long bodyDataID) {
+ public BodyConfigurationDocument(long bodyConfigurationID, String ownerUsername, String displayName, long bodyDataID, String baseTextureName) {
data = new XMLElement(NAME);
data.setAttribute(BODY_CONFIGURATION_ID, bodyConfigurationID);
ArgumentUtils.assertNotEmpty(ownerUsername);
@@ -41,6 +43,9 @@
data.setAttribute(DISPLAY_NAME, displayName);
ArgumentUtils.assertNotNegative(bodyDataID);
data.setAttribute(BODY_DATA_ID, bodyDataID);
+ if(baseTextureName != null){
+ data.setAttribute(BASE_TEXTURE_NAME, baseTextureName);
+ }
}
public BodyConfigurationDocument(XMLElement data) {
@@ -51,7 +56,7 @@
}
public BodyConfigurationDocument(BodyConfiguration bodyConfiguration) {
- this(bodyConfiguration.getBodyConfigurationID(), bodyConfiguration.getUser().getUsername(), bodyConfiguration.getDisplayName(), bodyConfiguration.getBodyDataID());
+ this(bodyConfiguration.getBodyConfigurationID(), bodyConfiguration.getUser().getUsername(), bodyConfiguration.getDisplayName(), bodyConfiguration.getBodyDataID(), bodyConfiguration.getBaseTextureName());
String[] settingNames = bodyConfiguration.getSettingNames();
for (int i = 0; i < settingNames.length; i++) {
addBodySetting(settingNames[i], bodyConfiguration.getSetting(settingNames[i]));
@@ -74,6 +79,19 @@
return data.getLongAttribute(BODY_DATA_ID);
}
+ public String getBaseTextureName(){
+ return data.getStringAttribute(BASE_TEXTURE_NAME);
+ }
+
+ public void setBaseTextureName(String baseTextureName) {
+ if(baseTextureName == null){
+ data.removeAttribute(BASE_TEXTURE_NAME);
+ return;
+ }
+ data.setAttribute(BASE_TEXTURE_NAME, baseTextureName);
+ }
+
+
public void addBodySetting(String settingName, float setting) {
data.addChild(new BodySettingDocument(getBodyConfigurationID(), settingName, setting).toElement());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-20 12:21:37
|
Revision: 523
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=523&view=rev
Author: trevorolio
Date: 2007-10-20 05:21:41 -0700 (Sat, 20 Oct 2007)
Log Message:
-----------
Added a better mouse control for camera movement.
Currently used only in the body editor, but eventually will work for viewers.
Modified Paths:
--------------
maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java
Modified: maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java
===================================================================
--- maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java 2007-10-20 12:21:34 UTC (rev 522)
+++ maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java 2007-10-20 12:21:41 UTC (rev 523)
@@ -55,6 +55,7 @@
import com.ogoglio.util.UIConstants;
import com.ogoglio.viewer.j3d.J3DBodyData;
import com.ogoglio.viewer.j3d.J3DCamera;
+import com.ogoglio.viewer.j3d.J3DCameraMotionBehavior;
import com.ogoglio.viewer.j3d.J3DCanvas;
import com.ogoglio.viewer.j3d.J3DDataManager;
import com.ogoglio.viewer.j3d.J3DUniverse;
@@ -258,21 +259,18 @@
userGroup.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);
userGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
userGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
- Transform3D userTransform = new Transform3D();
- userTransform.rotY(1);
- userGroup.setTransform(userTransform);
- MouseRotate behavior = new MouseRotate();
- behavior.setFactor(0.05, 0);
- behavior.setTransformGroup(userGroup);
- userGroup.addChild(behavior);
- behavior.setSchedulingBounds(bounds);
+ J3DCameraMotionBehavior zoomBehavior = new J3DCameraMotionBehavior(camera.getTransformGroup(), 1.1);
+ zoomBehavior.setTransformGroup(camera.getTransformGroup());
+ camera.getTransformGroup().addChild(zoomBehavior);
+ zoomBehavior.setSchedulingBounds(bounds);
+
canvas.getView().setTransparencySortingPolicy(View.TRANSPARENCY_SORT_GEOMETRY);
canvas.getView().setSceneAntialiasingEnable(true);
- camera.setRotation(-0.2, Math.PI, 0);
- camera.setLocation(new Vector3f(0f, 1.7f, -2.5f));
- sceneRoot.addChild(camera.getNode());
+ camera.setRotation(-0, Math.PI, 0);
+ camera.setLocation(new Vector3f(0f, 1.5f, -1.1f));
+ userGroup.addChild(camera.getNode());
universe.makeLive();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-20 12:21:32
|
Revision: 522
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=522&view=rev
Author: trevorolio
Date: 2007-10-20 05:21:34 -0700 (Sat, 20 Oct 2007)
Log Message:
-----------
Added a better mouse control for camera movement.
Currently used only in the body editor, but eventually will work for viewers.
Added Paths:
-----------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DCameraMotionBehavior.java
Added: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DCameraMotionBehavior.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DCameraMotionBehavior.java (rev 0)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DCameraMotionBehavior.java 2007-10-20 12:21:34 UTC (rev 522)
@@ -0,0 +1,123 @@
+package com.ogoglio.viewer.j3d;
+
+import java.awt.AWTEvent;
+import java.awt.event.MouseEvent;
+import java.util.Enumeration;
+
+import javax.media.j3d.Transform3D;
+import javax.media.j3d.TransformGroup;
+import javax.media.j3d.WakeupCriterion;
+import javax.media.j3d.WakeupOnAWTEvent;
+import javax.media.j3d.WakeupOnBehaviorPost;
+import javax.vecmath.Quat4f;
+import javax.vecmath.Vector3d;
+
+import com.sun.j3d.utils.behaviors.mouse.MouseBehavior;
+
+public class J3DCameraMotionBehavior extends MouseBehavior {
+ double x_angle = 0, y_angle = 0, old_y = 0;
+
+ double x_factor = 0.01;
+
+ double z_factor = 0.04;
+
+ Vector3d translation = new Vector3d();
+
+ Quat4f orientation = new Quat4f();
+
+ Transform3D orientationTransform = new Transform3D();
+
+ double minDistance = 0;
+
+ public J3DCameraMotionBehavior(TransformGroup transformGroup, double minDistance) {
+ super(transformGroup);
+ this.minDistance = minDistance;
+ }
+
+ public void processStimulus(Enumeration criteria) {
+ WakeupCriterion wakeup;
+ AWTEvent[] events;
+ MouseEvent mouseEvent;
+
+ while (criteria.hasMoreElements()) {
+ wakeup = (WakeupCriterion) criteria.nextElement();
+ if (wakeup instanceof WakeupOnAWTEvent) {
+ events = ((WakeupOnAWTEvent) wakeup).getAWTEvent();
+ if (events.length > 0) {
+ mouseEvent = (MouseEvent) events[events.length - 1];
+ doProcess(mouseEvent);
+ }
+ }
+
+ else if (wakeup instanceof WakeupOnBehaviorPost) {
+ while (true) {
+ synchronized (mouseq) {
+ if (mouseq.isEmpty())
+ break;
+ mouseEvent = (MouseEvent) mouseq.remove(0);
+
+ while ((mouseEvent.getID() == MouseEvent.MOUSE_DRAGGED) && !mouseq.isEmpty() && (((MouseEvent) mouseq.get(0)).getID() == MouseEvent.MOUSE_DRAGGED)) {
+ mouseEvent = (MouseEvent) mouseq.remove(0);
+ }
+ }
+ doProcess(mouseEvent);
+ }
+ }
+
+ }
+ wakeupOn(mouseCriterion);
+ }
+
+ void doProcess(MouseEvent evt) {
+ int id;
+ int dx, dy;
+
+ processMouseEvent(evt);
+
+ if (((buttonPress) && ((flags & MANUAL_WAKEUP) == 0)) || ((wakeUp) && ((flags & MANUAL_WAKEUP) != 0))) {
+ id = evt.getID();
+ if ((id == MouseEvent.MOUSE_DRAGGED) && !evt.isAltDown() && !evt.isMetaDown()) {
+
+ x = evt.getX();
+ y = evt.getY();
+
+ dx = x - x_last;
+ dy = y - y_last;
+
+ if (!reset) {
+ y_angle = dx * x_factor;
+ transformGroup.getTransform(currXform);
+
+ currXform.get(translation);
+ translation.y = 0;
+ if (translation.length() > minDistance || dy > 0) {
+ // First zoom
+ currXform.get(orientation);
+ translation.x = 0;
+ translation.y = 0;
+ translation.z = 0;
+ orientationTransform.set(orientation, translation, 1);
+ translation.z = dy * z_factor;
+ orientationTransform.transform(translation);
+ transformX.set(translation);
+ currXform.mul(transformX, currXform);
+ }
+
+ //Now rotate
+ transformY.rotY(y_angle);
+ currXform.mul(transformY, currXform);
+
+ transformGroup.setTransform(currXform);
+ } else {
+ reset = false;
+ }
+
+ x_last = x;
+ y_last = y;
+ } else if (id == MouseEvent.MOUSE_PRESSED) {
+ x_last = evt.getX();
+ y_last = evt.getY();
+ }
+ }
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-19 22:09:27
|
Revision: 521
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=521&view=rev
Author: trevorolio
Date: 2007-10-19 15:09:31 -0700 (Fri, 19 Oct 2007)
Log Message:
-----------
Fixed up the chairs so that they are populated as seats with reasonable seat positioning.
This required an addition of a template.properties file to template population dirs.
Tweaked template editor html to handle seat position editing keystrokes a little better.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java
maven/trunk/ogoglio-common/src/main/java/nanoxml/XMLElement.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-10-19 22:09:27 UTC (rev 520)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-10-19 22:09:31 UTC (rev 521)
@@ -443,6 +443,7 @@
}
stopRenderableMotion(renderable, position);
renderable.stopAnimation();
+ renderable.playAnimation(BodyConstants.DEFAULT_ANIMATION_NAME, false, false);
}
public void userSat(User user, Thing seatThing) {
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java 2007-10-19 22:09:27 UTC (rev 520)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java 2007-10-19 22:09:31 UTC (rev 521)
@@ -21,6 +21,7 @@
import javax.media.j3d.Transform3D;
import javax.vecmath.Point3d;
+import javax.vecmath.Quat4d;
import com.ogoglio.client.UserInputListener;
import com.ogoglio.client.model.SplinePath;
@@ -90,6 +91,18 @@
}
dirty = false;
+ if(userRenderable.getUser().getSeat() != null){
+ Transform3D standingPosition = new Transform3D();
+ standingPosition.set(userRenderable.getUser().getSeat().getPosition());
+ Quat4d seatRotation = userRenderable.getUser().getSeat().getTemplate().getSeatRotation();
+ Transform3D rotateTransform = new Transform3D();
+ rotateTransform.set(seatRotation);
+ standingPosition.mul(rotateTransform);
+
+ userInputListener.viewpointMotionStopped(standingPosition);
+ return;
+ }
+
Transform3D position = new Transform3D();
userRenderable.getPosition(position);
Modified: maven/trunk/ogoglio-common/src/main/java/nanoxml/XMLElement.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/nanoxml/XMLElement.java 2007-10-19 22:09:27 UTC (rev 520)
+++ maven/trunk/ogoglio-common/src/main/java/nanoxml/XMLElement.java 2007-10-19 22:09:31 UTC (rev 521)
@@ -27,7 +27,6 @@
*****************************************************************************/
// TFS added some basic functions. Look for the ones without Javadocs. :-O
-
package nanoxml;
import java.io.ByteArrayOutputStream;
@@ -592,7 +591,6 @@
}
}
-
/**
* Adds or modifies an attribute.
*
@@ -650,11 +648,13 @@
}
public void setAttribute(String name, double value) {
- setAttribute(name, value + "");
+ Object[] args = { new Double(value) };
+ setAttribute(name, String.format("%f", args));
}
public void setAttribute(String name, float value) {
- setAttribute(name, value + "");
+ Object[] args = { new Float(value) };
+ setAttribute(name, String.format("%f", args));
}
/**
@@ -1149,7 +1149,7 @@
* @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getStringAttribute(String, Hashtable, String, boolean)
*/
public String getStringAttribute(String name, String defaultValue) {
- return unencode((String)this.getAttribute(name, defaultValue));
+ return unencode((String) this.getAttribute(name, defaultValue));
}
/**
@@ -1653,7 +1653,7 @@
result.parseString(string);
return result;
}
-
+
/**
* Reads one XML element from a String and parses it.
*
@@ -2157,7 +2157,7 @@
}
public String unencode(String input) {
- if(input == null) {
+ if (input == null) {
return null;
}
StringBuffer result = new StringBuffer();
@@ -2165,24 +2165,24 @@
switch (input.charAt(i)) {
case '&':
int semiIndex = input.indexOf(';', i);
- if(semiIndex == -1) {
+ if (semiIndex == -1) {
result.append('&');
} else {
String entity = input.substring(i, semiIndex + 1);
- if("<".equals(entity)) {
+ if ("<".equals(entity)) {
result.append('<');
i = semiIndex;
- } else if(">".equals(entity)) {
+ } else if (">".equals(entity)) {
result.append('>');
i = semiIndex;
- } else if("&".equals(entity)) {
+ } else if ("&".equals(entity)) {
result.append('&');
i = semiIndex;
- } else if("'".equals(entity)) {
+ } else if ("'".equals(entity)) {
result.append('\'');
i = semiIndex;
- } else if(entity.startsWith("&#x")) {
- result.append((char)(Integer.parseInt(entity.substring(3, entity.length() - 1))));
+ } else if (entity.startsWith("&#x")) {
+ result.append((char) (Integer.parseInt(entity.substring(3, entity.length() - 1))));
i = semiIndex;
} else {
result.append('&');
@@ -2195,7 +2195,7 @@
}
return result.toString();
}
-
+
/**
* Scans an identifier from the current reader. The scanned identifier is appended to <code>result</code>.
*
@@ -2853,5 +2853,4 @@
return new XMLParseException(this.getName(), this.parserLineNr, msg);
}
-
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-19 22:09:23
|
Revision: 520
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=520&view=rev
Author: trevorolio
Date: 2007-10-19 15:09:27 -0700 (Fri, 19 Oct 2007)
Log Message:
-----------
Fixed up the chairs so that they are populated as seats with reasonable seat positioning.
This required an addition of a template.properties file to template population dirs.
Tweaked template editor html to handle seat position editing keystrokes a little better.
Modified Paths:
--------------
maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/PopulateMojo.java
Modified: maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/PopulateMojo.java
===================================================================
--- maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/PopulateMojo.java 2007-10-19 22:09:21 UTC (rev 519)
+++ maven/trunk/dev-plugins/src/main/java/com/ogoglio/plugin/PopulateMojo.java 2007-10-19 22:09:27 UTC (rev 520)
@@ -12,7 +12,12 @@
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
+import java.util.Properties;
+import javax.media.j3d.Transform3D;
+import javax.vecmath.Quat4d;
+import javax.vecmath.Vector3d;
+
import nanoxml.XMLElement;
import org.apache.maven.plugin.MojoExecutionException;
@@ -31,11 +36,14 @@
* @goal populate
*/
public class PopulateMojo extends OgServiceMojoBase {
+ public static final String PROPERTIES_FILE_NAME = "template.properties";
+
private Map<Long, Long> templateIdMap = new HashMap<Long, Long>();
- private Map<Long,SpaceDocument> localSpaces = new HashMap<Long,SpaceDocument>();
- private Map<String,SpaceDocument> serveSpacerNameToSpaceDoc = new HashMap<String, SpaceDocument>();
+ private Map<Long, SpaceDocument> localSpaces = new HashMap<Long, SpaceDocument>();
+ private Map<String, SpaceDocument> serveSpacerNameToSpaceDoc = new HashMap<String, SpaceDocument>();
+
private Map<String, TemplateDocument> existingServerTemplates = null;
public static final DateFormat fmt = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL, Locale.US);
@@ -66,20 +74,20 @@
}
}
}
- serveSpacerNameToSpaceDoc=getAllServerSpaces(client);
+ serveSpacerNameToSpaceDoc = getAllServerSpaces(client);
patchSpaces(client);
}
- private Map<String,SpaceDocument> getAllServerSpaces(WebAPIClient client) throws MojoExecutionException{
+ private Map<String, SpaceDocument> getAllServerSpaces(WebAPIClient client) throws MojoExecutionException {
try {
- Map<String,SpaceDocument> result=new HashMap<String,SpaceDocument>();
- SpaceDocument[] doc=client.getAccountSpaceDocuments(username);
- for (int i=0; i<doc.length;++i) {
- result.put(doc[i].getDisplayName(),doc[i]);
+ Map<String, SpaceDocument> result = new HashMap<String, SpaceDocument>();
+ SpaceDocument[] doc = client.getAccountSpaceDocuments(username);
+ for (int i = 0; i < doc.length; ++i) {
+ result.put(doc[i].getDisplayName(), doc[i]);
}
return result;
} catch (IOException e) {
- throw new MojoExecutionException("Unable to read server set of space documents",e);
+ throw new MojoExecutionException("Unable to read server set of space documents", e);
}
}
@@ -87,7 +95,7 @@
Map<String, TemplateDocument> result = new HashMap<String, TemplateDocument>();
TemplateDocument[] doc = client.getTemplateDocuments(username);
- getLog().info("Checking existing server templates...total of:"+doc.length);
+ getLog().info("Checking existing server templates...total of:" + doc.length);
for (int i = 0; i < doc.length; ++i) {
result.put(doc[i].getDisplayName(), doc[i]);
}
@@ -96,24 +104,24 @@
private void patchSpaces(WebAPIClient client) throws MojoExecutionException {
SpaceDocument fakeSpaceDoc, realSpaceDoc;
- Iterator<Long> iter=localSpaces.keySet().iterator();
-
+ Iterator<Long> iter = localSpaces.keySet().iterator();
+
while (iter.hasNext()) {
try {
long localModTime = iter.next();
fakeSpaceDoc = localSpaces.get(localModTime);
if (serveSpacerNameToSpaceDoc.containsKey(fakeSpaceDoc.getDisplayName())) {
realSpaceDoc = serveSpacerNameToSpaceDoc.get(fakeSpaceDoc.getDisplayName());
-
- Date fileModified=new Date(localModTime);
+
+ Date fileModified = new Date(localModTime);
Date serverModified = TemplateSupportFileDocument.fmt.parse(realSpaceDoc.getLastModifiedAsUTC());
if (fileModified.before(serverModified)) {
- getLog().info("Not patching space document "+realSpaceDoc.getDisplayName()+". Server copy is newer.");
+ getLog().info("Not patching space document " + realSpaceDoc.getDisplayName() + ". Server copy is newer.");
continue;
} else {
//need to torch the server version b/c it's too old
client.deleteSpace(realSpaceDoc.getSpaceID());
- getLog().info("Deleted old server version of "+realSpaceDoc.getDisplayName()+" ["+realSpaceDoc.getSpaceID()+"]");
+ getLog().info("Deleted old server version of " + realSpaceDoc.getDisplayName() + " [" + realSpaceDoc.getSpaceID() + "]");
}
}
realSpaceDoc = client.createSpace(fakeSpaceDoc.getDisplayName());
@@ -149,7 +157,7 @@
client.createDoor(realSpaceID, doorDocs[j].getTemplateID(), doorDocs[j].getTemplateOwner(), doorDocs[j].getDisplayName(), doorDocs[j].getLink(), doorDocs[j].getTransform());
}
- getLog().info("Patched up space " + realSpaceDoc.getDisplayName() +" ["+realSpaceDoc.getSpaceID()+"]");
+ getLog().info("Patched up space " + realSpaceDoc.getDisplayName() + " [" + realSpaceDoc.getSpaceID() + "]");
} catch (ParseException e) {
throw new MojoExecutionException("Parse exception patching space", e);
} catch (IOException e) {
@@ -174,7 +182,7 @@
FileInputStream inputStream = new FileInputStream(candidate);
String docContent = StreamUtils.readInput(inputStream);
SpaceDocument doc = new SpaceDocument(XMLElement.parseElementFromString(docContent));
- localSpaces.put(candidate.lastModified(),doc);
+ localSpaces.put(candidate.lastModified(), doc);
inputStream.close();
} catch (IOException e) {
throw new MojoExecutionException("IO Error reading space", e);
@@ -195,10 +203,10 @@
throw new MojoExecutionException("Badly formed directory " + name + ". Should have 1 obj file but has " + objs.length);
}
- String templateVisibleName=fileToTemplateName(objs[0]);
+ String templateVisibleName = fileToTemplateName(objs[0]);
if (!checkFileTemplateIsNewer(client, candidate, existing, templateVisibleName)) {
getLog().info("Not uploading template " + templateVisibleName + ". Server copy is newer.");
- templateIdMap.put(templateFakeId,existing.get(templateVisibleName).getTemplateID());
+ templateIdMap.put(templateFakeId, existing.get(templateVisibleName).getTemplateID());
return;
} else {
getLog().info("Uploading template #" + templateFakeId + " to " + serviceURI);
@@ -207,6 +215,15 @@
try {
TemplateDocument doc = fileNameToTemplateDocument(client, objs[0]);
+ File propertiesFile = new File(candidate, PROPERTIES_FILE_NAME);
+ if (propertiesFile.exists() && propertiesFile.canRead()) {
+ Properties templateProperties = new Properties();
+ templateProperties.load(new FileInputStream(propertiesFile));
+ if (templateProperties.size() > 0) {
+ updateTemplateDoc(client, doc, templateProperties);
+ }
+ }
+
InputStream objStream = new FileInputStream(objs[0]);
client.uploadTemplateGeometryStream(username, doc.getTemplateID(), 0, objStream);
@@ -228,7 +245,7 @@
} else {
if ((!(supportName.endsWith(".gif"))) && (!(supportName.endsWith(".jpg"))) && (!(supportName.endsWith(".png"))) && (!(supportName.endsWith(".mtl")))) {
- if ((!(supportName.endsWith(".blend"))) && (!(supportName.endsWith(".3DS"))) && (!(supportName.endsWith(".txt"))) && (!(supportName.equals(".svn")))) {
+ if ((!(supportName.endsWith(".blend"))) && (!(supportName.endsWith(".3DS"))) && (!(supportName.endsWith(".txt"))) && (!(supportName.equals(".svn"))) && !supportName.equals(PROPERTIES_FILE_NAME)) {
getLog().warn("Don't know what to do with file " + supportName + ". Ignoring.");
}
continue;
@@ -244,6 +261,42 @@
}
}
+ private void updateTemplateDoc(WebAPIClient client, TemplateDocument doc, Properties templateProperties) throws IOException {
+ String[] keys = (String[])templateProperties.keySet().toArray(new String[0]);
+ double rotX = 0, rotY = 0, rotZ = 0;
+
+ for (int i = 0; i < keys.length; i++) {
+ if("seat".equals(keys[i])){
+ doc.setSeat("true".equals(templateProperties.get(keys[i])));
+ } else if("seatX".equals(keys[i])){
+ doc.setSeatPosition(Double.parseDouble((String)templateProperties.get(keys[i])), doc.getSeatPosition().y, doc.getSeatPosition().z);
+ } else if("seatY".equals(keys[i])){
+ doc.setSeatPosition(doc.getSeatPosition().x, Double.parseDouble((String)templateProperties.get(keys[i])), doc.getSeatPosition().z);
+ } else if("seatZ".equals(keys[i])){
+ doc.setSeatPosition(doc.getSeatPosition().x, doc.getSeatPosition().y, Double.parseDouble((String)templateProperties.get(keys[i])));
+ } else if("seatRotX".equals(keys[i])){
+ rotX = Double.parseDouble(templateProperties.getProperty(keys[i]));
+ } else if("seatRotY".equals(keys[i])){
+ rotY = Double.parseDouble(templateProperties.getProperty(keys[i]));
+ } else if("seatRotZ".equals(keys[i])){
+ rotZ = Double.parseDouble(templateProperties.getProperty(keys[i]));
+ } else {
+ System.err.println("Unknown properties in template.properties: " + keys[i]);
+ }
+ }
+
+ if(rotX != 0 || rotY != 0 || rotZ != 0){
+ Transform3D transform = new Transform3D();
+ transform.setEuler(new Vector3d(rotX, rotY, rotZ));
+ Quat4d quat = new Quat4d();
+ transform.get(quat);
+ doc.setSeatRotation(quat);
+ }
+
+ getLog().info("Updating template " + doc.getDisplayName() + " with properties from template.properties");
+ client.updateTemplate(doc);
+ }
+
private boolean checkFileTemplateIsNewer(WebAPIClient client, File candidate, Map<String, TemplateDocument> existing, String displayName) throws MojoExecutionException {
//is it even on server?
if (!existing.containsKey(displayName)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-10-19 22:09:16
|
Revision: 519
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=519&view=rev
Author: trevorolio
Date: 2007-10-19 15:09:21 -0700 (Fri, 19 Oct 2007)
Log Message:
-----------
Fixed up the chairs so that they are populated as seats with reasonable seat positioning.
This required an addition of a template.properties file to template population dirs.
Tweaked template editor html to handle seat position editing keystrokes a little better.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/PossessionPersistTasks.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/TemplatePersistTasks.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml
maven/trunk/ogoglio-server/src/main/resources/populate/space-1
maven/trunk/ogoglio-server/src/main/resources/populate/template-15/HillHouseChair.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-15/HillHouseChair.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-16/JacobsenChair3107.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-16/JacobsenChair3107.mtl
maven/trunk/ogoglio-server/src/main/resources/populate/template-16/JacobsenChair3107.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-17/LeCorbusierArmChair.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-17/LeCorbusierArmChair.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-18/LeCorbusierRecliner.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-18/LeCorbusierRecliner.mtl
maven/trunk/ogoglio-server/src/main/resources/populate/template-18/LeCorbusierRecliner.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-19/LeCorbusierSofa.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-19/LeCorbusierSofa.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-20/MarshmallowSofa.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-20/MarshmallowSofa.mtl
maven/trunk/ogoglio-server/src/main/resources/populate/template-20/MarshmallowSofa.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-24/OfficeChair.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-24/OfficeChair.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-3/BarcelonaChair.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-3/BarcelonaChair.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-31/OfficeChairNoArms.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-31/OfficeChairNoArms.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-5/CescaArmChair.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-5/CescaArmChair.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-6/CornerSofa.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-6/CornerSofa.mtl
maven/trunk/ogoglio-server/src/main/resources/populate/template-6/CornerSofa.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-8/AluminumChair.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-8/AluminumChair.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-9/EamesLoungeChair.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-9/EamesLoungeChair.mtl
maven/trunk/ogoglio-server/src/main/resources/populate/template-9/EamesLoungeChair.obj
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/templateEditor.html
Added Paths:
-----------
maven/trunk/ogoglio-server/src/main/resources/populate/template-15/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-16/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-17/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-18/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-19/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-20/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-24/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-3/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-31/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-5/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-6/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-77/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-8/template.properties
maven/trunk/ogoglio-server/src/main/resources/populate/template-9/template.properties
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/PossessionPersistTasks.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/PossessionPersistTasks.java 2007-10-19 17:15:31 UTC (rev 518)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/PossessionPersistTasks.java 2007-10-19 22:09:21 UTC (rev 519)
@@ -29,6 +29,8 @@
public static final String POSSESSIONS_BY_SPACE_ID = "com.ogoglio.persist.possessionsBySpaceID";
+ protected static final String POSSESSIONS_BY_TEMPLATE_ID = "com.ogoglio.persist.possessionsByTemplateID";
+
public static PossessionRecord[] findPossessionsByOwnerUsername(final String username, SessionFactory sessionFactory) throws PersistException {
HibernateTask task = new HibernateTask() {
public Object run(Session session) throws PersistException {
@@ -41,6 +43,18 @@
return (PossessionRecord[]) task.execute();
}
+ public static PossessionRecord[] findPossessionsByTemplateID(final long templateID, SessionFactory sessionFactory) throws PersistException {
+ HibernateTask task = new HibernateTask() {
+ public Object run(Session session) throws PersistException {
+ Query query = session.getNamedQuery(POSSESSIONS_BY_TEMPLATE_ID);
+ query.setLong("templateID", templateID);
+ return query.list().toArray(new PossessionRecord[0]);
+ }
+ };
+ task.setSessionFactory(sessionFactory);
+ return (PossessionRecord[]) task.execute();
+ }
+
public static PossessionRecord[] findPossessionsBySpaceID(final long spaceID, SessionFactory sessionFactory) throws PersistException {
HibernateTask task = new HibernateTask() {
public Object run(Session session) throws PersistException {
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/TemplatePersistTasks.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/TemplatePersistTasks.java 2007-10-19 17:15:31 UTC (rev 518)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/TemplatePersistTasks.java 2007-10-19 22:09:21 UTC (rev 519)
@@ -162,6 +162,14 @@
if (accountRecord == null) {
return null;
}
+
+ Query possQuery = session.getNamedQuery(PossessionPersistTasks.POSSESSIONS_BY_TEMPLATE_ID);
+ possQuery.setLong("templateID", record.getTemplateID());
+ PossessionRecord[] currentPossessions = (PossessionRecord[])possQuery.list().toArray(new PossessionRecord[0]);
+ if(currentPossessions.length > 0){
+ return Boolean.FALSE;
+ }
+
session.delete(record);
return Boolean.TRUE;
}
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-10-19 17:15:31 UTC (rev 518)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-10-19 22:09:21 UTC (rev 519)
@@ -100,7 +100,13 @@
ThingDocument[] thingDocs = spaceDocument.getThingDocuments();
for (int i = 0; i < thingDocs.length; i++) {
- Template template = new Template(listener.getTemplateDocument(thingDocs[i].getTemplateID()));
+ TemplateDocument templateDoc = listener.getTemplateDocument(thingDocs[i].getTemplateID());
+ if (templateDoc == null) {
+ log("Could not add a thing (" + thingDocs[i].getDisplayName() + ") for unknown template " + thingDocs[i].getTemplateID());
+ Log.error("In space " + space.getSpaceID() + ", could not add a thing (" + thingDocs[i].getDisplayName() + ") for unknown template " + thingDocs[i].getTemplateID());
+ return;
+ }
+ Template template = new Template(templateDoc);
space.addTemplate(template);
space.addThing(new Thing(space, template, thingDocs[i]));
}
@@ -131,7 +137,7 @@
public void generatedSpaceEventForUser(String username, SpaceEvent event, SpaceSimulator spaceSimulator);
public TemplateDocument getTemplateDocument(long templateID);
-
+
public BodyConfigurationDocument getDefaultBodyConfigurationDocument(String username);
public String getTemplateScript(long templateID);
@@ -200,7 +206,7 @@
while (!cleaned) {
try {
SpaceEvent event = (SpaceEvent) queue.dequeue();
- if(cleaned){
+ if (cleaned) {
return;
}
if (SpaceEvent.ADD_USER_EVENT.equals(event.getName())) {
@@ -231,7 +237,7 @@
}
user.stopMotion(event.getTransform());
listener.generatedSpaceEvent(event, SpaceSimulator.this);
- } else if(SpaceEvent.USER_SAT_EVENT.equals(event.getName())){
+ } else if (SpaceEvent.USER_SAT_EVENT.equals(event.getName())) {
String username = event.getStringProperty(SpaceEvent.USERNAME);
User user = space.getUser(username);
if (user == null) {
@@ -240,12 +246,12 @@
}
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
Thing seatThing = space.getThing(thingID);
- if(seatThing == null){
+ if (seatThing == null) {
log("Received sit event for unknown thing: " + username + ", " + thingID);
}
user.setSeat(seatThing);
listener.generatedSpaceEvent(event, SpaceSimulator.this);
-
+
} else if (SpaceEvent.THING_START_MOTION_EVENT.equals(event.getName())) {
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
Thing thing = space.getThing(thingID);
@@ -339,11 +345,11 @@
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
long pageID = event.getLongProperty(SpaceEvent.PAGE_ID).longValue();
Thing thing = space.getThing(thingID);
- if(thing == null){
+ if (thing == null) {
return;
}
Page page = thing.getPage(pageID);
- if(page == null){
+ if (page == null) {
return;
}
page.setContentType(event.getStringProperty(SpaceEvent.CONTENT_TYPE));
@@ -353,11 +359,11 @@
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
long pageID = event.getLongProperty(SpaceEvent.PAGE_ID).longValue();
Thing thing = space.getThing(thingID);
- if(thing == null){
+ if (thing == null) {
return;
}
Page page = thing.getPage(pageID);
- if(page == null){
+ if (page == null) {
return;
}
page.setContentType(event.getStringProperty(SpaceEvent.CONTENT_TYPE));
@@ -1019,9 +1025,9 @@
public SimBodyConfiguration() {
super(1, "Sim Body", 1);
}
-
+
}
-
+
private class InSimBodyDataProvider implements BodyDataProvider {
public ZipInputStream getBodyData(long bodyDataID) {
return new ZipInputStream(getClass().getClassLoader().getResourceAsStream("ogoglio-body-sim.jar"));
@@ -1050,7 +1056,7 @@
return listener.getTemplateResourceStream(templateID, resourceName);
}
- public String getTemplateScript(String username, long templateID){
+ public String getTemplateScript(String username, long templateID) {
Template template = space.getTemplate(templateID);
if (template == null) {
return null;
Modified: maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml 2007-10-19 17:15:31 UTC (rev 518)
+++ maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml 2007-10-19 22:09:21 UTC (rev 519)
@@ -222,6 +222,10 @@
<![CDATA[ from com.ogoglio.persist.PossessionRecord as possession where possession.spaceID = :spaceID ]]>
</query>
+ <query name="com.ogoglio.persist.possessionsByTemplateID">
+ <![CDATA[ from com.ogoglio.persist.PossessionRecord as possession where possession.templateID = :templateID ]]>
+ </query>
+
<query name="com.ogoglio.persist.templateByID">
<![CDATA[ from com.ogoglio.persist.TemplateRecord as template where template.templateID = :templateID ]]>
</query>
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/space-1
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/space-1 2007-10-19 17:15:31 UTC (rev 518)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/space-1 2007-10-19 22:09:21 UTC (rev 519)
@@ -1,52 +1 @@
-<space ownerusername="library" sealevel="0.0" simid="1"
- displayname="Sitting" maxguests="0" displaysea="false" spaceid="1"
- published="true">
- <thing templateid="9" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="EamesLoungeChair" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="1" thingid="1"
- z="-5.0" y="0.0" x="-18.0" ownerusername="library" />
- <thing templateid="24" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="OfficeChair" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="2" thingid="2"
- z="-5.0" y="0.0" x="-16.0" ownerusername="library" />
- <thing templateid="18" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="LeCorbusierRecliner" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="3" thingid="3"
- z="-5.0" y="0.0" x="-8.2" ownerusername="library" />
- <thing templateid="19" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="LeCorbusierSofa" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="4" thingid="4"
- z="-5.0" y="0.0" x="-12.0" ownerusername="library" />
- <thing templateid="16" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="JacobsenChair3107" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="5" thingid="5"
- z="-5.0" y="0.0" x="-3.0" ownerusername="library" />
- <thing templateid="5" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="CescaArmChair" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="6" thingid="6"
- z="-5.0" y="0.0" x="-6.0" ownerusername="library" />
- <thing templateid="8" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="AluminumChair" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="7" thingid="7"
- z="-5.0" y="0.0" x="0.0" ownerusername="library" />
- <thing templateid="20" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="MarshmallowSofa" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="8" thingid="8"
- z="-5.0" y="0.0" x="3.0" ownerusername="library" />
- <thing templateid="17" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="LeCorbusierArmChair" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="9" thingid="9"
- z="-5.0" y="0.0" x="9.0" ownerusername="library" />
- <thing templateid="3" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="BarcelonaChair" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="10" thingid="10"
- z="-5.0" y="0.0" x="6.0" ownerusername="library" />
- <thing templateid="31" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="OfficeChairNoArms" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="11" thingid="11"
- z="-5.0" y="0.0" x="12.0" ownerusername="library" />
- <thing templateid="6" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
- scalez="1.0" displayname="CornerSofa" scaley="1.0"
- templateowner="library" scalex="1.0" possessionid="12" thingid="12"
- z="-5.0" y="0.0" x="18.0" ownerusername="library" />
-</space>
+<space ownerusername="admin" sealevel="0.000000" simid="1" displayname="Sitting" maxguests="5" displaysea="false" spaceid="2" published="true"><thing templateid="24" rz="0.000000" ry="0.841471" rx="0.000000" rw="0.540302" scalez="1.000000" displayname="Office Chair" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="1" thingid="1" z="-9.000000" y="0.000000" x="-5.000000" ownerusername="admin"/><thing templateid="19" rz="0.000000" ry="-0.711473" rx="0.000000" rw="0.702713" scalez="1.000000" displayname="Le Corbusier Sofa" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="2" thingid="2" z="-12.000000" y="0.000000" x="2.000000" ownerusername="admin"/><thing templateid="17" rz="0.000000" ry="0.681639" rx="0.000000" rw="0.731688" scalez="1.000000" displayname="Le Corbusier Arm Chair" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="3" thingid="3" z="-12.000000" y="0.000000" x="-5.000000" ownerusername="admin"/><thing templateid="20" rz="0.000000" ry="-0.479426" rx="0.000000" rw="0.877582" scalez="1.000000" displayname="Marshmallow Sofa" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="4" thingid="4" z="-16.000000" y="0.000000" x="1.500000" ownerusername="admin"/><thing templateid="31" rz="0.000000" ry="0.841471" rx="0.000000" rw="0.540302" scalez="1.000000" displayname="Office Chair No Arms" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="5" thingid="5" z="-10.000000" y="0.000000" x="-5.000000" ownerusername="admin"/><thing templateid="5" rz="0.000000" ry="0.997495" rx="0.000000" rw="0.070737" scalez="1.000000" displayname="Cesca Arm Chair" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="6" thingid="6" z="-8.000000" y="0.000000" x="-4.000000" ownerusername="admin"/><thing templateid="9" rz="0.000000" ry="-0.999574" rx="0.000000" rw="0.029200" scalez="1.000000" displayname="Eames Lounge Chair" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="7" thingid="7" z="-8.000000" y="0.000000" x="-2.000000" ownerusername="admin"/><thing templateid="18" rz="0.000000" ry="0.681639" rx="0.000000" rw="0.731688" scalez="1.000000" displayname="Le Corbusier Recliner" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="8" thingid="8" z="-18.000000" y="0.000000" x="-1.200000" ownerusername="admin"/><thing templateid="3" rz="0.000000" ry="-0.983986" rx="0.000000" rw="0.178246" scalez="1.000000" displayname="Barcelona Chair" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="9" thingid="9" z="-9.000000" y="0.000000" x="0.000000" ownerusername="admin"/><thing templateid="8" rz="0.000000" ry="0.000000" rx="0.000000" rw="1.000000" scalez="1.000000" displayname="Aluminum Chair" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="10" thingid="10" z="-17.000000" y="0.000000" x="0.000000" ownerusername="admin"/><thing templateid="6" rz="0.000000" ry="0.479426" rx="0.000000" rw="0.877582" scalez="1.000000" displayname="Corner Sofa" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="11" thingid="11" z="-17.000000" y="0.000000" x="-4.000000" ownerusername="admin"/><thing templateid="16" rz="0.000000" ry="0.681639" rx="0.000000" rw="0.731689" scalez="1.000000" displayname="Jacobsen Chair3107" scaley="1.000000" templateowner="admin" scalex="1.000000" possessionid="12" thingid="12" z="-14.000000" y="0.000000" x="-5.000000" ownerusername="admin"/></space>
\ No newline at end of file
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/template-15/HillHouseChair.blend
===================================================================
(Binary files differ)
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/template-15/HillHouseChair.obj
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-15/HillHouseChair.obj 2007-10-19 17:15:31 UTC (rev 518)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-15/HillHouseChair.obj 2007-10-19 22:09:21 UTC (rev 519)
@@ -2,1435 +2,1435 @@
# www.blender3d.org
mtllib HillHouseChair.mtl
o frame_Material_#39
-v -8.820000 2.800000 -0.700000
-v -0.316349 2.799963 -0.363283
-v -0.316349 2.865866 -0.363283
-v -0.316349 2.799963 -0.378398
-v -0.316349 2.865866 -0.378398
-v -0.316349 0.004264 -0.363283
-v -0.316349 0.070167 -0.363283
-v -0.316349 0.004264 -0.378399
-v -0.316349 0.070167 -0.378399
-v -0.316349 0.137393 -0.363283
-v -0.316349 0.203296 -0.363283
-v -0.316349 0.137393 -0.378399
-v -0.316349 0.203296 -0.378399
-v -0.316349 0.270522 -0.363283
-v -0.316349 0.336424 -0.363283
-v -0.316349 0.270522 -0.378399
-v -0.316349 0.336424 -0.378399
-v -0.316349 0.403650 -0.363283
-v -0.316349 0.469553 -0.363283
-v -0.316349 0.403650 -0.378399
-v -0.316349 0.469553 -0.378399
-v -0.316349 0.536779 -0.363283
-v -0.316349 0.602682 -0.363283
-v -0.316349 0.536779 -0.378399
-v -0.316349 0.602682 -0.378399
-v -0.316349 0.669907 -0.363283
-v -0.316349 0.735810 -0.363283
-v -0.316349 0.669907 -0.378399
-v -0.316349 0.735810 -0.378399
-v -0.316349 0.803036 -0.363283
-v -0.316349 0.868939 -0.363283
-v -0.316349 0.803036 -0.378399
-v -0.316349 0.868939 -0.378399
-v -0.316349 0.936164 -0.363283
-v -0.316349 1.002067 -0.363283
-v -0.316349 0.936164 -0.378399
-v -0.316349 1.002067 -0.378399
-v -0.316349 1.069293 -0.363283
-v -0.316349 1.135196 -0.363283
-v -0.316349 1.069293 -0.378399
-v -0.316349 1.135196 -0.378399
-v -0.316349 1.202421 -0.363283
-v -0.316349 1.268324 -0.363283
-v -0.316349 1.202421 -0.378399
-v -0.316349 1.268324 -0.378399
-v -0.316349 1.335550 -0.363283
-v -0.316349 1.401453 -0.363283
-v -0.316349 1.335550 -0.378399
-v -0.316349 1.401453 -0.378398
-v -0.316349 1.468678 -0.363283
-v -0.316349 1.534581 -0.363283
-v -0.316349 1.468678 -0.378398
-v -0.316349 1.534581 -0.378398
-v -0.316349 1.601807 -0.363283
-v -0.316349 1.667710 -0.363283
-v -0.316349 1.601807 -0.378398
-v -0.316349 1.667710 -0.378398
-v -0.316349 1.734935 -0.363283
-v -0.316349 1.800838 -0.363283
-v -0.316349 1.734935 -0.378398
-v -0.316349 1.800838 -0.378398
-v -0.316349 1.868064 -0.363283
-v -0.316349 1.933967 -0.363283
-v -0.316349 1.868064 -0.378398
-v -0.316349 1.933967 -0.378398
-v -0.316349 2.001192 -0.363283
-v -0.316349 2.067095 -0.363283
-v -0.316349 2.001192 -0.378398
-v -0.316349 2.067095 -0.378398
-v -0.316349 2.134321 -0.363283
-v -0.316349 2.200224 -0.363283
-v -0.316349 2.134321 -0.378398
-v -0.316349 2.200224 -0.378398
-v -0.316349 2.267449 -0.363283
-v -0.316349 2.333352 -0.363283
-v -0.316349 2.267449 -0.378398
-v -0.316349 2.333352 -0.378398
-v -0.316349 2.400578 -0.363283
-v -0.316349 2.466481 -0.363283
-v -0.316349 2.400578 -0.378398
-v -0.316349 2.466481 -0.378398
-v -0.316349 2.533706 -0.363283
-v -0.316349 2.599609 -0.363283
-v -0.316349 2.533706 -0.378398
-v -0.316349 2.599609 -0.378398
-v -0.316349 2.666835 -0.363283
-v -0.316349 2.732738 -0.363283
-v -0.316349 2.666835 -0.378398
-v -0.316349 2.732738 -0.378398
-v -0.316349 2.933092 -0.363283
-v -0.316349 2.998995 -0.363283
-v -0.316349 2.933092 -0.378398
-v -0.316349 2.998995 -0.378398
-v -0.316349 3.066221 -0.363283
-v -0.316349 3.132123 -0.363283
-v -0.316349 3.066221 -0.378398
-v -0.316349 3.132123 -0.378398
-v -0.424112 -0.030615 0.349412
-v -0.426888 -0.030615 0.339054
-v -0.434470 -0.030615 0.331471
-v -0.444829 -0.030615 0.328695
-v -0.455187 -0.030615 0.331471
-v -0.462770 -0.030615 0.339054
-v -0.465546 -0.030615 0.349412
-v -0.462770 -0.030615 0.359771
-v -0.455187 -0.030615 0.367354
-v -0.444829 -0.030615 0.370129
-v -0.434470 -0.030615 0.367354
-v -0.426888 -0.030615 0.359771
-v -0.424112 0.861191 0.349412
-v -0.426888 0.861191 0.339054
-v -0.434470 0.861191 0.331471
-v -0.444829 0.861191 0.328696
-v -0.455187 0.861191 0.331471
-v -0.462770 0.861191 0.339054
-v -0.465546 0.861191 0.349412
-v -0.462770 0.861191 0.359771
-v -0.455187 0.861191 0.367354
-v -0.444829 0.861191 0.370129
-v -0.434470 0.861191 0.367354
-v -0.426888 0.861191 0.352050
-v -0.424112 0.961367 0.349412
-v -0.426888 0.961367 0.339054
-v -0.434470 0.961367 0.331471
-v -0.444829 0.961367 0.328696
-v -0.455187 0.961367 0.331471
-v -0.462770 0.961367 0.339054
-v -0.465546 0.961367 0.349412
-v -0.462770 0.961367 0.359771
-v -0.455187 0.961367 0.367354
-v -0.444829 0.961367 0.370129
-v -0.434470 0.961367 0.367354
-v -0.426888 0.961367 0.352050
-v -0.323274 0.861191 -0.359568
-v -0.333633 0.861191 -0.359564
-v -0.343992 0.861191 -0.359568
-v -0.348737 0.961367 -0.359058
-v -0.338378 0.961367 -0.359055
-v -0.328020 0.961367 -0.359058
-v -0.435890 0.264134 0.368684
-v -0.435890 0.249399 0.357979
-v -0.435890 0.255028 0.340657
-v -0.435890 0.273241 0.340657
-v -0.435890 0.278869 0.357979
-v -0.439432 0.218242 0.354200
-v -0.443589 0.212439 0.353503
-v -0.450318 0.214656 0.352375
-v -0.450318 0.221829 0.352375
-v -0.443589 0.224045 0.353503
-v -0.320608 0.218242 -0.354492
-v -0.324766 0.212439 -0.355189
-v -0.331494 0.214656 -0.356317
-v -0.331494 0.221829 -0.356317
-v -0.324766 0.224046 -0.355189
-v -0.439432 0.316060 0.354200
-v -0.443589 0.310257 0.353503
-v -0.450318 0.312474 0.352375
-v -0.450318 0.319647 0.352375
-v -0.443589 0.321864 0.353503
-v -0.320608 0.316060 -0.354492
-v -0.324766 0.310257 -0.355189
-v -0.331494 0.312474 -0.356317
-v -0.331494 0.319647 -0.356317
-v -0.324766 0.321864 -0.355189
-v -0.302178 -0.030615 -0.371799
-v -0.323431 -0.030615 -0.401051
-v -0.357819 -0.030615 -0.389878
-v -0.357819 -0.030615 -0.353720
-v -0.323431 -0.030615 -0.342547
-v -0.302178 3.553614 -0.371799
-v -0.323431 3.553614 -0.401051
-v -0.357819 3.553614 -0.389877
-v -0.357819 3.553614 -0.353720
-v -0.323431 3.553614 -0.342546
-v 0.333612 2.799963 -0.363283
-v 0.333612 2.865866 -0.363283
-v 0.333612 2.799963 -0.378398
-v 0.333612 2.865866 -0.378398
-v 0.333612 0.004264 -0.363283
-v 0.333612 0.070167 -0.363283
-v 0.333612 0.004264 -0.378399
-v 0.333612 0.070167 -0.378399
-v 0.333612 0.137393 -0.363283
-v 0.333612 0.203296 -0.363283
-v 0.333612 0.137393 -0.378399
-v 0.333612 0.203296 -0.378399
-v 0.333612 0.270522 -0.363283
-v 0.333612 0.336424 -0.363283
-v 0.333612 0.270522 -0.378399
-v 0.333612 0.336424 -0.378399
-v 0.333612 0.403650 -0.363283
-v 0.333612 0.469553 -0.363283
-v 0.333612 0.403650 -0.378399
-v 0.333612 0.469553 -0.378399
-v 0.333612 0.536779 -0.363283
-v 0.333612 0.602682 -0.363283
-v 0.333612 0.536779 -0.378399
-v 0.333612 0.602682 -0.378399
-v 0.333612 0.669907 -0.363283
-v 0.333612 0.735810 -0.363283
-v 0.333612 0.669907 -0.378399
-v 0.333612 0.735810 -0.378399
-v 0.333612 0.803036 -0.363283
-v 0.333612 0.868939 -0.363283
-v 0.333612 0.803036 -0.378399
-v 0.333612 0.868939 -0.378399
-v 0.333612 0.936164 -0.363283
-v 0.333612 1.002067 -0.363283
-v 0.333612 0.936164 -0.378399
-v 0.333612 1.002067 -0.378399
-v 0.333612 1.069293 -0.363283
-v 0.333612 1.135196 -0.363283
-v 0.333612 1.069293 -0.378399
-v 0.333612 1.135196 -0.378399
-v 0.333612 1.202421 -0.363283
-v 0.333612 1.268324 -0.363283
-v 0.333612 1.202421 -0.378399
-v 0.333612 1.268324 -0.378399
-v 0.333612 1.335550 -0.363283
-v 0.333612 1.401453 -0.363283
-v 0.333612 1.335550 -0.378399
-v 0.333612 1.401453 -0.378398
-v 0.333612 1.468678 -0.363283
-v 0.333612 1.534581 -0.363283
-v 0.333612 1.468678 -0.378398
-v 0.333612 1.534581 -0.378398
-v 0.333612 1.601807 -0.363283
-v 0.333612 1.667710 -0.363283
-v 0.333612 1.601807 -0.378398
-v 0.333612 1.667710 -0.378398
-v 0.333612 1.734935 -0.363283
-v 0.333612 1.800838 -0.363283
-v 0.333612 1.734935 -0.378398
-v 0.333612 1.800838 -0.378398
-v 0.333612 1.868064 -0.363283
-v 0.333612 1.933967 -0.363283
-v 0.333612 1.868064 -0.378398
-v 0.333612 1.933967 -0.378398
-v 0.333612 2.001192 -0.363283
-v 0.333612 2.067095 -0.363283
-v 0.333612 2.001192 -0.378398
-v 0.333612 2.067095 -0.378398
-v 0.333612 2.134321 -0.363283
-v 0.333612 2.200224 -0.363283
-v 0.333612 2.134321 -0.378398
-v 0.333612 2.200224 -0.378398
-v 0.333612 2.267449 -0.363283
-v 0.333612 2.333352 -0.363283
-v 0.333612 2.267449 -0.378398
-v 0.333612 2.333352 -0.378398
-v 0.333612 2.400578 -0.363283
-v 0.333612 2.466481 -0.363283
-v 0.333612 2.400578 -0.378398
-v 0.333612 2.466481 -0.378398
-v 0.333612 2.533706 -0.363283
-v 0.333612 2.599609 -0.363283
-v 0.333612 2.533706 -0.378398
-v 0.333612 2.599609 -0.378398
-v 0.333612 2.666835 -0.363283
-v 0.333612 2.732738 -0.363283
-v 0.333612 2.666835 -0.378398
-v 0.333612 2.732738 -0.378398
-v 0.333612 2.933092 -0.363283
-v 0.333612 2.998995 -0.363283
-v 0.333612 2.933092 -0.378398
-v 0.333612 2.998995 -0.378398
-v 0.333612 3.066221 -0.363283
-v 0.333612 3.132123 -0.363283
-v 0.333612 3.066221 -0.378398
-v 0.333612 3.132123 -0.378398
-v 0.441376 -0.030615 0.349412
-v 0.444151 -0.030615 0.339054
-v 0.444151 0.861191 0.339054
-v 0.441376 0.861191 0.349412
-v 0.451734 -0.030615 0.331471
-v 0.451734 0.861191 0.331471
-v 0.462093 -0.030615 0.328695
-v 0.462093 0.861191 0.328696
-v 0.472451 -0.030615 0.331471
-v 0.472451 0.861191 0.331471
-v 0.480034 -0.030615 0.339054
-v 0.480034 0.861191 0.339054
-v 0.482809 -0.030615 0.349412
-v 0.482809 0.861191 0.349412
-v 0.480034 -0.030615 0.359771
-v 0.480034 0.861191 0.359771
-v 0.472451 -0.030615 0.367354
-v 0.472451 0.861191 0.367354
-v 0.462093 -0.030615 0.370129
-v 0.462093 0.861191 0.370129
-v 0.451734 -0.030615 0.367354
-v 0.451734 0.861191 0.367354
-v 0.444151 -0.030615 0.359771
-v 0.444151 0.861191 0.352050
-v 0.441376 0.961367 0.349412
-v 0.444151 0.961367 0.339054
-v 0.451734 0.961367 0.331471
-v 0.462093 0.961367 0.328696
-v 0.472451 0.961367 0.331471
-v 0.480034 0.961367 0.339054
-v 0.482809 0.961367 0.349412
-v 0.480034 0.961367 0.359771
-v 0.472451 0.961367 0.367354
-v 0.462093 0.961367 0.370129
-v 0.451734 0.961367 0.367354
-v 0.444151 0.961367 0.352050
-v 0.350897 0.861191 -0.359564
-v 0.340538 0.861191 -0.359568
-v 0.361255 0.861191 -0.359568
-v 0.366000 0.961367 -0.359058
-v 0.355642 0.961367 -0.359055
-v 0.345284 0.961367 -0.359058
-v 0.453154 0.264134 0.368684
-v 0.453154 0.249399 0.357979
-v 0.453154 0.255028 0.340657
-v 0.453154 0.273241 0.340657
-v 0.453154 0.278869 0.357979
-v 0.456695 0.218242 0.354200
-v 0.460853 0.212439 0.353503
-v 0.342029 0.212439 -0.355189
-v 0.337871 0.218242 -0.354492
-v 0.467581 0.214656 0.352375
-v 0.348757 0.214656 -0.356317
-v 0.467581 0.221829 0.352375
-v 0.348757 0.221829 -0.356317
-v 0.460853 0.224045 0.353503
-v 0.342029 0.224046 -0.355189
-v 0.456695 0.316060 0.354200
-v 0.460853 0.310257 0.353503
-v 0.342029 0.310257 -0.355189
-v 0.337871 0.316060 -0.354492
-v 0.467581 0.312474 0.352375
-v 0.348757 0.312474 -0.356317
-v 0.467581 0.319647 0.352375
-v 0.348757 0.319647 -0.356317
-v 0.460853 0.321864 0.353503
-v 0.342029 0.321864 -0.355189
-v 0.319441 -0.030615 -0.371799
-v 0.340694 -0.030615 -0.401051
-v 0.340694 3.553614 -0.401051
-v 0.319441 3.553614 -0.371799
-v 0.375082 -0.030615 -0.389878
-v 0.375082 3.553614 -0.389877
-v 0.375082 -0.030615 -0.353720
-v 0.375082 3.553614 -0.353720
-v 0.340694 -0.030615 -0.342547
-v 0.340694 3.553614 -0.342546
-v -0.312753 3.154567 -0.367072
-v 0.333250 3.154567 -0.367072
-v -0.312753 3.536669 -0.367072
-v 0.333250 3.536669 -0.367072
-v -0.312753 3.154567 -0.375088
-v 0.333250 3.154567 -0.375088
-v -0.312753 3.536669 -0.375088
-v 0.333250 3.536669 -0.375088
-v 0.287319 3.172385 -0.367072
-v 0.225875 3.172385 -0.367072
-v 0.225875 3.172385 -0.375088
-v 0.287319 3.172385 -0.375088
-v 0.287319 3.233829 -0.367072
-v 0.287319 3.233829 -0.375088
-v 0.225875 3.233829 -0.367072
-v 0.225875 3.233829 -0.375088
-v -0.204233 3.459124 -0.367072
-v -0.265676 3.459124 -0.367072
-v -0.265676 3.459124 -0.375088
-v -0.204233 3.459124 -0.375088
-v -0.204233 3.520567 -0.367072
-v -0.204233 3.520567 -0.375088
-v -0.265676 3.520567 -0.367072
-v -0.265676 3.520567 -0.375088
-v -0.204233 3.387439 -0.367072
-v -0.265676 3.387439 -0.367072
-v -0.265676 3.387439 -0.375088
-v -0.204233 3.387439 -0.375088
-v -0.204233 3.448883 -0.367072
-v -0.204233 3.448883 -0.375088
-v -0.265676 3.448883 -0.367072
-v -0.265676 3.448883 -0.375088
-v -0.204233 3.315754 -0.367072
-v -0.265676 3.315754 -0.367072
-v -0.265676 3.315754 -0.375088
-v -0.204233 3.315754 -0.375088
-v -0.204233 3.377198 -0.367072
-v -0.204233 3.377198 -0.375088
-v -0.265676 3.377198 -0.367072
-v -0.265676 3.377198 -0.375088
-v -0.204233 3.244070 -0.367072
-v -0.265676 3.244070 -0.367072
-v -0.265676 3.244070 -0.375088
-v -0.204233 3.244070 -0.375088
-v -0.204233 3.305514 -0.367072
-v -0.204233 3.305514 -0.375088
-v -0.265676 3.305514 -0.367072
-v -0.265676 3.305514 -0.375088
-v -0.204233 3.172385 -0.367072
-v -0.265676 3.172385 -0.367072
-v -0.265676 3.172385 -0.375088
-v -0.204233 3.172385 -0.375088
-v -0.204233 3.233829 -0.367072
-v -0.204233 3.233829 -0.375088
-v -0.265676 3.233829 -0.367072
-v -0.265676 3.233829 -0.375088
-v -0.081345 3.459124 -0.367072
-v -0.142789 3.459124 -0.367072
-v -0.142789 3.459124 -0.375088
-v -0.081345 3.459124 -0.375088
-v -0.081345 3.520567 -0.367072
-v -0.081345 3.520567 -0.375088
-v -0.142789 3.520567 -0.367072
-v -0.142789 3.520567 -0.375088
-v -0.081345 3.387439 -0.367072
-v -0.081345 3.387439 -0.375088
-v -0.142789 3.387439 -0.367072
-v -0.142789 3.387439 -0.375088
-v -0.081345 3.448883 -0.367072
-v -0.081345 3.448883 -0.375088
-v -0.142789 3.448883 -0.375088
-v -0.142789 3.448883 -0.367072
-v -0.081345 3.315754 -0.367072
-v -0.142789 3.315754 -0.367072
-v -0.142789 3.315754 -0.375088
-v -0.081345 3.315754 -0.375088
-v -0.081345 3.377198 -0.367072
-v -0.081345 3.377198 -0.375088
-v -0.142789 3.377198 -0.375088
-v -0.142789 3.377198 -0.367072
-v -0.081345 3.244070 -0.367072
-v -0.142789 3.244070 -0.367072
-v -0.142789 3.244070 -0.375088
-v -0.081345 3.244070 -0.375088
-v -0.081345 3.305514 -0.367072
-v -0.081345 3.305514 -0.375088
-v -0.142789 3.305514 -0.375088
-v -0.142789 3.305514 -0.367072
-v -0.142789 3.172385 -0.367072
-v -0.081345 3.172385 -0.367072
-v -0.142789 3.172385 -0.375088
-v -0.081345 3.172385 -0.375088
-v -0.081345 3.233829 -0.367072
-v -0.081345 3.233829 -0.375088
-v -0.142789 3.233829 -0.367072
-v -0.142789 3.233829 -0.375088
-v 0.041543 3.459124 -0.367072
-v -0.019901 3.459124 -0.367072
-v -0.019901 3.459124 -0.375088
-v 0.041543 3.459124 -0.375088
-v 0.041543 3.520567 -0.367072
-v 0.041543 3.520567 -0.375088
-v -0.019901 3.520567 -0.367072
-v -0.019901 3.520567 -0.375088
-v -0.019901 3.387439 -0.367072
-v -0.019901 3.387439 -0.375088
-v 0.041543 3.387439 -0.367072
-v 0.041543 3.387439 -0.375088
-v 0.041543 3.448883 -0.367072
-v 0.041543 3.448883 -0.375088
-v -0.019901 3.448883 -0.375088
-v -0.019901 3.448883 -0.367072
-v 0.041543 3.315754 -0.367072
-v -0.019901 3.315754 -0.367072
-v -0.019901 3.315754 -0.375088
-v 0.041543 3.315754 -0.375088
-v 0.041543 3.377198 -0.367072
-v 0.041543 3.377198 -0.375088
-v -0.019901 3.377198 -0.367072
-v -0.019901 3.377198 -0.375088
-v 0.041543 3.244070 -0.367072
-v 0.041543 3.244070 -0.375088
-v -0.019901 3.244070 -0.367072
-v -0.019901 3.244070 -0.375088
-v 0.041543 3.305514 -0.367072
-v 0.041543 3.305514 -0.375088
-v -0.019901 3.305514 -0.375088
-v -0.019901 3.305514 -0.367072
-v -0.019901 3.172385 -0.367072
-v 0.041543 3.172385 -0.367072
-v -0.019901 3.172385 -0.375088
-v 0.041543 3.172385 -0.375088
-v 0.041543 3.233829 -0.367072
-v 0.041543 3.233829 -0.375088
-v -0.019901 3.233829 -0.375088
-v -0.019901 3.233829 -0.367072
-v 0.164431 3.459124 -0.367072
-v 0.102987 3.459124 -0.367072
-v 0.102987 3.459124 -0.375088
-v 0.164431 3.459124 -0.375088
-v 0.164431 3.520567 -0.367072
-v 0.164431 3.520567 -0.375088
-v 0.102987 3.520567 -0.367072
-v 0.102987 3.520567 -0.375088
-v 0.102987 3.387439 -0.367072
-v 0.102987 3.387439 -0.375088
-v 0.164431 3.387439 -0.367072
-v 0.164431 3.387439 -0.375088
-v 0.164431 3.448883 -0.367072
-v 0.164431 3.448883 -0.375088
-v 0.102987 3.448883 -0.375088
-v 0.102987 3.448883 -0.367072
-v 0.102987 3.315754 -0.367072
-v 0.164431 3.315754 -0.375088
-v 0.102987 3.315754 -0.375088
-v 0.164431 3.315754 -0.367072
-v 0.164431 3.377198 -0.367072
-v 0.164431 3.377198 -0.375088
-v 0.102987 3.377198 -0.375088
-v 0.102987 3.377198 -0.367072
-v 0.164431 3.244070 -0.367072
-v 0.102987 3.244070 -0.367072
-v 0.102987 3.244070 -0.375088
-v 0.164431 3.244070 -0.375088
-v 0.164431 3.305514 -0.367072
-v 0.164431 3.305514 -0.375088
-v 0.102987 3.305514 -0.367072
-v 0.102987 3.305514 -0.375088
-v 0.102987 3.172385 -0.367072
-v 0.164431 3.172385 -0.367072
-v 0.102987 3.172385 -0.375088
-v 0.164431 3.172385 -0.375088
-v 0.164431 3.233829 -0.367072
-v 0.164431 3.233829 -0.375088
-v 0.102987 3.233829 -0.367072
-v 0.102987 3.233829 -0.375088
-v 0.287319 3.459124 -0.367072
-v 0.225875 3.459124 -0.367072
-v 0.225875 3.459124 -0.375088
-v 0.287319 3.459124 -0.375088
-v 0.287319 3.521202 -0.367072
-v 0.287319 3.521202 -0.375088
-v 0.225875 3.520567 -0.367072
-v 0.225875 3.520567 -0.375088
-v 0.287319 3.520567 -0.375088
-v 0.287319 3.520567 -0.367072
-v 0.287319 3.387439 -0.367072
-v 0.287319 3.387439 -0.375088
-v 0.225875 3.387439 -0.367072
-v 0.225875 3.387439 -0.375088
-v 0.287319 3.448883 -0.367072
-v 0.287319 3.448883 -0.375088
-v 0.225875 3.448883 -0.375088
-v 0.225875 3.448883 -0.367072
-v 0.287319 3.315754 -0.367072
-v 0.287319 3.315754 -0.375088
-v 0.225875 3.315754 -0.367072
-v 0.225875 3.315754 -0.375088
-v 0.287319 3.377198 -0.367072
-v 0.287319 3.377198 -0.375088
-v 0.225875 3.377198 -0.375088
-v 0.225875 3.377198 -0.367072
-v 0.225875 3.244070 -0.367072
-v 0.225875 3.244070 -0.375088
-v 0.287319 3.244070 -0.367072
-v 0.287319 3.244070 -0.375088
-v 0.287319 3.305514 -0.367072
-v 0.287319 3.305514 -0.375088
-v 0.225929 3.305514 -0.367072
-v 0.225875 3.305514 -0.375088
-v 0.225875 3.305763 -0.375088
-v 0.225875 3.305787 -0.367072
-v -0.444829 -0.030615 0.328695
-v -0.444829 0.861191 0.328696
-v -0.444829 -0.030615 0.328695
-v -0.434470 -0.030615 0.367354
-v -0.444829 -0.030615 0.370129
-v -0.455187 -0.030615 0.367354
-v -0.455187 -0.030615 0.367354
-v -0.462770 -0.030615 0.359771
-v -0.465546 -0.030615 0.349412
-v -0.465546 -0.030615 0.349412
-v -0.462770 -0.030615 0.339054
-v -0.455187 -0.030615 0.331471
-v -0.455187 -0.030615 0.367354
-v -0.465546 -0.030615 0.349412
-v -0.455187 -0.030615 0.331471
-v -0.455187 -0.030615 0.331471
-v -0.444829 -0.030615 0.328695
-v -0.434470 -0.030615 0.331471
-v -0.434470 -0.030615 0.331471
-v -0.426888 -0.030615 0.339054
-v -0.424112 -0.030615 0.349412
-v -0.455187 -0.030615 0.331471
-v -0.434470 -0.030615 0.331471
-v -0.424112 -0.030615 0.349412
-v -0.455187 -0.030615 0.367354
-v -0.455187 -0.030615 0.331471
-v -0.424112 -0.030615 0.349412
-v -0.434470 -0.030615 0.367354
-v -0.455187 -0.030615 0.367354
-v -0.424112 -0.030615 0.349412
-v -0.426888 -0.030615 0.359771
-v -0.434470 -0.030615 0.367354
-v -0.424112 -0.030615 0.349412
-v -0.444829 0.861191 0.328696
-v -0.333633 0.861191 -0.359564
-v -0.444829 0.861191 0.328696
-v -0.443589 0.224045 0.353503
-v -0.324766 0.224046 -0.355189
-v -0.443589 0.224045 0.353503
-v -0.450318 0.214656 0.352375
-v -0.443589 0.212439 0.353503
-v -0.439432 0.218242 0.354200
-v -0.450318 0.221829 0.352375
-v -0.450318 0.214656 0.352375
-v -0.439432 0.218242 0.354200
-v -0.443589 0.224045 0.353503
-v -0.450318 0.221829 0.352375
-v -0.439432 0.218242 0.354200
-v -0.331494 0.214656 -0.356317
-v -0.331494 0.221829 -0.356317
-v -0.324766 0.224046 -0.355189
-v -0.324766 0.212439 -0.355189
-v -0.331494 0.214656 -0.356317
-v -0.324766 0.224046 -0.355189
-v -0.320608 0.218242 -0.354492
-v -0.324766 0.212439 -0.355189
-v -0.324766 0.224046 -0.355189
-v -0.443589 0.321864 0.353503
-v -0.324766 0.321864 -0.355189
-v -0.443589 0.321864 0.353503
-v -0.450318 0.312474 0.352375
-v -0.443589 0.310257 0.353503
-v -0.439432 0.316060 0.354200
-v -0.450318 0.319647 0.352375
-v -0.450318 0.312474 0.352375
-v -0.439432 0.316060 0.354200
-v -0.443589 0.321864 0.353503
-v -0.450318 0.319647 0.352375
-v -0.439432 0.316060 0.354200
-v -0.331494 0.312474 -0.356317
-v -0.331494 0.319647 -0.356317
-v -0.324766 0.321864 -0.355189
-v -0.324766 0.310257 -0.355189
-v -0.331494 0.312474 -0.356317
-v -0.324766 0.321864 -0.355189
-v -0.320608 0.316060 -0.354492
-v -0.324766 0.310257 -0.355189
-v -0.324766 0.321864 -0.355189
-v -0.357819 -0.030615 -0.389878
-v -0.357819 3.553614 -0.389877
-v -0.357819 -0.030615 -0.389878
-v -0.357819 -0.030615 -0.389878
-v -0.323431 -0.030615 -0.401051
-v -0.302178 -0.030615 -0.371799
-v -0.357819 -0.030615 -0.353720
-v -0.357819 -0.030615 -0.389878
-v -0.302178 -0.030615 -0.371799
-v -0.323431 -0.030615 -0.342547
-v -0.357819 -0.030615 -0.353720
-v -0.302178 -0.030615 -0.371799
-v -0.357819 3.553614 -0.389877
-v -0.357819 3.553614 -0.353720
-v -0.323431 3.553614 -0.342546
-v -0.323431 3.553614 -0.401051
-v -0.357819 3.553614 -0.389877
-v -0.323431 3.553614 -0.342546
-v -0.302178 3.553614 -0.371799
-v -0.323431 3.553614 -0.401051
-v -0.323431 3.553614 -0.342546
-v 0.462093 -0.030615 0.328695
-v 0.462093 0.861191 0.328696
-v 0.462093 -0.030615 0.328695
-v 0.441376 -0.030615 0.349412
-v 0.444151 -0.030615 0.339054
-v 0.451734 -0.030615 0.331471
-v 0.451734 -0.030615 0.331471
-v 0.462093 -0.030615 0.328695
-v 0.472451 -0.030615 0.331471
-v 0.441376 -0.030615 0.349412
-v 0.451734 -0.030615 0.331471
-v 0.472451 -0.030615 0.331471
-v 0.472451 -0.030615 0.331471
-v 0.480034 -0.030615 0.339054
-v 0.482809 -0.030615 0.349412
-v 0.482809 -0.030615 0.349412
-v 0.480034 -0.030615 0.359771
-v 0.472451 -0.030615 0.367354
-v 0.472451 -0.030615 0.331471
-v 0.482809 -0.030615 0.349412
-v 0.472451 -0.030615 0.367354
-v 0.441376 -0.030615 0.349412
-v 0.472451 -0.030615 0.331471
-v 0.472451 -0.030615 0.367354
-v 0.472451 -0.030615 0.367354
-v 0.462093 -0.030615 0.370129
-v 0.451734 -0.030615 0.367354
-v 0.441376 -0.030615 0.349412
-v 0.472451 -0.030615 0.367354
-v 0.451734 -0.030615 0.367354
-v 0.444151 -0.030615 0.359771
-v 0.441376 -0.030615 0.349412
-v 0.451734 -0.030615 0.367354
-v 0.462093 0.861191 0.328696
-v 0.350897 0.861191 -0.359564
-v 0.462093 0.861191 0.328696
-v 0.460853 0.224045 0.353503
-v 0.342029 0.224046 -0.355189
-v 0.460853 0.224045 0.353503
-v 0.456695 0.218242 0.354200
-v 0.460853 0.212439 0.353503
-v 0.467581 0.214656 0.352375
-v 0.456695 0.218242 0.354200
-v 0.467581 0.214656 0.352375
-v 0.467581 0.221829 0.352375
-v 0.460853 0.224045 0.353503
-v 0.456695 0.218242 0.354200
-v 0.467581 0.221829 0.352375
-v 0.342029 0.224046 -0.355189
-v 0.348757 0.221829 -0.356317
-v 0.348757 0.214656 -0.356317
-v 0.342029 0.224046 -0.355189
-v 0.348757 0.214656 -0.356317
-v 0.342029 0.212439 -0.355189
-v 0.337871 0.218242 -0.354492
-v 0.342029 0.224046 -0.355189
-v 0.342029 0.212439 -0.355189
-v 0.460853 0.321864 0.353503
-v 0.342029 0.321864 -0.355189
-v 0.460853 0.321864 0.353503
-v 0.456695 0.316060 0.354200
-v 0.460853 0.310257 0.353503
-v 0.467581 0.312474 0.352375
-v 0.456695 0.316060 0.354200
-v 0.467581 0.312474 0.352375
-v 0.467581 0.319647 0.352375
-v 0.460853 0.321864 0.353503
-v 0.456695 0.316060 0.354200
-v 0.467581 0.319647 0.352375
-v 0.342029 0.321864 -0.355189
-v 0.348757 0.319647 -0.356317
-v 0.348757 0.312474 -0.356317
-v 0.342029 0.321864 -0.355189
-v 0.348757 0.312474 -0.356317
-v 0.342029 0.310257 -0.355189
-v 0.337871 0.316060 -0.354492
-v 0.342029 0.321864 -0.355189
-v 0.342029 0.310257 -0.355189
-v 0.375082 -0.030615 -0.389878
-v 0.375082 3.553614 -0.389877
-v 0.375082 -0.030615 -0.389878
-v 0.319441 -0.030615 -0.371799
-v 0.340694 -0.030615 -0.401051
-v 0.375082 -0.030615 -0.389878
-v 0.319441 -0.030615 -0.371799
-v 0.375082 -0.030615 -0.389878
-v 0.375082 -0.030615 -0.353720
-v 0.340694 -0.030615 -0.342547
-v 0.319441 -0.030615 -0.371799
-v 0.375082 -0.030615 -0.353720
-v 0.340694 3.553614 -0.342546
-v 0.375082 3.553614 -0.353720
-v 0.375082 3.553614 -0.389877
-v 0.340694 3.553614 -0.342546
-v 0.375082 3.553614 -0.389877
-v 0.340694 3.553614 -0.401051
-v 0.319441 3.553614 -0.371799
-v 0.340694 3.553614 -0.342546
-v 0.340694 3.553614 -0.401051
-v 0.333250 3.154567 -0.367072
-v 0.333250 3.154567 -0.375088
-v 0.333250 3.154567 -0.367072
-v 0.333250 3.536669 -0.367072
-v 0.333250 3.536669 -0.375088
-v 0.333250 3.536669 -0.367072
-v -0.312753 3.536669 -0.367072
-v -0.312753 3.536669 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.536669 -0.367072
-v 0.333250 3.154567 -0.375088
-v 0.333250 3.154567 -0.375088
-v 0.333250 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.536669 -0.375088
-v -0.312753 3.536669 -0.375088
-v -0.312753 3.536669 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.536669 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v -0.312753 3.154567 -0.375088
-v 0.333250 3.536669 -0.367072
-v 0.333250 3.536669 -0.367072
-v 0.333250 3.536669 -0.367072
-v 0.333250 3.536669 -0.367072
-v -0.312753 3.536669 -0.367072
-v -0.312753 3.536669 -0.367072
-v -0.312753 3.536669 -0.367072
-v -0.312753 3.536669 -0.367072
-v -0.312753 3.536669 -0.367072
-v -0.312753 3.536669 -0.367072
-v -0.312753 3.536669 -0.367072
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v 0.333250 3.154567 -0.367072
-v 0.333250 3.536669 -0.367072
-v 0.333250 3.154567 -0.367072
-v 0.333250 3.154567 -0.367072
-v 0.333250 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v 0.333250 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v -0.312753 3.154567 -0.367072
-v 0.287319 3.172385 -0.367072
-v 0.287319 3.172385 -0.375088
-v 0.225875 3.172385 -0.375088
-v 0.225875 3.172385 -0.375088
-v 0.225875 3.172385 -0.367072
-v 0.287319 3.172385 -0.367072
-v 0.287319 3.233829 -0.367072
-v 0.287319 3.233829 -0.375088
-v 0.287319 3.172385 -0.375088
-v 0.287319 3.172385 -0.375088
-v 0.287319 3.172385 -0.367072
-v 0.287319 3.233829 -0.367072
-v 0.225875 3.233829 -0.367072
-v 0.225875 3.233829 -0.375088
-v 0.287319 3.233829 -0.375088
-v 0.287319 3.233829 -0.375088
-v 0.287319 3.233829 -0.367072
-v 0.225875 3.233829 -0.367072
-v -0.204233 3.459124 -0.367072
-v -0.204233 3.459124 -0.375088
-v -0.265676 3.459124 -0.375088
-v -0.265676 3.459124 -0.375088
-v -0.265676 3.459124 -0.367072
-v -0.204233 3.459124 -0.367072
-v -0.204233 3.520567 -0.367072
-v -0.204233 3.520567 -0.375088
-v -0.204233 3.459124 -0.375088
-v -0.204233 3.459124 -0.375088
-v -0.204233 3.459124 -0.367072
-v -0.204233 3.520567 -0.367072
-v -0.265676 3.520567 -0.367072
-v -0.265676 3.520567 -0.375088
-v -0.204233 3.520567 -0.375088
-v -0.204233 3.520567 -0.375088
-v -0.204233 3.520567 -0.367072
-v -0.265676 3.520567 -0.367072
-v -0.204233 3.387439 -0.367072
-v -0.204233 3.387439 -0.375088
-v -0.265676 3.387439 -0.375088
-v -0.265676 3.387439 -0.375088
-v -0.265676 3.387439 -0.367072
-v -0.204233 3.387439 -0.367072
-v -0.204233 3.448883 -0.367072
-v -0.204233 3.448883 -0.375088
-v -0.204233 3.387439 -0.375088
-v -0.204233 3.387439 -0.375088
-v -0.204233 3.387439 -0.367072
-v -0.204233 3.448883 -0.367072
-v -0.265676 3.448883 -0.367072
-v -0.265676 3.448883 -0.375088
-v -0.204233 3.448883 -0.375088
-v -0.204233 3.448883 -0.375088
-v -0.204233 3.448883 -0.367072
-v -0.265676 3.448883 -0.367072
-v -0.204233 3.315754 -0.367072
-v -0.204233 3.315754 -0.375088
-v -0.265676 3.315754 -0.375088
-v -0.265676 3.315754 -0.375088
-v -0.265676 3.315754 -0.367072
-v -0.204233 3.315754 -0.367072
-v -0.204233 3.377198 -0.367072
-v -0.204233 3.377198 -0.375088
-v -0.204233 3.315754 -0.375088
-v -0.204233 3.315754 -0.375088
-v -0.204233 3.315754 -0.367072
-v -0.204233 3.377198 -0.367072
-v -0.265676 3.377198 -0.367072
-v -0.265676 3.377198 -0.375088
-v -0.204233 3.377198 -0.375088
-v -0.204233 3.377198 -0.375088
-v -0.204233 3.377198 -0.367072
-v -0.265676 3.377198 -0.367072
-v -0.204233 3.244070 -0.367072
-v -0.204233 3.244070 -0.375088
-v -0.265676 3.244070 -0.375088
-v -0.265676 3.244070 -0.375088
-v -0.265676 3.244070 -0.367072
-v -0.204233 3.244070 -0.367072
-v -0.204233 3.305514 -0.367072
-v -0.204233 3.305514 -0.375088
-v -0.204233 3.244070 -0.375088
-v -0.204233 3.244070 -0.375088
-v -0.204233 3.244070 -0.367072
-v -0.204233 3.305514 -0.367072
-v -0.265676 3.305514 -0.367072
-v -0.265676 3.305514 -0.375088
-v -0.204233 3.305514 -0.375088
-v -0.204233 3.305514 -0.375088
-v -0.204233 3.305514 -0.367072
-v -0.265676 3.305514 -0.367072
-v -0.204233 3.172385 -0.367072
-v -0.204233 3.172385 -0.375088
-v -0.265676 3.172385 -0.375088
-v -0.265676 3.172385 -0.375088
-v -0.265676 3.172385 -0.367072
-v -0.204233 3.172385 -0.367072
-v -0.204233 3.233829 -0.367072
-v -0.204233 3.233829 -0.375088
-v -0.204233 3.172385 -0.375088
-v -0.204233 3.172385 -0.375088
-v -0.204233 3.172385 -0.367072
-v -0.204233 3.233829 -0.367072
-v -0.265676 3.233829 -0.367072
-v -0.265676 3.233829 -0.375088
-v -0.204233 3.233829 -0.375088
-v -0.204233 3.233829 -0.375088
-v -0.204233 3.233829 -0.367072
-v -0.265676 3.233829 -0.367072
-v -0.081345 3.459124 -0.367072
-v -0.081345 3.459124 -0.375088
-v -0.142789 3.459124 -0.375088
-v -0.142789 3.459124 -0.375088
-v -0.142789 3.459124 -0.367072
-v -0.081345 3.459124 -0.367072
-v -0.081345 3.520567 -0.367072
-v -0.081345 3.520567 -0.375088
-v -0.081345 3.459124 -0.375088
-v -0.081345 3.459124 -0.375088
-v -0.081345 3.459124 -0.367072
-v -0.081345 3.520567 -0.367072
-v -0.142789 3.520567 -0.367072
-v -0.142789 3.520567 -0.375088
-v -0.081345 3.520567 -0.375088
-v -0.081345 3.520567 -0.375088
-v -0.081345 3.520567 -0.367072
-v -0.142789 3.520567 -0.367072
-v -0.081345 3.387439 -0.367072
-v -0.081345 3.387439 -0.375088
-v -0.142789 3.387439 -0.375088
-v -0.142789 3.387439 -0.375088
-v -0.142789 3.387439 -0.367072
-v -0.081345 3.387439 -0.367072
-v -0.081345 3.448883 -0.367072
-v -0.081345 3.448883 -0.375088
-v -0.081345 3.387439 -0.375088
-v -0.081345 3.387439 -0.375088
-v -0.081345 3.387439 -0.367072
-v -0.081345 3.448883 -0.367072
-v -0.142789 3.448883 -0.367072
-v -0.142789 3.448883 -0.375088
-v -0.081345 3.448883 -0.375088
-v -0.081345 3.448883 -0.375088
-v -0.081345 3.448883 -0.367072
-v -0.142789 3.448883 -0.367072
-v -0.081345 3.315754 -0.367072
-v -0.081345 3.315754 -0.375088
-v -0.142789 3.315754 -0.375088
-v -0.142789 3.315754 -0.375088
-v -0.142789 3.315754 -0.367072
-v -0.081345 3.315754 -0.367072
-v -0.081345 3.377198 -0.367072
-v -0.081345 3.377198 -0.375088
-v -0.081345 3.315754 -0.375088
-v -0.081345 3.315754 -0.375088
-v -0.081345 3.315754 -0.367072
-v -0.081345 3.377198 -0.367072
-v -0.142789 3.377198 -0.367072
-v -0.142789 3.377198 -0.375088
-v -0.081345 3.377198 -0.375088
-v -0.081345 3.377198 -0.375088
-v -0.081345 3.377198 -0.367072
-v -0.142789 3.377198 -0.367072
-v -0.081345 3.244070 -0.367072
-v -0.081345 3.244070 -0.375088
-v -0.142789 3.244070 -0.375088
-v -0.142789 3.244070 -0.375088
-v -0.142789 3.244070 -0.367072
-v -0.081345 3.244070 -0.367072
-v -0.081345 3.305514 -0.367072
-v -0.081345 3.305514 -0.375088
-v -0.081345 3.244070 -0.375088
-v -0.081345 3.244070 -0.375088
-v -0.081345 3.244070 -0.367072
-v -0.081345 3.305514 -0.367072
-v -0.142789 3.305514 -0.367072
-v -0.142789 3.305514 -0.375088
-v -0.081345 3.305514 -0.375088
-v -0.081345 3.305514 -0.375088
-v -0.081345 3.305514 -0.367072
-v -0.142789 3.305514 -0.367072
-v -0.081345 3.172385 -0.367072
-v -0.081345 3.172385 -0.375088
-v -0.142789 3.172385 -0.375088
-v -0.142789 3.172385 -0.375088
-v -0.142789 3.172385 -0.367072
-v -0.081345 3.172385 -0.367072
-v -0.081345 3.233829 -0.367072
-v -0.081345 3.233829 -0.375088
-v -0.081345 3.172385 -0.375088
-v -0.081345 3.172385 -0.375088
-v -0.081345 3.172385 -0.367072
-v -0.081345 3.233829 -0.367072
-v -0.142789 3.233829 -0.367072
-v -0.142789 3.233829 -0.375088
-v -0.081345 3.233829 -0.375088
-v -0.081345 3.233829 -0.375088
-v -0.081345 3.233829 -0.367072
-v -0.142789 3.233829 -0.367072
-v 0.041543 3.459124 -0.367072
-v 0.041543 3.459124 -0.375088
-v -0.019901 3.459124 -0.375088
-v -0.019901 3.459124 -0.375088
-v -0.019901 3.459124 -0.367072
-v 0.041543 3.459124 -0.367072
-v 0.041543 3.520567 -0.367072
-v 0.041543 3.520567 -0.375088
-v 0.041543 3.459124 -0.375088
-v 0.041543 3.459124 -0.375088
-v 0.041543 3.459124 -0.367072
-v 0.041543 3.520567 -0.367072
-v -0.019901 3.520567 -0.367072
-v -0.019901 3.520567 -0.375088
-v 0.041543 3.520567 -0.375088
-v 0.041543 3.520567 -0.375088
-v 0.041543 3.520567 -0.367072
-v -0.019901 3.520567 -0.367072
-v 0.041543 3.387439 -0.367072
-v 0.041543 3.387439 -0.375088
-v -0.019901 3.387439 -0.375088
-v -0.019901 3.387439 -0.375088
-v -0.019901 3.387439 -0.367072
-v 0.041543 3.387439 -0.367072
-v 0.041543 3.448883 -0.367072
-v 0.041543 3.448883 -0.375088
-v 0.041543 3.387439 -0.375088
-v 0.041543 3.387439 -0.375088
-v 0.041543 3.387439 -0.367072
-v 0.041543 3.448883 -0.367072
-v -0.019901 3.448883 -0.367072
-v -0.019901 3.448883 -0.375088
-v 0.041543 3.448883 -0.375088
-v 0.041543 3.448883 -0.375088
-v 0.041543 3.448883 -0.367072
-v -0.019901 3.448883 -0.367072
-v 0.041543 3.315754 -0.367072
-v 0.041543 3.315754 -0.375088
-v -0.019901 3.315754 -0.375088
-v -0.019901 3.315754 -0.375088
-v 0.041543 3.315754 -0.367072
-v 0.041543 3.377198 -0.367072
-v 0.041543 3.377198 -0.375088
-v 0.041543 3.315754 -0.375088
-v 0.041543 3.315754 -0.375088
-v 0.041543 3.315754 -0.367072
-v 0.041543 3.377198 -0.367072
-v -0.019901 3.377198 -0.367072
-v -0.019901 3.377198 -0.375088
-v 0.041543 3.377198 -0.375088
-v 0.041543 3.377198 -0.375088
-v 0.041543 3.377198 -0.367072
-v -0.019901 3.377198 -0.367072
-v 0.041543 3.244070 -0.367072
-v 0.041543 3.244070 -0.375088
-v -0.019901 3.244070 -0.375088
-v -0.019901 3.244070 -0.375088
-v -0.019901 3.244070 -0.367072
-v 0.041543 3.244070 -0.367072
-v 0.041543 3.305514 -0.375088
-v 0.041543 3.244070 -0.375088
-v 0.041543 3.244070 -0.375088
-v 0.041543 3.244070 -0.367072
-v -0.019901 3.305514 -0.367072
-v -0.019901 3.305514 -0.375088
-v 0.041543 3.305514 -0.375088
-v 0.041543 3.305514 -0.375088
-v 0.041543 3.305514 -0.367072
-v -0.019901 3.305514 -0.367072
-v 0.041543 3.172385 -0.367072
-v 0.041543 3.172385 -0.375088
-v -0.019901 3.172385 -0.375088
-v -0.019901 3.172385 -0.375088
-v -0.019901 3.172385 -0.367072
-v 0.041543 3.172385 -0.367072
-v 0.041543 3.233829 -0.367072
-v 0.041543 3.233829 -0.375088
-v 0.041543 3.172385 -0.375088
-v 0.041543 3.172385 -0.375088
-v 0.041543 3.172385 -0.367072
-v 0.041543 3.233829 -0.367072
-v -0.019901 3.233829 -0.367072
-v -0.019901 3.233829 -0.375088
-v 0.041543 3.233829 -0.375088
-v 0.041543 3.233829 -0.375088
-v 0.041543 3.233829 -0.367072
-v -0.019901 3.233829 -0.367072
-v 0.164431 3.459124 -0.367072
-v 0.164431 3.459124 -0.375088
-v 0.102987 3.459124 -0.375088
-v 0.102987 3.459124 -0.375088
-v 0.102987 3.459124 -0.367072
-v 0.164431 3.459124 -0.367072
-v 0.164431 3.520567 -0.367072
-v 0.164431 3.520567 -0.375088
-v 0.164431 3.459124 -0.375088
-v 0.164431 3.459124 -0.375088
-v 0.164431 3.459124 -0.367072
-v 0.164431 3.520567 -0.367072
-v 0.102987 3.520567 -0.367072
-v 0.102987 3.520567 -0.375088
-v 0.164431 3.520567 -0.375088
-v 0.164431 3.520567 -0.375088
-v 0.164431 3.520567 -0.367072
-v 0.102987 3.520567 -0.367072
-v 0.164431 3.387439 -0.367072
-v 0.164431 3.387439 -0.375088
-v 0.102987 3.387439 -0.375088
-v 0.102987 3.387439 -0.375088
-v 0.102987 3.387439 -0.367072
-v 0.164431 3.387439 -0.367072
-v 0.164431 3.448883 -0.367072
-v 0.164431 3.448883 -0.375088
-v 0.164431 3.387439 -0.375088
-v 0.164431 3.387439 -0.375088
-v 0.164431 3.387439 -0.367072
-v 0.164431 3.448883 -0.367072
-v 0.102987 3.448883 -0.367072
-v 0.102987 3.448883 -0.375088
-v 0.164431 3.448883 -0.375088
-v 0.164431 3.448883 -0.375088
-v 0.164431 3.448883 -0.367072
-v 0.102987 3.448883 -0.367072
-v 0.164431 3.315754 -0.367072
-v 0.164431 3.315754 -0.375088
-v 0.102987 3.315754 -0.375088
-v 0.102987 3.315754 -0.375088
-v 0.102987 3.315754 -0.367072
-v 0.164431 3.315754 -0.367072
-v 0.164431 3.377198 -0.367072
-v 0.164431 3.377198 -0.375088
-v 0.164431 3.315754 -0.375088
-v 0.164431 3.315754 -0.375088
-v 0.164431 3.315754 -0.367072
-v 0.164431 3.377198 -0.367072
-v 0.102987 3.377198 -0.367072
-v 0.102987 3.377198 -0.375088
-v 0.164431 3.377198 -0.375088
-v 0.164431 3.377198 -0.375088
-v 0.164431 3.377198 -0.367072
-v 0.102987 3.377198 -0.367072
-v 0.164431 3.244070 -0.367072
-v 0.164431 3.244070 -0.375088
-v 0.102987 3.244070 -0.375088
-v 0.102987 3.244070 -0.375088
-v 0.102987 3.244070 -0.367072
-v 0.164431 3.244070 -0.367072
-v 0.164431 3.305514 -0.367072
-v 0.164431 3.305514 -0.375088
-v 0.164431 3.244070 -0.375088
-v 0.164431 3.244070 -0.375088
-v 0.164431 3.244070 -0.367072
-v 0.164431 3.305514 -0.367072
-v 0.102987 3.305514 -0.367072
-v 0.102987 3.305514 -0.375088
-v 0.164431 3.305514 -0.375088
-v 0.164431 3.305514 -0.375088
-v 0.164431 3.305514 -0.367072
-v 0.102987 3.305514 -0.367072
-v 0.164431 3.172385 -0.367072
-v 0.164431 3.172385 -0.375088
-v 0.102987 3.172385 -0.375088
-v 0.102987 3.172385 -0.375088
-v 0.102987 3.172385 -0.367072
-v 0.164431 3.172385 -0.367072
-v 0.164431 3.233829 -0.367072
-v 0.164431 3.233829 -0.375088
-v 0.164431 3.172385 -0.375088
-v 0.164431 3.172385 -0.375088
-v 0.164431 3.172385 -0.367072
-v 0.164431 3.233829 -0.367072
-v 0.102987 3.233829 -0.367072
-v 0.102987 3.233829 -0.375088
-v 0.164431 3.233829 -0.375088
-v 0.164431 3.233829 -0.375088
-v 0.164431 3.233829 -0.367072
-v 0.102987 3.233829 -0.367072
-v 0.287319 3.459124 -0.367072
-v 0.287319 3.459124 -0.375088
-v 0.225875 3.459124 -0.375088
-v 0.225875 3.459124 -0.375088
-v 0.225875 3.459124 -0.367072
-v 0.287319 3.459124 -0.367072
-v 0.287319 3.520567 -0.367072
-v 0.287319 3.520567 -0.375088
-v 0.287319 3.459124 -0.375088
-v 0.287319 3.459124 -0.375088
-v 0.287319 3.459124 -0.367072
-v 0.287319 3.520567 -0.367072
-v 0.225875 3.520567 -0.367072
-v 0.225875 3.520567 -0.375088
-v 0.287319 3.520567 -0.375088
-v 0.287319 3.520567 -0.375088
-v 0.287319 3.520567 -0.367072
-v 0.225875 3.520567 -0.367072
-v 0.287319 3.387439 -0.367072
-v 0.287319 3.387439 -0.375088
-v 0.225875 3.387439 -0.375088
-v 0.225875 3.387439 -0.375088
-v 0.225875 3.387439 -0.367072
-v 0.287319 3.387439 -0...
[truncated message content] |