de.grogra.imp3d.objects
Class Supershape
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, java.io.Serializable
public class Supershape
- extends ShadedNull
- implements Pickable, Renderable
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:
- Serialized Form
Nested classes/interfaces inherited from interface de.grogra.util.Map |
Map.Chain |
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 |
Constructor Summary |
Supershape()
|
Supershape(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)
|
Methods inherited from class de.grogra.imp3d.objects.ShadedNull |
getInterior, getShader, getSymbolColor, isTreatedAsInfinite, setBackShader, setColor, setColor, setFrontShader, setInterior, setMaterial, setShader, setShaders, setTreatedAsInfinite |
Methods 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, setTranslation |
Methods inherited from class de.grogra.graph.impl.Node |
addEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dupUnmanagedFields, edgeChanged, fieldModified, findAdjacent, 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, 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, writeReplace |
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 |
$TYPE
public static final Node.NType $TYPE
a
protected float a
A_MAX
protected static final float A_MAX
- See Also:
- Constant Field Values
A_MIN
protected static final float A_MIN
- See Also:
- Constant Field Values
a$FIELD
public static final Node.NType.Field a$FIELD
b
protected float b
B_MAX
protected static final float B_MAX
- See Also:
- Constant Field Values
B_MIN
protected static final float B_MIN
- See Also:
- Constant Field Values
b$FIELD
public static final Node.NType.Field b$FIELD
M_MAX
protected static final float M_MAX
- See Also:
- Constant Field Values
M_MIN
protected static final float M_MIN
- See Also:
- Constant Field Values
m1
protected float m1
m1$FIELD
public static final Node.NType.Field m1$FIELD
m2
protected float m2
m2$FIELD
public static final Node.NType.Field m2$FIELD
N1_MAX
protected static final float N1_MAX
- See Also:
- Constant Field Values
N1_MIN
protected static final float N1_MIN
- See Also:
- Constant Field Values
n11
protected float n11
n11$FIELD
public static final Node.NType.Field n11$FIELD
n12
protected float n12
n12$FIELD
public static final Node.NType.Field n12$FIELD
n13
protected float n13
n13$FIELD
public static final Node.NType.Field n13$FIELD
N2_MAX
protected static final float N2_MAX
- See Also:
- Constant Field Values
N2_MIN
protected static final float N2_MIN
- See Also:
- Constant Field Values
n21
protected float n21
n21$FIELD
public static final Node.NType.Field n21$FIELD
n22
protected float n22
n22$FIELD
public static final Node.NType.Field n22$FIELD
n23
protected float n23
n23$FIELD
public static final Node.NType.Field n23$FIELD
N3_MAX
protected static final float N3_MAX
- See Also:
- Constant Field Values
N3_MIN
protected static final float N3_MIN
- See Also:
- Constant Field Values
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)
draw
public void draw(java.lang.Object object,
boolean asNode,
RenderState rs)
- Specified by:
draw
in interface Renderable
getA
public float getA()
getB
public float getB()
getM1
public float getM1()
getM2
public float getM2()
getN11
public float getN11()
getN12
public float getN12()
getN13
public float getN13()
getN21
public float getN21()
getN22
public float getN22()
getN23
public float getN23()
getNTypeImpl
protected Node.NType getNTypeImpl()
- Description copied from class:
Node
- This method returns the
Node.NType
which describes the managed
fields of the class of this node. This method has to be implemented
in every concrete subclass.
- Overrides:
getNTypeImpl
in class ShadedNull
- Returns:
- type describing the managed fields of the class of this node
newInstance
protected Node newInstance()
- Description copied from class:
Node
- This method returns a new instance of the class of this
node. This method has to be implemented in every concrete subclass.
- Overrides:
newInstance
in class ShadedNull
- Returns:
- new instance of class of this node
pick
public void pick(java.lang.Object object,
boolean asNode,
Point3d origin,
Vector3d direction,
Matrix4d transformation,
PickList list)
- Description copied from interface:
Pickable
- Computes intersections of a given ray with this shape.
- Specified by:
pick
in interface Pickable
- Parameters:
object
- 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 coordinatestransformation
- the transformation from local coordinates to world coordinateslist
- the list to which intersections have to be added
setA
public void setA(float value)
setB
public void setB(float value)
setM1
public void setM1(float value)
setM2
public void setM2(float value)
setN11
public void setN11(float value)
setN12
public void setN12(float value)
setN13
public void setN13(float value)
setN21
public void setN21(float value)
setN22
public void setN22(float value)
setN23
public void setN23(float value)