|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprocessing.core.PVector
generativedesign.Node
public class Node
The node class supplies a basic object for physical simulations. It has a position (which can be constrained), a velocity vector with damping and it can attract or repulse other nodes.
Field Summary | |
---|---|
float |
damping
Damping of the velocity: 0=no damping, 1=full damping (default = 0.5) |
float |
diameter
Diameter of the node (useful if a click on the node has to be checked) |
String |
id
|
float |
maxVelocity
Maximum length of the velocity vector (default = 10) |
float |
maxX
Maximum x position |
float |
maxY
Maximum y position |
float |
maxZ
Maximum z position |
float |
minX
Minimum x position |
float |
minY
Minimum y position |
float |
minZ
Minimum z position |
float |
radius
|
float |
ramp
|
float |
strength
|
PVector |
velocity
Velocity vector (speed) |
Fields inherited from class processing.core.PVector |
---|
x, y, z |
Constructor Summary | |
---|---|
Node()
|
|
Node(float theX,
float theY)
|
|
Node(float theX,
float theY,
float theZ)
|
|
Node(PVector theVector)
|
Method Summary | |
---|---|
void |
attract(Node theNode)
|
void |
attract(Node[] theNodes)
|
float |
getDamping()
|
float |
getDiameter()
|
String |
getID()
|
float |
getMaxVelocity()
|
float |
getMaxX()
|
float |
getMaxY()
|
float |
getMaxZ()
|
float |
getMinX()
|
float |
getMinY()
|
float |
getMinZ()
|
float |
getRadius()
|
float |
getRamp()
|
float |
getStrength()
|
PVector |
getVelocity()
|
void |
rotateX(float theAngle)
|
void |
rotateY(float theAngle)
|
void |
rotateZ(float theAngle)
|
void |
setBoundary(float theMinX,
float theMinY,
float theMaxX,
float theMaxY)
|
void |
setBoundary(float theMinX,
float theMinY,
float theMinZ,
float theMaxX,
float theMaxY,
float theMaxZ)
|
void |
setDamping(float theDamping)
|
void |
setDiameter(float theDiameter)
|
void |
setID(String theID)
|
void |
setMaxVelocity(float theMaxVelocity)
|
void |
setMaxX(float theMaxX)
|
void |
setMaxY(float theMaxY)
|
void |
setMaxZ(float theMaxZ)
|
void |
setMinX(float theMinX)
|
void |
setMinY(float theMinY)
|
void |
setMinZ(float theMinZ)
|
void |
setRadius(float theRadius)
|
void |
setRamp(float theRamp)
|
void |
setStrength(float theStrength)
|
void |
setVelocity(PVector theVelocity)
|
void |
update()
|
void |
update(boolean theLockX,
boolean theLockY,
boolean theLockZ)
|
Methods inherited from class processing.core.PVector |
---|
add, add, add, add, add, angleBetween, array, copy, cross, cross, cross, dist, dist, div, div, div, dot, dot, dot, equals, fromAngle, fromAngle, get, get, hashCode, heading, heading2D, lerp, lerp, lerp, limit, mag, magSq, mult, mult, mult, normalize, normalize, random2D, random2D, random2D, random2D, random3D, random3D, random3D, random3D, rotate, set, set, set, set, setMag, setMag, sub, sub, sub, sub, sub, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String id
public float diameter
public float minX
public float maxX
public float minY
public float maxY
public float minZ
public float maxZ
public PVector velocity
public float maxVelocity
public float damping
public float radius
public float strength
public float ramp
Constructor Detail |
---|
public Node()
public Node(float theX, float theY)
public Node(float theX, float theY, float theZ)
public Node(PVector theVector)
Method Detail |
---|
public void rotateX(float theAngle)
public void rotateY(float theAngle)
public void rotateZ(float theAngle)
public void attract(Node[] theNodes)
public void attract(Node theNode)
public void update()
public void update(boolean theLockX, boolean theLockY, boolean theLockZ)
public String getID()
public void setID(String theID)
public float getDiameter()
public void setDiameter(float theDiameter)
public void setBoundary(float theMinX, float theMinY, float theMinZ, float theMaxX, float theMaxY, float theMaxZ)
public void setBoundary(float theMinX, float theMinY, float theMaxX, float theMaxY)
public float getMinX()
public void setMinX(float theMinX)
public float getMaxX()
public void setMaxX(float theMaxX)
public float getMinY()
public void setMinY(float theMinY)
public float getMaxY()
public void setMaxY(float theMaxY)
public float getMinZ()
public void setMinZ(float theMinZ)
public float getMaxZ()
public void setMaxZ(float theMaxZ)
public PVector getVelocity()
public void setVelocity(PVector theVelocity)
public float getMaxVelocity()
public void setMaxVelocity(float theMaxVelocity)
public float getDamping()
public void setDamping(float theDamping)
public float getRadius()
public void setRadius(float theRadius)
public float getStrength()
public void setStrength(float theStrength)
public float getRamp()
public void setRamp(float theRamp)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |