public class PointParticleAttachmentTest extends DynamicAttachmentTestBase<PointParticleAttachment>
Constructor and Description |
---|
PointParticleAttachmentTest() |
Modifier and Type | Method and Description |
---|---|
void |
computeMasterForce(VectorNd force,
int idx,
PointParticleAttachment at)
Computes the force for the idx-th master given the current force on the
slave component.
|
void |
computeSlavePos(VectorNd pos,
PointParticleAttachment at)
Computes the position for the slave given the current state of the master
components.
|
void |
computeSlaveVel(VectorNd vel,
PointParticleAttachment at)
Computes the velocity for the slave given the current state of the master
components.
|
PointParticleAttachment |
createTestAttachment(int idx)
Creates and returns an test attachment, with associated master and slave
components, to be used for testing.
|
static void |
main(java.lang.String[] args) |
numTestAttachments, test, test
check, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkNormedEquals, checkNormedEquals, getSilent, printUsageAndExit, runtest, setSilent
public void computeSlavePos(VectorNd pos, PointParticleAttachment at)
DynamicAttachmentTestBase
computeSlavePos
in class DynamicAttachmentTestBase<PointParticleAttachment>
pos
- returns the computed position. On input, will be set to the
position state size of the slave.at
- attachment for which the position is to be computedpublic void computeSlaveVel(VectorNd vel, PointParticleAttachment at)
DynamicAttachmentTestBase
computeSlaveVel
in class DynamicAttachmentTestBase<PointParticleAttachment>
vel
- returns the computed velocity. On input, will be set to the
velocity state size of the slave.at
- attachment for which the velocity is to be computedpublic void computeMasterForce(VectorNd force, int idx, PointParticleAttachment at)
DynamicAttachmentTestBase
computeMasterForce
in class DynamicAttachmentTestBase<PointParticleAttachment>
force
- returns the computed force. On input, will be set to the
velocity state size of the master.idx
- index of the master componentat
- attachment for which the force is to be computedpublic PointParticleAttachment createTestAttachment(int idx)
DynamicAttachmentTestBase
maxNum
times, where maxNum
is the value returned by DynamicAttachmentTestBase.numTestAttachments()
, with the parameter num
varying
from 0
to maxNum-1
. This allows the testing application
to create different kinds of test attachments, which might be
necessary in some situtations.createTestAttachment
in class DynamicAttachmentTestBase<PointParticleAttachment>
idx
- instance number for the attachment to be created.public static void main(java.lang.String[] args)