TrackFlow Pro Documentation 1
Generate roller coasters, railroads, conveyors and more with a physics aware spline and meshing system.
Loading...
Searching...
No Matches
TrackFlowPro.Editor.TrackFlowScreenPickUtil Class Reference

Shared, lightweight SceneView picking helpers for TrackFlowSpline polylines. Screen-space nearest-sample selection. Quiet failure if polylines are not available. More...

Classes

struct  SnapResult

Public Types

enum  SnapKind {
  None , Knot , Segment , Collider ,
  ViewPlane
}

Static Public Member Functions

static bool TryPickNearestPolylineSample (TrackFlowSpline spline, Vector2 mouseGui, float pixelRadius, out int sampleIndex, out Vector3 samplePosWorld, out float pixelDistSqr)
 Pick nearest polyline sample (spline.CurrentPolyline.P) to mouse GUI position. Returns false if no polyline or nearest is outside pixelRadius.
static bool TrySnapToKnot (Ray ray, TrackFlowSpline spline, bool isActive, out SnapResult snap)

Static Public Attributes

const float DefaultPixelRadius = 18f

Static Private Member Functions

static float DistancePointToRaySq (Vector3 p, Ray ray)

Static Private Attributes

static float s_KnotSnapScoreMax = 0.16f

Detailed Description

Shared, lightweight SceneView picking helpers for TrackFlowSpline polylines. Screen-space nearest-sample selection. Quiet failure if polylines are not available.

Member Enumeration Documentation

◆ SnapKind

Enumerator
None 
Knot 
Segment 
Collider 
ViewPlane 

Member Function Documentation

◆ DistancePointToRaySq()

float TrackFlowPro.Editor.TrackFlowScreenPickUtil.DistancePointToRaySq ( Vector3 p,
Ray ray )
staticprivate

◆ TryPickNearestPolylineSample()

bool TrackFlowPro.Editor.TrackFlowScreenPickUtil.TryPickNearestPolylineSample ( TrackFlowSpline spline,
Vector2 mouseGui,
float pixelRadius,
out int sampleIndex,
out Vector3 samplePosWorld,
out float pixelDistSqr )
static

Pick nearest polyline sample (spline.CurrentPolyline.P) to mouse GUI position. Returns false if no polyline or nearest is outside pixelRadius.

◆ TrySnapToKnot()

bool TrackFlowPro.Editor.TrackFlowScreenPickUtil.TrySnapToKnot ( Ray ray,
TrackFlowSpline spline,
bool isActive,
out SnapResult snap )
static

Member Data Documentation

◆ DefaultPixelRadius

const float TrackFlowPro.Editor.TrackFlowScreenPickUtil.DefaultPixelRadius = 18f
static

◆ s_KnotSnapScoreMax

float TrackFlowPro.Editor.TrackFlowScreenPickUtil.s_KnotSnapScoreMax = 0.16f
staticprivate

The documentation for this class was generated from the following file: