public abstract class DynamicAttachmentTestBase<C extends DynamicAttachment> extends UnitTest
| Constructor and Description |
|---|
DynamicAttachmentTestBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
computeMasterForce(VectorNd force,
int idx,
C at)
Computes the force for the idx-th master given the current force on the
slave component.
|
abstract void |
computeSlavePos(VectorNd pos,
C at)
Computes the position for the slave given the current state of the master
components.
|
abstract void |
computeSlaveVel(VectorNd vel,
C at)
Computes the velocity for the slave given the current state of the master
components.
|
abstract C |
createTestAttachment(int num)
Creates and returns an test attachment, with associated master and slave
components, to be used for testing.
|
int |
numTestAttachments()
Returns the number of test attachments to be created and returned by
createTestAttachment(int). |
void |
test() |
void |
test(C at) |
check, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkNormedEquals, checkNormedEquals, getSilent, printUsageAndExit, runtest, setSilentpublic abstract void computeSlavePos(VectorNd pos, C at)
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 abstract void computeSlaveVel(VectorNd vel, C at)
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, C at)
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 int numTestAttachments()
createTestAttachment(int). By default this is 1, but test classes can
override this to supply a larger number. This might be necessary, for
instance, to test attachments with different kinds of master components.public abstract C createTestAttachment(int num)
maxNum times, where maxNum is the value returned by 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.num - instance number for the attachment to be created.public void test(C at)