edu.washington.biostr.sig.brainj3d.model
Class Canvas3DUtil

java.lang.Object
  extended by edu.washington.biostr.sig.brainj3d.model.Canvas3DUtil

public class Canvas3DUtil
extends Object

Title:

Description:

Copyright: Copyright (c) 2003

Company:

Version:
1.0
Author:
not attributable

Constructor Summary
Canvas3DUtil()
           
 
Method Summary
static javax.media.j3d.Canvas3D getCanvas(GraphicsConfiguration gc, boolean offscreen, int width, int height)
          obs is called postswap.
static BufferedImage getImage(javax.media.j3d.Canvas3D canvas, BufferedImage otherBuffer)
          Get the image.
static javax.media.j3d.Transform3D getTransform(double[] va)
          Get the transform from a vector angle.
static double[] getVectorAngle(javax.media.j3d.Transform3D tForm)
          Get a vector angle from a transform.
static void main(String[] arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Canvas3DUtil

public Canvas3DUtil()
Method Detail

getCanvas

public static javax.media.j3d.Canvas3D getCanvas(GraphicsConfiguration gc,
                                                 boolean offscreen,
                                                 int width,
                                                 int height)
obs is called postswap. It is only really useful for offscreen rendering and null is acceptable.

Parameters:
offscreen -
gc -
obs -
Returns:

getImage

public static BufferedImage getImage(javax.media.j3d.Canvas3D canvas,
                                     BufferedImage otherBuffer)
Get the image. If this is offscreen and otherBuffer is not null, then we swap buffers.

Parameters:
canvas -
otherBuffer -
Returns:

getVectorAngle

public static double[] getVectorAngle(javax.media.j3d.Transform3D tForm)
Get a vector angle from a transform. This ignores scale and translation. This is the inverse of getTransform(double[] va). A Vector Angle describes a rotation and can be visualized as a point on a the unit sphere (the vector points to this point) and an angle around that vector that defines "up." I think this is distinct from an AxisAngle, which I still don't understand.

Parameters:
tForm -
Returns:
a double[4] specifying {x,y,z,upAngle}

getTransform

public static javax.media.j3d.Transform3D getTransform(double[] va)
Get the transform from a vector angle. This doesn't set translation or scale and is the inverse of getVectorAngle()

Parameters:
va - a double[4] specifying {x,y,z,upAngle}
Returns:

main

public static void main(String[] arg)


Copyright © 2006 University of Washington. All Rights Reserved.