use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class RigidTransformInputProbe method setRigid.
/**
* Set the rigid body associated with this probe.
*
* This must only be called once in the lifetime of the probe. Reseting the
* rigid body is not supported at the moment. Create a new
* RigidTransformInputProbe instead.
*
* @param rigid rigid body for this probe
*/
public void setRigid(RigidBody rigid) {
if (rigid != null) {
throw new UnsupportedOperationException("A rigid body has already been set! Aborting");
}
myRigid = rigid;
/*
* setup default interpolator
*/
myTransAndQuaternParams = new NumericList(myVectorSize);
myInterpolation = new Interpolation(Interpolation.Order.Linear, myExtendEnd);
myTransAndQuaternParams.setInterpolation(myInterpolation);
myTmpVec = new VectorNd(myVectorSize);
setStartTime(0.);
setStopTime(0.);
setUpdateInterval(-1);
setActive(true);
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class NumericProbeBase method scaleNumericList.
/**
* Scales the values of a numberic probe. Method added by Chad. author: Chad
* Scales the values of a numberic probe.
*
* @param scale
* the parameter by which to scale the values.
*/
public void scaleNumericList(double scale) {
Iterator numericListIterator = myNumericList.iterator();
NumericListKnot datavalue = null;
VectorNd yVector = null;
double[] vectorArray = null;
while (numericListIterator.hasNext()) {
datavalue = (NumericListKnot) numericListIterator.next();
yVector = datavalue.v;
vectorArray = yVector.getBuffer();
for (int i = 0; i < yVector.size(); i++) {
// System.out.print(vectorArray[i]+ ",");
vectorArray[i] *= scale;
// System.out.println(vectorArray[i]);
}
}
updateDisplays();
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class MFreeMuscleModel method getActivations.
public VectorNd getActivations() {
VectorNd act = new VectorNd(numActivations());
getActivations(act, 0);
return act;
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class MFreeNode3d method setNodeCoordinates.
public void setNodeCoordinates(VectorNd coords) {
myCoords = new VectorNd(coords);
updateSlavePos();
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class MLSShapeFunction method computePCorrelation.
protected void computePCorrelation(MatrixNd out, double x, double y, double z) {
VectorNd _p = new VectorNd(nBasis);
computeP(_p, x, y, z);
computeCorrelation(out, _p);
}
Aggregations