|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.inverse.LeastSquaresTermBase
artisynth.core.inverse.MotionTargetTerm
public class MotionTargetTerm
Tracking error term for the TrackingController
Field Summary | |
---|---|
static double |
DEFAULT_K
|
static boolean |
DEFAULT_NORMALIZE_H
|
static PropertyList |
myProps
|
Fields inherited from class artisynth.core.inverse.LeastSquaresTermBase |
---|
defaultWeight |
Constructor Summary | |
---|---|
MotionTargetTerm(TrackingController trackingController)
|
Method Summary | |
---|---|
MotionTargetComponent |
addTarget(MotionTargetComponent target)
Adds a target to track |
MotionTargetComponent |
addTarget(MotionTargetComponent source,
double weight)
Adds a target to track |
void |
clearTargets()
Removes targets |
void |
dispose()
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by this object. |
VectorNd |
getCurrentVel()
|
boolean |
getNormalizeH()
Returns whether or not we're normalizing this term's contribution to H and b . |
RenderProps |
getSourceRenderProps()
Render props for the sources |
java.util.ArrayList<MotionTargetComponent> |
getSources()
Returns list of source points/frames that are part of the model that will move to the targets |
RenderProps |
getTargetRenderProps()
Render props for targets |
java.util.ArrayList<MotionTargetComponent> |
getTargets()
Returns list of target points/frames |
int |
getTargetSize()
Returns complete size of velocity vector (not number of targets) |
double |
getTargetVelocityFactor()
Returns the velocity factor. |
int |
getTargetVelSize()
|
VectorNd |
getTargetWeights()
Returns target weights, one per target point. |
void |
getTargetWeights(VectorNd out)
Gets weights for targets. |
int |
getTerm(MatrixNd H,
VectorNd b,
int rowoff,
double t0,
double t1)
Fills H and b with this motion term |
SparseBlockMatrix |
getVelocityJacobian()
Returns the velocity Jacobian, creates if null |
void |
initSourceRenderProps()
|
void |
initTargetRenderProps()
|
boolean |
isEnabled()
|
void |
setEnabled(boolean enabled)
|
void |
setNormalizeH(boolean set)
Sets whether or not to normalize the contribution to H
and b by the Frobenius norm of this term's H block. |
void |
setSourceRenderProps(RenderProps rend)
Sets render props for sources |
void |
setTargetRenderProps(RenderProps rend)
Sets render props for the target points/frames |
void |
setTargetVelocityFactor(double k)
Sets a scaling factor to use when computing target velocities. |
void |
setTargetWeights(VectorNd wgts)
Sets weights for targets. |
void |
setWeight(double w)
Weight used to scale the contribution of this term in the quadratic optimization problem |
void |
updateTarget(double t0,
double t1)
|
Methods inherited from class artisynth.core.inverse.LeastSquaresTermBase |
---|
getProperty, getWeight |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double DEFAULT_K
public static boolean DEFAULT_NORMALIZE_H
public static PropertyList myProps
Constructor Detail |
---|
public MotionTargetTerm(TrackingController trackingController)
Method Detail |
---|
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class LeastSquaresTermBase
public void updateTarget(double t0, double t1)
public void dispose()
public boolean isEnabled()
public void setEnabled(boolean enabled)
public VectorNd getCurrentVel()
public void initTargetRenderProps()
public void initSourceRenderProps()
public MotionTargetComponent addTarget(MotionTargetComponent source, double weight)
source
- point or frame on the model you wish to drive to
a target positionweight
- used in error tracking
public MotionTargetComponent addTarget(MotionTargetComponent target)
target
- point or frame on the model you wish to drive to
a target position
public void clearTargets()
public java.util.ArrayList<MotionTargetComponent> getTargets()
public java.util.ArrayList<MotionTargetComponent> getSources()
public int getTargetVelSize()
public SparseBlockMatrix getVelocityJacobian()
public int getTargetSize()
public int getTerm(MatrixNd H, VectorNd b, int rowoff, double t0, double t1)
H
and b
with this motion term
H
- LHS matrix to fillb
- RHS vector to fillrowoff
- row offset to start filling termt0
- starting time of time stept1
- ending time of time step
public void setWeight(double w)
setWeight
in interface LeastSquaresTerm
setWeight
in class LeastSquaresTermBase
public void setTargetWeights(VectorNd wgts)
H
(allows you to scale x,y,z
components of velocity separately).
wgts
- weights vectorpublic void getTargetWeights(VectorNd out)
out
- weights vectorpublic RenderProps getTargetRenderProps()
public VectorNd getTargetWeights()
public void setTargetRenderProps(RenderProps rend)
public RenderProps getSourceRenderProps()
public void setSourceRenderProps(RenderProps rend)
public void setTargetVelocityFactor(double k)
k
can be used to scale down the velocity so we only reach a fraction of the
distance by the next time step.
public double getTargetVelocityFactor()
setTargetVelocityFactor(double)
.
public void setNormalizeH(boolean set)
H
and b
by the Frobenius norm of this term's H
block.
This is for scaling purposes when damping is important. If set to false,
then the damping term's scale will depend on the time and spatial scales.
However, if set to true, we will likely scale this term differently every
time step.
set
- public boolean getNormalizeH()
H
and b
. See setNormalizeH(boolean)
H
and b
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |