subscript.vis
Class VisObject

java.lang.Object
  extended by subscript.vis.VisObject
Direct Known Subclasses:
VisAxes, VisCar, VisCircle, VisCube, VisEarth, VisGrid, VisImage, VisLaserScanExtrusion, VisPoints, VisPointWindow, VisPolygon, VisPoseMarker, VisShape, VisSick, VisSplinter, VisSurface, VisT, VisText

public abstract class VisObject
extends java.lang.Object

The abstract base class of all objects which can be drawn on a VisCanvas. Every object has a transformation matrix which alters the object's display. Most methods that modify the object's transformation return the same object, allowing multiple transformations to be easily concatenated.


Constructor Summary
VisObject()
           
 
Method Summary
abstract  Box3D getExtents(Matrix S)
          Get the bounding box in global coordinates, i.e., using the object's transform T and the passed-in matrix S.
 Matrix getPosition()
          Returns the object's transformation matrix.
abstract  void render(VisRenderer r, VisWorld world, VisView v)
          Called by VisCanvas when it is time to render the object.
 VisObject rotateX(double t)
          Concatenate the object's current transform with a rotation around the X axis.
 VisObject rotateY(double t)
          Concatenate the object's current transform with a rotation around the Y axis.
 VisObject rotateZ(double t)
          Concatenate the object's current transform with a rotation around the Z axis.
 VisObject setPosition(GPoint2D p)
          Set the object's transform to a translation specified by a 2D point.
 VisObject setPosition(Matrix T)
          Set the object's transform using either a 3x1 or 4x4 matrix.
 VisObject setPosition(Transform3D T)
          Set the object's transform.
 VisObject setPositionT(Matrix T)
          Set the object's transform using either a 3x1 or 4x4 matrix.
 VisObject setPositionXYT(double x, double y, double t)
          Set the object's transform to the 2D rigid-body transformation parameterized by x, y, t.
 VisObject setPositionXYT(Matrix G)
          Set the object's transform to the 2D rigid-body transformation parameterized by a 3x1 matrix (dx, dy, dt).
 VisObject setPositionXYZ(double x, double y, double z)
          Set the object's transform to a translation.
 VisObject transform(Matrix T)
          Concatenate the object's current transform with another transform.
 VisObject transform(Quaternion q, GPoint3D p)
          ???
 VisObject translate(double dx, double dy, double dz)
          Concatenate the object's current transform with a translation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisObject

public VisObject()
Method Detail

render

public abstract void render(VisRenderer r,
                            VisWorld world,
                            VisView v)
Called by VisCanvas when it is time to render the object.


translate

public VisObject translate(double dx,
                           double dy,
                           double dz)
Concatenate the object's current transform with a translation.


rotateX

public VisObject rotateX(double t)
Concatenate the object's current transform with a rotation around the X axis.


rotateZ

public VisObject rotateZ(double t)
Concatenate the object's current transform with a rotation around the Z axis.


rotateY

public VisObject rotateY(double t)
Concatenate the object's current transform with a rotation around the Y axis.


transform

public VisObject transform(Quaternion q,
                           GPoint3D p)
???


transform

public VisObject transform(Matrix T)
Concatenate the object's current transform with another transform.


setPositionXYZ

public VisObject setPositionXYZ(double x,
                                double y,
                                double z)
Set the object's transform to a translation.


setPositionXYT

public VisObject setPositionXYT(Matrix G)
Set the object's transform to the 2D rigid-body transformation parameterized by a 3x1 matrix (dx, dy, dt).


setPositionXYT

public VisObject setPositionXYT(double x,
                                double y,
                                double t)
Set the object's transform to the 2D rigid-body transformation parameterized by x, y, t.


setPosition

public VisObject setPosition(GPoint2D p)
Set the object's transform to a translation specified by a 2D point.


setPosition

public VisObject setPosition(Transform3D T)
Set the object's transform.


setPosition

public VisObject setPosition(Matrix T)
Set the object's transform using either a 3x1 or 4x4 matrix.


setPositionT

public VisObject setPositionT(Matrix T)
Set the object's transform using either a 3x1 or 4x4 matrix.


getPosition

public Matrix getPosition()
Returns the object's transformation matrix.


getExtents

public abstract Box3D getExtents(Matrix S)
Get the bounding box in global coordinates, i.e., using the object's transform T and the passed-in matrix S. I.e., pass S*T to methods of Box3D.