public class MultiPointSpring.WrapSegment extends MultiPointSpring.Segment implements HasNumericState
myPntA, myPntB
Modifier and Type | Method and Description |
---|---|
void |
advanceState(double t0,
double t1)
Called at the very beginning of the time step (in the system's
preadvance() method) to perform any required updating of the component's
state before the application in input probes or controllers.
|
double |
computeContactEnergy() |
double |
computeEnergy() |
double |
computeStrandLength() |
MultiPointSpring.SubSegment |
firstSubSegment()
If this segment has subsegments, return the first subsegment.
|
Point |
getABPoint(int idx) |
int[] |
getContactCnts() |
MultiPointSpring.WrapKnot |
getKnot(int idx) |
void |
getKnotPositions(VectorNd pos) |
void |
getState(DataBuffer data)
Saves state information for this component by adding data to the
supplied DataBuffer.
|
boolean |
hasState()
Specifies whether this component currently hold state.
|
boolean |
hasSubSegments()
Queries whether this segment has subsegments.
|
boolean |
inContact() |
void |
initializeStrand(Point3d[] initialPnts)
initialize the knots in the strand so that they are distributed evenly
along the piecewise-linear path specified by the start and end points
and any initialization points that may have been specified.
|
MultiPointSpring.SubSegment |
lastSubSegment()
If this segment has subsegments, return the last subsegment.
|
int |
numABPoints() |
int |
numKnots() |
void |
setKnotPositions(Point3d[] plist) |
void |
setKnotPositions(VectorNd pos) |
void |
setState(DataBuffer data)
Restores the state for this component by reading from the supplied
data buffer, starting at the current buffer offsets.
|
void |
transformGeometry(GeometryTransformer gtr)
Transforms the geometry of this wrappable segment.
|
getLength
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStateVersion
public int[] getContactCnts()
public Point getABPoint(int idx)
public int numABPoints()
public double computeStrandLength()
public void initializeStrand(Point3d[] initialPnts)
public double computeEnergy()
public double computeContactEnergy()
public boolean inContact()
public int numKnots()
public MultiPointSpring.WrapKnot getKnot(int idx)
public void setKnotPositions(Point3d[] plist)
public MultiPointSpring.SubSegment firstSubSegment()
null
.firstSubSegment
in class MultiPointSpring.Segment
public MultiPointSpring.SubSegment lastSubSegment()
null
.lastSubSegment
in class MultiPointSpring.Segment
public boolean hasSubSegments()
hasSubSegments
in class MultiPointSpring.Segment
true
if this segment has subsegments.public void getState(DataBuffer data)
HasNumericState
getState
in interface HasNumericState
data
- buffer for storing the state values.public void setState(DataBuffer data)
HasNumericState
setState
in interface HasNumericState
data
- buffer containing the state informationpublic void advanceState(double t0, double t1)
HasNumericState
advanceState
in interface HasNumericState
t0
- beginning time associated with the time step advancet1
- end time associated with the time step advancepublic boolean hasState()
HasNumericState
hasState
in interface HasNumericState
public void transformGeometry(GeometryTransformer gtr)
transformGeometry
in class MultiPointSpring.Segment
public void getKnotPositions(VectorNd pos)
public void setKnotPositions(VectorNd pos)