I think you can inherits specific classes without the need to have a parameter that describe the object.
Pseudo code
Public Class Terrain
Inherits DarkGDK.Basic3d.Object3D
' add here specific private/public member and methods
End Class
Public Class Entity
Inherits DarkGDK.Basic3d.Object3D
' add here specific private/public member and methods
End Class
You can also declare an variable of class Object3D and assign to it an instance as terrain, entity at runtime
pseudo code
Module Test
private x as DarkGDK.Basic3D.Object3D
public sub NowAsTerrain
x = new Terrain
end sub
public SUb NowAsEntity
x = new Entity
end sub
End Module