public class Node extends PointsList<Node>
head, next, normal, point, position, prev, tan, tracknumber
Constructor and Description |
---|
Node()
Default constructor.
|
Node(double xx,
double yy,
int t)
Create Node from coordinates.
|
Node(int t)
Create Node with given id.
|
Node(Node src)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addF_total(ExtendedVector2d f)
Update total force for Node.
|
void |
addVel(ExtendedVector2d v)
Update velocity for Node.
|
boolean |
equals(Object obj) |
ExtendedVector2d |
getF_total()
Setter to F_total field.
|
ExtendedVector2d |
getVel()
Setter to vel field.
|
int |
hashCode()
(non-Javadoc) Compare only current Node, no neighbours.
|
void |
setF_total(ExtendedVector2d f)
Set total force for Node.
|
void |
setPrelim(ExtendedVector2d v)
Set preliminary point for Node.
|
void |
setVel(ExtendedVector2d v)
Set velocity for Node.
|
String |
toString() |
void |
update()
Update point and force with preliminary values, and reset.
|
freeze, getCurvatureLocal, getNext, getNormal, getPoint, getPosition, getPrev, getTangent, getTrackNum, getX, getY, isFrozen, isHead, randDirection, setClockwise, setHead, setNext, setNormal, setPosition, setPrev, setTrackNum, setX, setY, unfreeze, updateNormale
public Node()
public Node(int t)
t
- id of NodePointsList
public Node(Node src)
Previous or next points are not copied
src
- Source Nodepublic Node(double xx, double yy, int t)
xx
- x-axis coordinateyy
- y-axis coordinatet
- id of Nodepublic int hashCode()
hashCode
in class PointsList<Node>
Object.hashCode()
public boolean equals(Object obj)
equals
in class PointsList<Node>
public void update()
public String toString()
toString
in class PointsList<Node>
public ExtendedVector2d getF_total()
public ExtendedVector2d getVel()
public void setF_total(ExtendedVector2d f)
f
- vector of force to assign to Node forcepublic void setVel(ExtendedVector2d v)
v
- vector of velocity to assign to Node forcepublic void addF_total(ExtendedVector2d f)
f
- vector of force to add to Node forcepublic void addVel(ExtendedVector2d v)
v
- vector of velocity to add to Node forcepublic void setPrelim(ExtendedVector2d v)
v
- vector of preliminary point to assign to Node forceCopyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.