...
 
Commits (10)
This diff is collapsed.
<component name="libraryTable">
<library name="commons-io-2.6">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/commons-io-2.6" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/lib/commons-io-2.6" recursive="false" />
</library>
</component>
\ No newline at end of file
......@@ -58,6 +58,36 @@
<pathelement location="jre6/rt.jar"/>
</path>
<path id="batik.classpath">
<pathelement location="jre6/rt.jar"/>
<fileset dir="lib/batik-1.8">
<include name="batik-1.8.jar"/>
<!-- TODO: check which of the jars are needed! -->
<include name="batik-bridge-1.8.jar"/>
<include name="batik-codec-1.8.jar"/>
<include name="batik-css-1.8.jar"/>
<include name="batik-dom-1.8.jar"/>
<include name="batik-ext-1.8.jar"/>
<include name="batik-extension-1.8.jar"/>
<include name="batik-gui-util-1.8.jar"/>
<include name="batik-gvt-1.8.jar"/>
<include name="batik-parser-1.8.jar"/>
<include name="batik-script-1.8.jar"/>
<include name="batik-svg-dom-1.8.jar"/>
<include name="batik-svggen-1.8.jar"/>
<include name="batik-transcoder-1.8.jar"/>
<include name="batik-util-1.8.jar"/>
<include name="batik-xml-1.8.jar"/>
<include name="fop-transcoder-allinone-1.1.jar"/>
<include name="js.jar"/>
<include name="xalan-2.7.0.jar"/>
<include name="xerces_2_5_0.jar"/>
<include name="xml-apis-1.3.04.jar"/>
<include name="xml-apis-ext-1.3.04.jar"/>
<include name="xmlgraphics-commons-2.0.jar"/>
</fileset>
</path>
<path id="backends-share.classpath">
<fileset dir="dist">
<include name="jReality-core.jar"/>
......@@ -79,6 +109,8 @@
<fileset dir="dist">
<include name="jReality-core.jar"/>
<include name="jReality-tools.jar"/>
<include name="jacknativeclient.jar"/>
<include name="libpd.jar"/>
</fileset>
<fileset dir="lib">
<include name="jacknativeclient.jar"/>
......@@ -258,6 +290,7 @@
<include name="smrj.jar"/>
<include name="jogamp/jogl-all.jar"/>
<include name="jjack_min.jar"/>
<include name="jacknativeclient.jar"/>
<include name="colorpicker.jar"/>
<include name="beans.jar"/>
<include name="xstream-1.4.7.jar"/>
......@@ -285,7 +318,8 @@
<include name="jrworkspace.jar" />
<include name="beans.jar" />
<include name="jogamp/jogl-all.jar" />
<include name="numericalMethods.jar" />
<include name="numericalMethods.jar" />
<include name="commons-io-2.6.jar"/>
</fileset>
</path>
......@@ -303,6 +337,7 @@
<javac source="${source}" target="${target}" excludesfile="excludes.txt"
srcdir="${core}" destdir="${build}/core"
debug="true" includeantruntime="false" bootclasspathref="jre6.libraryclasspath">
<classpath refid="batik.classpath"/>
</javac>
<copy todir="${build}/core">
<fileset dir="${core}">
......@@ -869,4 +904,4 @@
<delete dir="${javadoc}"/>
</target>
</project>
\ No newline at end of file
</project>
......@@ -14,14 +14,12 @@
**/MasterApplication.java
**/ODEExample.java
**/**VRPN**
**/JLink*.java
**/SwtExample.java
**/csound/**
# this uses CSound:
**/MinimalExample.java
**/u3d/TestScene.java
**/DeviceSpacenav.java
**/WiiMoteOSC.java
**/OSCPool.java
**/blender/test/**
\ No newline at end of file
**/blender/test/**
This diff is collapsed.
Apache Batik
Copyright 1999-2007 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This software contains code from the World Wide Web Consortium (W3C) for the
Document Object Model API (DOM API) and SVG Document Type Definition (DTD).
This software contains code from the International Organisation for
Standardization for the definition of character entities used in the software's
documentation.
This product includes images from the Tango Desktop Project
(http://tango.freedesktop.org/).
This product includes images from the Pasodoble Icon Theme
(http://www.jesusda.com/projects/pasodoble).
A P A C H E B A T I K
What is it?
-----------
Batik is a Java based toolkit for applications which handle
images in the Scalable Vector Graphics (SVG) format for
various purposes, such as viewing, generation or
manipulation.
The project's ambition is to give developers a set of core
modules which can be used together or individually to
support specific SVG solutions. Examples of modules are
an SVG parser, an SVG generator and an SVG DOM
implementation. Another ambition of the Batik project is to
make it highly extensible (for example, Batik allows the
developer to handle custom SVG tags). Even though the
goal of the project is to provide a set of core modules, one
of the deliveries is a full fledged SVG Viewer
implementation which validates the various modules and
their inter-operability.
In a nutshell, Batik provides building blocks that developers
can assemble in various ways in their Java technology
applications to generate, parse, view or convert SVG
contents. For example, Batik contains a Swing component
that can add SVG viewing capability to all Java technology
applications. Batik can also be used to generate SVG on a
client or on a server, and Batik can convert SVG content
into other formats such as JPEG or PNG. Batik's goal is to
make it easy for application developers to handle SVG
content for various purposes, client-side or server-side.
Where is it?
------------
The home page for the Apache Batik project can be found in the Apache XML
Project web site (http://xmlgraphics.apache.org/batik/). There you also find
information on how to download the latest release as well as all the other
information you might need regarding this project.
Requirements
------------
o A Java 1.4 or later compatible virtual machine for your operating system.
Optional Libraries
------------------
By default, Batik includes a scripting engine for ECMAScript. It is possible
to add support for additional scripting languages (Python and TCL).
See http://xmlgraphics.apache.org/batik/install.html#optionalComponents for
details.
Installation Instructions and Documentation
-------------------------------------------
Read the Install page at http://xmlgraphics.apache.org/batik/install.html
for the installation instructions.
Look for the most updated documentation on the Apache Batik web site under
the Apache XML Graphics Project (http://xmlgraphics.apache.org/batik/).
Licensing and legal issues
--------------------------
For legal and licensing issues, please read the LICENSE and NOTICE files.
Thanks for using Apache Batik.
The Apache XML Graphics Project
http://xmlgraphics.apache.org/
xml-commons/java/external/LICENSE.dom-documentation.txt $Id: LICENSE.dom-documentation.txt 201084 2002-12-09 16:15:21Z vhardy $
This license came from: http://www.w3.org/Consortium/Legal/copyright-documents-19990405
W3C® DOCUMENT NOTICE AND LICENSE
Copyright © 1994-2001 World
Wide Web Consortium, <a href="http://www.w3.org/">World
Wide Web Consortium</a>, (<a href=
"http://www.lcs.mit.edu/">Massachusetts Institute of
Technology</a>, <a href="http://www.inria.fr/">Institut National de
Recherche en Informatique et en Automatique</a>, <a href=
"http://www.keio.ac.jp/">Keio University</a>). All Rights Reserved.
http://www.w3.org/Consortium/Legal/
Public documents on the W3C site are provided by the copyright
holders under the following license. The software or Document Type
Definitions (DTDs) associated with W3C specifications are governed
by the Software Notice. By using and/or copying this document, or the
W3C document from which this statement is linked, you (the
licensee) agree that you have read, understood, and will comply
with the following terms and conditions:
Permission to use, copy, and distribute the contents of this
document, or the W3C document from which this statement is linked,
in any medium for any purpose and without fee or royalty is hereby
granted, provided that you include the following on ALL
copies of the document, or portions thereof, that you use:
A link or URL to the original W3C document.
The pre-existing copyright notice of the original author, or if
it doesn't exist, a notice of the form: "Copyright © [$date-of-document] World Wide Web
Consortium, (Massachusetts
Institute of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio
University). All Rights Reserved.
http://www.w3.org/Consortium/Legal/" (Hypertext is preferred, but a
textual representation is permitted.)
If it exists, the STATUS of the W3C document.
When space permits, inclusion of the full text of this NOTICE
should be provided. We request that authorship
attribution be provided in any software, documents, or other items
or products that you create pursuant to the implementation of the
contents of this document, or any portion thereof.
No right to create modifications or derivatives of W3C documents
is granted pursuant to this license. However, if additional
requirements (documented in the Copyright
FAQ) are satisfied, the right to create modifications or
derivatives is sometimes granted by the W3C to individuals
complying with those requirements.
THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS
OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY
PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS
THEREOF.
The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to this document or its
contents without specific, written prior permission. Title to
copyright in this document will at all times remain with copyright
holders.
----------------------------------------------------------------------------
This formulation of W3C's notice and license became active on
April 05 1999 so as to account for the treatment of DTDs, schema's and
bindings. See the older formulation for the policy prior to this date.
Please see
our Copyright FAQ for common questions
about using materials from our site, including specific terms and
conditions for packages like libwww, Amaya, and Jigsaw.
Other questions about this notice can be directed to site-policy@w3.org.
webmaster
(last updated by reagle on 1999/04/99.)
\ No newline at end of file
xml-commons/java/external/LICENSE.dom-software.txt $Id: LICENSE.dom-software.txt 201084 2002-12-09 16:15:21Z vhardy $
This license came from: http://www.w3.org/Consortium/Legal/copyright-software-19980720
W3C® SOFTWARE NOTICE AND LICENSE
Copyright © 1994-2001 World
Wide Web Consortium, <a href="http://www.w3.org/">World
Wide Web Consortium</a>, (<a href=
"http://www.lcs.mit.edu/">Massachusetts Institute of
Technology</a>, <a href="http://www.inria.fr/">Institut National de
Recherche en Informatique et en Automatique</a>, <a href=
"http://www.keio.ac.jp/">Keio University</a>). All Rights Reserved.
http://www.w3.org/Consortium/Legal/
This W3C work (including software, documents, or other related
items) is being provided by the copyright holders under the
following license. By obtaining, using and/or copying this work,
you (the licensee) agree that you have read, understood, and will
comply with the following terms and conditions:
Permission to use, copy, modify, and distribute this software
and its documentation, with or without modification,  for any
purpose and without fee or royalty is hereby granted, provided that
you include the following on ALL copies of the software and
documentation or portions thereof, including modifications, that
you make:
The full text of this NOTICE in a location viewable to users of
the redistributed or derivative work.
Any pre-existing intellectual property disclaimers, notices, or
terms and conditions. If none exist, a short notice of the
following form (hypertext is preferred, text is permitted) should
be used within the body of any redistributed or derivative code:
"Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of
Technology, Institut National de
Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
http://www.w3.org/Consortium/Legal/"
Notice of any changes or modifications to the W3C files,
including the date changes were made. (We recommend you provide
URIs to the location from which the code is derived.)
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND
COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
SOFTWARE OR DOCUMENTATION.
The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to the software without
specific, written prior permission. Title to copyright in this
software and any associated documentation will at all times remain
with copyright holders.
____________________________________
This formulation of W3C's notice and license became active on
August 14 1998 so as to improve compatibility with GPL. This
version ensures that W3C software licensing terms are no more
restrictive than GPL and consequently W3C software may be
distributed in GPL packages. See the older formulation for the
policy prior to this date. Please see our Copyright FAQ for common
questions about using materials from
our site, including specific terms and conditions for packages like
libwww, Amaya, and Jigsaw.
Other questions about this notice can be
directed to site-policy@w3.org.
webmaster
(last updated $Date: 2002-12-09 17:15:21 +0100 (Mon, 09 Dec 2002) $)
\ No newline at end of file
The fop-transcoder-allinone-1.1.jar file is licensed under the Apache License 2.0, which
can be found in the distribution root directory in the LICENSE file.
This diff is collapsed.
xml-commons/java/external/LICENSE.sax.txt $Id: LICENSE.sax.txt 201084 2002-12-09 16:15:21Z vhardy $
This license came from: http://www.megginson.com/SAX/copying.html
However please note future versions of SAX may be covered
under http://saxproject.org/?selected=pd
This page is now out of date -- see the new SAX site at
http://www.saxproject.org/ for more up-to-date
releases and other information. Please change your bookmarks.
SAX2 is Free!
I hereby abandon any property rights to SAX 2.0 (the Simple API for
XML), and release all of the SAX 2.0 source code, compiled code, and
documentation contained in this distribution into the Public Domain.
SAX comes with NO WARRANTY or guarantee of fitness for any
purpose.
David Megginson, david@megginson.com
2000-05-05
\ No newline at end of file
The xalan-2.7.0.jar file is licensed under the Apache License 2.0, which
can be found in the distribution root directory in the LICENSE file.
The xerces_2_5_0.jar file comes from the Apache Xerces project
(http://xmlapache.org/dist/xerces-j/), and is licensed under the
Apache Software License, Version 1.1, which is reproduced below.
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
This diff is collapsed.
The fop-transcoder-allinone-1.1.jar file is built from the Apache FOP project
(http://xmlgraphics.apache.org/fop), version 1.1.
This is only needed if you want to transcode to PDF, otherwise it can
be removed.
The pdf-transcoder.jar file is licensed under the Apache License 2.0, which
can be found in the distribution root directory in the LICENSE file.
This distribution includes a binary distribution of Mozilla Rhino 1.6 release 5
plus one patch.
You can get the unpatched 1.6R5 release of Rhino from the following URL:
ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_6R5.zip
To obtain the source code for the 1.6R5 release of Rhino, issue the following
commands:
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot \
co -D2006-11-20 mozilla/js/rhino
The patch is available here:
https://bugzilla.mozilla.org/attachment.cgi?id=288467
which is attached to this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=367627
Rhino is licensed under both the MPL (Mozilla Public License) 1.1 and the
GPL (GNU General Public License) 2.0, which are in the LICENSE.js.txt file.
The xalan-2.7.0.jar file comes from the Apache Xalan project
(http://xml.apache.org/xalan-j/), and is licensed under the
Apache License 2.0, which can be found in the distribution root directory
in the LICENSE file.
The xerces_2_5_0.jar file comes from the Apache Xerces project
(http://xml.apache.org/dist/xerces-j/), and is licensed under the
Apache Software License, Version 1.1, which is in the
LICENSE.xerces_2_5_0.txt file.
This distribution includes xml-apis.jar from the XML Commons External
1.3.04 binary distribution, which can also be obtained from:
http://xml.apache.org/mirrors.cgi
Source code is available from the XML Commons web site:
http://xml.apache.org/commons/
xml-apis.jar contains:
- DOM Level 2 Events
- DOM Level 2 HTML
- DOM Level 2 Style
- DOM Level 2 Traversal and Range
- DOM Level 2 Views
- DOM Level 3 Core
- DOM Level 3 Load and Save
- DOM Level 3 XPath
- JAXP 1.3 (JSR 206)
- SAX
All DOM code is licensed under the W3C Software License, and DOM documentation
under the W3C Document License. See LICENSE.dom-software.txt and
LICENSE.dom-documentation.txt.
The JAXP 1.3 code is licensed under the Apache Software License 2.0, which is
in the LICENSE in the root directory of this distribution.
SAX is public domain. See LICENSE.sax.txt.
This distribution includes xml-apis-ext.jar from the XML Commons External
1.3.04 binary distribution, which can also be obtained from:
http://xml.apache.org/mirrors.cgi
Source code is available from the XML Commons web site:
http://xml.apache.org/commons/
xml-apis-ext.jar contains:
- SAC 1.3
- SMIL Java bindings
- SVG 1.1 Java bindings
SAC 1.3, the SMIL Java bindings and the SVG 1.1 Java bindings are licensed
under the W3C Software License. Related documentation is licensed under the
W3C Document License. See LICENSE.dom-software.txt and
LICENSE.dom-documentation.txt.
#!/bin/bash
# -----------------------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# make-squiggle-app.sh
#
# Creates a Mac OS X application bundle for Squiggle, then opens a Finder
# window for the current directory so that the user can drag the icon
# into their desired installation location (probably /Applications).
#
# $Id: make-squiggle-app.sh.template 985243 2010-08-13 15:30:25Z helder $
# -----------------------------------------------------------------------------
trap 'echo Error creating application bundle.; exit 1' ERR
cd `dirname "$0"`/..
APP=Squiggle.app
CON=$APP/Contents
MAC=$CON/MacOS
RES=$CON/Resources
[ -e $APP ] && echo $APP already exists: please move it out of the way before running this script. && exit 1
echo Creating $APP in `pwd`...
mkdir $APP $CON $MAC $RES
cat >$CON/Info.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>Squiggle</string>
<key>CFBundleVersion</key>
<string>1.8</string>
<key>CFBundleShortVersionString</key>
<string>1.8</string>
<key>CFBundleIconFile</key>
<string>Squiggle.icns</string>
<key>CFBundleIdentifier</key>
<string>org.apache.batik</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Squiggle</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Apache Software Foundation. All Rights Reserved.</string>
</dict>
</plist>
EOF
cat >$MAC/Squiggle <<EOF
#!/bin/sh
JAVA=/usr/bin/java
[ -e "$JAVA_HOME/bin/java" ] && JAVA="$JAVA_HOME/bin/java"
"$JAVA" -Dcom.apple.mrj.application.apple.menu.about.name=Squiggle -jar "\`dirname \$0\`/../Resources/batik-squiggle.jar"
EOF
chmod a+x $MAC/Squiggle
cp -r *.jar lib extensions $RES/
mv $RES/lib/Squiggle.icns $RES/
echo Done.
open .
This diff is collapsed.
/**
*
* This file is part of jReality. jReality is open source software, made
* available under a BSD license:
*
* Copyright (c) 2003-2006, jReality Group: Charles Gunn, Tim Hoffmann, Markus
* Schmies, Steffen Weissmann.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of jReality nor the names of its contributors nor the
* names of their associated organizations may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
package de.jreality.examples;
import java.awt.Component;
import javax.swing.JFrame;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.opengl.GLCanvas;
import org.eclipse.swt.opengl.GLData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import de.jreality.jogl.SwtQueue;
import de.jreality.jogl.SwtViewer;
import de.jreality.math.MatrixBuilder;
import de.jreality.scene.Appearance;
import de.jreality.scene.Camera;
import de.jreality.scene.DirectionalLight;
import de.jreality.scene.Light;
import de.jreality.scene.SceneGraphComponent;
import de.jreality.scene.SceneGraphPath;
import de.jreality.scene.Viewer;
import de.jreality.swing.JFakeFrame;
import de.jreality.tools.DraggingTool;
import de.jreality.tools.EncompassTool;
import de.jreality.tools.RotateTool;
import de.jreality.tools.ShipNavigationTool;
import de.jreality.toolsystem.ToolSystem;
import de.jreality.util.RenderTrigger;
public class SwtExample {
public static void main(String[] args) throws Exception {
// create scene
SceneGraphComponent rootNode=new SceneGraphComponent();
SceneGraphComponent geometryNode=new SceneGraphComponent();
SceneGraphComponent cameraNode=new SceneGraphComponent();
SceneGraphComponent lightNode=new SceneGraphComponent();
rootNode.addChild(geometryNode);
rootNode.addChild(cameraNode);
cameraNode.addChild(lightNode);
final CatenoidHelicoid geom=new CatenoidHelicoid(50);
geom.setAlpha(Math.PI/2.-0.3);
Camera camera=new Camera();
Light light=new DirectionalLight();
geometryNode.setGeometry(geom);
cameraNode.setCamera(camera);
lightNode.setLight(light);
Appearance app=new Appearance();
//app.setAttribute(CommonAttributes.FACE_DRAW, false);
//app.setAttribute("diffuseColor", Color.red);
//app.setAttribute(CommonAttributes.TRANSPARENCY_ENABLED, true);
//app.setAttribute(CommonAttributes.TRANSPARENCY, 0.4);
//app.setAttribute(CommonAttributes.BACKGROUND_COLOR, Color.blue);
rootNode.setAppearance(app);
MatrixBuilder.euclidean().rotateY(Math.PI/6).assignTo(geometryNode);
MatrixBuilder.euclidean().translate(0, 0, 12).assignTo(cameraNode);
MatrixBuilder.euclidean().rotate(-Math.PI/4, 1, 1, 0).assignTo(lightNode);
SceneGraphPath cameraPath=new SceneGraphPath();
cameraPath.push(rootNode);
cameraPath.push(cameraNode);
cameraPath.push(camera);
Viewer viewer = null;
ToolSystem toolSystem;
// true for SWT, false for AWT
if (true) {
// create Shell, GLCanvas and SwtViewer
SwtQueue f = SwtQueue.getInstance();
final Shell shell = f.createShell();
final GLCanvas[] can = new GLCanvas[1];
f.waitFor(new Runnable() {
public void run() {
shell.setLayout(new FillLayout());
Composite comp = new Composite(shell, SWT.NONE);
comp.setLayout(new FillLayout());
GLData data = new GLData ();
data.doubleBuffer = true;
System.out.println("data.depthSize="+data.depthSize);
data.depthSize = 8;
can[0] = new GLCanvas(comp, SWT.NONE, data);
can[0].setCurrent();
shell.setText("SWT");
shell.setSize(640, 480);
shell.open();
}
});
final SwtViewer swtViewer=new SwtViewer(can[0]);
// enable tools
// viewer = new ToolSystemViewer(swtViewer);
toolSystem = ToolSystem.toolSystemForViewer(swtViewer);
toolSystem.initializeSceneTools();
}
else {
viewer = new de.jreality.jogl.JOGLViewer();
JFrame f = new JFrame("AWT");
f.setSize(640, 480);
f.getContentPane().add((Component) viewer.getViewingComponent());
f.setVisible(true);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
viewer.setSceneRoot(rootNode);
viewer.setCameraPath(cameraPath);
toolSystem = ToolSystem.toolSystemForViewer(viewer);
toolSystem.initializeSceneTools();
// viewer.initializeTools();
// add tools
geometryNode.addTool(new RotateTool());
geometryNode.addTool(new DraggingTool());
geometryNode.addTool(new EncompassTool());
ShipNavigationTool shipNavigationTool = new ShipNavigationTool();
shipNavigationTool.setGravity(0);
cameraNode.addTool(shipNavigationTool);
PaintComponent pc = new PaintComponent();
JFakeFrame jrj = new JFakeFrame();
jrj.getContentPane().add(pc);
geometryNode.setAppearance(jrj.getAppearance());
geometryNode.addTool(jrj.getTool());
// add a render trigger for auto redraw
RenderTrigger rt = new RenderTrigger();
rt.addViewer(viewer);
rt.addSceneGraphComponent(rootNode);
}
}
......@@ -63,12 +63,15 @@ import de.jreality.util.SceneGraphUtility;
*/
public class WriterOBJ {
public static int write( IndexedFaceSet ifs, String groupName, int startVertex, boolean writeEdgesOfFaceSet, OutputStream out) {
return write( ifs, groupName, new PrintWriter( out ), startVertex, writeEdgesOfFaceSet);
}
public static int write( IndexedFaceSet ifs, OutputStream out, int startVertex, boolean writeEdgesOfFaceSet) {
return write( ifs, null, new PrintWriter( out ), startVertex, writeEdgesOfFaceSet);
}
public static int write( IndexedFaceSet ifs, String groupName, int startVertex, OutputStream out) {
return write( ifs, groupName, new PrintWriter( out ), startVertex);
return write(ifs, groupName, startVertex, false, out);
}
public static int write( IndexedFaceSet ifs, OutputStream out, int startVertex ) {
......
......@@ -71,7 +71,7 @@ public class ConsolePlugin extends ShrinkPanelPlugin {
set.addAttribute(StyleConstants.Foreground, color);
String msg = toString();
try {
doc.insertString(end.getOffset(), msg, set);
doc.insertString(end.getOffset()-1, msg, set);
console.select(doc.getLength(), doc.getLength());
} catch (BadLocationException e) {
e.printStackTrace();
......
package de.jreality.toolsystem.raw;
import java.io.IOException;
import java.util.Map;
import net.sf.spacenav.SpaceNav;
import net.sf.spacenav.SpaceNavButtonEvent;
import net.sf.spacenav.SpaceNavEvent;
import net.sf.spacenav.SpaceNavMotionEvent;
import de.jreality.scene.Viewer;
import de.jreality.scene.tool.AxisState;
import de.jreality.scene.tool.InputSlot;
import de.jreality.toolsystem.ToolEvent;
import de.jreality.toolsystem.ToolEventQueue;
public class DeviceSpacenav implements RawDevice, Runnable {
boolean running=true;
private SpaceNav s;
double x, y, z, rx, ry, rz;
// 6 axes, 2 buttons x, y, z, rx, ry, rz, bLeft, bRight
InputSlot[] slots = new InputSlot[8];
private ToolEventQueue queue;
private double sensitivity;
private volatile long timestamp = System.currentTimeMillis();
synchronized boolean isRunning() {
return running;
}
synchronized void stop() {
running = false;
}
public void dispose() {
stop();
}
public String getName() {
return "Spacenav";
}
public void initialize(Viewer viewer, Map<String, Object> config) {
s=new SpaceNav();
sensitivity = 1.0;
if (config.containsKey("sensitivity")) {
sensitivity = (Double) config.get("sensitivity");
}
// this is not this.sensitivity!!
s.setSensitivity(1.0);
new Thread(this).start();
if (config.containsKey("screensaver-wakeup-cmd")) {
final String SCREENSAVER_WAKEUP_CMD = (String) config.get("screensaver-wakeup-cmd");
Thread t = new Thread(
new Runnable() {
public void run() {
while (isRunning()) {
synchronized (DeviceSpacenav.this) {
try {
DeviceSpacenav.this.wait(1000);
} catch (InterruptedException e1) {
}
}
long ct = System.currentTimeMillis();
int diff = (int) (ct - timestamp);
try {
if (diff < 2500) Runtime.getRuntime().exec(SCREENSAVER_WAKEUP_CMD);
} catch (IOException e) {
System.out.println("Could not trigger screensaver - giving up.");
return;
}
}
}
});
t.setPriority(Thread.MIN_PRIORITY);
t.start();
}
}
public ToolEvent mapRawDevice(String rawDeviceName, InputSlot inputDevice) {
if (rawDeviceName.equals("x"))
slots[0]=inputDevice;
else if (rawDeviceName.equals("y"))
slots[1]=inputDevice;
else if (rawDeviceName.equals("z"))
slots[2]=inputDevice;
else if (rawDeviceName.equals("rx"))
slots[3]=inputDevice;
else if (rawDeviceName.equals("ry"))
slots[4]=inputDevice;
else if (rawDeviceName.equals("rz"))
slots[5]=inputDevice;
else if (rawDeviceName.equals("buttonLeft"))
slots[6]=inputDevice;
else if (rawDeviceName.equals("buttonRight"))
slots[7]=inputDevice;
else
throw new IllegalArgumentException("no such device: "+rawDeviceName);
System.out.println("registered "+rawDeviceName+"->"+inputDevice);
return new ToolEvent(this, System.currentTimeMillis(), inputDevice, AxisState.ORIGIN);
}
public void setEventQueue(ToolEventQueue queue) {
this.queue = queue;
}
public void button(SpaceNavButtonEvent e) {
InputSlot slot = slots[6+e.getButton()];
if (slot != null) queue.addEvent(new ToolEvent(this, System.currentTimeMillis(), slot, e.isPressed() ? AxisState.PRESSED : AxisState.ORIGIN));
}
public void motion(SpaceNavMotionEvent e) {
// System.out.println("DeviceSpacenav.motion()");
//
// System.out.printf("Motion event: tx:%4d ty:%4d tz:%4d rx:%4d ry:%4d rz:%4d\n",
// e.getX(), e.getY(), e.getZ(),
// e.getRX(), e.getRY(), e.getRZ()
// );
//
double cx, cy, cz, crx, cry, crz;
cx = e.getX();
if (cx!=x) {
x=cx;
queue.addEvent(new ToolEvent(this, timestamp, slots[0], new AxisState(sensitivity*x)));
}
cy = e.getY();
if (cy!=y){
y=cy;
queue.addEvent(new ToolEvent(this, timestamp, slots[1], new AxisState(sensitivity*y)));
}
cz = e.getZ();
if (cz!=z){
z=cz;
queue.addEvent(new ToolEvent(this, timestamp, slots[2], new AxisState(sensitivity*z)));
}
crx = e.getRX();
if (crx!=rx){
rx=crx;
queue.addEvent(new ToolEvent(this, timestamp, slots[3], new AxisState(sensitivity*rx)));
}
cry = e.getRY();
if (cry!=ry){
ry=cry;
queue.addEvent(new ToolEvent(this, timestamp, slots[4], new AxisState(sensitivity*ry)));
}
crz = e.getRZ();
if (crz!=rz){
rz=crz;
queue.addEvent(new ToolEvent(this, timestamp, slots[5], new AxisState(sensitivity*rz)));
}
}
public void run() {
SpaceNavEvent e;
while((e=s.waitForEvent())!=null && isRunning()) {
long ct = System.currentTimeMillis();
long dt = ct - timestamp;
timestamp = ct;
if (dt > 1000) {
synchronized(this) {
// quit screensaver
this.notifyAll();
}
}
if(e instanceof SpaceNavMotionEvent) {
SpaceNavMotionEvent m=(SpaceNavMotionEvent) e;
motion(m);
}
else if(e instanceof SpaceNavButtonEvent) {
SpaceNavButtonEvent b=(SpaceNavButtonEvent) e;
button(b);
}
else {
System.out.println("Unknown event!");
}
}
s.closeDevice();
}
}
package de.jreality.tutorial.audio;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import de.jreality.audio.csound.CsoundSource;
import de.jreality.plugin.JRViewer;
import de.jreality.plugin.JRViewer.ContentType;
import de.jreality.reader.Readers;
import de.jreality.scene.AudioSource;
import de.jreality.scene.SceneGraphComponent;
import de.jreality.tools.ActionTool;
import de.jreality.tools.DraggingTool;
import de.jreality.util.Input;
/**
*
* Code example for ICMC submission. Not pretty but short.
*
* @author brinkman
*
*/
public class MinimalExample {
public static void main(String[] args) throws IOException {
SceneGraphComponent audioComponent = Readers.read(Input.getInput(MinimalExample.class.getResource("schwarz.jrs")));
Input input = Input.getInput(MinimalExample.class.getResource("trapped.csd"));
final AudioSource source = new CsoundSource("csound node", input);
source.start();
audioComponent.setAudioSource(source);
ActionTool actionTool = new ActionTool("PanelActivation");
actionTool.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (source.getState() == AudioSource.State.RUNNING) {
source.pause();
} else {
source.start();
}
}
});
audioComponent.addTool(actionTool);
audioComponent.addTool(new DraggingTool());
JRViewer v = new JRViewer();
v.addBasicUI();
v.addAudioSupport();
v.addVRSupport();
v.setPropertiesFile("MinimalExample.jrw");
v.addContentSupport(ContentType.TerrainAligned);
v.setContent(audioComponent);
v.startup();
}
}
package de.jreality.tutorial.geom;
import de.jreality.geometry.TTFLineSetFactory;
import de.jreality.math.MatrixBuilder;
import de.jreality.plugin.JRViewer;
import de.jreality.scene.SceneGraphComponent;
import de.jreality.util.SceneGraphUtility;
import org.apache.commons.io.FileUtils;
import java.io.*;
import java.net.URL;
public class TTFLineSet {
public static void main(String[] args) {
try {
TTFLineSetFactory ttfLSF = new TTFLineSetFactory();
// ttfLSF.setTTFFont(TTFLineSet.class.getResource("Raleway-Thin.ttf").getPath());
// ttfLSF.setSingleLineFont(false);
InputStream resource = TTFLineSet.class.getResourceAsStream("RhSS.ttf");
File tmpFile = File.createTempFile("Font", "ttf");
FileUtils.copyInputStreamToFile(resource,tmpFile);
ttfLSF.setTTFFont(tmpFile.getPath());
ttfLSF.setSingleLineFont(true);
SceneGraphComponent root = new SceneGraphComponent("Root");
String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_";
for(int i = 1; i <= 1; ++i) {
ttfLSF.setSize(i);
SceneGraphComponent stringRoot = new SceneGraphComponent("String root");
stringRoot.setGeometry(ttfLSF.getIndexLineSet(str));
root.addChild(stringRoot);
MatrixBuilder.euclidean().translate(i*(i-1)/2.0, 0, 0).getMatrix().assignTo(stringRoot);
}
root.setAppearance(ttfLSF.getStandardAppearance());
JRViewer jrViewer = new JRViewer();
jrViewer.setPropertiesFile("TTFLineSet.xml");
jrViewer.addContentUI();
jrViewer.addBasicUI();
SceneGraphUtility.flatten(root);
jrViewer.setContent(root);
jrViewer.encompassEuclidean();
jrViewer.startup();
} catch (IOException e) {
e.printStackTrace();
}
}
}