I'm trying to implement LOD into my object based on my GeometryBatch code. I'm using DiscreteLodNode & DistanceSwitchModel as per the DiscreteLOD example.
My code does work - I've set up one model distance from 0-1000, and when I move beyond 1000 the object isn't rendered anymore.
The only problem is that the object isn't rendered when I first run the app. I have to move the camera away from the object (not sure how far) before anything is drawn. Even though the object is within 0-1000 units from the camera.
The code is:
DistanceSwitchModel m = new DistanceSwitchModel(1);
m.setModelDistance(0, 0, 1000);
DiscreteLodNode dlod = new DiscreteLodNode(NameService.createName(), m);
Is there anything I'm missing here? geom is an object of type GeometryBatch, which is derived from TriMesh.