Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkLights::Light Class Reference

Public Types

enum  LightType { kDirectional_LightType, kPoint_LightType }
 

Public Member Functions

 Light (const Light &other)
 
 Light (Light &&other)
 
LightType type () const
 
const SkColor3fcolor () const
 
const SkVector3dir () const
 
const SkPoint3pos () const
 
SkScalar intensity () const
 
void setShadowMap (sk_sp< SkImage > shadowMap)
 
SkImagegetShadowMap () const
 
bool isRadial () const
 
Lightoperator= (const Light &b)
 
bool operator== (const Light &b)
 
bool operator!= (const Light &b)
 

Static Public Member Functions

static Light MakeDirectional (const SkColor3f &color, const SkVector3 &dir, bool isRadial=false)
 
static Light MakePoint (const SkColor3f &color, const SkPoint3 &pos, SkScalar intensity, bool isRadial=false)
 

Private Member Functions

 Light (LightType type, const SkColor3f &color, const SkVector3 &dirOrPos, SkScalar intensity=0.0f, bool isRadial=false)
 

Private Attributes

LightType fType
 
SkColor3f fColor
 
SkVector3 fDirOrPos
 
SkScalar fIntensity
 
sk_sp< SkImagefShadowMap
 
bool fIsRadial
 

Friends

class SkLights
 

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