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

Light constructors

Post by ddeath » Thu May 01, 2014 12:34 pm

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
0 x
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 1
Contact:

Re: Light constructors

Post by mmixLinus » Fri May 02, 2014 8:47 am

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
0 x
Powered by Ogre3D:
MMiX.Me 3D - 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
YouTube|Facebook

Post Reply