de.grogra.imp3d.objects
public class TextBlock extends ShadedNull implements Pickable, Renderable, Raytraceable
| Modifier and Type | Class and Description |
|---|---|
static class |
TextBlock.Pattern |
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType| Modifier and Type | Field and Description |
|---|---|
static Node.NType |
$TYPE |
protected java.lang.String |
caption |
static Node.NType.Field |
caption$FIELD |
protected float |
depth |
static Node.NType.Field |
depth$FIELD |
protected FontAdapter |
font |
static Node.NType.Field |
font$FIELD |
INFINITE_MASK, interior, interior$FIELD, shader, shader$FIELD, treatedAsInfinite$FIELD, USED_BITStransform, transform$FIELD, TRANSFORMING_MASK, transforming$FIELDADDITIONAL_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$FIELDDEFAULT_VALUE, EMPTY_MAP| Constructor and Description |
|---|
TextBlock() |
TextBlock(java.lang.String caption) |
TextBlock(java.lang.String caption,
float depth) |
TextBlock(java.lang.String caption,
float depth,
java.lang.String fontName,
int size) |
| Modifier and Type | Method and Description |
|---|---|
RaytracerLeaf |
createRaytracerLeaf(java.lang.Object object,
boolean asNode,
long pathId,
GraphState gs) |
void |
draw(java.lang.Object object,
boolean asNode,
RenderState rs) |
java.lang.String |
getCaption() |
float |
getDepth() |
FontAdapter |
getFont() |
protected Node.NType |
getNTypeImpl()
This method returns the
Node.NType which describes the managed
fields of the class of this node. |
double |
getSurfaceArea()
Calculates the area of an object.
|
double |
getVolume()
Calculates the volume.
|
protected Node |
newInstance()
This method returns a new instance of the class of this
node.
|
void |
pick(java.lang.Object object,
boolean asNode,
Point3d origin,
Vector3d direction,
Matrix4d t,
PickList list)
Computes intersections of a given ray with this shape.
|
static void |
pick(java.lang.String caption,
java.awt.Font font,
Point3d origin,
Vector3d direction,
Matrix4d transformation,
PickList list) |
void |
setCaption(java.lang.String value) |
void |
setDepth(float value) |
void |
setFont(FontAdapter value) |
getInterior, getShader, getSymbolColor, isTreatedAsInfinite, setBackShader, setColor, setColor, setFrontShader, setInterior, setMaterial, setShader, setShaders, setTreatedAsInfinitegetLocalTransformation, getTransform, getTranslation, isTransforming, postTransform, preTransform, setRotation, setScale, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransforming, setTranslationaddEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dupUnmanagedFields, edgeChanged, fieldModified, findAdjacent, findRefinementType, get, getAccessor, getAccessor, getAttributes, getAxisParent, getBoolean, getBranch, getBranchLength, getBranchNode, getBranchTail, getByte, getChar, getCommonAncestor, getCurrentGraphState, getDirectChildCount, getDouble, getEdgeAttributeAccessor, getEdgeAttributes, getEdgeBitsTo, getEdgeTo, getExtentIndex, getFirst, getFirstEdge, getFloat, getGraph, getId, getIndex, getInstantiator, getInt, getLayer, getLong, getManageableType, getName, getNeighbor, getNext, getNType, getObject, getOrCreateEdgeTo, getOrNull, getPersistenceManager, getPredecessor, getProvider, getShort, getSource, getStamp, getSuccessor, getSymbol, getTarget, getTransaction, getUserField, getUserFieldCount, getXClass, getXData, hasName, initProvider, initXClass, insertBranchNode, insertBranchNode, instantiateGraph, isAncestorOf, isDirection, isEncoarseOf, isManagingInstance, isMarked, isRoot, isSource, isTarget, manageableReadResolve, manageableWriteReplace, paramString, removeAll, removeEdgeBitsTo, removeFromChain, removeFromChain, removeReference, setBranch, setBranch, setExtentIndex, setGraphForDeserialization, setLayer, setMark, setName, setSuccessor, setSuccessor, specialEdgeAdded, specialEdgeRefModified, specialEdgeRemoved, toString, writeReplaceaddEdgeBits, getBitMark, getEdgeBits, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBitsequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBitMark, getObjectMark, setBitMark, setObjectMarkpublic static final Node.NType $TYPE
protected java.lang.String caption
public static final Node.NType.Field caption$FIELD
protected float depth
public static final Node.NType.Field depth$FIELD
protected FontAdapter font
public static final Node.NType.Field font$FIELD
public TextBlock()
public TextBlock(java.lang.String caption)
public TextBlock(java.lang.String caption,
float depth)
public TextBlock(java.lang.String caption,
float depth,
java.lang.String fontName,
int size)
public RaytracerLeaf createRaytracerLeaf(java.lang.Object object, boolean asNode, long pathId, GraphState gs)
createRaytracerLeaf in interface Raytraceablepublic void draw(java.lang.Object object,
boolean asNode,
RenderState rs)
draw in interface Renderablepublic java.lang.String getCaption()
public float getDepth()
public FontAdapter getFont()
protected Node.NType getNTypeImpl()
NodeNode.NType which describes the managed
fields of the class of this node. This method has to be implemented
in every concrete subclass.getNTypeImpl in class ShadedNullpublic double getSurfaceArea()
getSurfaceArea in class ShadedNullpublic double getVolume()
getVolume in class ShadedNullprotected Node newInstance()
NodenewInstance in class ShadedNullpublic void pick(java.lang.Object object,
boolean asNode,
Point3d origin,
Vector3d direction,
Matrix4d t,
PickList list)
Pickablepick in interface Pickableobject - the object of which this shape is an attributeasNode - true iff object is a nodeorigin - the origin of the ray, in local coordinatesdirection - the direction of the ray, in local coordinatest - the transformation from local coordinates to world coordinateslist - the list to which intersections have to be addedpublic static void pick(java.lang.String caption,
java.awt.Font font,
Point3d origin,
Vector3d direction,
Matrix4d transformation,
PickList list)
public void setCaption(java.lang.String value)
public void setDepth(float value)
public void setFont(FontAdapter value)