sghr / iGeo

iGeo: Computational Design and 3D Modeling Library for Processing

Home Page:http://igeo.jp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Field strength of IAttractor is always zero

sketch34 opened this issue · comments

How to I access the field strength of an IAttractorField? Using the get() method doesn't seem to work. It is zero strength at every point.

import processing.opengl.;
import igeo.
;

IAttractor attr = null;
void setup()
{
size(480, 360, IG.GL);
attr = new IAttractor(0,0,0, 20.f).noDecay();
IVecI f = attr.get(new IVec(20, 30, 40));
println(f);
}

Output:
(0.0,0.0,0.0)

The previous update was having a new bug around point-based fields making all force outputs zero. I fixed it and posted a new version.
Thanks for letting me know.