Skip to content

Commit

Permalink
Fix point force arrow length not being scaled by scene scale factor (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Aug 28, 2024
1 parent d617e76 commit a0e9c85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/OpenSimCreator/Graphics/OpenSimDecorationGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ namespace
const SimTK::Vec3 forceInGround = forceExpressionFrame.findStationLocationInGround(rs.getState(), forceInForceExpressionFrame);

const ArrowProperties arrowProperties = {
.start = ToVec3((rs.getFixupScaleFactor() * c_ForceArrowLengthScale * forceInGround) - pointInGround),
.end = ToVec3(pointInGround),
.start = ToVec3(pointInGround),
.end = ToVec3(pointInGround + (rs.getFixupScaleFactor() * c_ForceArrowLengthScale * forceInGround)),
.tip_length = 0.015f * rs.getFixupScaleFactor(),
.neck_thickness = 0.006f * rs.getFixupScaleFactor(),
.head_thickness = 0.01f * rs.getFixupScaleFactor(),
Expand All @@ -473,8 +473,8 @@ namespace
const SimTK::Vec3 torqueInGround = forceExpressionFrame.findStationLocationInGround(rs.getState(), torqueInTorqueExpressionFrame);

const ArrowProperties arrowProperties = {
.start = ToVec3((rs.getFixupScaleFactor() * c_TorqueArrowLengthScale * torqueInGround) - pointInGround),
.end = ToVec3(pointInGround),
.start = ToVec3(pointInGround),
.end = ToVec3(pointInGround + (rs.getFixupScaleFactor() * c_TorqueArrowLengthScale * torqueInGround)),
.tip_length = 0.015f * rs.getFixupScaleFactor(),
.neck_thickness = 0.006f * rs.getFixupScaleFactor(),
.head_thickness = 0.01f * rs.getFixupScaleFactor(),
Expand Down Expand Up @@ -530,7 +530,7 @@ namespace

const ArrowProperties arrowProperties = {
.start = ToVec3(pointInGround),
.end = ToVec3(pointInGround + arrowLength*directionInGround),
.end = ToVec3(pointInGround + (rs.getFixupScaleFactor() * arrowLength * directionInGround)),
.tip_length = 0.015f * rs.getFixupScaleFactor(),
.neck_thickness = 0.006f * rs.getFixupScaleFactor(),
.head_thickness = 0.01f * rs.getFixupScaleFactor(),
Expand Down

0 comments on commit a0e9c85

Please sign in to comment.