Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
CRC Collaborative Designer
Notes by Greg Smith
Key Centre of Design Computing and Cognition
University of Sydney
CRC Collaborative Designer – p.1/15
Objective
CRC project aims
Investigate distributed designer collaboration &
facilitating technologies
Investigate allowing different disciplines to share design
models
CRC Collaborative Designer aims
Allow remote designers to collaborate
Conceptual design environment
Integrate with virtual environment
CRC Collaborative Designer – p.2/15
Requirements of initial prototype
Designers
Collaborate remotely across network
Visualise design in AW browser 3D panel
Interact with system via AW browser HTML panel
Index page
System overview
Help
Health of database and agent
Webcam
Audio and vision
CRC Collaborative Designer – p.3/15
Requirements of initial prototype
Whiteboard
Distributed
Save/load sketches to/from database
Logging
Capture image to background
Designer’s palette
Distributed collaboration
Palette of 3D objects
Changes with category of designer
Configure & select objects parametrically
3D model viewer
Save/load objects & collaboration status to/from
database
CRC Collaborative Designer – p.3/15
Demo
CRC Collaborative Designer – p.4/15
System architecture
1.. ∗
1.. ∗
Apache Tomcat JSP engine on Linux or PC
MySQL database on
Linux or PC
Designer’s PC
Sensor AW3DObjectSensor
AWAvatarSensor
Perceptor
Agent
CcdAgent SpatialAgent StructuralAgent
CcdActivator
SpatialActivator
StructuralAtcivator
ActionActivator
AW3DObjectEffector
Effector
NullConceptor
BioBean
ProjectBean
ObjectCatalog
AgentBean
pallete.jsp
whiteboard.jsp
3D
Panel
HTML
Panel
AgentServer
AW Server
Agent(s) on PC
webcam.jsp
index.jsp
CRC Collaborative Designer – p.5/15
Designers PC
1.. ∗
1.. ∗
Apache Tomcat JSP engine on Linux or PC
MySQL database on
Linux or PC
Designer’s PC
Sensor AW3DObjectSensor
AWAvatarSensor
Perceptor
Agent
CcdAgent SpatialAgent StructuralAgent
CcdActivator
SpatialActivator
StructuralAtcivator
ActionActivator
AW3DObjectEffector
Effector
NullConceptor
BioBean
ProjectBean
ObjectCatalog
AgentBean
pallete.jsp
whiteboard.jsp
3D
Panel
HTML
Panel
AgentServer
AW Server
Agent(s) on PC
webcam.jsp
index.jsp
CRC Collaborative Designer – p.6/15
JSP engine
1.. ∗
1.. ∗
Apache Tomcat JSP engine on Linux or PC
MySQL database on
Linux or PC
Designer’s PC
Sensor AW3DObjectSensor
AWAvatarSensor
Perceptor
Agent
CcdAgent SpatialAgent StructuralAgent
CcdActivator
SpatialActivator
StructuralAtcivator
ActionActivator
AW3DObjectEffector
Effector
NullConceptor
BioBean
ProjectBean
ObjectCatalog
AgentBean
pallete.jsp
whiteboard.jsp
3D
Panel
HTML
Panel
AgentServer
AW Server
Agent(s) on PC
webcam.jsp
index.jsp
CRC Collaborative Designer – p.7/15
MySQL database
1.. ∗
1.. ∗
Apache Tomcat JSP engine on Linux or PC
MySQL database on
Linux or PC
Designer’s PC
Sensor AW3DObjectSensor
AWAvatarSensor
Perceptor
Agent
CcdAgent SpatialAgent StructuralAgent
CcdActivator
SpatialActivator
StructuralAtcivator
ActionActivator
AW3DObjectEffector
Effector
NullConceptor
BioBean
ProjectBean
ObjectCatalog
AgentBean
pallete.jsp
whiteboard.jsp
3D
Panel
HTML
Panel
AgentServer
AW Server
Agent(s) on PC
webcam.jsp
index.jsp
CRC Collaborative Designer – p.8/15
Agent Ccd
Java program, uses AW SDK via JNI to DLL
Senses
Changes to 3D objects in world
Changes to avatars in world
Chat in world
Remembers what 3D objects are nearby
Remembers what avatars are nearby
Listens for messages from JSP pages
Requests are to change world
Satisfies each request & returns response
CRC Collaborative Designer – p.9/15
pallete.jsp
Designer sees HTML rendered in AW browser RHS panel
And clicks on a radio button
...
Enable architects objects
... CRC Collaborative Designer – p.10/15 pallete.jsp But there is no such HTML file on the server! Instead it has the following ... <% String ar_ch = (pb.getCategory().equals("ARCHITECT") ? "CHECKED" : ""); %> ’ method="POST">
type="radio" name="category" value="<%= kcdcc.awa.proxy.AgentBean.ENABLE_ARCHITECT %>" onChange="document.of.submit()"> Enable architects objects
... CRC Collaborative Designer – p.11/15 pallete.jsp The above is part of a Java Server Pages (JSP) file Is normal HTML, CSS, JS, images, ... But also with Java code inserted Uses HTTP protocol Server “executes” JSP file HTML in pallete.jsp is left as is Executes <% /* java here */ %> code Executes <%= /* java here */ %> and inserts resulting value Sends resulting HTML to client browser When you click on radio button Form is submitted back to same JSP file CRC Collaborative Designer – p.12/15 pallete.jsp ’/> ’/> <% String pc = request.getParameter(’category’); if (pc == null) rmiagtst.setCategory(kcdcc.awa.proxy.AgentBean.ENABLE_ALL); else rmiagtst.setCategory(Integer.parseInt(pc)); %>  same JSP constructs different HTML according to situation CRC Collaborative Designer – p.13/15 Database Because pallete.jsp is on server It can use a database when constructing HTML <% kcdcc.crc.beans.ProjectBean pb = new kcdcc.crc.beans.ProjectBean("Prototyping"); %> kcdcc.crc.beans.ProjectBean is a Java class Hides database details from JSP engine Hides HTTP & JSP details from database Has methods like public String getCategory() { /* do SQL query to retrieve category */ } public void setCategory(String cat) { /* do SQL update with cat */ } CRC Collaborative Designer – p.14/15 Summary Agent is a remote Java process Listens to JSP engine for requests Talks to AW server to satisfy requests Database maintains state fo distributed system JSP engine Serves HTTP requests from AW browser clients (RHS panel) Interprets request messages Updates database & agent accordingly Returns new HTML in HTTP responses CRC Collaborative Designer – p.15/15 Summary AW browser: designer (citizen) ... Interacts with 3D world Chats to citizens &/or agent Interacts via whiteboard Interacts via webcam visual & audio CRC Collaborative Designer – p.15/15

本站部分内容来自互联网,仅供学习和参考