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

Decsendents: RectLight, SphereLight, DiscLight

Methods

AnalyticAreaLight
~AnalyticAreaLight
getPowerGet total light power (needed for light picking)
getScalingSet light source scale
getTransformMatrixGet transform matrix
setScalingSet light source scaling
setTransformMatrixSet transform matrix
update

Source

Lines 284-321 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>;
    ~AnalyticAreaLight() = default;
    /** Set light source scaling
        \param[in] scale x,y,z scaling factors
    */
    void setScaling(float3 scale) { mScaling = scale; update(); }
    /** 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; }
protected:
    AnalyticAreaLight(const std::string& name, LightType type);
    virtual 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