JReality Notes

From JReality Wiki
Jump to: navigation, search
LeftArrowHeader.png
[[|      ]]>
RightArrowHeader.png
[[|      ]]>
Main Page: Contents

Website stuff

To enable wiki user signup: toggle boolean in line 461 of

  mediawiki/includes/SpecialUserlogin.php

Database: for redaxo, mediawiki, phpbb the same db:

  -> germain:jreality_wiki

Portal HowTo

start trackd:

  /etc/init.d/trackd start

(trackd already started?: ps aux | grep trackd)

start smrj-clients:

  cd workspace/jreality/src-portal
  ./startclients  (run applications on master)
  ./startremoteclients  (run applications on clients)

java flags: (VM arguments in eclipse run configurations)

  -Dde.jreality.scene.Viewer=de.jreality.portal.PortalServerViewer  (use portal viewer)
  -Dde.jreality.scene.tool.Config=portal  (use portal devices in tool system)
  -Dde.jreality.viewerapp.env=portal  (use portal environment, e.g. loads different default JrScene)
  -Djava.library.path=/central/home/demo/.jnilib  (libs for devices etc.)

kill smrj-clients:

  cd workspace/jreality/src-portal
  ./killclients

stop trackd:

  /etc/init.d/trackd stop


jreality checkout/update: add /net/MathVis/data/testData3D/vrTextures.jar


beanshell scripts: hide cursor

import java.awt.image.*;
    Component cmp = _viewer.getViewingComponent();
    while (!(cmp instanceof Frame)) cmp = cmp.getParent();
    Frame frame = (Frame) cmp;
    BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
    Graphics2D gfx = cursorImg.createGraphics();
    gfx.setColor(new Color(0, 0, 0, 0));
    gfx.fillRect(0, 0, 16, 16);
    gfx.dispose();
    frame.setCursor(frame.getToolkit().createCustomCursor(cursorImg,
        new Point(), ""));
import java.awt.image.*;
    Component cmp = _viewer.getViewingComponent();
    while (!(cmp instanceof Frame)) cmp = cmp.getParent();
    Frame frame = (Frame) cmp;
    BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
    Graphics2D gfx = cursorImg.createGraphics();
    gfx.setColor(new Color(0, 0, 0, 0));
    gfx.fillRect(0, 0, 16, 16);
    gfx.dispose();
    frame.setCursor(frame.getToolkit().createCustomCursor(cursorImg,
        new Point(), ""));
avatar=self.getChildComponent(0);
camNode=avatar.getChildComponent(0);
camera=camNode.getCamera();
wm=camNode.getChildComponent(0);
MatrixBuilder.euclidean().translate(0,0,-50).scale(20).assignTo(wm);
camera.setFocus(50);
camera.setEyeSeparation(0.4);
camera.setFieldOfView(60);
camera.setStereo(true);