harmonic.mz.manager
Class UCSManager

java.lang.Object
  |
  +--harmonic.mz.manager.UCSManager

public class UCSManager
extends java.lang.Object

User Coordinate System Manager. A UCS is a tool for defining an arbitrary coordinate system that is easy to work with for object manipulation of creation functions. This class accepts and returns TMat's associated with the current UCS.


Constructor Summary
UCSManager()
           
 
Method Summary
 harmonic.meshGeom.math.TMat getGlobalPerUCS()
          Returns the inverse of getUCSPerGlobal()
 harmonic.meshGeom.math.TMat getLocalPerUCS(harmonic.viewer3D.CoordSystem cs)
          Return a transformation matrix that will take coordinates from the user coordinate system to the given coordinate system.
 ShapeGroup getUCSGroup()
          Returns ShapeGroup to be used for keeping objects under the UCS coordinate system.
 harmonic.meshGeom.math.TMat getUCSPerGlobal()
          Return a transformation matrix that will take coordinates from global coordinates to the current user coordinate system.
 harmonic.meshGeom.math.TMat getUCSPerLocal(harmonic.viewer3D.CoordSystem cs)
          Return a transformation matrix that will take coordinates from the given coordinate system to the current user coordinate system.
 harmonic.meshGeom.math.TMat getUCSPerLocal(ShapeNode shapeGroup)
          return getUCSPerLocal(shapeGroup.coordSystem)
 harmonic.meshGeom.math.TMat getUCSPerView()
          Return a transformation matrix that will take coorinates from the current viewpoint coordinates to the current user coordinate system.
 void setUCS(harmonic.meshGeom.math.TMat mat)
          Set the user coordinate system's matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UCSManager

public UCSManager()
Method Detail

getUCSGroup

public ShapeGroup getUCSGroup()
Returns ShapeGroup to be used for keeping objects under the UCS coordinate system.


getLocalPerUCS

public harmonic.meshGeom.math.TMat getLocalPerUCS(harmonic.viewer3D.CoordSystem cs)
Return a transformation matrix that will take coordinates from the user coordinate system to the given coordinate system. Some people call would this the local coordinate system because it may be the coordinate system an object resides in.


getUCSPerLocal

public harmonic.meshGeom.math.TMat getUCSPerLocal(ShapeNode shapeGroup)
return getUCSPerLocal(shapeGroup.coordSystem)


getUCSPerLocal

public harmonic.meshGeom.math.TMat getUCSPerLocal(harmonic.viewer3D.CoordSystem cs)
Return a transformation matrix that will take coordinates from the given coordinate system to the current user coordinate system. If the coordinate system is detatched from global, matrix is assumed to be idenity. It has proven problematic to consider this an error. The object is likly about to be removed anyway.


getUCSPerView

public harmonic.meshGeom.math.TMat getUCSPerView()
Return a transformation matrix that will take coorinates from the current viewpoint coordinates to the current user coordinate system. View coordinates are centered in the viewport center, positive x points right, positive y points up. X ranges from -1.0 to 1.0.


getUCSPerGlobal

public harmonic.meshGeom.math.TMat getUCSPerGlobal()
Return a transformation matrix that will take coordinates from global coordinates to the current user coordinate system. Global coordinates could also be called model coordinates.


getGlobalPerUCS

public harmonic.meshGeom.math.TMat getGlobalPerUCS()
Returns the inverse of getUCSPerGlobal()


setUCS

public void setUCS(harmonic.meshGeom.math.TMat mat)
Set the user coordinate system's matrix. This is the matrix that take UCS points to global points.