While working on the texture, model, sound managers(caches), I've noticed that the same pattern would be applicable to other objects(car, cardynamics, ...).
Joe, what do you think about going towards a component oriented implementation?
http://cowboyprogramming.com/2007/01/05/...-heirachy/
First rough concept of the track description file given available components(transform, drawable, body, surface):
t0 = transform
t0.position = 0, 1, 0
t0.orientation = 0, 0.15, 0.15
d0 = drawable
d0.transform = t0
d0.mesh = tree.obj
d0.texture = tree.png
d0.color = 1, 1, 1 # default color(no blending)
d0.doublesided = true
To make it collidable/dynamic add a body component (body and drawable are sharing transform and mesh):
s0 = surface
s0.bumplength = 1.0
s0.bumpamlitude = 0.2
s0.treaded = 0.7
s0.nontreaded = 0.4
s0.rollresistance = 1.0
b0 = body
b0.transform = t0
b0.shape = tree.obj
b0.mass = 0 # default mass(static body)
b0.surface = s0