java.lang.Object
de.grogra.graph.impl.Edge
de.grogra.graph.impl.Node
de.grogra.imp3d.objects.Null
de.grogra.imp3d.objects.ShadedNull
de.grogra.imp3d.objects.Supershape
- All Implemented Interfaces:
Transformation,Pickable,Renderable,Manageable,PersistenceCapable,Shareable,UserFields,XObject,Map,Serializable
This class represents a supershape.
An implementation of Johan Gielis's Superformula which was published in the
American Journal of Botany 90(3): 333–338. 2003.
INVITED SPECIAL PAPER A GENERIC GEOMETRIC TRANSFORMATION
THAT UNIFIES A WIDE RANGE OF NATURAL AND ABSTRACT SHAPES
- Author:
- MH
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.grogra.graph.impl.Node
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Node.NTypeprotected floatprotected static final floatprotected static final floatstatic final Node.NType.Fieldprotected floatprotected static final floatprotected static final floatstatic final Node.NType.Fieldprotected static final floatprotected static final floatprotected floatstatic final Node.NType.Fieldprotected floatstatic final Node.NType.Fieldprotected static final floatprotected static final floatprotected floatstatic final Node.NType.Fieldprotected floatstatic final Node.NType.Fieldprotected floatstatic final Node.NType.Fieldprotected static final floatprotected static final floatprotected floatstatic final Node.NType.Fieldprotected floatstatic final Node.NType.Fieldprotected floatstatic final Node.NType.Fieldprotected static final floatprotected static final floatFields inherited from class de.grogra.imp3d.objects.ShadedNull
INFINITE_MASK, interior, interior$FIELD, renderAsWireframe, renderAsWireframe$FIELD, shader, shader$FIELD, treatedAsInfinite$FIELD, USED_BITSFields inherited from class de.grogra.imp3d.objects.Null
transform, transform$FIELD, TRANSFORMING_MASK, transforming$FIELDFields 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, MAX_RESOLUTION, MIME_TYPE, MIN_RESOLUTION, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, RESOLUTION_BIT, RESOLUTION_MASK, resolution$FIELDFields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP -
Constructor Summary
ConstructorsConstructorDescriptionSupershape(float a, float b, float m, float n1, float n2, float n3) Supershape(float a, float b, float m1, float n11, float n12, float n13, float m2, float n21, float n22, float n23) -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Object object, boolean asNode, RenderState rs) floatgetA()floatgetB()floatgetM1()floatgetM2()floatgetN11()floatgetN12()floatgetN13()floatgetN21()floatgetN22()floatgetN23()protected Node.NTypeThis method returns theNode.NTypewhich describes the managed fields of the class of this node.protected NodeThis method returns a new instance of the class of this node.voidpick(Object object, boolean asNode, Point3d origin, Vector3d direction, Matrix4d transformation, PickList list) Computes intersections of a given ray with this shape.voidsetA(float value) voidsetB(float value) voidsetM1(float value) voidsetM2(float value) voidsetN11(float value) voidsetN12(float value) voidsetN13(float value) voidsetN21(float value) voidsetN22(float value) voidsetN23(float value) Methods inherited from class de.grogra.imp3d.objects.ShadedNull
getInterior, getShader, getSurfaceArea, getSymbolColor, getVolume, isRenderAsWireframe, isTreatedAsInfinite, setBackShader, setColor, setColor, setFrontShader, setInterior, setMaterial, setRenderAsWireframe, setShader, setShaders, setTreatedAsInfiniteMethods inherited from class de.grogra.imp3d.objects.Null
getLocalTransformation, getTransform, getTranslation, isTransforming, postTransform, preTransform, setRotation, setScale, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransforming, setTranslationMethods inherited from class de.grogra.graph.impl.Node
addEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dupFrom, dupnew, 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, getIgnored, getIndex, getInstantiator, getInt, getLayer, getLong, getManageableType, getName, getNeighbor, getNext, getNType, getObject, getOrCreateEdgeTo, getOrNull, getPersistenceManager, getPredecessor, getProvider, getResolution, 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, setIgnored, setLayer, setMark, setName, setResolution, setSuccessor, setSuccessor, specialEdgeAdded, specialEdgeRefModified, specialEdgeRemoved, toString, writeReplaceMethods inherited from class de.grogra.graph.impl.Edge
addEdgeBits, getBitMark, getEdgeBits, getEdgeKeys, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBitsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.persistence.PersistenceCapable
getBitMark, getObjectMark, setBitMark, setObjectMark
-
Field Details
-
A_MIN
protected static final float A_MIN- See Also:
-
A_MAX
protected static final float A_MAX- See Also:
-
B_MIN
protected static final float B_MIN- See Also:
-
B_MAX
protected static final float B_MAX- See Also:
-
M_MIN
protected static final float M_MIN- See Also:
-
M_MAX
protected static final float M_MAX- See Also:
-
N1_MIN
protected static final float N1_MIN- See Also:
-
N1_MAX
protected static final float N1_MAX- See Also:
-
N2_MIN
protected static final float N2_MIN- See Also:
-
N2_MAX
protected static final float N2_MAX- See Also:
-
N3_MIN
protected static final float N3_MIN- See Also:
-
N3_MAX
protected static final float N3_MAX- See Also:
-
a
protected float a -
b
protected float b -
m1
protected float m1 -
n11
protected float n11 -
n12
protected float n12 -
n13
protected float n13 -
m2
protected float m2 -
n21
protected float n21 -
n22
protected float n22 -
n23
protected float n23 -
$TYPE
-
a$FIELD
-
b$FIELD
-
m1$FIELD
-
n11$FIELD
-
n12$FIELD
-
n13$FIELD
-
m2$FIELD
-
n21$FIELD
-
n22$FIELD
-
n23$FIELD
-
-
Constructor Details
-
Supershape
public Supershape() -
Supershape
public Supershape(float a, float b, float m, float n1, float n2, float n3) -
Supershape
public Supershape(float a, float b, float m1, float n11, float n12, float n13, float m2, float n21, float n22, float n23)
-
-
Method Details
-
pick
public void pick(Object object, boolean asNode, Point3d origin, Vector3d direction, Matrix4d transformation, PickList list) Description copied from interface:PickableComputes intersections of a given ray with this shape.- Specified by:
pickin interfacePickable- Parameters:
object- the object of which this shape is an attributeasNode-trueiff object is a nodeorigin- the origin of the ray, in local coordinatesdirection- the direction of the ray, in local coordinatestransformation- the transformation from local coordinates to world coordinateslist- the list to which intersections have to be added
-
draw
- Specified by:
drawin interfaceRenderable
-
getNTypeImpl
Description copied from class:NodeThis method returns theNode.NTypewhich describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
getNTypeImplin classShadedNull- Returns:
- type describing the managed fields of the class of this node
-
newInstance
Description copied from class:NodeThis method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
newInstancein classShadedNull- Returns:
- new instance of class of this node
-
getA
public float getA() -
getB
public float getB() -
getM1
public float getM1() -
getN11
public float getN11() -
getN12
public float getN12() -
getN13
public float getN13() -
getM2
public float getM2() -
getN21
public float getN21() -
getN22
public float getN22() -
getN23
public float getN23() -
setA
public void setA(float value) -
setB
public void setB(float value) -
setM1
public void setM1(float value) -
setN11
public void setN11(float value) -
setN12
public void setN12(float value) -
setN13
public void setN13(float value) -
setM2
public void setM2(float value) -
setN21
public void setN21(float value) -
setN22
public void setN22(float value) -
setN23
public void setN23(float value)
-