Skip to content

Commit

Permalink
fixup! SceneGadget : Add normalAt` method
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmehl committed Mar 5, 2024
1 parent 2f459dd commit 009cb96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GafferSceneUI/SceneGadget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,8 @@ std::optional<V3f> SceneGadget::normalAt( const IECore::LineSegment3f &lineInGad
// incorrect. We know that the incoming `lineInGadgetSpace` has been calculated from
// an integeer pixel value so we snap to the nearest integer as a corrective.
V2f centerRasterP = viewportGadget->gadgetToRasterSpace( lineInGadgetSpace.p0, this );
centerRasterP.x = (float)( (int)centerRasterP.x + 0.5 );
centerRasterP.y = (float)( (int)centerRasterP.y + 0.5 );
centerRasterP.x = (int)centerRasterP.x + 0.5f;
centerRasterP.y = (int)centerRasterP.y + 0.5f;

if( objectAt( viewportGadget->rasterToGadgetSpace( centerRasterP, this ), centerPath, centerP ) )
{
Expand Down

0 comments on commit 009cb96

Please sign in to comment.