OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::LightProfiles Class Reference

#include <OgreLightProfiles.h>

+ Inheritance diagram for Ogre::LightProfiles:

Public Member Functions

 LightProfiles (HlmsPbs *hlmsPbs, TextureGpuManager *textureGpuManager)
 
 ~LightProfiles ()
 
void assignProfile (IdString profileName, Light *light)
 Assigns the given profile to the light. More...
 
void build ()
 After you're done with all your loadIesProfile calls, call this function to generate the texture required for rendering. More...
 
const IesLoadergetProfile (IdString profileName) const
 Returns the profile associated with the name. Nullptr if not found. More...
 
const IesLoadergetProfile (Light *light) const
 Returns the profile associated with the light. More...
 
const StringgetProfileName (Light *light) const
 Returns the name of the profile associated with the light. More...
 
void loadIesProfile (const String &filename, const String &resourceGroup, bool throwOnDuplicate=true)
 Loads an IES (Illuminating Engineering Society) profile to memory. More...
 

Constructor & Destructor Documentation

◆ LightProfiles()

Ogre::LightProfiles::LightProfiles ( HlmsPbs hlmsPbs,
TextureGpuManager textureGpuManager 
)

◆ ~LightProfiles()

Ogre::LightProfiles::~LightProfiles ( )

Member Function Documentation

◆ assignProfile()

void Ogre::LightProfiles::assignProfile ( IdString  profileName,
Light light 
)

Assigns the given profile to the light.

Use either:

lightProfile->assignProfile( IdString(), light );
lightProfile->assignProfile( IdString( "" ), light );

To unset any profile

Remarks
Throws if no profile with the given name exists, and profileName is not IdString()
Parameters
profileNameName of the profile to assign to the light. Use IdString() or IdString( "" ) to unset any profile the light might already have
lightLight to set the profile to

◆ build()

void Ogre::LightProfiles::build ( )

After you're done with all your loadIesProfile calls, call this function to generate the texture required for rendering.

Remarks
You can add more profiles later by calling loadIesProfile, but you must call build again afterwards

You can call LightProfiles::assignProfile before calling build

◆ getProfile() [1/2]

const IesLoader* Ogre::LightProfiles::getProfile ( IdString  profileName) const

Returns the profile associated with the name. Nullptr if not found.

◆ getProfile() [2/2]

const IesLoader* Ogre::LightProfiles::getProfile ( Light light) const

Returns the profile associated with the light.

Nullptr if none Assumes the light's profile was created by 'this'

◆ getProfileName()

const String& Ogre::LightProfiles::getProfileName ( Light light) const

Returns the name of the profile associated with the light.

Empty if none Assumes the light's profile was created by 'this'

◆ loadIesProfile()

void Ogre::LightProfiles::loadIesProfile ( const String filename,
const String resourceGroup,
bool  throwOnDuplicate = true 
)

Loads an IES (Illuminating Engineering Society) profile to memory.

When trying to load an IES file that is already loaded, if throwOnDuplicate = false then this function does nothing


The documentation for this class was generated from the following file: