Skip to content

Commit

Permalink
外部ライブラリ joglの追加
Browse files Browse the repository at this point in the history
外部ライブラリ webcamcaptureの追加
webcamcaptureのサンプルプログラムを追加

add jogl libdary
add webcamcapture library
add webcam capture sample
  • Loading branch information
nyatla committed Oct 4, 2015
1 parent f4922f2 commit b22a8ee
Show file tree
Hide file tree
Showing 282 changed files with 58,210 additions and 5 deletions.
17 changes: 14 additions & 3 deletions sample/jogl/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,19 @@
<classpathentry combineaccessrules="false" kind="src" path="/NyARToolkit.utils.jogl"/>
<classpathentry kind="lib" path="C:/Program Files (x86)/JMF2.1.1e/lib/jmf.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/NyARToolkit.utils.j2se"/>
<classpathentry combineaccessrules="false" kind="src" path="/NyARToolkit.utils.qt"/>
<classpathentry kind="lib" path="D:/project.github/NyARToolkit series/NyARToolkit/extlib/jogl-1.1.1-rc8-windows-i586/lib/gluegen-rt.jar"/>
<classpathentry kind="lib" path="D:/project.github/NyARToolkit series/NyARToolkit/extlib/jogl-1.1.1-rc8-windows-i586/lib/jogl.jar"/>
<classpathentry kind="lib" path="/NyARToolkit.utils.webcamcapture/extlib/webcam-capture-0.3.10-dist/webcam-capture-0.3.10.jar"/>
<classpathentry kind="lib" path="/NyARToolkit.utils.webcamcapture/extlib/webcam-capture-0.3.10-dist/libs/bridj-0.6.2.jar"/>
<classpathentry kind="lib" path="/NyARToolkit.utils.webcamcapture/extlib/webcam-capture-0.3.10-dist/libs/slf4j-api-1.7.2.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/NyARToolkit.utils.webcamcapture"/>
<classpathentry kind="lib" path="/NyARToolkit.utils.jogl/extlib/gluegen-old-1.0b6/gluegen-rt.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="NyARToolkit.utils.jogl/extlib/gluegen-old-1.0b6"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/NyARToolkit.utils.jogl/extlib/jogl-old-1.1.1/jogl.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="NyARToolkit.utils.jogl/extlib/jogl-old-1.1.1/bin"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* PROJECT: NyARToolkit JOGL sample program.
* --------------------------------------------------------------------------------
* The MIT License
* Copyright (c) 2008 nyatla
* airmail(at)ebony.plala.or.jp
* http://nyatla.jp/nyartoolkit/
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
package jp.nyatla.nyartoolkit.jogl.sample.sketch.webcamcapture;


import java.awt.Dimension;
import javax.media.opengl.*;

import com.github.sarxos.webcam.Webcam;
import jp.nyatla.nyartoolkit.jogl.sketch.GlSketch;
import jp.nyatla.nyartoolkit.jogl.utils.*;
import jp.nyatla.nyartoolkit.markersystem.NyARMarkerSystemConfig;
import jp.nyatla.nyartoolkit.markersystem.NyARSensor;
import jp.nyatla.nyartoolkit.utils.j2se.NyARBufferedImageRaster;
/**
* WebcamCaptureの映像を使うサンプルです。
* ARマーカには、patt.hiroを使用して下さい。
*/
public class WebCamSample extends GlSketch
{
private Webcam camera;
private NyARGlMarkerSystem nyar;
private NyARGlMarkerSystemRender render;
private NyARSensor sensor;
public void setup(GL gl)throws Exception
{
this.size(640,480);
NyARMarkerSystemConfig config = new NyARMarkerSystemConfig(640,480);
this.camera=Webcam.getDefault();
this.camera.setViewSize(new Dimension(640,480));
this.nyar=new NyARGlMarkerSystem(config); //create MarkerSystem
this.render=new NyARGlMarkerSystemRender(this.nyar);
this.sensor=new NyARSensor(config.getScreenSize());
this.id=this.nyar.addARMarker(ARCODE_FILE,16,25,80);
// this.id=this.nyar.addPsARPlayCard(1,80);
// this.id=this.nyar.addNyIdMarker(0,80); //for NyIdmarker #0
gl.glEnable(GL.GL_DEPTH_TEST);
this.camera.open();
}
private final static String ARCODE_FILE = "../../Data/patt.hiro";
private int id;

public void draw(GL gl)throws Exception
{
synchronized(this.camera){
try {
this.sensor.update(new NyARBufferedImageRaster(this.camera.getImage()));
this.render.drawBackground(gl, this.sensor.getSourceImage());
this.render.loadARProjectionMatrix(gl);

this.nyar.update(this.sensor);
if(this.nyar.isExistMarker(this.id)){
this.render.loadMarkerMatrix(gl,this.id);
this.render.colorCube(gl,40,0,0,20);
}
Thread.sleep(1);
} catch (Exception e) {
e.printStackTrace();
}
}
}
public static void main(String[] args)
{
new WebCamSample().run();
return;
}
}
4 changes: 2 additions & 2 deletions utils/jogl/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<classpathentry combineaccessrules="false" kind="src" path="/NyARToolKit"/>
<classpathentry combineaccessrules="false" kind="src" path="/NyARToolkit.utils.jmf"/>
<classpathentry kind="lib" path="C:/Program Files (x86)/JMF2.1.1e/lib/jmf.jar"/>
<classpathentry kind="lib" path="C:/Program Files/JDK6/jdk/lib/gluegen-rt.jar"/>
<classpathentry kind="lib" path="C:/Program Files/JDK6/jdk/lib/jogl.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/NyARToolkit.utils.j2se"/>
<classpathentry kind="lib" path="extlib/gluegen-old-1.0b6/gluegen-rt.jar"/>
<classpathentry kind="lib" path="extlib/jogl-old-1.1.1/jogl.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
182 changes: 182 additions & 0 deletions utils/jogl/extlib/gluegen-old-1.0b6/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
The GlueGen source code is mostly licensed under the New BSD 2-clause license,
however it contains other licensed material as well.

Other licensed material is compatible with the 'New BSD 2-Clause License',
if not stated otherwise.

'New BSD 2-Clause License' incompatible materials are optional, they are:

NONE

Below you find a detailed list of licenses used in this project.

+++

The content of folder 'make/lib' contains build-time only
Java binaries (JAR) to ease the build setup.
Each JAR file has it's corresponding LICENSE file containing the
source location and license text. None of these binaries are contained in any way
by the generated and deployed GlueGen binaries.

+++

L.1) The GlueGen source tree contains code from the JogAmp Community
which is covered by the Simplified BSD 2-clause license:

Copyright 2010 JogAmp Community. 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.

THIS SOFTWARE IS PROVIDED BY JogAmp Community ``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 JogAmp Community 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.

The views and conclusions contained in the software and documentation are those of the
authors and should not be interpreted as representing official policies, either expressed
or implied, of JogAmp Community.

You can address the JogAmp Community via:
Web http://jogamp.org/
Forum/Mailinglist http://jogamp.762907.n3.nabble.com/
Chatrooms
IRC irc.freenode.net #jogamp
Jabber conference.jabber.org room: jogamp (deprecated!)
Repository http://jogamp.org/git/
Email mediastream _at_ jogamp _dot_ org


L.2) The GlueGen source tree contains code from Sun Microsystems, Inc.
which is covered by the New BSD 3-clause license:

Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

- Redistribution of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

- Redistribution 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 Sun Microsystems, Inc. or the names of
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

This software is provided "AS IS," without a warranty of any kind. ALL
EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

You acknowledge that this software is not designed or intended for use
in the design, construction, operation or maintenance of any nuclear
facility.

L.3) The GlueGen source tree contains CGRAM http://www.antlr.org/grammar/cgram/,
a ANSI-C parser implementation using ANTLR, which is being used
in the compile time part only.
It is covered by the Original BSD 4-clause license:

Copyright (c) 1998-2000, Non, Inc.
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.

All advertising materials mentioning features or use of this
software must display the following acknowledgement:

This product includes software developed by Non, Inc. and
its contributors.

Neither name of the company nor the names of its contributors
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 COMPANY 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.

A.1) The GlueGen source tree contains code from The Apache Software Foundation
which is covered by the Apache License Version 2.0

Apache Harmony - Open Source Java SE
=====================================

<http://harmony.apache.org/>

Author: The Apache Software Foundation (http://www.apache.org/).

Copyright 2006, 2010 The Apache Software Foundation.

Apache License Version 2.0, January 2004
http://www.apache.org/licenses/LICENSE-2.0
Or within this repository: doc/licenses/Apache.LICENSE-2.0

Files:
- src/java/com/jogamp/common/net/Uri.java
(derived from java.net.URI.Helper and heavily modified)

A.2) The GlueGen source tree contains code from Ben Mankin, a.k.a 'Shevek',
which is covered by the Apache License Version 2.0

JCPP - A Java C Preprocessor
=============================

<http://www.anarres.org/projects/jcpp/>
<https://github.com/shevek/jcpp>

Author: Ben Mankin, a.k.a 'Shevek' (http://www.anarres.org/about/).

Copyright (c) 2007-2008, Shevek

Apache License Version 2.0, January 2004
http://www.apache.org/licenses/LICENSE-2.0
Or within this repository: doc/licenses/Apache.LICENSE-2.0

Files:
The complete git submodule 'jcpp',
which is a patched version of the original mentioned above.

Used for the compile-time module gluegen.jar only.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit b22a8ee

Please sign in to comment.