Skip to content

Commit

Permalink
Merge branch 'release/0.0.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Bertrand committed Nov 9, 2018
2 parents 62e63e0 + 3fa7ffa commit 0b93a22
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apply plugin: "us.ihmc.ihmc-build"

ihmc {
group = "us.ihmc"
version = "0.0.9"
version = "0.0.10"
vcsUrl = "https://github.com/ihmcrobotics/mecano"
openSource = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,12 @@ default List<? extends JointBasics> subtreeList()
return subtreeStream().collect(Collectors.toList());
}

@Override
default JointBasics[] subtreeArray()
{
return subtreeStream().toArray(JointBasics[]::new);
}

/**
* Updates {@code afterJointFrame} of this joint to take into consideration the new joint
* configuration. Then calls {@link RigidBody#updateFramesRecursively()} which in its turn updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,6 @@ default void getJointOffset(RigidBodyTransform jointOffsetTransformToPack)
* <p>
* This method generates garbage.
* </p>
* <p>
* A subtree is defined by a start joint and is the set of all the joint for which the start
* joint is an ancestor.
* </p>
*
* @return the new subtree iterable.
* @see JointIterable
Expand All @@ -399,6 +395,9 @@ default Iterable<? extends JointReadOnly> subtreeIterable()
* A subtree is defined by a start joint and is the set of all the joint for which the start
* joint is an ancestor.
* </p>
* <p>
* This method generates garbage.
* </p>
*
* @return the new subtree stream.
* @see SubtreeStreams
Expand All @@ -415,6 +414,9 @@ default Stream<? extends JointReadOnly> subtreeStream()
* A subtree is defined by a start joint and is the set of all the joint for which the start
* joint is an ancestor.
* </p>
* <p>
* This method generates garbage.
* </p>
*
* @return the new subtree list.
*/
Expand All @@ -423,6 +425,24 @@ default List<? extends JointReadOnly> subtreeList()
return subtreeStream().collect(Collectors.toList());
}

/**
* Gets an array that contains all the joints, including {@code this}, of the subtree that starts at
* this joint.
* <p>
* A subtree is defined by a start joint and is the set of all the joint for which the start joint
* is an ancestor.
* </p>
* <p>
* This method generates garbage.
* </p>
*
* @return the new subtree array.
*/
default JointReadOnly[] subtreeArray()
{
return subtreeStream().toArray(JointReadOnly[]::new);
}

/**
* Returns the reference to the name of this joint.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,10 @@ default List<? extends RigidBodyBasics> subtreeList()
{
return subtreeStream().collect(Collectors.toList());
}

@Override
default RigidBodyBasics[] subtreeArray()
{
return subtreeStream().toArray(RigidBodyBasics[]::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ default void getCenterOfMass(FramePoint3DBasics centerOfMassToPack)
* Gets a new iterable to iterate through all the rigid-bodies, including {@code this}, of the
* subtree that starts at this rigid-body.
* <p>
* This method generates garbage.
* </p>
* <p>
* A subtree is defined by a start rigid-body and is the set of all the rigid-body for which the
* start rigid-body is an ancestor.
* </p>
* <p>
* This method generates garbage.
* </p>
*
* @return the new subtree iterable.
* @see RigidBodyIterable
Expand Down Expand Up @@ -163,6 +163,9 @@ default Iterable<? extends JointReadOnly> childrenSubtreeIterable()
* A subtree is defined by a start rigid-body and is the set of all the rigid-body for which the
* start rigid-body is an ancestor.
* </p>
* <p>
* This method generates garbage.
* </p>
*
* @return the new subtree stream.
* @see SubtreeStreams
Expand All @@ -179,6 +182,9 @@ default Stream<? extends RigidBodyReadOnly> subtreeStream()
* A subtree is defined by a start rigid-body and is the set of all the rigid-body for which the
* start rigid-body is an ancestor.
* </p>
* <p>
* This method generates garbage.
* </p>
*
* @return the new subtree list.
*/
Expand All @@ -187,6 +193,24 @@ default List<? extends RigidBodyReadOnly> subtreeList()
return subtreeStream().collect(Collectors.toList());
}

/**
* Gets an array that contains all the rigid-bodies, including {@code this}, of the subtree that
* starts at this rigid-body.
* <p>
* A subtree is defined by a start rigid-body and is the set of all the rigid-body for which the
* start rigid-body is an ancestor.
* </p>
* <p>
* This method generates garbage.
* </p>
*
* @return the new subtree array.
*/
default RigidBodyReadOnly[] subtreeArray()
{
return subtreeStream().toArray(RigidBodyReadOnly[]::new);
}

/**
* Gets the string that is used to identify this rigid-body.
* <p>
Expand Down

0 comments on commit 0b93a22

Please sign in to comment.