public class LinearPointConstraint extends ConstrainerBase
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_COMPLIANCE |
static double |
DEFAULT_DAMPING |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
LinearPointConstraint()
General constructor.
|
LinearPointConstraint(Point[] pnts,
double[] wgts)
General constructor
|
LinearPointConstraint(Point[] pnts,
double[] wgts,
Point3d target)
General constructor
|
LinearPointConstraint(Point[] pnts,
VectorNd wgts,
Point3d target)
General constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb) |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
int |
getBilateralForces(VectorNd lam,
int idx) |
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx) |
void |
getBilateralSizes(VectorNi sizes) |
double |
getCompliance() |
void |
getConstrainedComponents(java.util.List<DynamicComponent> list) |
double |
getDamping() |
Point[] |
getPoints() |
Point3d |
getTarget() |
double[] |
getWeights() |
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
boolean |
scanItem(ReaderTokenizer rtok,
java.util.Deque<ScanToken> tokens) |
int |
setBilateralForces(VectorNd lam,
double s,
int idx) |
void |
setCompliance(double c) |
void |
setDamping(double d) |
void |
setTarget(Point3d pos)
Sets a target sum of positions
|
double |
updateConstraints(double t,
int flags)
Updates the current set of constraints, and returns the maximum
penetration
> 0 associated with all of them. |
void |
zeroForces() |
addFrictionConstraints, addUnilateralConstraints, advanceState, getState, getUnilateralForces, getUnilateralInfo, getUnilateralSizes, hasState, maxFrictionConstraintSets, setState, setUnilateralForces
copy, createRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, isVisible, numSelectionQueriesNeeded, prerender, setRenderProps, setVisible, updateBounds, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStateVersion
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
public static double DEFAULT_COMPLIANCE
public static double DEFAULT_DAMPING
public LinearPointConstraint()
setPoints(Point[], double[])
.public LinearPointConstraint(Point[] pnts, double[] wgts)
pnts
- list of points to constrainwgts
- list of weightspublic LinearPointConstraint(Point[] pnts, double[] wgts, Point3d target)
pnts
- list of points to constrainwgts
- list of weightstarget
- target sumpublic PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelComponentBase
public void setTarget(Point3d pos)
pos
- target positionpublic Point[] getPoints()
public double[] getWeights()
public Point3d getTarget()
public double getCompliance()
public void setCompliance(double c)
public double getDamping()
public void setDamping(double d)
public void getBilateralSizes(VectorNi sizes)
getBilateralSizes
in interface Constrainer
getBilateralSizes
in class ConstrainerBase
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
addBilateralConstraints
in interface Constrainer
addBilateralConstraints
in class ConstrainerBase
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
getBilateralInfo
in interface Constrainer
getBilateralInfo
in class ConstrainerBase
public int setBilateralForces(VectorNd lam, double s, int idx)
setBilateralForces
in interface Constrainer
setBilateralForces
in class ConstrainerBase
public int getBilateralForces(VectorNd lam, int idx)
getBilateralForces
in interface Constrainer
getBilateralForces
in class ConstrainerBase
public void zeroForces()
zeroForces
in interface Constrainer
zeroForces
in class ConstrainerBase
public double updateConstraints(double t, int flags)
Constrainer
>
0 associated with all of them. If no constraints are
presently active, returns -1.updateConstraints
in interface Constrainer
updateConstraints
in class ConstrainerBase
public void getConstrainedComponents(java.util.List<DynamicComponent> list)
getConstrainedComponents
in interface Constrainer
getConstrainedComponents
in class ConstrainerBase
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 scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
ModelComponentBase
write
.scan
in interface ModelComponent
scan
in interface Scannable
scan
in class ModelComponentBase
rtok
- Tokenizer from which to scan the elementref
- optional reference object which can be used for resolving references to
other objectsjava.io.IOException
- if an I/O or formatting error occuredpublic boolean scanItem(ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens) throws java.io.IOException
java.io.IOException