public class ConstraintForceTarget extends RenderableComponentBase implements TrackingTarget
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ARROW_SIZE |
static double |
DEFAULT_WEIGHT |
static PropertyList |
myProps |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
ConstraintForceTarget() |
ConstraintForceTarget(BodyConnector con,
VectorNd targetLambda) |
Modifier and Type | Method and Description |
---|---|
int |
addForceJacobian(SparseBlockMatrix J,
int bi,
int solve_index) |
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
double |
getArrowSize() |
BodyConnector |
getConnector() |
BodyConnector |
getSourceComp()
Returns the source component associated with this target.
|
VectorNd |
getSubWeights()
Queries the subweights of this target.
|
VectorNd |
getTargetLambda() |
int |
getTargetSize()
Queries the number of DOFs in the target.
|
double |
getWeight()
Queries the weight of this target.
|
int |
numBilateralConstraints() |
void |
prerender(RenderList list)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
setArrowSize(double size) |
void |
setConnector(BodyConnector connector) |
void |
setSubWeights(VectorNd weights)
Sets the subweights for this target.
|
void |
setTargetLambda(VectorNd lam) |
void |
setWeight(double w)
Sets the weight for this target.
|
copy, defaultRenderPropsAreNull, getRenderHints, getRenderProps, getSelection, isSelectable, isVisible, numSelectionQueriesNeeded, setRenderProps, setVisible, updateBounds, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
public static final double DEFAULT_WEIGHT
public static final double DEFAULT_ARROW_SIZE
public static PropertyList myProps
public ConstraintForceTarget()
public ConstraintForceTarget(BodyConnector con, VectorNd targetLambda)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class RenderableComponentBase
public double getWeight()
TrackingTarget
getWeight
in interface TrackingTarget
TrackingTarget.setWeight(double)
public void setWeight(double w)
TrackingTarget
setWeight
in interface TrackingTarget
w
- new target weightTrackingTarget.getWeight()
public VectorNd getSubWeights()
TrackingTarget
getSubWeights
in interface TrackingTarget
TrackingTarget.setSubWeights(maspack.matrix.VectorNd)
public void setSubWeights(VectorNd weights)
TrackingTarget
TrackingTarget.getTargetSize()
, and each has a default value of 1. Subweights are
multiplied by the target weight (returned by TrackingTarget.getWeight()
) to yield
a net weight used to prioritize each degree of freedom in the tracking
computation, with higher weights resulting in more accurate tracking and
a weight of 0 resulting in no tracking at all.setSubWeights
in interface TrackingTarget
weights
- new target subweightsTrackingTarget.getSubWeights()
public VectorNd getTargetLambda()
public void setTargetLambda(VectorNd lam)
public int getTargetSize()
TrackingTarget
getTargetSize
in interface TrackingTarget
public void setConnector(BodyConnector connector)
public int numBilateralConstraints()
public BodyConnector getSourceComp()
TrackingTarget
getSourceComp
in interface TrackingTarget
public BodyConnector getConnector()
public int addForceJacobian(SparseBlockMatrix J, int bi, int solve_index)
public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class RenderableComponentBase
public void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class RenderableComponentBase
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public void prerender(RenderList list)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
prerender
in class RenderableComponentBase
list
- list of objects to be renderedpublic void setArrowSize(double size)
public double getArrowSize()