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.NType
protected float
protected static final float
protected static final float
static final Node.NType.Field
protected float
protected static final float
protected static final float
static final Node.NType.Field
protected static final float
protected static final float
protected float
static final Node.NType.Field
protected float
static final Node.NType.Field
protected static final float
protected static final float
protected float
static final Node.NType.Field
protected float
static final Node.NType.Field
protected float
static final Node.NType.Field
protected static final float
protected static final float
protected float
static final Node.NType.Field
protected float
static final Node.NType.Field
protected float
static final Node.NType.Field
protected static final float
protected static final float
Fields inherited from class de.grogra.imp3d.objects.ShadedNull
INFINITE_MASK, interior, interior$FIELD, renderAsWireframe, renderAsWireframe$FIELD, shader, shader$FIELD, treatedAsInfinite$FIELD, USED_BITS
Fields inherited from class de.grogra.imp3d.objects.Null
transform, transform$FIELD, TRANSFORMING_MASK, transforming$FIELD
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, MAX_RESOLUTION, MIME_TYPE, MIN_RESOLUTION, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, RESOLUTION_BIT, RESOLUTION_MASK, resolution$FIELD
Fields 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 TypeMethodDescriptionvoid
draw
(Object object, boolean asNode, RenderState rs) float
getA()
float
getB()
float
getM1()
float
getM2()
float
getN11()
float
getN12()
float
getN13()
float
getN21()
float
getN22()
float
getN23()
protected Node.NType
This method returns theNode.NType
which describes the managed fields of the class of this node.protected Node
This method returns a new instance of the class of this node.void
pick
(Object object, boolean asNode, Point3d origin, Vector3d direction, Matrix4d transformation, PickList list) Computes intersections of a given ray with this shape.void
setA
(float value) void
setB
(float value) void
setM1
(float value) void
setM2
(float value) void
setN11
(float value) void
setN12
(float value) void
setN13
(float value) void
setN21
(float value) void
setN22
(float value) void
setN23
(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, 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, 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, writeReplace
Methods inherited from class de.grogra.graph.impl.Edge
addEdgeBits, getBitMark, getEdgeBits, getEdgeKeys, 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 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:Pickable
Computes intersections of a given ray with this shape.- Specified by:
pick
in interfacePickable
- 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
-
draw
- Specified by:
draw
in interfaceRenderable
-
getNTypeImpl
Description copied from class:Node
This method returns theNode.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 classShadedNull
- Returns:
- type describing the managed fields of the class of this 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 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)
-