Skip to content

Capsule: "lineLineMinimumPoints" function returns global temp variables, does not use Capsule fields #26923

@gkjohnson

Description

@gkjohnson

Description

I was looking through the example Capsule file and saw that the "lineLineMinimumPoints" function does not use any of the local "Capsule" members. It also returns the global temp _v1 and _v2 variables to the caller instead of taking target variables instead of making clones. It seems it's only used in the Octree file for triangle / capsule intersections and only ever takes a line representing the capsule as the first argument.

I'd fix and rename the function to something more clear but it's not clear to me exactly what it's supposed to do. Is the function just returning the closest point between the two line segments? Does it belong in the LineSegment class? Do we know where the original implementation is referenced from?

Solution

  • rename function
  • adjust function signature to return boolean, take target variables
  • add comments for original reference function implementation

Alternatives

None

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions