@ThreadSafe public class Joint extends LinkageNode
Structured rigid transform from one Link
to another.
updateWidgetsImpl()
See additional description in header doc for Linkage
.
Copyright (C) 2008 Marsette A. Vona, III
Modifier and Type | Class and Description |
---|---|
static class |
Joint.ResidualType
Residual type requested for
getResidual(int, ResidualType,
int, double[]) . |
protected static class |
Joint.SliderSegmentWidget
A specialization that knows how to track start and end coords as
described in
addSegmentWidget(int, float) . |
static class |
Joint.Type
The set of available types of Joint.
|
LinkageNode.ApplyingNodeHandler, LinkageNode.NodeHandler, LinkageNode.SubFrame
Modifier and Type | Field and Description |
---|---|
static int[] |
ALL_TXEM_INDICES
vector of all six TXEM indices
|
static float |
AXES_RADIUS_FACTOR
Joint
AxesWidget radius relative to LinkageNode.widgetLength |
Link |
branchLink
For a chain closure joint,
Controller.analyze() sets this to the
least common ancestor of the model tree branches containing parentLink and childLink . |
static double |
BROKEN_TOL
tolerance for
isBroken() |
protected Link |
childLink
The immediate descendant of this joint, or null if dangling.
|
protected java.util.List<Link> |
childLinks
Contains
childLink (for getChildren() ), empty if
dangling. |
protected vona.math.RX |
childMobilityCMT
cached quantity
|
protected boolean |
childMobilityCMTDirty
dirty flag for indicated quantity
|
protected double[] |
childMobilityCMTQuaternion
cached quantity
|
protected boolean |
childMobilityCMTQuaternionDirty
dirty flag for indicated quantity
|
protected double[] |
childMobilityCMTRotMatrix
cached quantity
|
protected boolean |
childMobilityCMTRotMatrixDirty
dirty flag for indicated quantity
|
protected java.lang.String |
childSubFrame
Subframe in child link corresponding to
childToMobilityRX , if
any. |
protected vona.math.RX |
childToMobilityRX
Sub transform taking the child frame to the child mobility
frame.
|
static vona.color.ColorScheme |
CLOSURE_ROUTE_COLOR_SCHEME
Color scheme for closure joint
RouteWidget s. |
static float |
CONE_HEIGHT_FACTOR
Joint
ConeWidget dimensions relative to LinkageNode.widgetLength . |
static float |
CONE_RADIUS_FACTOR
Joint
ConeWidget dimensions relative to LinkageNode.widgetLength . |
private static java.lang.String |
cvsid |
static float |
CYLINDER_HEIGHT_FACTOR
Joint cylinder
Widget height relative to LinkageNode.widgetLength |
static float |
DEGENERATE_ROUTE_TANGENT_FACTOR
RouteWidget endpoint tangent lengths relative to LinkageNode.widgetLength . |
static double |
DEGENERATE_ROUTE_TOL
tolerance for checking route widget degeneracy
|
static java.lang.String |
FMT
decimal printf format
|
static java.lang.String |
FMT_S
string printf format same width as
FMT |
static int |
FMT_WIDTH
field width for
FMT |
static java.lang.String |
FMT3
multiple
FMT s |
static java.lang.String |
FMT3_S
multiple
FMT_S s |
static java.lang.String |
FMT4
multiple
FMT s |
static java.lang.String |
FMT4_S
multiple
FMT_S s |
static java.lang.String |
FMT6
multiple
FMT s |
static java.lang.String |
FMT6_S
multiple
FMT_S s |
static int |
G_LIMIT
Non-transform goal identifiers.
|
protected vona.math.RX |
invariantRX
Current
mobilityRX invariant goal. |
int |
jacobianDoFStartRow
Start indices of the spans of Jacobian rows corresponding to this
Joint in
solver , or -1 if none. |
int |
jacobianDoIStartRow
Start indices of the spans of Jacobian rows corresponding to this
Joint in
solver , or -1 if none. |
int |
jacobianLimitStartRow
Start indices of the spans of Jacobian rows corresponding to this
Joint in
solver , or -1 if none. |
int |
jacobianStartColumn
Start index of the span of Jacobian columns corresponding to this
Joint in
solver , or -1 if none. |
static java.lang.String[] |
JOINT_SUBFRAMES
all joint subframes
|
protected vona.math.RX |
jointRX
Total transform taking the child frame to the parent
frame.
|
static java.lang.String |
JW_AXES
WP_JOINT values |
static vona.color.ColorScheme |
JW_COLOR_SCHEME
Color scheme for Joint
Widget s. |
static java.lang.String |
JW_LABEL
WP_JOINT values |
static java.lang.String |
JW_MOBILITY_SLIDER
WP_JOINT values |
static java.lang.String |
JW_MOBILITY_SURFACE
WP_JOINT values |
static java.lang.String |
JW_ROUTE
WP_JOINT values |
static java.lang.String |
JW_ROUTE_CONE
WP_JOINT values |
static java.lang.String |
JW_SLIDER_SURFACE
WP_JOINT values |
int |
lastSupportIndexBeforeBranch
For a chain closure joint,
Controller.analyze() sets this to the
index of the last actuator in support before branchLink . |
protected double[][] |
limit
|
static int |
LIMIT_PENALTY_DEGREE
Polynomial degree of the limit penalty function.
|
static int |
LIMITED_EDGE_PATTERN
edge pattern for indicating limited or unlimited mobility
|
static float |
LIMITED_EDGE_WIDTH
edge width for indicating limited or unlimited mobility
|
protected boolean[] |
limitSet
Whether we currently have a
limit for each TXEM parameter. |
protected boolean |
locked
whether this Joint is currently locked
|
protected vona.math.RX |
lockRX
Current
mobilityRX lock goal. |
static int |
LOWER
|
static java.awt.Color |
MOBILITY_ERROR_ROUTE_COLOR
color of mobility routes for broken closures
|
protected double[][] |
mobilitydEMdQ
cached quantity
|
protected boolean |
mobilitydEMdQDirty
dirty flag for indicated quantity
|
protected double[][] |
mobilitydQdEM
cached quantity
|
protected boolean |
mobilitydQdEMDirty
dirty flag for indicated quantity
|
protected double[][] |
mobilitydRdEM
cached quantity
|
protected boolean |
mobilitydRdEMDirty
dirty flag for indicated quantity
|
protected double[][] |
mobilitydRdQ
cached quantity
|
protected boolean |
mobilitydRdQDirty
dirty flag for indicated quantity
|
protected boolean |
mobilityInverted
whether this Joint's mobility space is currently inverted
|
protected double[] |
mobilityQuaternion
cached quantity
|
protected boolean |
mobilityQuaternionDirty
dirty flag for indicated quantity
|
protected double[] |
mobilityRotMatrix
cached quantity
|
protected boolean |
mobilityRotMatrixDirty
dirty flag for indicated quantity
|
protected vona.math.RX |
mobilityRX
Sub transform taking the child mobility frame to the parent
mobility frame, or vice-versa if
mobilityInverted . |
protected vona.math.RX |
mobilityRXClamped
Mirror of
mobilityRX , but always clamped to limit s. |
protected vona.math.RX |
mobilityRXClampedInverse
cached quantity
|
protected boolean |
mobilityRXClampedInverseDirty
dirty flag for indicated quantity
|
protected vona.math.RX |
mobilityRXInverse
cached quantity
|
protected boolean |
mobilityRXInverseDirty
dirty flag for indicated quantity
|
protected vona.math.RX |
mobilityToParentRX
Sub transform taking the parent mobility frame to the parent
frame.
|
static int |
NUM_CHAIN_SUBTRANSFORMS
number of subtransforms
|
static int |
NUM_CONE_SECTORS
number of sectors for
ConeWidget s |
static int |
NUM_GOAL_SUBTRANSFORMS
number of subtransforms
|
static int |
NUM_HARD_GOAL_SUBTRANSFORMS
number of subtransforms
|
static int |
NUM_RESIDUAL_TYPES
number of different
Joint.ResidualType s |
static int |
NUM_ROUTE_SEGMENTS
number of segments for
RouteWidget s |
static int |
NUM_SOFT_GOAL_SUBTRANSFORMS
number of subtransforms
|
static int |
NUM_SUBTRANSFORMS
number of subtransforms
|
static int |
NUM_TYPES
number of different
Joint.Type s |
protected Link |
parentLink
The
Link leading to this joint, or null if dangling. |
protected vona.math.RX |
parentMobilityCMT
cached quantity
|
protected boolean |
parentMobilityCMTDirty
dirty flag for indicated quantity
|
protected double[] |
parentMobilityCMTQuaternion
cached quantity
|
protected boolean |
parentMobilityCMTQuaternionDirty
dirty flag for indicated quantity
|
protected double[] |
parentMobilityCMTRotMatrix
cached quantity
|
protected boolean |
parentMobilityCMTRotMatrixDirty
dirty flag for indicated quantity
|
protected java.lang.String |
parentSubFrame
Subframe in parent link corresponding to
mobilityToParentRX ,
if any. |
static int |
PG_GRAVITY
Non-transform goal identifiers.
|
static int |
PG_POTENTIAL
Non-transform goal identifiers.
|
static int |
PG_STIFFNESS
Non-transform goal identifiers.
|
static float |
PLANAR_RECTANGLE_ALPHA
Joint revolute/cylindrical/pin-slider sector, pin-slider/point-slider
prism, and planar/point-plane rectangle
Widget face alphas. |
protected boolean |
positioningTransformsLocked
Whether
RX_CHILD_TO_MOBILITY and RX_MOBILITY_TO_PARENT are currently locked. |
protected vona.math.RX |
postureRX
Current
mobilityRX posture. |
protected boolean |
potentialEnabled
Gating enable for any potential goal.
|
static Joint.ResidualType[] |
RESIDUAL_TYPES
set of all
Joint.ResidualType s, do not modify |
static float |
REVOLUTE_SECTOR_ALPHA
Joint revolute/cylindrical/pin-slider sector, pin-slider/point-slider
prism, and planar/point-plane rectangle
Widget face alphas. |
protected boolean |
rotationDoFLimited
Whether the indicated motion DoF space has any limits currently set.
|
static float |
ROUTE_LINE_WIDTH
line width for
RouteWidget s |
static float |
ROUTE_TANGENT_FACTOR
RouteWidget endpoint tangent lengths relative to LinkageNode.widgetLength . |
static int |
RX_CHILD_TO_MOBILITY
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents . |
static int |
RX_INVARIANT
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents . |
static int |
RX_LOCK
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents . |
static int |
RX_MOBILITY
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents . |
static int |
RX_MOBILITY_TO_PARENT
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents . |
static int |
RX_POSTURE
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents . |
static int |
RX_TARGET
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents . |
static float |
SECTOR_MARGIN
Joint extendable
SectorWidget margin in radians. |
static float |
SECTOR_OFFSET_FACTOR
Joint segment and sector
Widget lengths relative to LinkageNode.widgetLength . |
static float |
SECTOR_WIDTH_FACTOR
Joint segment and sector
Widget lengths relative to LinkageNode.widgetLength . |
static float |
SEGMENT_LENGTH_FACTOR
Joint segment and sector
Widget lengths relative to LinkageNode.widgetLength . |
static float |
SEGMENT_OFFSET_FACTOR
Joint segment and sector
Widget lengths relative to LinkageNode.widgetLength . |
protected int[][] |
setGoalComponents
cached quantity
|
protected int[] |
setLimitComponents
cached quantity: limited DoF indices only (no DoI)
|
protected int[][] |
setRotationGoalComponents
cached quantity
|
protected int[] |
setRotationLimitComponents
cached quantity: limited DoF indices only (no DoI)
|
protected int[][] |
setTranslationGoalComponents
cached quantity
|
protected int[] |
setTranslationLimitComponents
cached quantity: limited DoF indices only (no DoI)
|
static java.lang.String |
SF_CHILD
Subframes.
|
static java.lang.String |
SF_CHILD_MOBILITY
Subframes.
|
static java.lang.String |
SF_MOBILITY_FROM
Subframes.
|
static java.lang.String |
SF_MOBILITY_TO
Subframes.
|
static java.lang.String |
SF_PARENT
Subframes.
|
static java.lang.String |
SF_PARENT_MOBILITY
Subframes.
|
protected double |
singleMobilityDoF
cached quantity
|
protected boolean |
singleMobilityDoFDirty
dirty flag for indicated quantity
|
static float |
SLIDER_EDGE_WIDTH
slider widget edge width
|
static float |
SLIDER_PRISM_ALPHA
Joint revolute/cylindrical/pin-slider sector, pin-slider/point-slider
prism, and planar/point-plane rectangle
Widget face alphas. |
float |
softGoalPriority
Solve priority of the highest priority soft goal of this Joint in
solver . |
int |
softGoalSolveLevel
Solve level of the highest priority soft goal, if any, of this Joint in
solver . |
double |
softGoalWeight
Solve weight of the highest priority soft goal of this Joint in
solver . |
Solver |
solver
the
Solver assigned by Controller.analyze() , iff any |
protected double |
stiffness
stiffness of this joint or NaN if unset
|
protected double |
stiffnessRest
stiffness rest pose of this joint, default 0
|
static java.lang.String[] |
SUB_RX_NAME
names of the sub-transforms
|
protected vona.math.RX[] |
subRX
the various sub-transforms, indexed by identifier
|
java.util.List<Joint> |
support
Joints associated to this Joint in a
Solver . |
protected vona.math.RX |
targetRX
Current
mobilityRX target. |
protected vona.math.RX |
tempRX
a temp transform
|
protected float[][] |
tempV3
temp storage
|
protected double[] |
tempV3D
temp storage
|
protected boolean |
translationDoFLimited
Whether the indicated motion DoF space has any limits currently set.
|
static vona.color.ColorScheme |
TREE_ROUTE_COLOR_SCHEME
Color scheme for tree joint
RouteWidget s. |
protected Joint.Type |
type
the current Joint
Joint.Type |
static Joint.Type[] |
TYPES
set of all
Joint.Type s, do not modify |
static int |
UNLIMITED_EDGE_PATTERN
edge pattern for indicating limited or unlimited mobility
|
static float |
UNLIMITED_EDGE_WIDTH
edge width for indicating limited or unlimited mobility
|
protected java.util.List<Link> |
unmodifiableChildLinks
unmodifiable view of
childLinks |
protected int[][] |
unsetGoalComponents
cached quantity
|
protected int[] |
unsetLimitComponents
cached quantity: unlimited DoF indices only (no DoI)
|
static int |
UPPER
|
static float |
WIDGET_MARGIN
Joint extendable
Widget margin relative to LinkageNode.widgetLength . |
static int |
WIDGET_NUM_SECTORS
Joint cylinder, sphere, and circle
Widget sector counts |
static float |
WIDGET_RADIUS_FACTOR
Joint cylinder, sphere, and circle
Widget radii relative to
LinkageNode.widgetLength . |
static float |
WIDGET_WIDTH_FACTOR
Joint prism and square
Widget widths relative to LinkageNode.widgetLength . |
static java.lang.String |
WN_C_TO_M_ROUTE
Joint
Widget names |
static java.lang.String |
WN_CHILD_MOBILITY_AXES
Joint
Widget names |
static java.lang.String |
WN_JOINT_CIRCLE
Joint
Widget names |
static java.lang.String |
WN_JOINT_CYLINDER
Joint
Widget names |
static java.lang.String |
WN_JOINT_LABEL
Joint
Widget names |
static java.lang.String |
WN_JOINT_PRISM
Joint
Widget names |
static java.lang.String |
WN_JOINT_PRISM_ENDS
Joint
Widget names |
static java.lang.String |
WN_JOINT_RECTANGLE
Joint
Widget names |
static java.lang.String |
WN_JOINT_RECTANGLE_Y_EDGES
Joint
Widget names |
static java.lang.String |
WN_JOINT_SECTOR
Joint
Widget names |
static java.lang.String |
WN_JOINT_SECTOR_ENDS
Joint
Widget names |
static java.lang.String |
WN_JOINT_SEGMENT
Joint
Widget names |
static java.lang.String |
WN_JOINT_SPHERE
Joint
Widget names |
static java.lang.String |
WN_JOINT_SQUARE
Joint
Widget names |
static java.lang.String |
WN_M_TO_P_ROUTE
Joint
Widget names |
static java.lang.String |
WN_MOBILITY_ROUTE
Joint
Widget names |
static java.lang.String |
WN_PARENT_MOBILITY_AXES
Joint
Widget names |
static java.lang.String |
WN_ROUTE_CONE_SUFFIX
Joint
Widget names |
static java.lang.String |
WP_JOINT
Widget property identifying a Joint widget |
static java.lang.String |
WP_ROUTE
Widget property identifying the RouteWidget to which
this widget is associated. |
autoNamed, cmt, DEF_WIDGET_LENGTH, depth, entityClass, explicitlyHidden, explicitlyHighlighted, explicitlyMasked, explicitlyVisible, linkage, name, nextAnonymousWidgetNumber, nodeWidgets, numUserWidgets, propertyMap, SF_CANONICAL, TM_JOINT_TYPE_START, TM_NUM_CLOSURE_JOINTS, TM_NUM_CONSTRAINED_CLOSURE_JOINTS, TM_NUM_DANGLING_JOINTS, TM_NUM_JOINT_WIDGETS, TM_NUM_JOINTS, TM_NUM_LINK_WIDGETS, TM_NUM_LINKAGES, TM_NUM_LINKS, TM_NUM_LOCKED_LINKS, TM_NUM_NODES, TM_NUM_SUPPORTING_TREE_JOINTS, TM_NUM_TREE_JOINTS, TM_NUM_UNCONSTRAINED_CLOSURE_JOINTS, TM_NUM_UNLOCKED_TREE_JOINTS, TM_NUM_WIDGETS, TM_SIZE, unmodifiableWidgets, widgetLength, widgetMap, widgets, widgetsDirty, WP_CACHED_SUBFRAME, WP_EXPLICIT_HIDDEN, WP_EXPLICIT_HIGHLIGHT, WP_EXPLICIT_MASK, WP_EXPLICIT_VISIBLE, WP_FRAME, WP_NAME, WP_NODE, WP_USER_SUBFRAME
Constructor and Description |
---|
Joint(Linkage linkage)
Covers
Joint(Linkage, String, Type, Link, Link) , initially
disconnected, Joint.Type.GENERAL , and auto-named. |
Joint(Linkage linkage,
Joint.Type type)
Covers
Joint(Linkage, String, Type, Link, Link) , initially
disconnected, auto-named. |
Joint(Linkage linkage,
Joint.Type type,
LinkageNode.SubFrame parent,
LinkageNode.SubFrame child)
|
Joint(Linkage linkage,
Joint.Type type,
Link parentLink,
Link childLink)
Covers
Joint(Linkage, String, Type, Link, Link) ,
auto-named. |
Joint(Linkage linkage,
Joint.Type type,
Link parentLink,
java.lang.String parentSubFrame,
Link childLink,
java.lang.String childSubFrame)
Covers
Joint(Linkage, String, Type, Link, String, Link,
String) , auto-named. |
Joint(Linkage linkage,
LinkageNode.SubFrame parent,
LinkageNode.SubFrame child)
|
Joint(Linkage linkage,
Link parentLink,
Link childLink)
Covers
Joint(Linkage, String, Type, Link, Link) , initially
Joint.Type.GENERAL and auto named. |
Joint(Linkage linkage,
Link parentLink,
java.lang.String parentSubFrame,
Link childLink,
java.lang.String childSubFrame)
Covers
Joint(Linkage, String, Type, Link, String, Link,
String) , initially Joint.Type.GENERAL and auto named. |
Joint(Linkage linkage,
java.lang.String name)
Covers
Joint(Linkage, String, Type, Link, Link) , initially
disconnected and Joint.Type.GENERAL . |
Joint(Linkage linkage,
java.lang.String name,
Joint.Type type)
Covers
Joint(Linkage, String, Type, Link, Link) , initially
disconnected. |
Joint(Linkage linkage,
java.lang.String name,
Joint.Type type,
LinkageNode.SubFrame parent,
LinkageNode.SubFrame child)
|
Joint(Linkage linkage,
java.lang.String name,
Joint.Type type,
Link parentLink,
Link childLink)
Covers
Joint(Linkage, String, Type, Link, String, Link,
String) , does not attach to subframes. |
Joint(Linkage linkage,
java.lang.String name,
Joint.Type type,
Link parentLink,
java.lang.String parentSubFrame,
Link childLink,
java.lang.String childSubFrame)
Makes a new chain closure joint and adds it to linkage.
|
Joint(Linkage linkage,
java.lang.String name,
LinkageNode.SubFrame parent,
LinkageNode.SubFrame child)
|
Joint(Linkage linkage,
java.lang.String name,
Link parentLink,
Link childLink)
Covers
Joint(Linkage, String, Type, Link, Link) , initially
Joint.Type.GENERAL . |
Joint(Linkage linkage,
java.lang.String name,
Link parentLink,
java.lang.String parentSubFrame,
Link childLink,
java.lang.String childSubFrame)
Covers
Joint(Linkage, String, Type, Link, String, Link,
String) , initially Joint.Type.GENERAL . |
Modifier and Type | Method and Description |
---|---|
protected vona.j3d.AxesWidget |
addAxesWidget(java.lang.String name,
java.lang.String frame)
Adds an
AxesWidget with AXES_RADIUS_FACTOR radius
in indicated frame. |
protected vona.j3d.CircleWidget |
addCircleWidget()
Adds a
CircleWidget with WIDGET_RADIUS_FACTOR radius
in the XY plane, symmetric about the Z axis in SF_MOBILITY_FROM . |
protected vona.j3d.CylinderWidget |
addCylinderWidget()
Adds a
CylinderWidget with WIDGET_RADIUS_FACTOR radius
symmetric about a line parallel to the parent mobility z axis but through
the origin of SF_MOBILITY_FROM . |
protected vona.j3d.PrismWidget |
addPrismWidgets(int axis,
float alpha,
float extraMargin)
Adds a
PrismWidget with a square WIDGET_WIDTH_FACTOR
profile symmetric about axis in SF_MOBILITY_TO . |
protected vona.j3d.RectangleWidget |
addRectangleWidgets(float extraMargin)
Adds a
RectangleWidget in the XY plane in SF_MOBILITY_TO . |
protected vona.j3d.RouteWidget |
addRouteWidgets(java.lang.String name,
java.lang.String frame,
int rx)
Adds route widgets for the indicated sub-transform.
|
protected vona.j3d.SectorWidget |
addSectorWidgets(float alpha)
Adds a
SectorWidget in the XY plane of SF_MOBILITY_TO
centered on a line parallel to the Z axis but through the origin of SF_MOBILITY_FROM , with inner radius SECTOR_OFFSET_FACTOR and
width SECTOR_WIDTH_FACTOR . |
protected vona.j3d.SegmentWidget |
addSegmentWidget(int axis,
float offsetFactor)
Adds a
Joint.SliderSegmentWidget on the indicated axis of
SF_MOBILITY_FROM , starting at offsetFactor and ending at
(offsetFactor+SEGMENT_LENGTH_FACTOR ). |
protected vona.j3d.SphereWidget |
addSphereWidget()
|
protected vona.j3d.RectangleWidget |
addSquareWidget()
Adds a
RectangleWidget with WIDGET_WIDTH_FACTOR width
and height in the XY plane, axis aligned, symmetric about the Z axis in
SF_MOBILITY_FROM . |
boolean |
checkName(java.lang.String name)
Extends superclass impl to verify name is unique in
parentLink , if any. |
java.lang.String |
checkType(Joint.Type type)
Check if type is a valid type for this joint in its current
connected configuration.
|
double |
clampDoFToLimits(int index,
double value)
Clamp DoF component value to the current
limit s for the
DoF at index. |
boolean |
clampToLimits(vona.math.RX rx)
Clamp rx to the current mobility space
limit s. |
Link |
detachChildLink()
setChildLink(Link) null |
Link |
detachParentLink()
setParentLink(Link) null |
boolean |
disablePotential()
covers
setPotentialEnabled(boolean) |
void |
dump(java.io.PrintStream s)
dump Joint details
|
void |
dumpSolverInfo()
dumpSolverInfo(PrintStream) to System.out |
void |
dumpSolverInfo(java.io.PrintStream s)
Describing the role of this Joint in its
solver , if any. |
void |
dumpState()
dumpState(PrintStream) to System.out |
void |
dumpState(java.io.PrintStream s)
dump mobility and related numeric state
|
void |
dumpSubFrames(java.io.PrintStream s)
Dump all available subframes.
|
void |
dumpSubJacobian(Joint other)
dumpSubJacobian(Joint, PrintStream) to System.out |
void |
dumpSubJacobian(Joint other,
java.io.PrintStream s)
Solver.dumpSubJacobian(Joint, Joint, PrintStream)
that relates this Joint, whether it's an actuator or an effector, to
other in solver , if any. |
void |
dumpSubRXState(int which)
dumpSubRXState(PrintStream, int) to System.out |
void |
dumpSubRXState(java.io.PrintStream s,
int which)
one-line dump of the state of one of the sub-transforms
|
void |
dumpSupport()
dumpSupport(PrintStream) to System.out |
void |
dumpSupport(java.io.PrintStream s)
dump the
support of this Joint |
protected void |
dumpTree(java.lang.String prefix,
java.io.PrintStream s)
|
boolean |
enablePotential()
covers
setPotentialEnabled(boolean) |
double[] |
getAllDoFLimits()
Get the upper and lower limits for all DoF.
|
double[] |
getAllRotationLimits()
similar to
getAllTranslationLimits() |
double[] |
getAllTranslationLimits()
Get the upper and lower limits for all translation DoF.
|
static java.lang.String |
getAttachmentName(Link link,
java.lang.String subFrame)
common impl of
getParentName() and getChildName() |
Link |
getBranchLink()
get the
branchLink of this Joint, if any |
LinkageNode |
getChild(java.lang.String name)
returns
childLink iff name matches |
Link |
getChildLink()
get the current
childLink , null if none |
double[] |
getChildMobilityCMTQuaternionRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
vona.math.RX |
getChildMobilityCMTRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
double[] |
getChildMobilityCMTRotMatrixRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
java.lang.String |
getChildName()
Get the name of the current attached child and child subframe, if any,
else null.
|
java.util.Collection<? extends LinkageNode> |
getChildren()
returns an unmodifiable view of
childLinks |
java.lang.String |
getChildSubFrame()
get the current
childSubFrame , null if none |
vona.math.RX |
getChildTOMobility(vona.math.RX rx)
covers
getSubRX(int, RX) , gets RX_CHILD_TO_MOBILITY |
vona.math.RX |
getChildToMobilityRX()
Covers
getSubRX(int, RX) , gets RX_CHILD_TO_MOBILITY
and conses. |
double[] |
getDoF()
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY with EM ailias in limits. |
double[] |
getDoF(int which)
getDoF(int, int[], int, double[], boolean) with EM ailias in
limits. |
double[] |
getDoF(int which,
double[] dof)
getDoF(int, int[], int, double[], boolean) with EM ailias in
limits. |
double[] |
getDoF(int which,
int[] dofIndex,
double[] dof)
getDoF(int, int[], int, double[], boolean) with EM ailias in
limits. |
double[] |
getDoF(int which,
int[] dofIndex,
int start,
double[] dof,
boolean getEMAliasInLimits)
Retrieve the current Degree of Freedom values of the packed translation
and exponential map vector corresponding to a goal or to the mobility
sub-transform.
|
double[] |
getDoF(int which,
int start,
double[] dof)
getDoF(int, int[], int, double[], boolean) with EM ailias in
limits. |
int[] |
getDoFIndices()
getDoFIndices(int, int[]) starting at 0 and consing |
int[] |
getDoFIndices(int[] indices)
getDoFIndices(int, int[]) starting at 0 |
int[] |
getDoFIndices(int start,
int[] indices)
get the TXEM vector indices of the DoF in the current
type |
int[] |
getDoFIndicesRef()
Get a reference to the TXEM vector indices of the DoF in the current
type . |
double[] |
getDoFLimits(int which)
Covers
getDoFLimits(int, int, double[]) , starts at 0, always
conses. |
double[] |
getDoFLimits(int which,
double[] values)
Covers
getDoFLimits(int, int, double[]) , starts at 0. |
double[] |
getDoFLimits(int which,
int start,
double[] values)
|
java.lang.String[] |
getDoFNames()
getDoFNames(int, String[]) starting at 0 and consing |
java.lang.String[] |
getDoFNames(int start,
java.lang.String[] names)
like
getDoFIndices(int, int[]) but gets TXEM component names |
java.lang.String[] |
getDoFNames(java.lang.String[] names)
getDoFNames(int, String[]) starting at 0 |
int[] |
getDoIIndices()
getDoIIndices(int, int[]) starting at 0 and consing |
int[] |
getDoIIndices(int[] indices)
getDoIIndices(int, int[]) starting at 0 |
int[] |
getDoIIndices(int start,
int[] indices)
similar to
getDoFIndices(int, int[]) but gets Degrees of Invariance |
int[] |
getDoIIndicesRef()
similar to
getDoFIndicesRef() but gets Degrees of Invariance |
java.lang.String[] |
getDoINames()
getDoINames(int, String[]) starting at 0 and consing |
java.lang.String[] |
getDoINames(int start,
java.lang.String[] names)
like
getDoIIndices(int, int[]) but gets TXEM component names |
java.lang.String[] |
getDoINames(java.lang.String[] names)
getDoINames(int, String[]) starting at 0 |
static java.lang.String |
getGoalName(int which)
get the human readable name for the indicated goal
|
boolean[] |
getGoalStatus(int which,
boolean[] status)
getGoalStatus(int, int, boolean[]) , starting at 0 |
boolean[] |
getGoalStatus(int which,
int start,
boolean[] status)
|
java.lang.String[] |
getGoalStatus(int which,
int start,
java.lang.String[] status)
Get the status, "set" or "unset" of each goal component.
|
java.lang.String[] |
getGoalStatus(int which,
java.lang.String[] status)
getGoalStatus(int, int, String[]) , starting at 0 |
boolean[] |
getGoalStatusBoolean(int which)
getGoalStatus(int, int, boolean[]) , starting at 0 and consing |
java.lang.String[] |
getGoalStatusString(int which)
getGoalStatus(int, int, String[]) , starting at 0 and consing |
double |
getGravityPotential()
Get the current potential energy stored by this joint due to
gravity.
|
double |
getGravityPotential(vona.math.RX mobilityRX)
Impl of
getGravityPotential() . |
int |
getHighestPrioritySoftGoal()
Get the id of the highest-priority "soft" goal that is currently
set.
|
protected int[] |
getIndices(int[] source,
int writeStart,
int[] dest)
Helper method to copy source to dest, consing if
necessary.
|
double |
getInvariant(int index)
Get the invariant value of a TXEM component, NaN if not an
invariant.
|
double[] |
getInvariants()
Covers
getInvariants(int, double[]) , starts at 0 and
conses. |
double[] |
getInvariants(double[] values)
Covers
getInvariants(int, double[]) , starts at 0. |
double[] |
getInvariants(int start,
double[] values)
Get the values of the Degrees of Invariance of the current Joint
type . |
int |
getJacobianDoFStartRow()
Get this Joint's
jacobianDoFStartRow in its solver ,
if any, else negative. |
int |
getJacobianDoIStartRow()
Get this Joint's
jacobianDoIStartRow in its solver ,
if any, else negative. |
int |
getJacobianLimitStartRow()
Get this Joint's
jacobianLimitStartRow in its solver ,
if any, else negative. |
int |
getJacobianStartColumn()
Get this Joint's
jacobianStartColumn in its solver ,
if any, else negative. |
vona.math.RX |
getJointRX()
covers
getJointRX(RX) , always conses |
vona.math.RX |
getJointRX(vona.math.RX rx)
get a copy of
jointRX , consing if null |
vona.math.RX |
getJointRXRef()
get a ref to
jointRX , do not mutate |
double |
getLimit(int component,
int offset,
int which)
Common impl of
getTranslationLimit(int, int) and getRotationLimit(int, int) . |
double[] |
getLimitExcess()
Covers
getLimitExcess(RX, int[], int, double[]) , uses setLimitComponents and mobilityRX , starts writing at index
0 and conses. |
double[] |
getLimitExcess(double[] excess)
Covers
getLimitExcess(RX, int[], int, double[]) , uses setLimitComponents and mobilityRX , starts writing at index
0. |
double |
getLimitExcess(int index)
Get the signed amount by which a particular DoF exceeds its current
limits, if any.
|
double[] |
getLimitExcess(int start,
double[] excess)
|
double[] |
getLimitExcess(vona.math.RX mobilityRX,
int[] indices,
int start,
double[] excess)
Generalizes
getLimitExcess(int) to get a vector of
excesses. |
double[] |
getLimitExcess(vona.math.RX mobilityRX,
int start,
double[] excess)
Covers
getLimitExcess(RX, int[], int, double[]) , uses setLimitComponents . |
static java.lang.String |
getLimitGoalName()
get the human readable name for the limit goal
|
double[] |
getLimitPenalty()
Covers
getLimitPenalty(RX, int[], int, double[]) , uses setLimitComponents and mobilityRX , starts writing at index
0 and conses. |
double[] |
getLimitPenalty(double[] penalty)
Covers
getLimitPenalty(RX, int[], int, double[]) , uses setLimitComponents and mobilityRX , starts writing at index
0. |
double[] |
getLimitPenalty(int start,
double[] penalty)
|
double[] |
getLimitPenalty(vona.math.RX mobilityRX,
int[] indices,
int start,
double[] penalty)
Impl of
getResidual(int, ResidualType, int, double[]) for
G_LIMIT . |
double[] |
getLimitPenalty(vona.math.RX mobilityRX,
int start,
double[] penalty)
Covers
getLimitPenalty(RX, int[], int, double[]) , uses setLimitComponents . |
double[] |
getLimits(int which)
covers
getLimits(int, int, double[]) , conses and starts at 0 |
double[] |
getLimits(int which,
double[] ret)
covers
getLimits(int, int, double[]) , starts at 0 |
double[] |
getLimits(int which,
int start,
double[] ret)
|
double[] |
getMobility(double[] dof)
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY , starting at 0, and always getting EM alias in limits. |
double[] |
getMobility(int start,
double[] dof,
boolean getEMAliasInLimits)
|
vona.math.RX |
getMobility(vona.math.RX rx)
covers
getSubRX(int, RX) , gets RX_MOBILITY |
double[][] |
getMobilitydEMdQRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
double[] |
getMobilityDoF()
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY , consing, and always getting EM alias in limits. |
double[][] |
getMobilitydQdEMRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
double[][] |
getMobilitydRdEMRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
double[][] |
getMobilitydRdQRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
double[] |
getMobilityQuaternionRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
double[] |
getMobilityRotMatrixRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
vona.math.RX |
getMobilityRX()
Covers
getSubRX(int, RX) , gets RX_MOBILITY and
conses. |
vona.math.RX |
getMobilityRXClampedInverseRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
vona.math.RX |
getMobilityRXInverseRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
double[] |
getMobilityRXTranslation()
|
double[] |
getMobilityRXTranslation(double[] translation)
get a copy of the translation part of
RX_MOBILITY |
vona.math.RX |
getMobilityToParent(vona.math.RX rx)
covers
getSubRX(int, RX) , gets RX_MOBILITY_TO_PARENT |
vona.math.RX |
getMobilityToParentRX()
Covers
getSubRX(int, RX) , gets RX_MOBILITY_TO_PARENT
and conses. |
protected java.lang.String[] |
getNames(java.lang.String[] source,
int writeStart,
java.lang.String[] dest)
like
getIndices(int[], int, int[]) but gets TXEM component names |
protected java.lang.String |
getNodeWidgetProperty()
Return the
Widget property name that indicates an internal
(i.e. |
int |
getNumDoF()
get the number of Degrees of Freedom in the current
type |
int |
getNumDoI()
get the number of Degrees of Invariance in the current
type |
int |
getNumGoalComponentsSet(int which)
Get the number of TXEM components currently set for
RX_INVARIANT , RX_LOCK , RX_TARGET , RX_POSTURE ,
or G_LIMIT . |
int |
getNumRotationDoF()
get the number of rotational DoF in the current
type |
int |
getNumRotationGoalComponentsSet(int which)
Like
getNumGoalComponentsSet(int) but only returns rotational
components. |
int |
getNumTranslationDoF()
get the number of translational DoF in the current
type |
int |
getNumTranslationGoalComponentsSet(int which)
Like
getNumGoalComponentsSet(int) but only returns translational
components. |
double[] |
getPackedInvariantsRef()
Get the values of the Degrees of Invariance of the current Joint
type , eliding DoF. |
LinkageNode |
getParent()
returns
parentLink |
Link |
getParentLink()
get the current
parentLink , null if none |
double[] |
getParentMobilityCMTQuaternionRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
vona.math.RX |
getParentMobilityCMTRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
double[] |
getParentMobilityCMTRotMatrixRef()
get a ref to the indicated cached quantity, recomputing if dirty
|
java.lang.String |
getParentName()
Get the name of the current attached child and child subframe, if any,
else null.
|
java.lang.String |
getParentSubFrame()
get the current
parentSubFrame , null if none |
static java.lang.String |
getParentSubFrameOf(int subXForm)
Get the name of the sub-frame to which the sub-transform
subXForm attaches.
|
double |
getPotential()
like
getPotential(int) but always auto-selects |
double |
getPotential(int which)
Get the indicated potential energy value.
|
int |
getPotentialGoal()
Get the currently set potential goal,
PG_STIFFNESS or PG_GRAVITY , or -1 if none. |
static java.lang.String |
getPotentialGoalName(int which)
get the human readable name for the indicated potential goal
|
double[] |
getResidual(int which,
Joint.ResidualType type)
Covers
getResidual(int, ResidualType, int, double[]) , starts
at 0 and conses. |
double[] |
getResidual(int which,
Joint.ResidualType type,
double[] residual)
Covers
getResidual(int, ResidualType, int, double[]) , starts
at 0. |
double[] |
getResidual(int which,
Joint.ResidualType type,
int start,
double[] residual)
Compute a differential vector which will satisfy the specified goal
when added to the current state of that goal.
|
double[] |
getRotation()
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY with EM ailias in limits, rotation DoF only. |
double[] |
getRotation(double[] dof)
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY with EM ailias in limits, rotation DoF only. |
double[] |
getRotation(int start,
double[] dof)
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY with EM ailias in limits, rotation DoF only. |
int[] |
getRotationDoFIndices()
getRotationDoFIndices(int, int[]) starting at 0 and
consing. |
int[] |
getRotationDoFIndices(int[] indices)
getRotationDoFIndices(int, int[]) starting at 0 |
int[] |
getRotationDoFIndices(int start,
int[] indices)
similar to
getDoFIndices(int, int[]) but restricted to rotation |
int[] |
getRotationDoFIndicesRef()
similar to
getDoFIndicesRef() but restricted to rotation |
java.lang.String[] |
getRotationDoFNames()
getRotationDoFNames(int, String[]) starting at 0 and
consing |
java.lang.String[] |
getRotationDoFNames(int start,
java.lang.String[] names)
like
getRotationDoFIndices(int, int[]) but gets TXEM component names |
java.lang.String[] |
getRotationDoFNames(java.lang.String[] names)
getRotationDoFNames(int, String[]) starting at 0 |
int[] |
getRotationDoIIndices()
getRotationDoIIndices(int, int[]) starting at 0 and
consing. |
int[] |
getRotationDoIIndices(int[] indices)
getRotationDoIIndices(int, int[]) starting at 0 |
int[] |
getRotationDoIIndices(int start,
int[] indices)
similar to
getDoIIndices(int, int[]) but restricted to rotation |
int[] |
getRotationDoIIndicesRef()
similar to
getDoIIndicesRef() but restricted to rotation |
java.lang.String[] |
getRotationDoINames()
getRotationDoINames(int, String[]) starting at 0 and
consing |
java.lang.String[] |
getRotationDoINames(int start,
java.lang.String[] names)
like
getRotationDoIIndices(int, int[]) but gets TXEM component names |
java.lang.String[] |
getRotationDoINames(java.lang.String[] names)
getRotationDoINames(int, String[]) starting at 0 |
double |
getRotationLimit(int component,
int which)
similar to
getTranslationLimit(int, int) |
java.lang.String[] |
getSetGoalComponentNames(int which)
getSetGoalComponentNames(int, int, String[]) starting at 0 and
consing. |
java.lang.String[] |
getSetGoalComponentNames(int which,
int start,
java.lang.String[] names)
like
getSetGoalComponents(int) but gets TXEM component names |
java.lang.String[] |
getSetGoalComponentNames(int which,
java.lang.String[] names)
getSetGoalComponentNames(int, int, String[]) starting at 0 |
int[] |
getSetGoalComponents(int which)
Get a ref to a cached array containing the indices of the currently set
components for the indicated goal,
RX_INVARIANT , RX_LOCK , RX_TARGET , RX_POSTURE , or G_LIMIT ,
if any. |
int[] |
getSetRotationGoalComponents(int which)
Like
getSetGoalComponents(int) but restricted to rotation
components. |
int[] |
getSetTranslationGoalComponents(int which)
Like
getSetGoalComponents(int) but restricted to translation
components. |
double |
getSingleMobilityDoF()
get a ref to the indicated cached quantity, recomputing if dirty
|
float |
getSoftGoalPriority()
get the
softGoalPriority of this Joint |
int |
getSoftGoalSolveLevel()
get this Joint's
softGoalSolveLevel in its solver |
double |
getSoftGoalWeight()
get the
softGoalWeight of this Joint |
Solver |
getSolver()
get the
solver assigned to this Joint |
double |
getStiffness()
get
stiffness or NaN if unset |
double |
getStiffnessPotential()
Get the current potential energy stored in this Joint's
stiffness , if any. |
double |
getStiffnessPotential(double mobilityDoF)
Impl of
getStiffnessPotential() . |
double |
getStiffnessRest()
get
stiffnessRest |
vona.math.RX |
getSubFrameCMT(int subXForm)
getSubFrameCMT(int, RX) , conses |
vona.math.RX |
getSubFrameCMT(int subXForm,
vona.math.RX rx)
Convenience cover of
getSubFrameCMT(String, RX) using getParentSubFrameOf(int) . |
vona.math.RX |
getSubFrameCMT(java.lang.String frame,
vona.math.RX rx)
Convenience method appends
LinkageNode.cmt to LinkageNode.getSubFrameRX(String, RX) . |
vona.math.RX |
getSubFrameCMT(java.lang.String frame,
vona.math.RX rx,
boolean clamped)
Convenience method appends
LinkageNode.cmt to getSubFrameRX(String, RX, boolean) . |
vona.math.RX |
getSubFrameRX(int subXForm)
getSubFrameRX(int, RX) , conses |
vona.math.RX |
getSubFrameRX(int subXForm,
vona.math.RX rx)
Convenience cover of
getSubFrameRX(String, RX) using getParentSubFrame() . |
vona.math.RX |
getSubFrameRX(java.lang.String frame,
vona.math.RX rx)
Get the transform taking coordinates in a sub-frame to the canonical
(i.e.
|
vona.math.RX |
getSubFrameRX(java.lang.String frame,
vona.math.RX rx,
boolean clamped)
Impl of
getSubFrameRX(String, RX) . |
vona.math.RX |
getSubRX(int which)
covers
getSubRX(int, RX) , always conses |
vona.math.RX |
getSubRX(int which,
vona.math.RX rx)
Get a copy of one of the sub-transforms.
|
static java.lang.String |
getSubRXName(int which)
get the human readable name for the indicated subtransform
|
vona.math.RX |
getSubRXRef(int which)
Get a reference to one of the sub-transforms, do not modify.
|
int |
getSupportSize()
|
double[] |
getTranslation()
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY translation DoF only. |
double[] |
getTranslation(double[] dof)
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY translation DoF only. |
double[] |
getTranslation(int start,
double[] dof)
getDoF(int, int[], int, double[], boolean) getting RX_MOBILITY translation DoF only. |
int[] |
getTranslationDoFIndices()
getTranslationDoFIndices(int, int[]) starting at 0 and
consing. |
int[] |
getTranslationDoFIndices(int[] indices)
getTranslationDoFIndices(int, int[]) starting at 0 |
int[] |
getTranslationDoFIndices(int start,
int[] indices)
similar to
getDoFIndices(int, int[]) but restricted to translation |
int[] |
getTranslationDoFIndicesRef()
similar to
getDoFIndicesRef() but restricted to translation |
java.lang.String[] |
getTranslationDoFNames()
getTranslationDoFNames(int, String[]) starting at 0 and
consing |
java.lang.String[] |
getTranslationDoFNames(int start,
java.lang.String[] names)
like
getTranslationDoFIndices(int, int[]) but gets TXEM component names |
java.lang.String[] |
getTranslationDoFNames(java.lang.String[] names)
getTranslationDoFNames(int, String[]) starting at 0 |
int[] |
getTranslationDoIIndices()
getTranslationDoIIndices(int, int[]) starting at 0 and
consing. |
int[] |
getTranslationDoIIndices(int[] indices)
getTranslationDoIIndices(int, int[]) starting at 0 |
int[] |
getTranslationDoIIndices(int start,
int[] indices)
similar to
getDoIIndices(int, int[]) but restricted to translation |
int[] |
getTranslationDoIIndicesRef()
similar to
getDoIIndicesRef() but restricted to translation |
java.lang.String[] |
getTranslationDoINames()
getTranslationDoINames(int, String[]) starting at 0 and
consing |
java.lang.String[] |
getTranslationDoINames(int start,
java.lang.String[] names)
like
getTranslationDoIIndices(int, int[]) but gets TXEM component names |
java.lang.String[] |
getTranslationDoINames(java.lang.String[] names)
getTranslationDoINames(int, String[]) starting at 0 |
double |
getTranslationLimit(int component,
int which)
|
Joint.Type |
getType()
get the current Joint
Joint.Type |
java.lang.String |
getTypeName()
returns the lower-cased name of this Joint's
type |
int[] |
getUnsetGoalComponents(int which)
complimentary to
getSetGoalComponents(int) |
protected boolean |
handleMobilityChange()
|
protected boolean |
handleMobilityChange(boolean overwriteIfClamped)
Hook called whenever
mobilityRX or the mobility space
has changed. |
boolean |
hasAnyGoal()
Check if any component of any goal is currently set or
hasPotential() or isDoFLimited() . |
boolean |
hasChildren()
check whether this node has any children
|
boolean |
hasEitherSoftGoal()
Check if either
RX_TARGET or RX_POSTURE is currently
set. |
boolean |
hasGoal(int which)
check if a goal is currently set
|
boolean |
hasGravity()
Check if this Joint has gravity.
|
boolean |
hasInvariant()
|
boolean |
hasLock()
|
boolean |
hasPosture()
|
boolean |
hasPotential()
check either
hasStiffness() or hasGravity() |
boolean |
hasStiffness()
Check if this Joint has stiffness.
|
boolean |
hasSubFrame(java.lang.String frame)
Check if the named subframe is present.
|
boolean |
hasTarget()
|
boolean |
inDoFLimits()
inDoFLimits(double) , no tol |
boolean |
inDoFLimits(double tol)
Check if the current mobility transform is actually within the
limit s. |
Joint |
invert()
Invert both the topology and the geometry of this Joint.
|
boolean |
isActuator()
check if this Joint is an actuator in its
solver |
boolean |
isBroken()
check if this breaks DoI or DoF limits (using
BROKEN_TOL ) |
static boolean |
isChainSubtransform(int which)
check if the indicated sub-transform is in the child-to-parent chain
|
boolean |
isChildToMobilityIdentity()
check
RX.isIdentity() on childToMobilityRX |
boolean |
isClosureJoint()
Checks not
isTreeJoint() , i.e. |
boolean |
isConnected()
check if both
parentLink and childLink are set |
boolean |
isCrossing()
Check if
isIncrossing() or isOutcrossing() . |
boolean |
isDoF(int component)
check if a TXEM component is a DoF
|
boolean |
isDoF(int component,
int offset)
Common impl of
isTranslationDoF(int) and isRotationDoF(int) . |
boolean |
isDoFLimited()
Check whether any of the DoF of this joint are limited.
|
boolean |
isDoI(int component)
check if a TXEM component is a DoI
|
boolean |
isDoI(int component,
int offset)
Common impl of
isTranslationDoI(int) and isRotationDoI(int) . |
boolean |
isEffector()
Check if this Joint is an effector of any type in its
solver . |
boolean |
isEffector(int which)
Check if this Joint is an effector of the given type (
RX_INVARIANT , G_LIMIT , RX_LOCK , RX_TARGET ,
RX_POSTURE , or PG_POTENTIAL ) in its solver . |
static boolean |
isGoalSubtransform(int which)
check if the indicated sub-transform is a goal
|
static boolean |
isHardGoalSubtransform(int which)
check if the indicated sub-transform is a hard goal
|
boolean |
isIdentity()
check
RX.isIdentity() on jointRX |
boolean |
isIncrossing()
Check if
childLink is not null and is not in LinkageNode.linkage . |
boolean |
isInternalFrame(java.lang.String frame)
Check if frame is an internal (i.e.
|
boolean |
isLimited()
check if there are any DoI or if there are limits are set on any DoF
|
boolean |
isLimited(int component)
check if a TXEM component is limited
|
boolean |
isLimited(int component,
int offset)
Common impl of
isTranslationLimited(int) and isRotationLimited(int) . |
static boolean |
isLimitGoal(int which)
check if which indicates the limit goal
|
boolean |
isLocked()
check if this node is locked
|
boolean |
isMobilityIdentity()
check
RX.isIdentity() on mobilityRX |
boolean |
isMobilityInverted()
check if
mobilityInverted |
static boolean |
isMobilitySpaceSubtransform(int which)
Check if the indicated sub-transform is
RX_MOBILITY or a hard
or soft goal. |
boolean |
isMobilityToParentIdentity()
check
RX.isIdentity() on mobilityToParentRX |
boolean |
isOutcrossing()
Check if
parentLink is not null and is not in LinkageNode.linkage . |
static boolean |
isPositioningSubtransform(int which)
check if the indicated sub-transform positions the mobility space
|
boolean |
isPotentialEnabled()
check potential goal gating enable
|
static boolean |
isPotentialGoal(int goal)
Check if goal is one of the potential goals
PG_POTENTIAL (itself a meta-goal), PG_STIFFNESS , or PG_GRAVITY . |
boolean |
isRotationDoF(int component)
similar to
isTranslationDoF(int) |
boolean |
isRotationDoI(int component)
similar to
isTranslationDoI(int) |
boolean |
isRotationLimited(int component)
similar to
isTranslationLimited(int) |
static boolean |
isSoftGoalSubtransform(int which)
check if the indicated sub-transform is a soft goal
|
boolean |
isStiffnessSet()
Check if
stiffness is set (not NaN). |
boolean |
isTranslationDoF(int component)
Check if a given translation vector component is a Degree of Freedom
according to the current Joint
type . |
boolean |
isTranslationDoI(int component)
Check if a given translation vector component is a Degree of Invariance
according to the current Joint
type . |
boolean |
isTranslationLimited(int component)
Check if one component of the mobility translation vector currently has
limits set.
|
boolean |
isTreeJoint()
Checks if we have a
childLink and its Link.parentJoint
is this Joint. |
boolean |
isTreeLeaf()
Check if this is a leaf in the model tree.
|
Joint |
lockPositioningTransforms()
|
Joint |
makeClosureJoint()
Ensure that this Joint is a chain closure.
|
Joint |
makeTreeJoint()
Ensure that this Joint is a tree joint iff it's connected.
|
Link |
merge()
Covers
merge(boolean, boolean) , reparents both Joint and
Link user widgets. |
Link |
merge(boolean reparentWidgets)
Covers
merge(boolean, boolean) , reparents both Joint and
Link user widgets or not. |
Link |
merge(boolean reparentUserJointWidgets,
boolean reparentUserLinkWidgets)
|
static int |
otherPositioningTransform(int which)
return the opposite mobility space positioning transform
|
boolean |
positioningTransformsMutable()
Check if
RX_CHILD_TO_MOBILITY and RX_MOBILITY_TO_PARENT are mutable. |
boolean |
recomputeInverse()
|
boolean |
recomputeInverse(int slackTransform)
Covers
recomputeInverse(int, boolean) , always recomputes
jointRX . |
boolean |
recomputeInverse(int slackTransform,
boolean recomputeJointRX)
Possibly recompute
jointRX to fit the current parentLink and childLink LinkageNode.cmt s, then recompute one
of the three internal transforms RX_MOBILITY , RX_CHILD_TO_MOBILITY , or RX_MOBILITY_TO_PARENT to take up the
slack left by the other two incomposing (the new) jointRX . |
protected boolean |
recomputeInverse(vona.math.RX slackRX)
Recompute the indicated slackRX based on the current
jointRX.
|
protected boolean |
recomputeInverse(vona.math.RX slackRX,
vona.math.RX parentCMT,
vona.math.RX childCMT)
|
void |
recomputeJointRX()
|
void |
remove()
Remove this node from the
Linkage tree. |
void |
resetSolveFields()
reset/null
solver and related fields |
boolean |
setAllDoFLimits(double... limits)
similar to
setAllTranslationLimits(double...) |
boolean |
setAllRotationLimits(double... limits)
similar to
setAllTranslationLimits(double...) |
boolean |
setAllTranslationLimits(double... limits)
|
Link |
setChildLink(Link childLink)
setChildLink(Link, boolean) , does not request holding
absolute pose. |
Link |
setChildLink(LinkageNode.SubFrame child)
Covers
setChildLink(Link, String) . |
Link |
setChildLink(LinkageNode.SubFrame child,
boolean holdAbsolutePose)
|
Link |
setChildLink(Link childLink,
boolean holdAbsolutePose)
setChildLink(Link, String, boolean) , does not attach to
subframe. |
Link |
setChildLink(Link childLink,
java.lang.String childSubFrame)
setChildLink(Link, String, boolean) , does not request holding
absolute pose. |
Link |
setChildLink(Link childLink,
java.lang.String childSubFrame,
boolean holdAbsolutePose)
Mutate the
childLink . |
void |
setChildToMobility(Link child)
recomputeInverse(int) as if our child was child and put
the slack in RX_CHILD_TO_MOBILITY . |
void |
setChildToMobility(vona.math.RX rx)
|
boolean |
setDoF(double... dof)
|
boolean |
setDoF(int which,
int[] dofIndex,
double... dof)
setDoF(int, int[], int, double...) starting at 0 |
boolean |
setDoF(int which,
int[] dofIndex,
int start,
double... dof)
Set the Degree of Freedom values of the
RX_TARGET , RX_LOCK , RX_POSTURE , or RX_MOBILITY RX treated
as a packed translation and exponential map vector. |
protected boolean |
setLimits(int component,
int offset,
java.lang.String name,
double min,
double max)
Common impl of
setTranslationLimits(int, double, double) and setRotationLimits(int, double, double) . |
boolean |
setLock(double... dof)
|
LinkageNode |
setLocked(boolean locked)
lock the state of this node
|
boolean |
setLockRotation(double... dof)
Like
setDoF(int, int[], int, double...) on RX_LOCK
but only sets EM rotation components. |
Joint |
setLockToMobility()
opposite of
setMobilityToLock() |
boolean |
setLockTranslation(double... dof)
Like
setDoF(int, int[], int, double...) on RX_LOCK
but only sets translation components. |
boolean |
setMobility(vona.math.RX rx)
|
boolean |
setMobilityDoF(double... dof)
setMobilityDoF(int[], int, double...) all Joint.Type.dofIndex starting at 0. |
boolean |
setMobilityDoF(int[] dofIndex,
double... dof)
setMobilityDoF(int[], int, double...) starting at 0 |
boolean |
setMobilityDoF(int[] dofIndex,
int start,
double... dof)
Impl of
setDoF(int, int[], int, double...) for setting RX_MOBILITY . |
boolean |
setMobilityDoF(int start,
double... dof)
setMobilityDoF(int[], int, double...) sets all DoF |
Joint |
setMobilityToGoal(int which)
Set
mobilityRX to the current value of the indicated goal. |
Joint |
setMobilityToGravityRest()
Set the mobility DoF to zero gravitational potential energy stored in
this joint.
|
Joint |
setMobilityToInvariant()
|
Joint |
setMobilityToLock()
|
void |
setMobilityToParent(Link parent)
recomputeInverse(int) as if our parent was parent and
put the slack in RX_MOBILITY_TO_PARENT . |
void |
setMobilityToParent(vona.math.RX rx)
|
Joint |
setMobilityToPosture()
|
Joint |
setMobilityToStiffnessRest()
Set the mobility DoF to the
stiffnessRest . |
Joint |
setMobilityToTarget()
|
java.lang.String |
setName(java.lang.String name)
Set the name of this Joint.
|
Link |
setParentLink(Link parentLink)
setParentLink(Link, boolean) , does not request holding
absolute pose. |
Link |
setParentLink(LinkageNode.SubFrame parent)
Covers
setParentLink(Link, String) . |
Link |
setParentLink(LinkageNode.SubFrame parent,
boolean holdAbsolutePose)
|
Link |
setParentLink(Link parentLink,
boolean holdAbsolutePose)
setParentLink(Link, String, boolean) , does not attach to
subframe. |
Link |
setParentLink(Link parentLink,
java.lang.String parentSubFrame)
setParentLink(Link, String, boolean) , does not request holding
absolute pose. |
Link |
setParentLink(Link parentLink,
java.lang.String parentSubFrame,
boolean holdAbsolutePose)
Mutate the
parentLink . |
Joint |
setPositioningTransformsLocked(boolean lock)
Flag
RX_CHILD_TO_MOBILITY and RX_MOBILITY_TO_PARENT
as locked or unlocked. |
boolean |
setPosture(double... dof)
|
boolean |
setPostureRotation(double... dof)
Like
setDoF(int, int[], int, double...) on RX_POSTURE
but only sets EM rotation components. |
Joint |
setPostureToMobility()
covers
setSoftGoalToMobility(int) |
boolean |
setPostureTranslation(double... dof)
Like
setDoF(int, int[], int, double...) on RX_POSTURE
but only sets translation components. |
boolean |
setPotentialEnabled(boolean enabled)
Enable or disable potential goal, if any.
|
boolean |
setRotation(double... dof)
Like
setMobilityDoF(double...) but only sets EM rotation
components. |
boolean |
setRotationLimits(int component,
double min,
double max)
Similar to
setTranslationLimits(int, double, double) . |
boolean |
setSoftGoal(int which,
vona.math.RX rx)
|
boolean |
setSoftGoalDoF(int which,
double... dof)
setSoftGoalDoF(int, int[], boolean, boolean, int, double...)
all Joint.Type.dofIndex even if not different from current mobility,
starting at 0. |
boolean |
setSoftGoalDoF(int which,
int[] dofIndex,
boolean partial,
boolean onlyIfDifferent,
double... dof)
setSoftGoalDoF(int, int[], boolean, boolean, int, double...)
starting at 0. |
boolean |
setSoftGoalDoF(int which,
int[] dofIndex,
boolean partial,
boolean onlyIfDifferent,
int start,
double... dof)
|
boolean |
setSoftGoalDoF(int which,
int[] dofIndex,
double... dof)
setSoftGoalDoF(int, int[], boolean, boolean, int, double...)
partial but even if not different from current mobility, starting at
0. |
Joint |
setSoftGoalPriority(float priority)
set the
softGoalPriority of this Joint |
boolean |
setSoftGoalRX(int which,
int[] dofIndex,
boolean partial,
boolean onlyIfDifferent,
vona.math.RX rx,
vona.math.RX compareUnsetComponentsTo)
Like
setSoftGoalDoF(int, int[], boolean, boolean, int,
double...) but reads source values from an RX . |
protected boolean |
setSoftGoalRXOrDoF(int which,
int[] dofIndex,
boolean partial,
boolean onlyIfDifferent,
int start,
java.lang.Object rxOrDoF,
vona.math.RX compareUnsetComponentsTo)
|
Joint |
setSoftGoalToMobility(int which)
Opposite of
setMobilityToGoal(int) . |
Joint |
setSoftGoalWeight(double weight)
set the
softGoalWeight of this Joint |
double |
setStiffness(double stiffness)
Set the joint stiffness.
|
boolean |
setStiffnessRest(double stiffnessRest)
Set
stiffnessRest . |
Joint |
setStiffnessRestToMobility()
Set
stiffnessRest to the current mobility DoF. |
boolean |
setSubRX(int which,
int slackRX,
vona.math.RX rx)
Set one of the sub-transforms.
|
boolean |
setSubRX(int which,
vona.math.RX rx)
setSubRX(int, int, RX) recomputing jointRX . |
boolean |
setTarget(double... dof)
|
boolean |
setTargetRotation(double... dof)
Like
setDoF(int, int[], int, double...) on RX_TARGET
but only sets EM rotation components. |
Joint |
setTargetToMobility()
covers
setSoftGoalToMobility(int) |
boolean |
setTargetTranslation(double... dof)
Like
setDoF(int, int[], int, double...) on RX_TARGET
but only sets translation components. |
boolean |
setTranslation(double... dof)
Like
setMobilityDoF(double...) but only sets translation
components. |
boolean |
setTranslationLimits(int component,
double min,
double max)
Set or un-set the upper and lower limits for one component of the
mobility translation vector.
|
Joint.Type |
setType(Joint.Type type)
Mutate the
type of this Joint. |
protected Joint.Type |
setTypeImpl(Joint.Type type)
Impl of
setType(msim.model.Joint.Type) , so that RootJoint constr can set
initial type but still disable run-time type mutation. |
double[] |
setUnsetGoalDoFtoNaN(int which,
double[] dof)
Set all components of dof that correspond to unset DoF of goal
which to NaN.
|
java.lang.String |
toString(boolean details)
covers
toString(boolean, boolean) , always shows connections |
java.lang.String |
toString(boolean details,
boolean connections)
returns a short human-readable identifying string for this Joint
|
Joint |
transformMobility(vona.math.RX rx)
|
Joint |
transformMobility(vona.math.RX rx,
java.lang.String inSubFrame)
Transform the mobility frames relative to the given frame.
|
java.lang.String |
unAliasSubFrame(java.lang.String subFrame)
|
Joint |
unlockPositioningTransforms()
|
Joint |
unsetAllDoFLimits()
similar to
unsetAllTranslationLimits() |
Joint |
unsetAllRotationLimits()
similar to
unsetAllTranslationLimits() |
Joint |
unsetAllTranslationLimits()
unsetTranslationLimits(int) all translation DoF |
Joint |
unsetLock()
chains to
setLocked(boolean) |
Joint |
unsetPosture()
|
Joint |
unsetRotationLimits(int component)
similar to
unsetTranslationLimits(int) |
Joint |
unsetSoftGoal(int which)
un-set current
RX_TARGET or RX_POSTURE |
Joint |
unsetSoftGoals()
un-set both
RX_TARGET or RX_POSTURE |
double |
unsetStiffness()
|
Joint |
unsetTarget()
|
Joint |
unsetTranslationLimits(int component)
covers
setTranslationLimits(int, double, double) , always un-sets |
protected void |
updateAxesWidget(vona.j3d.AxesWidget w,
java.lang.String frame)
Enables or disables the axes depending on whether the corresponding
transform is identity, whether the Joint is connected, and if so whether
it is attached to a
Link subframe. |
protected void |
updateAxesWidget(java.lang.String name,
java.lang.String frame)
Retrieves the named
AxesWidget and calls updateAxesWidget(AxesWidget, String) . |
protected void |
updateCircleWidget()
Retrieves
WN_JOINT_CIRCLE and calls updateSliderWidget(vona.j3d.EdgedFacetedWidget) . |
void |
updateCMTs()
Update this node's
LinkageNode.cmt based on its parent's LinkageNode.cmt . |
protected void |
updateCylinderWidget()
Retrieves
WN_JOINT_CYLINDER and calls updateCylinderWidget(CylinderWidget) . |
protected void |
updateCylinderWidget(vona.j3d.CylinderWidget w)
Sets the extents of w along the z axis, and the edge pattern of
w depending on the current z translation limits, if any.
|
protected boolean |
updateGoalFromMobility(int which)
Update any un-set TXEM components of goal which from
mobilityRX and clamp it to current limit s. |
protected void |
updatePrismWidgets(int axis,
float extraMargin)
Retrieves
WN_JOINT_PRISM and WN_JOINT_PRISM_ENDS and
calls updatePrismWidgets(PrismWidget, PrismWidget, int,
float) . |
protected void |
updatePrismWidgets(vona.j3d.PrismWidget w,
vona.j3d.PrismWidget cw,
int axis,
float extraMargin)
Sets the extents of w and cw along axis, and the
edge pattern of cw depending on the current limits for axis,
if any.
|
protected void |
updateRectangleWidgets(float extraMargin)
Retrieves
WN_JOINT_RECTANGLE and WN_JOINT_RECTANGLE_Y_EDGES and calls updateRectangleWidgets(RectangleWidget, RectangleWidget, float) . |
protected void |
updateRectangleWidgets(vona.j3d.RectangleWidget w,
vona.j3d.RectangleWidget yw,
float extraMargin)
Sets the extents of w and yw, and the edge patterns
depending on the current limits for the X and Y axes, if any.
|
protected void |
updateRouteWidgets(vona.j3d.RouteWidget rw,
vona.j3d.ConeWidget cw,
java.lang.String frame,
int rx)
Enables or disables the route widgets, and updates their geometry.
|
protected void |
updateRouteWidgets(java.lang.String name,
java.lang.String frame,
int rx)
Retrieves the named route widgets and calls
updateRouteWidgets(RouteWidget, ConeWidget, String, int) . |
protected void |
updateSectorWidgets()
Retrieves
WN_JOINT_SECTOR and WN_JOINT_SECTOR_ENDS
and calls updateSectorWidgets(SectorWidget, SectorWidget) . |
protected void |
updateSectorWidgets(vona.j3d.SectorWidget w,
vona.j3d.SectorWidget ew)
Sets the lengths and angles of w and ew, their
translation in
SF_MOBILITY_TO , and the edge pattern of ew
depending on the current Z axis rotation limits, if any. |
protected void |
updateSegmentWidget()
Retrieves
WN_JOINT_SEGMENT and calls updateSliderWidget(vona.j3d.EdgedFacetedWidget) . |
protected void |
updateSliderWidget(vona.j3d.CurveWidget w)
sets color depending on whether the joint is
locked |
protected void |
updateSliderWidget(vona.j3d.EdgedFacetedWidget w)
sets color depending on whether the joint is
locked |
protected void |
updateSphereWidget()
Retrieves
WN_JOINT_SPHERE and calls updateSphereWidget() . |
protected void |
updateSphereWidget(vona.j3d.SphereWidget w)
updates widget rx
|
protected void |
updateSquareWidget()
Retrieves
WN_JOINT_SQUARE and calls updateSliderWidget(vona.j3d.EdgedFacetedWidget) . |
protected void |
updateWidgetsImpl()
Hook for lazy
LinkageNode.widgetMap update. |
addWidget, addWidget, addWidget, addWidget, addWidget, addWidget, checkNamePattern, collectTreeMetrics, collectTreeMetrics, compareTo, dump, dumpSubFrames, dumpTree, dumpTree, dumpTreeMetrics, dumpTreeMetrics, enableDBGNormals, enableDBGNormalsRecursively, enableDBGSpheres, enableDBGSpheresRecursively, findImpl, findJoint, findJoint, findJoints, findJoints, findLink, findLink, findLinks, findLinks, findMultipleImpl, findNode, findNode, findNodes, findNodes, getCMT, getCMT, getDepth, getName, getNumUserWidgets, getNumWidgets, getProperty, getSubFrame, getSubFrame, getSubFrameCMT, getSubFrameCMT, getSubFrameCMT, getSubFrameName, getSubFrameRX, getSubFrameRX, getSubFrameRX, getWidget, getWidgetLength, getWidgets, hasDescendant, hasProperty, hasWidgets, isAutoNamed, isExplicitlyHidden, isExplicitlyHighlighted, isExplicitlyMasked, isExplicitlyVisible, isLive, isUserWidget, lock, removeAllWidgets, removeProperty, removeWidget, removeWidget, renameWidget, reparentUserWidgets, reparentUserWidgets, reparentWidget, reparentWidget, reparentWidgetImpl, reparentWidgets, reparentWidgets, setAllTreeJointsToGoal, setAllTreeJointsToHighestPrioritySoftGoal, setAllTreeJointsToPosture, setAllTreeJointsToTarget, setExplicitlyHidden, setExplicitlyHighlighted, setExplicitlyMasked, setExplicitlyVisible, setLockedRecursively, setProperty, setProperty, setWidgetLength, setWidgetLength, setWidgetLengthRecursively, setWidgetLengthRecursively, suppressTreeDump, toString, traverseTree, unlock, updateCMTsRecursively, updateWidgets, updateWidgetsRecursively
private static final java.lang.String cvsid
public static final int FMT_WIDTH
FMT
public static final java.lang.String FMT
public static final java.lang.String FMT_S
FMT
public static final java.lang.String FMT3
FMT
spublic static final java.lang.String FMT4
FMT
spublic static final java.lang.String FMT6
FMT
spublic static final java.lang.String FMT3_S
FMT_S
spublic static final java.lang.String FMT4_S
FMT_S
spublic static final java.lang.String FMT6_S
FMT_S
spublic static final java.lang.String WP_JOINT
Widget
property identifying a Joint widgetpublic static final java.lang.String WP_ROUTE
Widget
property identifying the RouteWidget
to which
this widget is associated.
public static final java.lang.String SF_CHILD
Subframes.
When not mobilityInverted
, SF_MOBILITY_FROM
is an
alias for SF_CHILD_MOBILITY
and SF_MOBILITY_TO
is an
alias for SF_PARENT_MOBILITY
. But when mobilityInverted
the aliases are swapped.
public static final java.lang.String SF_CHILD_MOBILITY
Subframes.
When not mobilityInverted
, SF_MOBILITY_FROM
is an
alias for SF_CHILD_MOBILITY
and SF_MOBILITY_TO
is an
alias for SF_PARENT_MOBILITY
. But when mobilityInverted
the aliases are swapped.
public static final java.lang.String SF_PARENT_MOBILITY
Subframes.
When not mobilityInverted
, SF_MOBILITY_FROM
is an
alias for SF_CHILD_MOBILITY
and SF_MOBILITY_TO
is an
alias for SF_PARENT_MOBILITY
. But when mobilityInverted
the aliases are swapped.
public static final java.lang.String SF_PARENT
Subframes.
When not mobilityInverted
, SF_MOBILITY_FROM
is an
alias for SF_CHILD_MOBILITY
and SF_MOBILITY_TO
is an
alias for SF_PARENT_MOBILITY
. But when mobilityInverted
the aliases are swapped.
public static final java.lang.String SF_MOBILITY_FROM
Subframes.
When not mobilityInverted
, SF_MOBILITY_FROM
is an
alias for SF_CHILD_MOBILITY
and SF_MOBILITY_TO
is an
alias for SF_PARENT_MOBILITY
. But when mobilityInverted
the aliases are swapped.
public static final java.lang.String SF_MOBILITY_TO
Subframes.
When not mobilityInverted
, SF_MOBILITY_FROM
is an
alias for SF_CHILD_MOBILITY
and SF_MOBILITY_TO
is an
alias for SF_PARENT_MOBILITY
. But when mobilityInverted
the aliases are swapped.
public static final java.lang.String[] JOINT_SUBFRAMES
public static final float WIDGET_MARGIN
Joint extendable Widget
margin relative to LinkageNode.widgetLength
. This extends the length of cylinder, prism, and plane
widgets beyond the current mobility state when the corresponding DoF is
unlimited.
public static final float SECTOR_MARGIN
Joint extendable SectorWidget
margin in radians. This extends
the angular extents of sector widgets beyond the current mobility state
when the Z rotation DoF is unlimited.
public static final float SEGMENT_OFFSET_FACTOR
Joint segment and sector Widget
lengths relative to LinkageNode.widgetLength
.
public static final float SEGMENT_LENGTH_FACTOR
Joint segment and sector Widget
lengths relative to LinkageNode.widgetLength
.
public static final float SECTOR_OFFSET_FACTOR
Joint segment and sector Widget
lengths relative to LinkageNode.widgetLength
.
public static final float SECTOR_WIDTH_FACTOR
Joint segment and sector Widget
lengths relative to LinkageNode.widgetLength
.
public static final float WIDGET_WIDTH_FACTOR
Joint prism and square Widget
widths relative to LinkageNode.widgetLength
.
public static final float REVOLUTE_SECTOR_ALPHA
Joint revolute/cylindrical/pin-slider sector, pin-slider/point-slider
prism, and planar/point-plane rectangle Widget
face alphas.
public static final float SLIDER_PRISM_ALPHA
Joint revolute/cylindrical/pin-slider sector, pin-slider/point-slider
prism, and planar/point-plane rectangle Widget
face alphas.
public static final float PLANAR_RECTANGLE_ALPHA
Joint revolute/cylindrical/pin-slider sector, pin-slider/point-slider
prism, and planar/point-plane rectangle Widget
face alphas.
public static final int LIMITED_EDGE_PATTERN
public static final int UNLIMITED_EDGE_PATTERN
public static final float LIMITED_EDGE_WIDTH
public static final float UNLIMITED_EDGE_WIDTH
public static final float SLIDER_EDGE_WIDTH
public static final float CYLINDER_HEIGHT_FACTOR
Widget
height relative to LinkageNode.widgetLength
public static final float AXES_RADIUS_FACTOR
AxesWidget
radius relative to LinkageNode.widgetLength
public static final float WIDGET_RADIUS_FACTOR
Joint cylinder, sphere, and circle Widget
radii relative to
LinkageNode.widgetLength
.
public static final int WIDGET_NUM_SECTORS
Widget
sector countspublic static final float ROUTE_TANGENT_FACTOR
RouteWidget
endpoint tangent lengths relative to LinkageNode.widgetLength
.
public static final float DEGENERATE_ROUTE_TANGENT_FACTOR
RouteWidget
endpoint tangent lengths relative to LinkageNode.widgetLength
.
public static final float ROUTE_LINE_WIDTH
RouteWidget
spublic static final int NUM_ROUTE_SEGMENTS
RouteWidget
spublic static final float CONE_RADIUS_FACTOR
Joint ConeWidget
dimensions relative to LinkageNode.widgetLength
.
public static final float CONE_HEIGHT_FACTOR
Joint ConeWidget
dimensions relative to LinkageNode.widgetLength
.
public static final int NUM_CONE_SECTORS
ConeWidget
spublic static final double DEGENERATE_ROUTE_TOL
public static final double BROKEN_TOL
isBroken()
public static final vona.color.ColorScheme JW_COLOR_SCHEME
Color scheme for Joint Widget
s.
public static final vona.color.ColorScheme TREE_ROUTE_COLOR_SCHEME
Color scheme for tree joint RouteWidget
s.
public static final vona.color.ColorScheme CLOSURE_ROUTE_COLOR_SCHEME
Color scheme for closure joint RouteWidget
s.
public static final java.awt.Color MOBILITY_ERROR_ROUTE_COLOR
public static final java.lang.String JW_AXES
WP_JOINT
valuespublic static final java.lang.String JW_LABEL
WP_JOINT
valuespublic static final java.lang.String JW_ROUTE
WP_JOINT
valuespublic static final java.lang.String JW_ROUTE_CONE
WP_JOINT
valuespublic static final java.lang.String JW_MOBILITY_SURFACE
WP_JOINT
valuespublic static final java.lang.String JW_SLIDER_SURFACE
WP_JOINT
valuespublic static final java.lang.String JW_MOBILITY_SLIDER
WP_JOINT
valuespublic static final java.lang.String WN_CHILD_MOBILITY_AXES
Widget
namespublic static final java.lang.String WN_PARENT_MOBILITY_AXES
Widget
namespublic static final java.lang.String WN_C_TO_M_ROUTE
Widget
namespublic static final java.lang.String WN_MOBILITY_ROUTE
Widget
namespublic static final java.lang.String WN_M_TO_P_ROUTE
Widget
namespublic static final java.lang.String WN_ROUTE_CONE_SUFFIX
Widget
namespublic static final java.lang.String WN_JOINT_LABEL
Widget
namespublic static final java.lang.String WN_JOINT_CYLINDER
Widget
namespublic static final java.lang.String WN_JOINT_SECTOR
Widget
namespublic static final java.lang.String WN_JOINT_SECTOR_ENDS
Widget
namespublic static final java.lang.String WN_JOINT_SEGMENT
Widget
namespublic static final java.lang.String WN_JOINT_PRISM
Widget
namespublic static final java.lang.String WN_JOINT_PRISM_ENDS
Widget
namespublic static final java.lang.String WN_JOINT_SQUARE
Widget
namespublic static final java.lang.String WN_JOINT_CIRCLE
Widget
namespublic static final java.lang.String WN_JOINT_SPHERE
Widget
namespublic static final java.lang.String WN_JOINT_RECTANGLE
Widget
namespublic static final java.lang.String WN_JOINT_RECTANGLE_Y_EDGES
Widget
namesprotected final float[][] tempV3
protected final double[] tempV3D
protected Link childLink
The immediate descendant of this joint, or null if dangling.
protected final java.util.List<Link> childLinks
Contains childLink
(for getChildren()
), empty if
dangling.
protected final java.util.List<Link> unmodifiableChildLinks
childLinks
protected final vona.math.RX childToMobilityRX
Sub transform taking the child frame to the child mobility frame.
See Linkage
class header doc for details.
protected java.lang.String childSubFrame
Subframe in child link corresponding to childToMobilityRX
, if
any.
protected final vona.math.RX mobilityRX
Sub transform taking the child mobility frame to the parent
mobility frame, or vice-versa if mobilityInverted
.
See Linkage
class header doc for details.
protected final vona.math.RX mobilityRXClamped
Mirror of mobilityRX
, but always clamped to limit
s.
protected final vona.math.RX mobilityToParentRX
Sub transform taking the parent mobility frame to the parent frame.
See Linkage
class header doc for details.
protected java.lang.String parentSubFrame
Subframe in parent link corresponding to mobilityToParentRX
,
if any.
protected final vona.math.RX jointRX
Total transform taking the child frame to the parent frame.
See Linkage
class header doc for details.
protected final vona.math.RX targetRX
Current mobilityRX
target.
Un-set components track mobilityRX
.
protected final vona.math.RX postureRX
Current mobilityRX
posture.
Un-set components track mobilityRX
.
protected final vona.math.RX invariantRX
Current mobilityRX
invariant goal.
DoF track mobilityRX
, DoI match Joint.Type.invariant
.
protected final vona.math.RX lockRX
Current mobilityRX
lock goal.
Frozen at mobilityRX
at the time the Joint is locked. If not
locked, tracks mobilityRX
.
protected final vona.math.RX tempRX
public static final int RX_INVARIANT
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents
.
RX_TARGET
and RX_POSTURE
are soft goals; RX_INVARIANT
and RX_LOCK
are hard goals.
Ordered so that all mobility space transforms are leq RX_MOBILITY
.
public static final int RX_LOCK
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents
.
RX_TARGET
and RX_POSTURE
are soft goals; RX_INVARIANT
and RX_LOCK
are hard goals.
Ordered so that all mobility space transforms are leq RX_MOBILITY
.
public static final int RX_TARGET
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents
.
RX_TARGET
and RX_POSTURE
are soft goals; RX_INVARIANT
and RX_LOCK
are hard goals.
Ordered so that all mobility space transforms are leq RX_MOBILITY
.
public static final int RX_POSTURE
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents
.
RX_TARGET
and RX_POSTURE
are soft goals; RX_INVARIANT
and RX_LOCK
are hard goals.
Ordered so that all mobility space transforms are leq RX_MOBILITY
.
public static final int RX_MOBILITY
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents
.
RX_TARGET
and RX_POSTURE
are soft goals; RX_INVARIANT
and RX_LOCK
are hard goals.
Ordered so that all mobility space transforms are leq RX_MOBILITY
.
public static final int RX_CHILD_TO_MOBILITY
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents
.
RX_TARGET
and RX_POSTURE
are soft goals; RX_INVARIANT
and RX_LOCK
are hard goals.
Ordered so that all mobility space transforms are leq RX_MOBILITY
.
public static final int RX_MOBILITY_TO_PARENT
Sub-transform identifiers, goals must come first to support indexing in
setGoalComponents
.
RX_TARGET
and RX_POSTURE
are soft goals; RX_INVARIANT
and RX_LOCK
are hard goals.
Ordered so that all mobility space transforms are leq RX_MOBILITY
.
public static final int PG_STIFFNESS
Non-transform goal identifiers.
public static final int PG_GRAVITY
Non-transform goal identifiers.
public static final int PG_POTENTIAL
Non-transform goal identifiers.
public static final int G_LIMIT
Non-transform goal identifiers.
public static final int LIMIT_PENALTY_DEGREE
Polynomial degree of the limit penalty function.
Must be even and positive.
public static final int NUM_SUBTRANSFORMS
public static final int NUM_GOAL_SUBTRANSFORMS
public static final int NUM_HARD_GOAL_SUBTRANSFORMS
public static final int NUM_SOFT_GOAL_SUBTRANSFORMS
public static final int NUM_CHAIN_SUBTRANSFORMS
protected final vona.math.RX[] subRX
public static final java.lang.String[] SUB_RX_NAME
public static final int[] ALL_TXEM_INDICES
protected final int[][] setGoalComponents
protected final int[][] setTranslationGoalComponents
protected final int[][] setRotationGoalComponents
protected int[] setLimitComponents
protected int[] setTranslationLimitComponents
protected int[] setRotationLimitComponents
protected final int[][] unsetGoalComponents
protected int[] unsetLimitComponents
protected boolean locked
protected boolean mobilityInverted
protected boolean positioningTransformsLocked
Whether RX_CHILD_TO_MOBILITY
and RX_MOBILITY_TO_PARENT
are currently locked.
public final java.util.List<Joint> support
Joints associated to this Joint in a Solver
.
This is populated by Controller.analyze()
according to whether
this Joint isClosureJoint()
.
The support of a a chain closure Joint cj is its
kinematic cycle, not including cj itself. They cycle is stored in
order, starting at the Link.parentJoint
of childLink
,
continuing down to one of the Link.childJoints
of branchLink
, then up through another of the Link.childJoints
of
branchLink
, and ending at the Link.parentJoint
of parentLink
. Locked tree Joint
s are not included in the
cycle.
For a tree Joint tj, support contains the list of chain closure Joints whose supports contain tj.
Note that support will be empty for chain closure Joints whose
cycle contains no other unlocked Joints (including closure Joints whose
parentLink
and childLink
are the same), and for tree
Joints that are not in the support of any chain closure Joint.
public Solver solver
Solver
assigned by Controller.analyze()
, iff anypublic Link branchLink
For a chain closure joint, Controller.analyze()
sets this to the
least common ancestor of the model tree branches containing parentLink
and childLink
. Null for tree joints.
public int lastSupportIndexBeforeBranch
For a chain closure joint, Controller.analyze()
sets this to the
index of the last actuator in support
before branchLink
.
-1 if all supporting actuators are after branchLink
, or if there
are no supporting actuators (there is always a branchLink
).
public int jacobianStartColumn
Start index of the span of Jacobian columns corresponding to this
Joint in solver
, or -1 if none.
public int jacobianDoIStartRow
Start indices of the spans of Jacobian rows corresponding to this
Joint in solver
, or -1 if none.
public int jacobianLimitStartRow
Start indices of the spans of Jacobian rows corresponding to this
Joint in solver
, or -1 if none.
public int jacobianDoFStartRow
Start indices of the spans of Jacobian rows corresponding to this
Joint in solver
, or -1 if none.
public double softGoalWeight
Solve weight of the highest priority soft goal of this Joint in
solver
.
public float softGoalPriority
Solve priority of the highest priority soft goal of this Joint in
solver
.
See getHighestPrioritySoftGoal()
.
This sets up a partial order among all soft goals of the same kind in
solver
, and that implies softGoalSolveLevel
. Higher
priority soft goals will be met first relative to other joints with the
same kind of soft goal (target or posture).
public int softGoalSolveLevel
Solve level of the highest priority soft goal, if any, of this Joint in
solver
.
See softGoalPriority
.
protected final vona.math.RX parentMobilityCMT
protected final vona.math.RX childMobilityCMT
protected boolean parentMobilityCMTDirty
protected boolean childMobilityCMTDirty
protected final double[] parentMobilityCMTRotMatrix
protected final double[] childMobilityCMTRotMatrix
protected final double[] mobilityRotMatrix
protected boolean parentMobilityCMTRotMatrixDirty
protected boolean childMobilityCMTRotMatrixDirty
protected boolean mobilityRotMatrixDirty
protected final double[] parentMobilityCMTQuaternion
protected final double[] childMobilityCMTQuaternion
protected final double[] mobilityQuaternion
protected boolean parentMobilityCMTQuaternionDirty
protected boolean childMobilityCMTQuaternionDirty
protected boolean mobilityQuaternionDirty
protected final double[][] mobilitydQdEM
protected final double[][] mobilitydEMdQ
protected final double[][] mobilitydRdQ
protected final double[][] mobilitydRdEM
protected boolean mobilitydQdEMDirty
protected boolean mobilitydEMdQDirty
protected boolean mobilitydRdQDirty
protected boolean mobilitydRdEMDirty
protected vona.math.RX mobilityRXInverse
protected vona.math.RX mobilityRXClampedInverse
protected boolean mobilityRXInverseDirty
protected boolean mobilityRXClampedInverseDirty
protected double singleMobilityDoF
protected boolean singleMobilityDoFDirty
public static final int LOWER
public static final int UPPER
protected final double[][] limit
protected final boolean[] limitSet
Whether we currently have a limit
for each TXEM parameter.
This is always true for DoI, and it's true for each DoF that has set limits.
protected boolean translationDoFLimited
Whether the indicated motion DoF space has any limits currently set.
protected boolean rotationDoFLimited
Whether the indicated motion DoF space has any limits currently set.
protected boolean potentialEnabled
Gating enable for any potential goal.
Default true.
protected double stiffness
protected double stiffnessRest
public static final Joint.Type[] TYPES
Joint.Type
s, do not modifypublic static final int NUM_TYPES
Joint.Type
sprotected Joint.Type type
Joint.Type
public static final Joint.ResidualType[] RESIDUAL_TYPES
Joint.ResidualType
s, do not modifypublic static final int NUM_RESIDUAL_TYPES
Joint.ResidualType
spublic Joint(Linkage linkage, java.lang.String name, Joint.Type type, Link parentLink, java.lang.String parentSubFrame, Link childLink, java.lang.String childSubFrame)
Makes a new chain closure joint and adds it to linkage.
linkage
- the Linkage
to contain this joint, not nullname
- the initial name of this Joint or null to auto-nametype
- the initial Joint.Type
of this Joint or null to default to
Joint.Type.GENERAL
parentLink
- the initial parent Link
, or null for noneparentSubFrame
- the initial parent subframe, or null for nonechildLink
- the initial child Link
, or null for nonechildSubFrame
- the initial child subframe, or null for nonejava.lang.IllegalArgumentException
- if name is non-null and fails
checkName(java.lang.String)
, in this case the new Joint is not added to
linkagepublic Joint(Linkage linkage, java.lang.String name, Joint.Type type, LinkageNode.SubFrame parent, LinkageNode.SubFrame child)
public Joint(Linkage linkage, java.lang.String name, Joint.Type type, Link parentLink, Link childLink)
Covers Joint(Linkage, String, Type, Link, String, Link,
String)
, does not attach to subframes.
public Joint(Linkage linkage, Joint.Type type, Link parentLink, java.lang.String parentSubFrame, Link childLink, java.lang.String childSubFrame)
Covers Joint(Linkage, String, Type, Link, String, Link,
String)
, auto-named.
public Joint(Linkage linkage, Joint.Type type, LinkageNode.SubFrame parent, LinkageNode.SubFrame child)
public Joint(Linkage linkage, Joint.Type type, Link parentLink, Link childLink)
Covers Joint(Linkage, String, Type, Link, Link)
,
auto-named.
public Joint(Linkage linkage, java.lang.String name, Joint.Type type)
Covers Joint(Linkage, String, Type, Link, Link)
, initially
disconnected.
public Joint(Linkage linkage, java.lang.String name)
Covers Joint(Linkage, String, Type, Link, Link)
, initially
disconnected and Joint.Type.GENERAL
.
public Joint(Linkage linkage, Joint.Type type)
Covers Joint(Linkage, String, Type, Link, Link)
, initially
disconnected, auto-named.
public Joint(Linkage linkage)
Covers Joint(Linkage, String, Type, Link, Link)
, initially
disconnected, Joint.Type.GENERAL
, and auto-named.
public Joint(Linkage linkage, java.lang.String name, Link parentLink, java.lang.String parentSubFrame, Link childLink, java.lang.String childSubFrame)
Covers Joint(Linkage, String, Type, Link, String, Link,
String)
, initially Joint.Type.GENERAL
.
public Joint(Linkage linkage, java.lang.String name, LinkageNode.SubFrame parent, LinkageNode.SubFrame child)
public Joint(Linkage linkage, java.lang.String name, Link parentLink, Link childLink)
Covers Joint(Linkage, String, Type, Link, Link)
, initially
Joint.Type.GENERAL
.
public Joint(Linkage linkage, Link parentLink, java.lang.String parentSubFrame, Link childLink, java.lang.String childSubFrame)
Covers Joint(Linkage, String, Type, Link, String, Link,
String)
, initially Joint.Type.GENERAL
and auto named.
public Joint(Linkage linkage, LinkageNode.SubFrame parent, LinkageNode.SubFrame child)
public Joint(Linkage linkage, Link parentLink, Link childLink)
Covers Joint(Linkage, String, Type, Link, Link)
, initially
Joint.Type.GENERAL
and auto named.
public Link getParentLink()
parentLink
, null if nonepublic static java.lang.String getAttachmentName(Link link, java.lang.String subFrame)
getParentName()
and getChildName()
public java.lang.String getParentName()
Get the name of the current attached child and child subframe, if any, else null.
public java.lang.String getChildName()
Get the name of the current attached child and child subframe, if any, else null.
public java.lang.String getParentSubFrame()
parentSubFrame
, null if nonepublic java.lang.String getChildSubFrame()
childSubFrame
, null if nonepublic java.lang.String setName(java.lang.String name)
Set the name of this Joint.
Has no effect if the new name equals the old.
setName
in class LinkageNode
name
- new name or null to auto-namejava.lang.IllegalArgumentException
- if name fails checkName(java.lang.String)
,
in this case the name is not changedpublic boolean checkName(java.lang.String name)
Extends superclass impl to verify name is unique in parentLink
, if any.
checkName
in class LinkageNode
public LinkageNode getParent()
parentLink
getParent
in class LinkageNode
public LinkageNode getChild(java.lang.String name)
childLink
iff name matchesgetChild
in class LinkageNode
public java.util.Collection<? extends LinkageNode> getChildren()
childLinks
getChildren
in class LinkageNode
public boolean hasChildren()
This impl checks if childLink
is not null.
hasChildren
in class LinkageNode
public boolean isTreeLeaf()
Check if this is a leaf in the model tree.
Default impl checks if not LinkageNode.hasChildren()
.
This impl checks if childLink
is null or isClosureJoint()
.
isTreeLeaf
in class LinkageNode
public void updateCMTs()
Update this node's LinkageNode.cmt
based on its parent's LinkageNode.cmt
.
Implementations may also compute and cache other CMT-related state in this call, such as CMTs for sub-frames.
For details on the semantics of CMTs see the Linkage
class
header doc.
updateCMTs
in class LinkageNode
public vona.math.RX getParentMobilityCMTRef()
public vona.math.RX getChildMobilityCMTRef()
public double[] getParentMobilityCMTRotMatrixRef()
public double[] getChildMobilityCMTRotMatrixRef()
public double[] getParentMobilityCMTQuaternionRef()
public double[] getChildMobilityCMTQuaternionRef()
public double[] getMobilityRotMatrixRef()
public double[] getMobilityQuaternionRef()
public double[][] getMobilitydQdEMRef()
public double[][] getMobilitydEMdQRef()
public double[][] getMobilitydRdQRef()
public double[][] getMobilitydRdEMRef()
public vona.math.RX getMobilityRXClampedInverseRef()
public vona.math.RX getMobilityRXInverseRef()
public double getSingleMobilityDoF()
public void remove()
Remove this node from the Linkage
tree.
All adjacent Joint endpoints are dangled.
Once a node has been removed it cannot be re-added.
If this is a connected tree joint, it is first converted to a chain
closure (makeClosureJoint()
). Then the child and parent Links are
detached, in that order.
remove
in class LinkageNode
public Link merge(boolean reparentUserJointWidgets, boolean reparentUserLinkWidgets)
remove()
this Joint and its child Link
from the model,
re-attaching joints that were attached to the child Link to our parent
Link.
Our own user widgets, as well as those of our child Link, are also optionally re-parented to our parent Link.
If this Joint is dangling then the effect is the same as first
(optionally) migrating its user widgets to the adjacent Link and then
calling remove()
.
If this Joint is connected then it is first made a tree joint (see
makeTreeJoint()
), then the Joints attached to the child Link are
re-attached to the parent Link without changing the absolute pose of their
mobility frames, the widgets are optionally migrated, and then both
this Joint and its child Link are removed from the model.
See also Link.split()
.
java.lang.IllegalStateException
- if isCrossing()
public Link merge(boolean reparentWidgets)
Covers merge(boolean, boolean)
, reparents both Joint and
Link
user widgets or not.
public Link merge()
Covers merge(boolean, boolean)
, reparents both Joint and
Link
user widgets.
public Link setParentLink(Link parentLink, java.lang.String parentSubFrame, boolean holdAbsolutePose)
Mutate the parentLink
.
Does nothing if the passed link is the same as the current parentLink
.
If LinkageNode.isAutoNamed()
, and the current Joint name is not unique in
the new parent, a new unique name will be automatically assigned.
If parentLink is in the enclosing Linkage
and this was a
connected tree joint, then childLink
becomes the new ground link
of this sublinkage (if it is not already the ground link). If the old
ground link was connected to the superlinkage by a tree joint t
other than its RootJoint
, t is made a chain closure,
enforcing the invariant that there is always exactly one outcrossing tree
joint from every sublinkage.
Specifying non-null parentSubFrame indicates attachment to a
link subframe. In this case the mobilityToParentRX
transform is
set from the corresponding sub-frame transform. Subsequent mutations to
either are propagated to the other. Subframe attachment is currently only
implmented for user subframes (see Link.addUserSubFrame(java.lang.String, vona.math.RX)
).
parentLink
- the new parentLink
or null to dangleparentSubFrame
- the new subframe to attach to in parentLink,
or null to attach directly to link frameholdAbsolutePose
- whether to request holding the current SF_PARENT_MOBILITY
absolute pose. Otherwise SF_PARENT_MOBILITY
will have the same relative pose to its new parent (if any) as it did to
its old parent. The request is not honored if not positioningTransformsMutable()
.parentLink
java.lang.IllegalArgumentException
- if parentLink is not livejava.lang.IllegalArgumentException
- if parentSubFrame is not null
and not a current user subframe in parentLinkjava.lang.IllegalStateException
- if there is a current child link and
Link.isConnectableToJoint(java.lang.String, msim.model.Joint, msim.model.Link)
fails for the new candidate parentjava.lang.IllegalStateException
- if there is not a current child link and
Link.isConnectableToJointType(java.lang.String, msim.model.Joint.Type)
fails for the new candidate parentjava.lang.IllegalArgumentException
- if parentLink is not null and
aliases existing childLink
java.lang.IllegalArgumentException
- if parentLink is neither in
LinkageNode.linkage
nor the enclosing Linkagejava.lang.IllegalArgumentException
- if parentLink is in the Linkage
enclosing LinkageNode.linkage
and so is the existing childLink
java.lang.IllegalStateException
- if not auto-named and parentLink
contains a different Joint with the same name as this Jointjava.lang.IllegalArgumentException
- if parentLink is null but
isConnected()
and isTreeJoint()
public Link setParentLink(LinkageNode.SubFrame parent, boolean holdAbsolutePose)
public Link setParentLink(Link parentLink, java.lang.String parentSubFrame)
setParentLink(Link, String, boolean)
, does not request holding
absolute pose.
public Link setParentLink(LinkageNode.SubFrame parent)
Covers setParentLink(Link, String)
.
public Link setParentLink(Link parentLink, boolean holdAbsolutePose)
setParentLink(Link, String, boolean)
, does not attach to
subframe.
public Link setParentLink(Link parentLink)
setParentLink(Link, boolean)
, does not request holding
absolute pose.
public Link detachParentLink()
setParentLink(Link)
nullpublic Link setChildLink(Link childLink, java.lang.String childSubFrame, boolean holdAbsolutePose)
Mutate the childLink
.
Does nothing if the passed link is the same as the current childLink
.
Specifying non-null childSubFrame indicates attachment to a link
subframe. In this case the childToMobilityRX
transform is set
from the inverse of the corresponding sub-frame transform. Subsequent
mutations to either are propagated to the other. Subframe attachment is
currently only implmented for user subframes (see Link.addUserSubFrame(java.lang.String, vona.math.RX)
).
childLink
- the new childLink
or null to danglechildSubFrame
- the new subframe to attach to in childLink,
or null to attach directly to link frameholdAbsolutePose
- whether to request holding childLink's
existing absolute pose. Otherwise childLink will be moved to have
the relative pose defined by the current state of this Joint to its parentLink
, if any.childLink
java.lang.IllegalArgumentException
- if childLink is not livejava.lang.IllegalArgumentException
- if childSubFrame is not null
and not a current user subframe in childLinkjava.lang.IllegalStateException
- if there is a current parent link and
Link.isConnectableToJoint(java.lang.String, msim.model.Joint, msim.model.Link)
fails for the new candidate childjava.lang.IllegalStateException
- if there is not a current parent link and
Link.isConnectableToJointType(java.lang.String, msim.model.Joint.Type)
fails for the new candidate childjava.lang.IllegalArgumentException
- if parentLink is not null andjava.lang.IllegalArgumentException
- if childLink is not null and
aliases existing parentLink
java.lang.IllegalArgumentException
- if childLink is neither in
LinkageNode.linkage
nor the enclosing Linkagejava.lang.IllegalArgumentException
- if childLink is in the Linkage
enclosing LinkageNode.linkage
and so is the existing parentLink
java.lang.IllegalArgumentException
- if isTreeJoint()
,
childLink is in the Linkage enclosing LinkageNode.linkage
, and the
Linkage.disposition
of LinkageNode.linkage
is Linkage.Disposition.DRIVEN
java.lang.IllegalArgumentException
- if isTreeJoint()
, and
childLink is the ground link in the Linkage enclosing LinkageNode.linkage
public Link setChildLink(LinkageNode.SubFrame child, boolean holdAbsolutePose)
public Link setChildLink(Link childLink, java.lang.String childSubFrame)
setChildLink(Link, String, boolean)
, does not request holding
absolute pose.
public Link setChildLink(LinkageNode.SubFrame child)
Covers setChildLink(Link, String)
.
public Link setChildLink(Link childLink, boolean holdAbsolutePose)
setChildLink(Link, String, boolean)
, does not attach to
subframe.
public Link setChildLink(Link childLink)
setChildLink(Link, boolean)
, does not request holding
absolute pose.
public Link detachChildLink()
setChildLink(Link)
nullpublic boolean isConnected()
parentLink
and childLink
are setpublic boolean isClosureJoint()
Checks not isTreeJoint()
, i.e. this Joint is a Closure if either
childLink
is null or the Link.parentJoint
of childLink
is not this Joint.
public boolean isBroken()
BROKEN_TOL
)public boolean isTreeJoint()
Checks if we have a childLink
and its Link.parentJoint
is this Joint.
public boolean isIncrossing()
Check if childLink
is not null and is not in LinkageNode.linkage
.
public boolean isOutcrossing()
Check if parentLink
is not null and is not in LinkageNode.linkage
.
public boolean isCrossing()
Check if isIncrossing()
or isOutcrossing()
.
public Joint makeClosureJoint()
Ensure that this Joint is a chain closure.
Has no effect if this Joint is already a chain closure.
The childLink
becomes a new root (see Link.makeRootLink()
); it always holds its absolute pose.
public Joint makeTreeJoint()
Ensure that this Joint is a tree joint iff it's connected.
Has no effect if this Joint is not currently connected or is already a tree joint.
The previous parent of childLink
becomes a chain closure on
it. A re-=grounding is triggered if not isCrossing()
and childLink
Link.isGroundLink()
, or if isOutcrossing()
:
in the former case parentLink
made the new ground link of LinkageNode.linkage
, in the latter case childLink
is made the new ground
link.
childLink
always holds its absolute pose.
java.lang.IllegalArgumentException
- if isIncrossing()
, and
the Linkage.disposition
of LinkageNode.linkage
is Linkage.Disposition.DRIVEN
java.lang.IllegalArgumentException
- if isIncrossing()
, and
childLink is the ground link in the Linkage enclosing LinkageNode.linkage
public Joint invert()
Invert both the topology and the geometry of this Joint.
If this is a closure joint then
parentLink
and childLink
are swappedchildToMobilityRX
and mobilityToParentRX
are swapped
and invertedmobilityInverted
is toggledrecomputeJointRX()
If this is a tree joint then this triggers a re-grounding, making
childLink
the new ground:
childLink
is Link.makeGroundLink()
now that it's a root
linkjava.lang.IllegalStateException
- if isTreeJoint()
and isCrossing()
java.lang.IllegalStateException
- if this Joint is not auto-named and the
new parent Link already has a Joint of the same name, or if the same holds
for any joint in the tree path to the current ground link; no mutation is
performedjava.lang.IllegalStateException
- if attached to either a parent or child
link subframepublic void recomputeJointRX()
Recompute jointRX
from childToMobilityRX
, mobilityRX
, and mobilityToParentRX
.
public boolean recomputeInverse(int slackTransform, boolean recomputeJointRX)
Possibly recompute jointRX
to fit the current parentLink
and childLink
LinkageNode.cmt
s, then recompute one
of the three internal transforms RX_MOBILITY
, RX_CHILD_TO_MOBILITY
, or RX_MOBILITY_TO_PARENT
to take up the
slack left by the other two incomposing (the new) jointRX
.
The slack transform is never clamped. If it's mobilityRX
,
then handleMobilityChange(boolean)
will take care of updating mobilityRXClamped
as appropriate. If the slack transform is childToMobilityRX
or mobilityToParentRX
then first mobilityRX
will be set to mobilityRXClamped
.
slackTransform
- the sub-transform selected to take up the slack:
RX_MOBILITY
, RX_CHILD_TO_MOBILITY
, or RX_MOBILITY_TO_PARENT
recomputeJointRX
- whether to first recompute jointRX
from
the adjacent Link
CMTs.java.lang.IllegalStateException
- if recomputeJointRX and this Joint
is not currently connectedpublic boolean recomputeInverse(int slackTransform)
Covers recomputeInverse(int, boolean)
, always recomputes
jointRX
.
public boolean recomputeInverse()
Covers recomputeInverse(int, boolean)
, always recomputes
jointRX
and puts the slack in RX_MOBILITY
.
protected boolean recomputeInverse(vona.math.RX slackRX, vona.math.RX parentCMT, vona.math.RX childCMT)
protected boolean recomputeInverse(vona.math.RX slackRX)
Recompute the indicated slackRX based on the current jointRX.
public boolean clampToLimits(vona.math.RX rx)
Clamp rx to the current mobility space limit
s.
This ensures that the transform respects both DoI and any set DoF limits.
public double clampDoFToLimits(int index, double value)
Clamp DoF component value to the current limit
s for the
DoF at index.
public static boolean isHardGoalSubtransform(int which)
public static boolean isSoftGoalSubtransform(int which)
public static boolean isMobilitySpaceSubtransform(int which)
Check if the indicated sub-transform is RX_MOBILITY
or a hard
or soft goal.
public static boolean isGoalSubtransform(int which)
public static boolean isPositioningSubtransform(int which)
public static boolean isChainSubtransform(int which)
public static int otherPositioningTransform(int which)
public boolean setSubRX(int which, int slackRX, vona.math.RX rx)
Set one of the sub-transforms.
The mutated transform is clamped to current limits if it isMobilitySpaceSubtransform(int)
.
Requests to unset RX_LOCK
are handled by deferring to setLocked(boolean)
.
Requests to set RX_LOCK
are only valid if currently locked.
In that case, the request is internally handled the same as RX_MOBILITY
for all but connected closure joints. Recall that lockRX
will automatically track mobilityRX
except for connected
closures.
which
- the sub-transform identifier. Only RX_INVARIANT
cannot be explicitly mutated. RX_LOCK
can be mutated only if
isLocked()
.slackRX
- if non-negative then the current jointRX
will be
held and the indicated sub-transform will receive slack in a recomputeInverse(int, boolean)
; if negative then jointRX
will
be recomputed.rx
- the new transform, passed by copy. Null triggers an un-set for
goal transforms and is treated as identity for the others.java.lang.IllegalStateException
- if which is RX_LOCK
and
not isLocked()
public boolean setSubRX(int which, vona.math.RX rx)
setSubRX(int, int, RX)
recomputing jointRX
.
public boolean setSoftGoal(int which, vona.math.RX rx)
setSubRX(int, RX)
on RX_TARGET
or RX_POSTURE
.
public void setChildToMobility(vona.math.RX rx)
public boolean setMobility(vona.math.RX rx)
public void setMobilityToParent(vona.math.RX rx)
public Joint transformMobility(vona.math.RX rx, java.lang.String inSubFrame)
Transform the mobility frames relative to the given frame.
This modifies one of the positioning transforms childToMobilityRX
or mobilityToParentRX
, whichever is
associated with inSubFrame. The current joint mobility transform
mobilityRX
and overall joint transform jointRX
, will be
preserved by recomputing the other positioning transform iff fully
connected.
inSubFrame
- the context frame for the transform, e.g. SF_PARENT_MOBILITY
public Joint transformMobility(vona.math.RX rx)
public vona.math.RX getSubRX(int which, vona.math.RX rx)
Get a copy of one of the sub-transforms.
which
- the sub-transform identifier, e.g. RX_MOBILITY
rx
- the copy is returned here, consing if nullpublic vona.math.RX getSubRX(int which)
getSubRX(int, RX)
, always consespublic vona.math.RX getChildTOMobility(vona.math.RX rx)
getSubRX(int, RX)
, gets RX_CHILD_TO_MOBILITY
public vona.math.RX getChildToMobilityRX()
Covers getSubRX(int, RX)
, gets RX_CHILD_TO_MOBILITY
and conses.
public vona.math.RX getMobility(vona.math.RX rx)
getSubRX(int, RX)
, gets RX_MOBILITY
public vona.math.RX getMobilityRX()
Covers getSubRX(int, RX)
, gets RX_MOBILITY
and
conses.
public double[] getMobilityRXTranslation(double[] translation)
RX_MOBILITY
public double[] getMobilityRXTranslation()
public vona.math.RX getMobilityToParent(vona.math.RX rx)
getSubRX(int, RX)
, gets RX_MOBILITY_TO_PARENT
public vona.math.RX getMobilityToParentRX()
Covers getSubRX(int, RX)
, gets RX_MOBILITY_TO_PARENT
and conses.
public vona.math.RX getSubRXRef(int which)
Get a reference to one of the sub-transforms, do not modify.
which
- the sub-transform identifier, e.g. RX_MOBILITY
public void setChildToMobility(Link child)
recomputeInverse(int)
as if our child was child and put
the slack in RX_CHILD_TO_MOBILITY
.
public void setMobilityToParent(Link parent)
recomputeInverse(int)
as if our parent was parent and
put the slack in RX_MOBILITY_TO_PARENT
.
public Joint setMobilityToGoal(int which)
Set mobilityRX
to the current value of the indicated goal.
which
- the goal transform identifierpublic Joint setMobilityToTarget()
public Joint setMobilityToPosture()
public Joint setMobilityToInvariant()
public Joint setMobilityToLock()
public Joint setMobilityToStiffnessRest()
Set the mobility DoF to the stiffnessRest
.
java.lang.IllegalStateException
- if this is not a 1-DoF Jointpublic Joint setMobilityToGravityRest()
Set the mobility DoF to zero gravitational potential energy stored in this joint.
java.lang.IllegalStateException
- if this is not a RootJoint
. See
RootJoint.setMobilityToGravityRest()
otherwise.public Joint setSoftGoalToMobility(int which)
Opposite of setMobilityToGoal(int)
.
The current impl does not actually change setGoalComponents
.
public Joint setTargetToMobility()
setSoftGoalToMobility(int)
public Joint setPostureToMobility()
setSoftGoalToMobility(int)
public Joint setLockToMobility()
setMobilityToLock()
public Joint setStiffnessRestToMobility()
Set stiffnessRest
to the current mobility DoF.
java.lang.IllegalStateException
- if this is not a 1-DoF Jointpublic boolean hasGoal(int which)
public int getHighestPrioritySoftGoal()
Get the id of the highest-priority "soft" goal that is currently set.
RX_TARGET
and RX_POSTURE
are soft goals; RX_INVARIANT
and RX_LOCK
are hard goals.
RX_TARGET
, if set, else RX_POSTURE
, if set, else
-1public int getNumGoalComponentsSet(int which)
Get the number of TXEM components currently set for RX_INVARIANT
, RX_LOCK
, RX_TARGET
, RX_POSTURE
,
or G_LIMIT
.
Potential goals are not supported.
public int getNumTranslationGoalComponentsSet(int which)
Like getNumGoalComponentsSet(int)
but only returns translational
components.
public int getNumRotationGoalComponentsSet(int which)
Like getNumGoalComponentsSet(int)
but only returns rotational
components.
public int[] getSetGoalComponents(int which)
Get a ref to a cached array containing the indices of the currently set
components for the indicated goal, RX_INVARIANT
, RX_LOCK
, RX_TARGET
, RX_POSTURE
, or G_LIMIT
,
if any.
Potential goals are not supported.
Returns a zero-length array if no components of the goal are currently set.
public int[] getUnsetGoalComponents(int which)
getSetGoalComponents(int)
public int[] getSetTranslationGoalComponents(int which)
Like getSetGoalComponents(int)
but restricted to translation
components.
public int[] getSetRotationGoalComponents(int which)
Like getSetGoalComponents(int)
but restricted to rotation
components.
public java.lang.String[] getSetGoalComponentNames(int which, int start, java.lang.String[] names)
getSetGoalComponents(int)
but gets TXEM component namespublic java.lang.String[] getSetGoalComponentNames(int which, java.lang.String[] names)
getSetGoalComponentNames(int, int, String[])
starting at 0public java.lang.String[] getSetGoalComponentNames(int which)
getSetGoalComponentNames(int, int, String[])
starting at 0 and
consing.
public java.lang.String[] getGoalStatus(int which, int start, java.lang.String[] status)
Get the status, "set" or "unset" of each goal component.
public java.lang.String[] getGoalStatus(int which, java.lang.String[] status)
getGoalStatus(int, int, String[])
, starting at 0public java.lang.String[] getGoalStatusString(int which)
getGoalStatus(int, int, String[])
, starting at 0 and consingpublic boolean[] getGoalStatus(int which, int start, boolean[] status)
public boolean[] getGoalStatus(int which, boolean[] status)
getGoalStatus(int, int, boolean[])
, starting at 0public boolean[] getGoalStatusBoolean(int which)
getGoalStatus(int, int, boolean[])
, starting at 0 and consingpublic boolean hasAnyGoal()
Check if any component of any goal is currently set or hasPotential()
or isDoFLimited()
.
This will effectively return true if hasInvariant()
because it
will check for any set RX_INVARIANT
goals.
public boolean hasEitherSoftGoal()
Check if either RX_TARGET
or RX_POSTURE
is currently
set.
public boolean hasTarget()
public boolean hasPosture()
public boolean hasInvariant()
public boolean hasLock()
public boolean hasStiffness()
Check if this Joint has stiffness.
A Joint has stiffness when potentialEnabled
, stiffness
is not NaN, and there is exactly one DoF.
Also see isStiffnessSet()
, which is less restrictive.
public boolean hasGravity()
Check if this Joint has gravity.
Default impl returns false. See RootJoint.hasGravity()
.
public boolean hasPotential()
hasStiffness()
or hasGravity()
public boolean setPotentialEnabled(boolean enabled)
Enable or disable potential goal, if any.
public boolean enablePotential()
setPotentialEnabled(boolean)
public boolean disablePotential()
setPotentialEnabled(boolean)
public boolean isPotentialEnabled()
public int getPotentialGoal()
Get the currently set potential goal, PG_STIFFNESS
or PG_GRAVITY
, or -1 if none.
public static boolean isPotentialGoal(int goal)
Check if goal is one of the potential goals PG_POTENTIAL
(itself a meta-goal), PG_STIFFNESS
, or PG_GRAVITY
.
public Joint unsetSoftGoal(int which)
RX_TARGET
or RX_POSTURE
public Joint unsetSoftGoals()
RX_TARGET
or RX_POSTURE
public Joint unsetTarget()
public Joint unsetPosture()
public Joint unsetLock()
setLocked(boolean)
public double setStiffness(double stiffness)
Set the joint stiffness.
NaN is equivalent to unsetStiffness()
.
java.lang.IllegalArgumentException
- if stiffness is negativepublic double unsetStiffness()
public double getStiffness()
stiffness
or NaN if unsetpublic boolean isStiffnessSet()
Check if stiffness
is set (not NaN).
Also see hasStiffness()
, which is more restrictive.
public boolean setStiffnessRest(double stiffnessRest)
Set stiffnessRest
.
java.lang.IllegalArgumentException
- if this is not a 1-DoF jointpublic double getStiffnessRest()
stiffnessRest
public double getStiffnessPotential()
Get the current potential energy stored in this Joint's stiffness
, if any.
public double getStiffnessPotential(double mobilityDoF)
Impl of getStiffnessPotential()
.
mobilityDoF
- the value to use for the current state of the mobility
DoF of this joint, typically getSingleMobilityDoF()
isStiffnessSet()
or this is not a 1-DoF joint,
else 0.5*stiffness
*(d-stiffnessRest
)^2 where
d is the current mobility state of the Joint's DoFpublic double getGravityPotential()
Get the current potential energy stored by this joint due to gravity.
public double getGravityPotential(vona.math.RX mobilityRX)
Impl of getGravityPotential()
.
Default impl returns 0. See RootJoint.getGravityPotential(vona.math.RX)
.
mobilityRX
- the value to use for the current state of the mobility
of this joint, typically mobilityRX
public double getPotential(int which)
Get the indicated potential energy value.
which
- PG_STIFFNESS
, PG_GRAVITY
, or PG_POTENTIAL
to auto-select via getPotentialGoal()
public double getPotential()
getPotential(int)
but always auto-selectspublic boolean setDoF(int which, int[] dofIndex, int start, double... dof)
Set the Degree of Freedom values of the RX_TARGET
, RX_LOCK
, RX_POSTURE
, or RX_MOBILITY
RX
treated
as a packed translation and exponential map vector.
Clamping is performed on the modified transform if it is a goal
transform or if it is RX_MOBILITY
and this is a tree or
disconnected Joint.
Requests to unset RX_LOCK
are handled by deferring to setLocked(boolean)
.
Requests to set RX_LOCK
are only valid if currently locked.
In that case, the request is internally handled the same as RX_MOBILITY
for all but connected closure joints. Recall that lockRX
will automatically track mobilityRX
except for connected
closures.
dofIndex
- the indices to set, or null to set all DoF for the current
type
dof
- the new Degree of Freedom values in order and length
corresponding to dofIndex, or null to use the Joint.Type.dofIndex
of the current type
of this Joint, or null or empty to un-set a
goal. NaN elements are allowed to set a partial goal, but are not allowed
when setting mobility.java.lang.IllegalArgumentException
- if the length of dof is
insufficientjava.lang.IllegalArgumentException
- if which is RX_MOBILITY
and any of the source dof is NaNjava.lang.IllegalStateException
- if which is RX_LOCK
and
not isLocked()
public boolean setDoF(int which, int[] dofIndex, double... dof)
setDoF(int, int[], int, double...)
starting at 0public boolean setDoF(double... dof)
setDoF(int, int[], int, double...)
all Joint.Type.dofIndex
starting at 0 and setting RX_MOBILITY
.
public boolean setMobilityDoF(int[] dofIndex, int start, double... dof)
Impl of setDoF(int, int[], int, double...)
for setting RX_MOBILITY
.
public boolean setMobilityDoF(int[] dofIndex, double... dof)
setMobilityDoF(int[], int, double...)
starting at 0public boolean setMobilityDoF(int start, double... dof)
setMobilityDoF(int[], int, double...)
sets all DoFpublic boolean setMobilityDoF(double... dof)
setMobilityDoF(int[], int, double...)
all Joint.Type.dofIndex
starting at 0.
public boolean setSoftGoalDoF(int which, int[] dofIndex, boolean partial, boolean onlyIfDifferent, int start, double... dof)
Impl of setDoF(int, int[], int, double...)
and other APIs for
setting RX_TARGET
or RX_POSTURE
DoF.
dofIndex
- the TXEM indices to set, may be a subset of the current
type
Joint.Type.dofIndex
, or null to set all DoFpartial
- whether this is a partial goal. If so, previously set goal
components outside dofIndex are left set. If not, components
outside dofIndex are unset (NaN specified dof are always
unset).onlyIfDifferent
- whether to not set components that match the
current mobility (matching components that are already set will not be
unset)start
- the read start index in dofdof
- the values to set, if NaN then the corresponding goal component
is marked as not set and will track mobilityRX
public boolean setSoftGoalRX(int which, int[] dofIndex, boolean partial, boolean onlyIfDifferent, vona.math.RX rx, vona.math.RX compareUnsetComponentsTo)
Like setSoftGoalDoF(int, int[], boolean, boolean, int,
double...)
but reads source values from an RX
.
compareUnsetComponentsTo
- if non-null then comparisons supporting
onlyIfDifferent for goal components that are not curently set are
made against this transform, else they are made against the current value
of the mobility transformprotected boolean setSoftGoalRXOrDoF(int which, int[] dofIndex, boolean partial, boolean onlyIfDifferent, int start, java.lang.Object rxOrDoF, vona.math.RX compareUnsetComponentsTo)
public boolean setSoftGoalDoF(int which, int[] dofIndex, boolean partial, boolean onlyIfDifferent, double... dof)
setSoftGoalDoF(int, int[], boolean, boolean, int, double...)
starting at 0.
public boolean setSoftGoalDoF(int which, int[] dofIndex, double... dof)
setSoftGoalDoF(int, int[], boolean, boolean, int, double...)
partial but even if not different from current mobility, starting at
0.
public boolean setSoftGoalDoF(int which, double... dof)
setSoftGoalDoF(int, int[], boolean, boolean, int, double...)
all Joint.Type.dofIndex
even if not different from current mobility,
starting at 0.
public boolean setTranslation(double... dof)
Like setMobilityDoF(double...)
but only sets translation
components.
public boolean setRotation(double... dof)
Like setMobilityDoF(double...)
but only sets EM rotation
components.
public boolean setTarget(double... dof)
public boolean setPosture(double... dof)
public boolean setLock(double... dof)
public boolean setTargetTranslation(double... dof)
Like setDoF(int, int[], int, double...)
on RX_TARGET
but only sets translation components.
Currently set rotation components for this goal, if any, are not modified.
public boolean setTargetRotation(double... dof)
Like setDoF(int, int[], int, double...)
on RX_TARGET
but only sets EM rotation components.
Currently set translation components for this goal, if any, are not modified.
public boolean setPostureTranslation(double... dof)
Like setDoF(int, int[], int, double...)
on RX_POSTURE
but only sets translation components.
Currently set rotation components for this goal, if any, are not modified.
public boolean setPostureRotation(double... dof)
Like setDoF(int, int[], int, double...)
on RX_POSTURE
but only sets EM rotation components.
Currently set translation components for this goal, if any, are not modified.
public boolean setLockTranslation(double... dof)
Like setDoF(int, int[], int, double...)
on RX_LOCK
but only sets translation components.
Currently set rotation components for this goal, if any, are not modified.
public boolean setLockRotation(double... dof)
Like setDoF(int, int[], int, double...)
on RX_LOCK
but only sets EM rotation components.
Currently set translation components for this goal, if any, are not modified.
public double[] setUnsetGoalDoFtoNaN(int which, double[] dof)
Set all components of dof that correspond to unset DoF of goal which to NaN.
public double[] getDoF(int which, int[] dofIndex, int start, double[] dof, boolean getEMAliasInLimits)
Retrieve the current Degree of Freedom values of the packed translation and exponential map vector corresponding to a goal or to the mobility sub-transform.
Note that each TXEM component of each soft goal (RX_TARGET
and
RX_POSTURE
) can be independently set or unset. The numeric value
of unset components tracks the corresponding actual mobility DoF. See
setUnsetGoalDoFtoNaN(int, double[])
to have those components marked as NaN
instead.
which
- the sub-transform to read, must be a mobility space transform
(i.e. RX_MOBILITY
or a goal like RX_TARGET
)dofIndex
- the indices to get, or null to get all DoF for the current
type
start
- the write start index in dofdof
- the dof are written here on return, or a new array is consed if
nullgetEMAliasInLimits
- whether to ensure that the returned EM
components correspond to a (possibly non-canonical) alias of the requested
EM vector which falls within any defined limits. Currently only checks
the alias within radius 2PI of EM space origin. If
getEMAliasInLimits is false then the canonical EM vector is always
reutrned.public double[] getDoF(int which, int[] dofIndex, double[] dof)
getDoF(int, int[], int, double[], boolean)
with EM ailias in
limits.
public double[] getDoF(int which, int start, double[] dof)
getDoF(int, int[], int, double[], boolean)
with EM ailias in
limits.
public double[] getDoF(int which, double[] dof)
getDoF(int, int[], int, double[], boolean)
with EM ailias in
limits.
public double[] getDoF(int which)
getDoF(int, int[], int, double[], boolean)
with EM ailias in
limits.
public double[] getDoF()
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
with EM ailias in limits.
public double[] getMobility(int start, double[] dof, boolean getEMAliasInLimits)
public double[] getMobility(double[] dof)
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
, starting at 0, and always getting EM alias in limits.
public double[] getMobilityDoF()
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
, consing, and always getting EM alias in limits.
public double[] getRotation(int start, double[] dof)
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
with EM ailias in limits, rotation DoF only.
public double[] getRotation(double[] dof)
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
with EM ailias in limits, rotation DoF only.
public double[] getRotation()
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
with EM ailias in limits, rotation DoF only.
public double[] getTranslation(int start, double[] dof)
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
translation DoF only.
public double[] getTranslation(double[] dof)
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
translation DoF only.
public double[] getTranslation()
getDoF(int, int[], int, double[], boolean)
getting RX_MOBILITY
translation DoF only.
public vona.math.RX getSubFrameRX(java.lang.String frame, vona.math.RX rx, boolean clamped)
Impl of getSubFrameRX(String, RX)
.
clamped
- whether to use mobilityRXClamped
instead of
mobilityRX
if they differpublic vona.math.RX getSubFrameRX(java.lang.String frame, vona.math.RX rx)
Get the transform taking coordinates in a sub-frame to the canonical
(i.e. LinkageNode.cmt
) frame of this LinkageNode.
This impl extends superclass impl to handle the various Joint sub-frames.
getSubFrameRX
in class LinkageNode
frame
- the sub-frame or null to imply LinkageNode.SF_CANONICAL
rx
- the transform is written here on return, consing if nullpublic vona.math.RX getSubFrameRX(int subXForm, vona.math.RX rx)
Convenience cover of getSubFrameRX(String, RX)
using getParentSubFrame()
.
public vona.math.RX getSubFrameRX(int subXForm)
getSubFrameRX(int, RX)
, consespublic vona.math.RX getSubFrameCMT(java.lang.String frame, vona.math.RX rx, boolean clamped)
Convenience method appends LinkageNode.cmt
to getSubFrameRX(String, RX, boolean)
.
public vona.math.RX getSubFrameCMT(java.lang.String frame, vona.math.RX rx)
Convenience method appends LinkageNode.cmt
to LinkageNode.getSubFrameRX(String, RX)
.
This impl extends superclass impl to handle the various Joint sub-frames.
getSubFrameCMT
in class LinkageNode
public vona.math.RX getSubFrameCMT(int subXForm, vona.math.RX rx)
Convenience cover of getSubFrameCMT(String, RX)
using getParentSubFrameOf(int)
.
public vona.math.RX getSubFrameCMT(int subXForm)
getSubFrameCMT(int, RX)
, consespublic static java.lang.String getParentSubFrameOf(int subXForm)
Get the name of the sub-frame to which the sub-transform subXForm attaches.
public java.lang.String unAliasSubFrame(java.lang.String subFrame)
Dereference SF_MOBILITY_FROM
and SF_MOBILITY_TO
according to the current value of mobilityInverted
.
public vona.math.RX getJointRX(vona.math.RX rx)
jointRX
, consing if nullpublic vona.math.RX getJointRX()
getJointRX(RX)
, always consespublic vona.math.RX getJointRXRef()
jointRX
, do not mutatepublic boolean isIdentity()
RX.isIdentity()
on jointRX
public boolean isChildToMobilityIdentity()
RX.isIdentity()
on childToMobilityRX
public boolean isMobilityIdentity()
RX.isIdentity()
on mobilityRX
public boolean isMobilityInverted()
mobilityInverted
public boolean isMobilityToParentIdentity()
RX.isIdentity()
on mobilityToParentRX
public LinkageNode setLocked(boolean locked)
This impl sets the locked
state of this Joint.
setLocked
in class LinkageNode
public boolean isLocked()
This impl checks the locked
state of this Joint.
isLocked
in class LinkageNode
public boolean positioningTransformsMutable()
Check if RX_CHILD_TO_MOBILITY
and RX_MOBILITY_TO_PARENT
are mutable.
Default impl returns opposite of positioningTransformsLocked
.
public Joint setPositioningTransformsLocked(boolean lock)
Flag RX_CHILD_TO_MOBILITY
and RX_MOBILITY_TO_PARENT
as locked or unlocked.
public Joint lockPositioningTransforms()
public Joint unlockPositioningTransforms()
public Joint setSoftGoalWeight(double weight)
softGoalWeight
of this Jointpublic double getSoftGoalWeight()
softGoalWeight
of this Jointpublic Joint setSoftGoalPriority(float priority)
softGoalPriority
of this Jointpublic float getSoftGoalPriority()
softGoalPriority
of this Jointpublic int getSoftGoalSolveLevel()
softGoalSolveLevel
in its solver
public int getSupportSize()
public Link getBranchLink()
branchLink
of this Joint, if anypublic int getJacobianStartColumn()
Get this Joint's jacobianStartColumn
in its solver
,
if any, else negative.
public int getJacobianDoIStartRow()
Get this Joint's jacobianDoIStartRow
in its solver
,
if any, else negative.
public int getJacobianLimitStartRow()
Get this Joint's jacobianLimitStartRow
in its solver
,
if any, else negative.
public int getJacobianDoFStartRow()
Get this Joint's jacobianDoFStartRow
in its solver
,
if any, else negative.
public boolean isActuator()
solver
public boolean isEffector(int which)
Check if this Joint is an effector of the given type (RX_INVARIANT
, G_LIMIT
, RX_LOCK
, RX_TARGET
,
RX_POSTURE
, or PG_POTENTIAL
) in its solver
.
public boolean isEffector()
Check if this Joint is an effector of any type in its solver
.
public void resetSolveFields()
solver
and related fieldspublic Joint.Type setType(Joint.Type type)
Mutate the type
of this Joint.
Does nothing if the passed type is the same as the current type
.
Any current target, posture, stiffness, and user limit
s are
un-set, and the Joint is LinkageNode.unlock()
ed. mobilityInverted
is
cleared. The current mobilityRX
state is then clamped to the DoI
of the new type
iff this is a tree or disconnected Joint.
java.lang.IllegalArgumentException
- if type is nullprotected Joint.Type setTypeImpl(Joint.Type type)
Impl of setType(msim.model.Joint.Type)
, so that RootJoint
constr can set
initial type but still disable run-time type mutation.
public java.lang.String checkType(Joint.Type type)
Check if type is a valid type for this joint in its current connected configuration.
See Link.isConnectableToJointType(java.lang.String, msim.model.Joint.Type)
.
public Joint.Type getType()
Joint.Type
public java.lang.String getTypeName()
type
public static java.lang.String getSubRXName(int which)
public static java.lang.String getPotentialGoalName(int which)
public static boolean isLimitGoal(int which)
public static java.lang.String getLimitGoalName()
public static java.lang.String getGoalName(int which)
public int getNumDoF()
type
public int getNumDoI()
type
public int getNumTranslationDoF()
type
public int getNumRotationDoF()
type
public int[] getDoFIndices(int start, int[] indices)
type
public int[] getDoFIndices(int[] indices)
getDoFIndices(int, int[])
starting at 0public int[] getDoFIndices()
getDoFIndices(int, int[])
starting at 0 and consingpublic int[] getDoFIndicesRef()
Get a reference to the TXEM vector indices of the DoF in the current
type
.
protected int[] getIndices(int[] source, int writeStart, int[] dest)
Helper method to copy source to dest, consing if necessary.
public int[] getDoIIndices(int start, int[] indices)
getDoFIndices(int, int[])
but gets Degrees of Invariancepublic int[] getDoIIndices(int[] indices)
getDoIIndices(int, int[])
starting at 0public int[] getDoIIndices()
getDoIIndices(int, int[])
starting at 0 and consingpublic int[] getDoIIndicesRef()
getDoFIndicesRef()
but gets Degrees of Invariancepublic int[] getTranslationDoFIndices(int start, int[] indices)
getDoFIndices(int, int[])
but restricted to translationpublic int[] getTranslationDoFIndices(int[] indices)
getTranslationDoFIndices(int, int[])
starting at 0public int[] getTranslationDoFIndices()
getTranslationDoFIndices(int, int[])
starting at 0 and
consing.
public int[] getTranslationDoFIndicesRef()
getDoFIndicesRef()
but restricted to translationpublic int[] getTranslationDoIIndices(int start, int[] indices)
getDoIIndices(int, int[])
but restricted to translationpublic int[] getTranslationDoIIndices(int[] indices)
getTranslationDoIIndices(int, int[])
starting at 0public int[] getTranslationDoIIndices()
getTranslationDoIIndices(int, int[])
starting at 0 and
consing.
public int[] getTranslationDoIIndicesRef()
getDoIIndicesRef()
but restricted to translationpublic int[] getRotationDoFIndices(int start, int[] indices)
getDoFIndices(int, int[])
but restricted to rotationpublic int[] getRotationDoFIndices(int[] indices)
getRotationDoFIndices(int, int[])
starting at 0public int[] getRotationDoFIndices()
getRotationDoFIndices(int, int[])
starting at 0 and
consing.
public int[] getRotationDoFIndicesRef()
getDoFIndicesRef()
but restricted to rotationpublic int[] getRotationDoIIndices(int start, int[] indices)
getDoIIndices(int, int[])
but restricted to rotationpublic int[] getRotationDoIIndices(int[] indices)
getRotationDoIIndices(int, int[])
starting at 0public int[] getRotationDoIIndices()
getRotationDoIIndices(int, int[])
starting at 0 and
consing.
public int[] getRotationDoIIndicesRef()
getDoIIndicesRef()
but restricted to rotationprotected java.lang.String[] getNames(java.lang.String[] source, int writeStart, java.lang.String[] dest)
getIndices(int[], int, int[])
but gets TXEM component namespublic java.lang.String[] getDoFNames(int start, java.lang.String[] names)
getDoFIndices(int, int[])
but gets TXEM component namespublic java.lang.String[] getDoFNames(java.lang.String[] names)
getDoFNames(int, String[])
starting at 0public java.lang.String[] getDoFNames()
getDoFNames(int, String[])
starting at 0 and consingpublic java.lang.String[] getDoINames(int start, java.lang.String[] names)
getDoIIndices(int, int[])
but gets TXEM component namespublic java.lang.String[] getDoINames(java.lang.String[] names)
getDoINames(int, String[])
starting at 0public java.lang.String[] getDoINames()
getDoINames(int, String[])
starting at 0 and consingpublic java.lang.String[] getTranslationDoFNames(int start, java.lang.String[] names)
getTranslationDoFIndices(int, int[])
but gets TXEM component namespublic java.lang.String[] getTranslationDoFNames(java.lang.String[] names)
getTranslationDoFNames(int, String[])
starting at 0public java.lang.String[] getTranslationDoFNames()
getTranslationDoFNames(int, String[])
starting at 0 and
consing
public java.lang.String[] getTranslationDoINames(int start, java.lang.String[] names)
getTranslationDoIIndices(int, int[])
but gets TXEM component namespublic java.lang.String[] getTranslationDoINames(java.lang.String[] names)
getTranslationDoINames(int, String[])
starting at 0public java.lang.String[] getTranslationDoINames()
getTranslationDoINames(int, String[])
starting at 0 and
consing
public java.lang.String[] getRotationDoFNames(int start, java.lang.String[] names)
getRotationDoFIndices(int, int[])
but gets TXEM component namespublic java.lang.String[] getRotationDoFNames(java.lang.String[] names)
getRotationDoFNames(int, String[])
starting at 0public java.lang.String[] getRotationDoFNames()
getRotationDoFNames(int, String[])
starting at 0 and
consing
public java.lang.String[] getRotationDoINames(int start, java.lang.String[] names)
getRotationDoIIndices(int, int[])
but gets TXEM component namespublic java.lang.String[] getRotationDoINames(java.lang.String[] names)
getRotationDoINames(int, String[])
starting at 0public java.lang.String[] getRotationDoINames()
getRotationDoINames(int, String[])
starting at 0 and
consing
public void dumpSubJacobian(Joint other, java.io.PrintStream s)
Solver.dumpSubJacobian(Joint, Joint, PrintStream)
that relates this Joint, whether it's an actuator or an effector, to
other in solver
, if any.
public void dumpSubJacobian(Joint other)
dumpSubJacobian(Joint, PrintStream)
to System.outpublic void dumpSolverInfo(java.io.PrintStream s)
Describing the role of this Joint in its solver
, if any.
public void dumpSolverInfo()
dumpSolverInfo(PrintStream)
to System.outpublic void dumpSupport(java.io.PrintStream s)
support
of this Jointpublic void dumpSupport()
dumpSupport(PrintStream)
to System.outpublic void dumpState(java.io.PrintStream s)
public void dumpState()
dumpState(PrintStream)
to System.outpublic void dumpSubRXState(java.io.PrintStream s, int which)
public void dumpSubRXState(int which)
dumpSubRXState(PrintStream, int)
to System.outpublic void dump(java.io.PrintStream s)
dump
in class LinkageNode
protected void dumpTree(java.lang.String prefix, java.io.PrintStream s)
LinkageNode.dumpTree(PrintStream)
This impl overrides generic impl to note if a joint isIdentity()
.
dumpTree
in class LinkageNode
public double[] getResidual(int which, Joint.ResidualType type, int start, double[] residual)
Compute a differential vector which will satisfy the specified goal when added to the current state of that goal.
Residuals can be requested even for goal components that are not currently set; in that case the corresponding residual components will be zero.
which
- RX_INVARIANT
, RX_LOCK
, RX_TARGET
,
RX_POSTURE
, PG_POTENTIAL
, PG_STIFFNESS
,
PG_GRAVITY
, or G_LIMIT
start
- write start index in residualresidual
- the destination vector, cons if nullpublic double[] getResidual(int which, Joint.ResidualType type, double[] residual)
Covers getResidual(int, ResidualType, int, double[])
, starts
at 0.
public double[] getResidual(int which, Joint.ResidualType type)
Covers getResidual(int, ResidualType, int, double[])
, starts
at 0 and conses.
public double getLimitExcess(int index)
Get the signed amount by which a particular DoF exceeds its current limits, if any.
The limit excess for a DoF component whose current value is c is
public double[] getLimitExcess(vona.math.RX mobilityRX, int[] indices, int start, double[] excess)
Generalizes getLimitExcess(int)
to get a vector of
excesses.
mobilityRX
- the RX
to use as if it were the mobilityRX
of this Joint, or null to use the Joint's actual mobilityRX
indices
- the DoF indices for which to compute the excesses, or null
to use setLimitComponents
start
- the write start index in excessexcess
- the computed excess is written here, or a new array is
consed if nullpublic double[] getLimitExcess(vona.math.RX mobilityRX, int start, double[] excess)
Covers getLimitExcess(RX, int[], int, double[])
, uses setLimitComponents
.
public double[] getLimitExcess(int start, double[] excess)
Covers getLimitExcess(RX, int[], int, double[])
, uses setLimitComponents
and mobilityRX
.
public double[] getLimitExcess(double[] excess)
Covers getLimitExcess(RX, int[], int, double[])
, uses setLimitComponents
and mobilityRX
, starts writing at index
0.
public double[] getLimitExcess()
Covers getLimitExcess(RX, int[], int, double[])
, uses setLimitComponents
and mobilityRX
, starts writing at index
0 and conses.
public double[] getLimitPenalty(vona.math.RX mobilityRX, int[] indices, int start, double[] penalty)
Impl of getResidual(int, ResidualType, int, double[])
for
G_LIMIT
.
The limit penalty for a DoF component with limit excess (see getLimitExcess(int)
) e is e^LIMIT_PENALTY_DEGREE
.
Note that the penalty has the opposite sign as the residual.
mobilityRX
- the RX
to use as if it were the mobilityRX
of this Joint, or null to use the Joint's actual mobilityRX
indices
- the DoF indices for which to compute the penalty, or null
to use setLimitComponents
start
- the write start index in penaltypenalty
- the computed penalty is written here, or a new array is
consed if nullpublic double[] getLimitPenalty(vona.math.RX mobilityRX, int start, double[] penalty)
Covers getLimitPenalty(RX, int[], int, double[])
, uses setLimitComponents
.
public double[] getLimitPenalty(int start, double[] penalty)
Covers getLimitPenalty(RX, int[], int, double[])
, uses setLimitComponents
and mobilityRX
.
public double[] getLimitPenalty(double[] penalty)
Covers getLimitPenalty(RX, int[], int, double[])
, uses setLimitComponents
and mobilityRX
, starts writing at index
0.
public double[] getLimitPenalty()
Covers getLimitPenalty(RX, int[], int, double[])
, uses setLimitComponents
and mobilityRX
, starts writing at index
0 and conses.
public boolean isTranslationDoF(int component)
Check if a given translation vector component is a Degree of Freedom
according to the current Joint type
.
component
- RX.X
, RX.Y
, or RX.Z
public boolean isTranslationDoI(int component)
Check if a given translation vector component is a Degree of Invariance
according to the current Joint type
.
component
- RX.X
, RX.Y
, or RX.Z
public boolean isRotationDoF(int component)
isTranslationDoF(int)
public boolean isRotationDoI(int component)
isTranslationDoI(int)
public boolean setTranslationLimits(int component, double min, double max)
Set or un-set the upper and lower limits for one component of the mobility translation vector.
The limits must be either both set or unset.
The current goal transforms, if set, are clamped to the new limits, if any. The mobility transform is also clamped iff this is a tree or disconnected Joint.
component
- RX.X
, RX.Y
, or RX.Z
min
- the new lower limit, or NaN to unsetmax
- the new upper limit, or NaN to unsetjava.lang.IllegalArgumentException
- if component is not a
translation DoF, if one of min or max is NaN but not the
other, or if min>maxpublic boolean setAllTranslationLimits(double... limits)
limits
- an array of limits in order (lower, upper) for each
translation DoF, in orderpublic Joint unsetTranslationLimits(int component)
setTranslationLimits(int, double, double)
, always un-setspublic Joint unsetAllTranslationLimits()
unsetTranslationLimits(int)
all translation DoFpublic boolean setRotationLimits(int component, double min, double max)
Similar to setTranslationLimits(int, double, double)
.
java.lang.IllegalArgumentException
- if the specified new limits would
extend the EM space limit box beyond the sphere of radius 2pi centered at
EM space origin. The limits are not modified in this case.public boolean setAllRotationLimits(double... limits)
setAllTranslationLimits(double...)
public Joint unsetRotationLimits(int component)
unsetTranslationLimits(int)
public Joint unsetAllRotationLimits()
unsetAllTranslationLimits()
public boolean setAllDoFLimits(double... limits)
setAllTranslationLimits(double...)
public Joint unsetAllDoFLimits()
unsetAllTranslationLimits()
public boolean isTranslationLimited(int component)
Check if one component of the mobility translation vector currently has limits set.
component
- RX.X
, RX.Y
, or RX.Z
public boolean isRotationLimited(int component)
isTranslationLimited(int)
public boolean isLimited()
public boolean isDoFLimited()
Check whether any of the DoF of this joint are limited.
This differs from isLimited()
because it doesn't count DoI.
public boolean inDoFLimits(double tol)
Check if the current mobility transform is actually within the limit
s.
public boolean inDoFLimits()
inDoFLimits(double)
, no tolpublic double getTranslationLimit(int component, int which)
public double[] getAllTranslationLimits()
Get the upper and lower limits for all translation DoF.
public double getRotationLimit(int component, int which)
getTranslationLimit(int, int)
public double[] getAllRotationLimits()
getAllTranslationLimits()
public double[] getDoFLimits(int which, int start, double[] values)
which
- LOWER
or UPPER
values
- the Joint.Type.numDoF
limit values are returned here
starting at index start in packed order corresponding to the Joint.Type.dofIndex
of the current Joint type
; NaN signifies the limit
is not set. A new array is consed if null.public double[] getDoFLimits(int which, double[] values)
Covers getDoFLimits(int, int, double[])
, starts at 0.
public double[] getDoFLimits(int which)
Covers getDoFLimits(int, int, double[])
, starts at 0, always
conses.
public double[] getAllDoFLimits()
Get the upper and lower limits for all DoF.
public double[] getInvariants(int start, double[] values)
Get the values of the Degrees of Invariance of the current Joint type
.
Always returns six values. DoF are returned as NaN.
values
- the Joint.Type.numDoI
invariant values are returned here
starting at index start in packed order corresponding to the Joint.Type.doiIndex
of the current Joint type
. A new array is consed
if null.public double[] getInvariants(double[] values)
Covers getInvariants(int, double[])
, starts at 0.
public double[] getInvariants()
Covers getInvariants(int, double[])
, starts at 0 and
conses.
public double getInvariant(int index)
Get the invariant value of a TXEM component, NaN if not an invariant.
public double[] getPackedInvariantsRef()
Get the values of the Degrees of Invariance of the current Joint type
, eliding DoF.
Always returns getNumDoI()
values.
public double getLimit(int component, int offset, int which)
Common impl of getTranslationLimit(int, int)
and getRotationLimit(int, int)
.
public double[] getLimits(int which, int start, double[] ret)
public double[] getLimits(int which, double[] ret)
getLimits(int, int, double[])
, starts at 0public double[] getLimits(int which)
getLimits(int, int, double[])
, conses and starts at 0public boolean isDoF(int component, int offset)
Common impl of isTranslationDoF(int)
and isRotationDoF(int)
.
public boolean isDoF(int component)
public boolean isDoI(int component, int offset)
Common impl of isTranslationDoI(int)
and isRotationDoI(int)
.
public boolean isDoI(int component)
public boolean isLimited(int component, int offset)
Common impl of isTranslationLimited(int)
and isRotationLimited(int)
.
public boolean isLimited(int component)
protected boolean setLimits(int component, int offset, java.lang.String name, double min, double max)
Common impl of setTranslationLimits(int, double, double)
and setRotationLimits(int, double, double)
.
public java.lang.String toString(boolean details, boolean connections)
public java.lang.String toString(boolean details)
toString(boolean, boolean)
, always shows connectionstoString
in class LinkageNode
protected boolean handleMobilityChange(boolean overwriteIfClamped)
Hook called whenever mobilityRX
or the mobility space
has changed.
Clamps mobilityRX
to the current limit
s, putting the
result in mobilityRXClamped
, and also back into mobilityRX
iff overwriteIfClamped. Then updateGoalFromMobility(int)
all goals and invalidate cached state that
depends on the mobility space.
overwriteIfClamped
- whether to actually update mobilityRX
;
if not then only mobilityRXClamped
is setmobilityRX
protected boolean handleMobilityChange()
handleMobilityChange(boolean)
and clamp mobilityRX
iff isTreeJoint()
or not isConnected()
.
protected boolean updateGoalFromMobility(int which)
Update any un-set TXEM components of goal which from mobilityRX
and clamp it to current limit
s.
protected java.lang.String getNodeWidgetProperty()
Return the Widget
property name that indicates an internal
(i.e. non-user) Widget.
This impl returns WP_JOINT
.
getNodeWidgetProperty
in class LinkageNode
protected void updateWidgetsImpl()
Hook for lazy LinkageNode.widgetMap
update.
Default impl updates all widgets to current LinkageNode.widgetLength
, sets
their EntityClass.WP_ENTITY_CLASS
, and updates existing dbg
geometry iff enabled.
This impl takes one of two actions depending on whether the current set
of LinkageNode.nodeWidgets
is empty. If so, it adds the widgets appropriate
for the current joint type (note that the implementation of setType(msim.model.Joint.Type)
will clear LinkageNode.nodeWidgets
whenever the type is mutated).
Otherwise, the widgets in the current set of LinkageNode.nodeWidgets
are
updated. Finally, this impl chains to superclass impl.
updateWidgetsImpl
in class LinkageNode
protected vona.j3d.AxesWidget addAxesWidget(java.lang.String name, java.lang.String frame)
Adds an AxesWidget
with AXES_RADIUS_FACTOR
radius
in indicated frame.
protected void updateAxesWidget(java.lang.String name, java.lang.String frame)
Retrieves the named AxesWidget
and calls updateAxesWidget(AxesWidget, String)
.
protected void updateAxesWidget(vona.j3d.AxesWidget w, java.lang.String frame)
Enables or disables the axes depending on whether the corresponding
transform is identity, whether the Joint is connected, and if so whether
it is attached to a Link
subframe. If enabled, the Widget
RX is updated to the current widget frame transform for frame.
protected vona.j3d.RouteWidget addRouteWidgets(java.lang.String name, java.lang.String frame, int rx)
Adds route widgets for the indicated sub-transform.
protected void updateRouteWidgets(java.lang.String name, java.lang.String frame, int rx)
Retrieves the named route widgets and calls updateRouteWidgets(RouteWidget, ConeWidget, String, int)
.
protected void updateRouteWidgets(vona.j3d.RouteWidget rw, vona.j3d.ConeWidget cw, java.lang.String frame, int rx)
Enables or disables the route widgets, and updates their geometry. If
enabled, the Widget
RX are updated to the current widget frame
transform for frame.
protected vona.j3d.CylinderWidget addCylinderWidget()
Adds a CylinderWidget
with WIDGET_RADIUS_FACTOR
radius
symmetric about a line parallel to the parent mobility z axis but through
the origin of SF_MOBILITY_FROM
.
If the z axis is as a translation DoF for the current joint type then
the cylinder height and edge pattern track the mobility transform similar
to the description in addPrismWidgets(int, float, float)
. Otherwise the cylinder
height is given by CYLINDER_HEIGHT_FACTOR
.
protected void updateCylinderWidget()
Retrieves WN_JOINT_CYLINDER
and calls updateCylinderWidget(CylinderWidget)
.
protected void updateCylinderWidget(vona.j3d.CylinderWidget w)
Sets the extents of w along the z axis, and the edge pattern of
w depending on the current z translation limits, if any. See
addCylinderWidget()
for details.
protected vona.j3d.SectorWidget addSectorWidgets(float alpha)
Adds a SectorWidget
in the XY plane of SF_MOBILITY_TO
centered on a line parallel to the Z axis but through the origin of SF_MOBILITY_FROM
, with inner radius SECTOR_OFFSET_FACTOR
and
width SECTOR_WIDTH_FACTOR
.
The Z axis must be a rotation DoF.
A second SectorWidget
is also added with the same geometry but
showing only its end edges. This gives independent control of the end
edge pattern.
If limits are set for Z rotation then the sector ends are aligned with those limits and are solid. Otherwise the ends endcaps track the mobility rotation and are broken.
protected void updateSectorWidgets()
Retrieves WN_JOINT_SECTOR
and WN_JOINT_SECTOR_ENDS
and calls updateSectorWidgets(SectorWidget, SectorWidget)
.
protected void updateSectorWidgets(vona.j3d.SectorWidget w, vona.j3d.SectorWidget ew)
Sets the lengths and angles of w and ew, their
translation in SF_MOBILITY_TO
, and the edge pattern of ew
depending on the current Z axis rotation limits, if any. See addSectorWidgets(float)
for details.
protected vona.j3d.SegmentWidget addSegmentWidget(int axis, float offsetFactor)
Adds a Joint.SliderSegmentWidget
on the indicated axis of
SF_MOBILITY_FROM
, starting at offsetFactor and ending at
(offsetFactor+SEGMENT_LENGTH_FACTOR
).
protected void updateSegmentWidget()
Retrieves WN_JOINT_SEGMENT
and calls updateSliderWidget(vona.j3d.EdgedFacetedWidget)
.
protected void updateSliderWidget(vona.j3d.EdgedFacetedWidget w)
locked
protected void updateSliderWidget(vona.j3d.CurveWidget w)
locked
protected vona.j3d.PrismWidget addPrismWidgets(int axis, float alpha, float extraMargin)
Adds a PrismWidget
with a square WIDGET_WIDTH_FACTOR
profile symmetric about axis in SF_MOBILITY_TO
.
A second PrismWidget
is also added with the same geometry but
showing only its (radial) endcap edges. This gives independent control of
the endcap edge pattern.
This can only be called for joints whose type defines axis as a translation DoF. If limits are set for this DoF then the prism endcaps are aligned with those limits and have solid edges. Otherwise the prism endcaps track the mobility translation in axis and have broken edges.
protected void updatePrismWidgets(int axis, float extraMargin)
Retrieves WN_JOINT_PRISM
and WN_JOINT_PRISM_ENDS
and
calls updatePrismWidgets(PrismWidget, PrismWidget, int,
float)
.
protected void updatePrismWidgets(vona.j3d.PrismWidget w, vona.j3d.PrismWidget cw, int axis, float extraMargin)
Sets the extents of w and cw along axis, and the
edge pattern of cw depending on the current limits for axis,
if any. See addPrismWidgets(int, float, float)
for details.
protected vona.j3d.RectangleWidget addSquareWidget()
Adds a RectangleWidget
with WIDGET_WIDTH_FACTOR
width
and height in the XY plane, axis aligned, symmetric about the Z axis in
SF_MOBILITY_FROM
.
protected void updateSquareWidget()
Retrieves WN_JOINT_SQUARE
and calls updateSliderWidget(vona.j3d.EdgedFacetedWidget)
.
protected vona.j3d.CircleWidget addCircleWidget()
Adds a CircleWidget
with WIDGET_RADIUS_FACTOR
radius
in the XY plane, symmetric about the Z axis in SF_MOBILITY_FROM
.
protected void updateCircleWidget()
Retrieves WN_JOINT_CIRCLE
and calls updateSliderWidget(vona.j3d.EdgedFacetedWidget)
.
protected vona.j3d.SphereWidget addSphereWidget()
Adds a SphereWidget
with WIDGET_RADIUS_FACTOR
radius
at the origin in SF_MOBILITY_FROM
.
protected void updateSphereWidget()
Retrieves WN_JOINT_SPHERE
and calls updateSphereWidget()
.
protected void updateSphereWidget(vona.j3d.SphereWidget w)
protected vona.j3d.RectangleWidget addRectangleWidgets(float extraMargin)
Adds a RectangleWidget
in the XY plane in SF_MOBILITY_TO
.
A second RectangleWidget
is also added with the same geometry
but showing only its Y-axis edges. This gives independent control of the
X and Y axis edge patterns.
This can only be called for joints whose type defines the X and Y axes as translation DoF. If limits are set for either DoF then the corresponding edges are aligned with those limits and are solid. Otherwise the edges the mobility translation in each axis, and are broken.
protected void updateRectangleWidgets(float extraMargin)
Retrieves WN_JOINT_RECTANGLE
and WN_JOINT_RECTANGLE_Y_EDGES
and calls updateRectangleWidgets(RectangleWidget, RectangleWidget, float)
.
protected void updateRectangleWidgets(vona.j3d.RectangleWidget w, vona.j3d.RectangleWidget yw, float extraMargin)
Sets the extents of w and yw, and the edge patterns
depending on the current limits for the X and Y axes, if any. See addRectangleWidgets(float)
for details.
public boolean hasSubFrame(java.lang.String frame)
Check if the named subframe is present.
Default impl just checks for LinkageNode.SF_CANONICAL
.
This impl checks all joint subframes.
hasSubFrame
in class LinkageNode
public void dumpSubFrames(java.io.PrintStream s)
Dump all available subframes.
Default impl just dumps LinkageNode.SF_CANONICAL
.
This impl adds all joint subframes.
dumpSubFrames
in class LinkageNode
public boolean isInternalFrame(java.lang.String frame)
Check if frame is an internal (i.e. non-user) subframe.
Default impl checks LinkageNode.SF_CANONICAL
.
This impl extends superclass to also check JOINT_SUBFRAMES
.
isInternalFrame
in class LinkageNode