Class AnalyticAreaLight

Synopsis

#include <Source/Falcor/Scene/Lights/Light.h>

class dlldecl AnalyticAreaLight : public Light

Description

Analytic area light source.

Mentioned in

  • Usage / Scripting / Light

Inheritance

Ancestors: Light

Methods

~AnalyticAreaLight
createCreates an analytic area light.
getPowerGet total light power (needed for light picking)
getScalingSet light source scale
getTransformMatrixGet transform matrix
setScalingSet light source scaling
setTransformMatrixSet transform matrix

Source

Lines 244-285 in Source/Falcor/Scene/Lights/Light.h.

class dlldecl AnalyticAreaLight : public Light
{
public:
    using SharedPtr = std::shared_ptr<AnalyticAreaLight>;
    using SharedConstPtr = std::shared_ptr<const AnalyticAreaLight>;
    /** Creates an analytic area light.
        \param[in] type The type of analytic area light (rectangular, sphere, disc etc). See LightData.slang
    */
    static SharedPtr create(LightType type);
    ~AnalyticAreaLight();
    /** Set light source scaling
        \param[in] scale x,y,z scaling factors
    */
    void setScaling(float3 scale) { mScaling = scale; }
    /** Set light source scale
      */
    float3 getScaling() const { return mScaling; }
    /** Get total light power (needed for light picking)
    */
    float getPower() const override;
    /** Set transform matrix
        \param[in] mtx object to world space transform matrix
    */
    void setTransformMatrix(const glm::mat4& mtx) { mTransformMatrix = mtx; update();  }
    /** Get transform matrix
    */
    glm::mat4 getTransformMatrix() const { return mTransformMatrix; }
private:
    AnalyticAreaLight(LightType type);
    void update();
    float3 mScaling;                ///< Scaling, controls the size of the light
    glm::mat4 mTransformMatrix;     ///< Transform matrix minus scaling component
};





Add Discussion as Guest

Log in to DocsForge