|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.graph.impl.Edge de.grogra.graph.impl.Node de.grogra.imp.edit.ToolRoot de.grogra.imp3d.edit.ToolRoot3D de.grogra.imp3d.edit.TransformTool
public abstract class TransformTool
This class is the base class for tool roots which manipulate
transformable objects (objects having the attribute
Attributes.TRANSFORM
).
The tool coordinate system (see ToolRoot3D
is adjusted such that tool nodes of size 1 have a size of about 150
pixels on a 3D view.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.grogra.graph.impl.Node |
---|
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType |
Nested classes/interfaces inherited from interface de.grogra.util.EventListener |
---|
EventListener.Bicast, EventListener.Multicaster |
Nested classes/interfaces inherited from interface de.grogra.util.Map |
---|
Map.Chain |
Field Summary | |
---|---|
protected Matrix4d |
local
The local transformation matrix of the transformable object. |
Fields inherited from class de.grogra.imp3d.edit.ToolRoot3D |
---|
$TYPE |
Fields inherited from class de.grogra.imp.edit.ToolRoot |
---|
tool |
Fields inherited from class de.grogra.graph.impl.Node |
---|
ADDITIONAL_FIELDS, bits, DELETED, EXTENT_BIT, EXTENT_MASK, extentIndex$FIELD, extentTail$FIELD, HAS_OBSERVERS, IS_INTERPRETIVE, isInterpretive$FIELD, LAST_EXTENT_INDEX, layer$FIELD, MARK, mark$FIELD, MIME_TYPE, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, USED_BITS |
Fields inherited from interface de.grogra.util.Map |
---|
DEFAULT_VALUE, EMPTY_MAP |
Constructor Summary | |
---|---|
TransformTool()
|
Method Summary | |
---|---|
protected void |
adjustToolTransformation(Matrix4d t,
CameraBase c)
This method is invoked to compute an adjustment of the tool coordinates system. |
protected void |
computeTargetTransformation(Matrix4d t,
Matrix4d parent)
This implementation sets the target coordinate system such that is is transformed to the parent coordinate system by the transformation of the transformable tool target. |
protected boolean |
initialize(Tool tool)
Initializes this tool root. |
protected void |
setTargetTransform(Matrix4d t)
This utility method may be used by subclasses in order to set the local transformation of the transformable tool target to the given matrix t . |
Methods inherited from class de.grogra.imp3d.edit.ToolRoot3D |
---|
adjustScale, attributeChanged, dispose, eventOccured, getAdjustment, getParentTransformation, getTargetTransformation, getToolTransformation, postTransform, preTransform |
Methods inherited from class de.grogra.imp.edit.ToolRoot |
---|
executeWithWriteLock, getToolTarget, isTargetNode |
Methods inherited from class de.grogra.graph.impl.Edge |
---|
addEdgeBits, getBitMark, getEdgeBits, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBits |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.grogra.persistence.PersistenceCapable |
---|
getBitMark, getObjectMark, setBitMark, setObjectMark |
Field Detail |
---|
protected Matrix4d local
Constructor Detail |
---|
public TransformTool()
Method Detail |
---|
protected void adjustToolTransformation(Matrix4d t, CameraBase c)
ToolRoot3D
t
to the
transformation matrix from target coordinates to world
coordinates. Implementations of this method may adjust
t
, e.g., they may set a certain scaling factor
between tool coordinates and camera coordinates in order to
ensure a fixed size of tool nodes on the 3D view.
adjustToolTransformation
in class ToolRoot3D
t
- the tool transformation to be adjustedc
- the camera of the tool's 3D viewprotected void computeTargetTransformation(Matrix4d t, Matrix4d parent)
computeTargetTransformation
in class ToolRoot3D
t
- the computed matrix of the target coordinate systemparent
- the provided matrix of the parent coordinate systemprotected boolean initialize(Tool tool)
ToolRoot
ToolRoot.tool
with the given tool
.
initialize
in class ToolRoot3D
tool
- the tool to which this tool root is associated
true
if this tool root actually shall be used
for the tool, false
if it shall not be used (e.g., if
the actual tool target cannot be manipulated by the tool graph
of this tool root).protected void setTargetTransform(Matrix4d t)
t
.
t
- the new local transformation of the target object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |