Page 1 of 1

Light constructors

Posted: Thu May 01, 2014 12:34 pm
by ddeath
Hi there,
in OgreLight.cpp are 2 constructors for a light.
First is without any argument and do NOT call MovableObject constructor.
Second is called with name argument and call MovableObject constructor with the same name...

What will be the name of the first light? (I think that it will not have a name - empty string)
What the first light is used for (I know that users should call createLight() from sceneManager... but what people do with that Light if they not)


Re: Light constructors

Posted: Fri May 02, 2014 8:47 am
by mmixLinus
Looking at the source code for Light and MovableObject it seems you are right: default ctor (constructor) Light() uses default ctor MovableObject() which doesn't set mName, so it will be an empty Ogre::String.

A comment in OgreLight.h says

Code: Select all

       /** Default constructor (for Python mainly).