Skip to main content

Function: getClosestBlockingVertex()

getClosestBlockingVertex(ndx, vtx, warps, wefts, vtx_list, cns, verbose): number

Defined in: simulation/simulation.ts:1834

given the x position of an ACN, this function returns the closest ACN on a blocking float for this ACN. It returns only the X distance of the closest ACN. a value of 0 means the acns are directly above one another, and should stack. A value close to one, is a strong repel. a larger value means that the ACNs are separated by some other distance. At a later date, we make this consider x and y, in the case when the y values between vary.

Parameters​

ndx​

CNIndex

vtx​

Vec3

warps​

number

wefts​

number

vtx_list​

YarnVertex[]

cns​

ContactNeighborhood[]

verbose​

boolean

Returns​

number

the distance between the ACNS as it would be rendered in pixels