I have these classes:
Entity
Light Extends Entity
PointLight Extends Light
SpotLight Extends Light
Then I have a list of Light classes that affect a certain entity. I want to get some information about the light that is specific to one of the light subclasses, like the cone angle of the spotlight. I can't get at it easily, because the cone angle parameter is part of the "SpotLight" type, and I have the handle to the Super "Light" type.
I can easily solve this by moving the coneangle field from the "SpotLight" type to the Super "Light" type, but it's not very nice.
Any suggestions?
Entity
Light Extends Entity
PointLight Extends Light
SpotLight Extends Light
Then I have a list of Light classes that affect a certain entity. I want to get some information about the light that is specific to one of the light subclasses, like the cone angle of the spotlight. I can't get at it easily, because the cone angle parameter is part of the "SpotLight" type, and I have the handle to the Super "Light" type.
I can easily solve this by moving the coneangle field from the "SpotLight" type to the Super "Light" type, but it's not very nice.
Any suggestions?