|
Post by silderan on Feb 3, 2015 14:01:26 GMT
In tile_map, node_map and (maybe) more there is, for example, this function:
NESSENGINE_API virtual const SRenderTransformations& get_absolute_transformations_const() const {return m_absolute_transformations;} But, insode .cpp code, you don't call this function. As it is "virtual" if I sub class tile_map and overload this funcion, will never be used from your code. As it is just the purpose of virtual funcions, you better remove "virtual" and force us to modify m_absolute_transformation or you call virtual function.
What do you think?
Silderán.
|
|
|
Post by Admin on Feb 3, 2015 17:33:42 GMT
I'm sorry I didn't quite understand what you mean. but you should know that the get_absolute_transformations_const() is part of the Transformable interface (as defined in transformable_api.h), that's why its virtual. I don't want to force objects to use local m_absolute_transformation to keep the possibility of objects sharing the same absolute transformations and other weird stuff I might want to do. does it someone answer your question? if not please to to explain further thanks!
|
|
|
Post by silderan on Feb 3, 2015 20:42:57 GMT
Ok, I'll try with a example class myNode : public tile_map { protected: SRenderTransformations m_MyNodeTrans;
public: NESSENGINE_API virtual const SRenderTransformations& get_absolute_transformations_const() const {return m_MyNodeTrans; } }
As in tile_map.cpp you're using m_absolute_transformation directly, my custom transformation will never be used. Who looks at .h files and sees this functions virtual, may think that overloading it is the way to modify tile_map default behaviour. If it's not clear, tell me.
|
|
|
Post by Admin on Feb 3, 2015 22:34:07 GMT
I see. good point, it was fixed, but not committed yet coming soon. thanks.
|
|