Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
LightOnSphere Struct Reference

Public Member Functions

SkV3 computeWorldPos (const VSphere &s) const
 
void draw (SkCanvas *canvas) const
 

Public Attributes

SkV2 fLoc
 
SkScalar fDistance
 
SkScalar fRadius
 

Detailed Description

Definition at line 150 of file 3DSlide.cpp.

Member Function Documentation

◆ computeWorldPos()

SkV3 LightOnSphere::computeWorldPos ( const VSphere s) const
inline

Definition at line 155 of file 3DSlide.cpp.

155 {
156 return s.computeUnitV3(fLoc) * fDistance;
157 }
struct MyStruct s
SkScalar fDistance
Definition: 3DSlide.cpp:152

◆ draw()

void LightOnSphere::draw ( SkCanvas canvas) const
inline

Definition at line 159 of file 3DSlide.cpp.

159 {
161 paint.setAntiAlias(true);
162 paint.setColor(SK_ColorWHITE);
163 canvas->drawCircle(fLoc.x, fLoc.y, fRadius + 2, paint);
164 paint.setColor(SK_ColorBLACK);
165 canvas->drawCircle(fLoc.x, fLoc.y, fRadius, paint);
166 }
constexpr SkColor SK_ColorBLACK
Definition: SkColor.h:103
constexpr SkColor SK_ColorWHITE
Definition: SkColor.h:122
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
Definition: SkCanvas.cpp:2707
const Paint & paint
Definition: color_source.cc:38
SkScalar fRadius
Definition: 3DSlide.cpp:153
float x
Definition: SkM44.h:20
float y
Definition: SkM44.h:20

Member Data Documentation

◆ fDistance

SkScalar LightOnSphere::fDistance

Definition at line 152 of file 3DSlide.cpp.

◆ fLoc

SkV2 LightOnSphere::fLoc

Definition at line 151 of file 3DSlide.cpp.

◆ fRadius

SkScalar LightOnSphere::fRadius

Definition at line 153 of file 3DSlide.cpp.


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