Light constructors

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
ddeath
Kobold
Posts: 37
Joined: Sat Sep 28, 2013 9:15 am
x 2

Light constructors

Post 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...

Questions:
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)

Thanks
Linux Mint 16
CPU: i5-430M
GPU: ATI Mobility Radeon HD 5650
User avatar
mmixLinus
Silver Sponsor
Silver Sponsor
Posts: 199
Joined: Thu Apr 21, 2011 3:08 pm
Location: Lund, Sweden
x 12
Contact:

Re: Light constructors

Post by mmixLinus »

Hi,
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).
        */
        Light();
Regards,
mmixLinus
Powered by Ogre3D:
MMiX.Me 3D - 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
YouTube|Facebook
Post Reply