Home
last modified time | relevance | path

Searched refs:SkPoint3 (Results 1 – 25 of 44) sorted by relevance

12

/external/skia/include/core/
DSkPoint3.h13 struct SK_API SkPoint3 { struct
16 static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z) { in Make() argument
17 SkPoint3 pt; in Make()
28 friend bool operator==(const SkPoint3& a, const SkPoint3& b) { argument
32 friend bool operator!=(const SkPoint3& a, const SkPoint3& b) {
42 SkScalar length() const { return SkPoint3::Length(fX, fY, fZ); } in length() argument
52 SkPoint3 makeScale(SkScalar scale) const { in makeScale() argument
53 SkPoint3 p; in makeScale()
69 SkPoint3 operator-() const { argument
70 SkPoint3 neg; argument
[all …]
DSkLights.h56 static Light MakePoint(const SkColor3f& color, const SkPoint3& pos, SkScalar intensity,
67 const SkPoint3& pos() const { in pos()
/external/skia/tests/
DPoint3Test.cpp14 const SkPoint3 p0 = SkPoint3::Make(0, 0, 0); in test_eq_ops()
15 const SkPoint3 p1 = SkPoint3::Make(1, 1, 1); in test_eq_ops()
16 const SkPoint3 p2 = SkPoint3::Make(1, 1, 1); in test_eq_ops()
23 SkPoint3 v = SkPoint3::Make(1, 1, 1); in test_ops()
28 SkPoint3 p = v.makeScale(3.0f); in test_ops()
34 SkPoint3 p1 = SkPoint3::Make(20.0f, 2.0f, 10.0f); in test_ops()
35 SkPoint3 p2 = -p1; in test_ops()
51 const SkPoint3 xAxis = SkPoint3::Make(1.0f, 0.0f, 0.0f); in test_dot()
52 const SkPoint3 yAxis = SkPoint3::Make(0.0f, 1.0f, 0.0f); in test_dot()
53 const SkPoint3 zAxis = SkPoint3::Make(0.0f, 0.0f, 1.0f); in test_dot()
[all …]
/external/skia/include/effects/
DSkLightingImageFilter.h16 struct SkPoint3;
20 static sk_sp<SkImageFilter> MakeDistantLitDiffuse(const SkPoint3& direction,
23 static sk_sp<SkImageFilter> MakePointLitDiffuse(const SkPoint3& location,
26 static sk_sp<SkImageFilter> MakeSpotLitDiffuse(const SkPoint3& location,
27 const SkPoint3& target, SkScalar specularExponent, SkScalar cutoffAngle,
30 static sk_sp<SkImageFilter> MakeDistantLitSpecular(const SkPoint3& direction,
33 static sk_sp<SkImageFilter> MakePointLitSpecular(const SkPoint3& location,
36 static sk_sp<SkImageFilter> MakeSpotLitSpecular(const SkPoint3& location,
37 const SkPoint3& target, SkScalar specularExponent, SkScalar cutoffAngle,
/external/skia/bench/
DLightingBench.cpp32 static SkPoint3 GetPointLocation() { in GetPointLocation()
33 static SkPoint3 pointLocation = SkPoint3::Make(0, 0, SkIntToScalar(10)); in GetPointLocation()
37 static SkPoint3 GetDistantDirection() { in GetDistantDirection()
40 static SkPoint3 distantDirection = SkPoint3::Make( in GetDistantDirection()
47 static SkPoint3 GetSpotLocation() { in GetSpotLocation()
48 static SkPoint3 spotLocation = SkPoint3::Make(SkIntToScalar(-10), in GetSpotLocation()
54 static SkPoint3 GetSpotTarget() { in GetSpotTarget()
55 static SkPoint3 spotTarget = SkPoint3::Make(SkIntToScalar(40), SkIntToScalar(40), 0); in GetSpotTarget()
DShadowBench.cpp64 fRec.fZPlaneParams = SkPoint3::Make(0, 0, kElevation); in onDelayedSetup()
65 fRec.fLightPos = SkPoint3::Make(270, 0, 600); in onDelayedSetup()
/external/skia/src/effects/
DSkLightingImageFilter.cpp50 const SkPoint3& point) { in setUniformPoint3()
51 GR_STATIC_ASSERT(sizeof(SkPoint3) == 3 * sizeof(float)); in setUniformPoint3()
56 const SkPoint3& point) { in setUniformNormal3()
71 static inline void fast_normalize(SkPoint3* vector) { in fast_normalize()
80 static SkPoint3 readPoint3(SkReadBuffer& buffer) { in readPoint3()
81 SkPoint3 point; in readPoint3()
91 static void writePoint3(const SkPoint3& point, SkWriteBuffer& buffer) { in writePoint3()
106 const SkPoint3& color() const { return fColor; } in color()
119 virtual SkPoint3 surfaceToLight(int x, int y, int z, SkScalar surfaceScale) const = 0;
120 virtual SkPoint3 lightColor(const SkPoint3& surfaceToLight) const = 0;
[all …]
/external/skia/gm/
Dlighting.cpp66 SkPoint3 spotTarget = SkPoint3::Make(SkIntToScalar(40), SkIntToScalar(40), 0); in onDraw()
67 SkPoint3 spotLocation = SkPoint3::Make(spotTarget.fX + 70.7214f * cosAzimuth, in onDraw()
72 SkPoint3 pointLocation = SkPoint3::Make(spotTarget.fX + 50 * cosAzimuth, in onDraw()
77 SkPoint3 distantDirection = SkPoint3::Make(cosAzimuth * SkScalarCos(elevationRad), in onDraw()
Dimagefiltersscaled.cpp81 SkPoint3 pointLocation = SkPoint3::Make(0, 0, SkIntToScalar(10)); in onDraw()
82 SkPoint3 spotLocation = SkPoint3::Make(SkIntToScalar(-10), in onDraw()
85 SkPoint3 spotTarget = SkPoint3::Make(SkIntToScalar(40), SkIntToScalar(40), 0); in onDraw()
Dshadowutils.cpp14 void draw_shadow(SkCanvas* canvas, const SkPath& path, int height, SkColor color, SkPoint3 lightPos, in draw_shadow()
42 SkPoint3 lightPos = { lightXY.fX, lightXY.fY, 500 }; in draw_paths()
Dimagefiltersclipped.cpp94 SkPoint3 pointLocation = SkPoint3::Make(32, 32, SkIntToScalar(10)); in onDraw()
Dimagefilterscropexpand.cpp63 SkPoint3 pointLocation = SkPoint3::Make(0, 0, SkIntToScalar(10));
/external/skia/include/utils/
DSkShadowUtils.h40 static void DrawShadow(SkCanvas* canvas, const SkPath& path, const SkPoint3& zPlaneParams,
41 const SkPoint3& lightPos, SkScalar lightRadius, SkScalar ambientAlpha,
65 const SkPoint3& lightPos, SkScalar lightRadius, SkScalar ambientAlpha,
68 SkPoint3 zPlane = SkPoint3::Make(0, 0, occluderHeight);
/external/skia/samplecode/
DSampleAndroidShadows.cpp34 SkPoint3 fLightPos;
72 fLightPos = SkPoint3::Make(350, 0, 600); in onOnceBeforeDraw()
130 const SkPoint3& zPlaneParams, in drawShadowedPath()
132 const SkPoint3& lightPos, SkScalar lightWidth, SkScalar spotAlpha) { in drawShadowedPath()
173 SkPoint3 lightPos = fLightPos; in onDrawContent()
174 SkPoint3 zPlaneParams = SkPoint3::Make(0, 0, 0); in onDrawContent()
238 zPlaneParams = SkPoint3::Make(0, in onDrawContent()
253 zPlaneParams = SkPoint3::Make(-SkScalarSin(radians), in onDrawContent()
DSampleShadowColor.cpp100 const SkPoint3& zPlaneParams, in drawShadowedPath()
102 const SkPoint3& lightPos, SkScalar lightWidth, SkScalar spotAlpha) { in drawShadowedPath()
191 SkPoint3 lightPos = { 75, -400, 600 }; in onDrawContent()
192 SkPoint3 zPlaneParams = SkPoint3::Make(0, 0, kZValues[fZIndex]); in onDrawContent()
DSampleShadowUtils.cpp111 const SkPoint3& zPlaneParams, in drawShadowedPath()
113 const SkPoint3& lightPos, SkScalar lightWidth, SkScalar spotAlpha, in drawShadowedPath()
156 static constexpr SkPoint3 lightPos = { 250, 400, 500 }; in onDrawContent()
170 SkPoint3 zPlaneParams = SkPoint3::Make(0, 0, SkTMax(1.0f, kHeight + fZDelta)); in onDrawContent()
DSampleShadowReference.cpp85 const SkPoint3& zPlaneParams, in drawShadowedPath()
87 const SkPoint3& lightPos, SkScalar lightWidth, SkScalar spotAlpha) { in drawShadowedPath()
127 SkPoint3 lightPos = { 175, -800, kDP * 600 }; in onDrawContent()
132 SkPoint3 zPlaneParams = SkPoint3::Make(0, 0, kDP * 2); in onDrawContent()
/external/skia/src/utils/
DSkShadowTessellator.h29 const SkPoint3& zPlane, bool transparent);
36 sk_sp<SkVertices> MakeSpot(const SkPath& path, const SkMatrix& ctm, const SkPoint3& zPlane,
37 const SkPoint3& lightPos, SkScalar lightRadius, bool transparent);
DSkShadowUtils.cpp101 SkPoint3 zParams = SkPoint3::Make(0, 0, fOccluderHeight); in makeVertices()
128 SkPoint3 fDevLightPos;
160 SkPoint3 zParams = SkPoint3::Make(0, 0, fOccluderHeight); in makeVertices()
172 SkPoint3 centerLightPos = SkPoint3::Make(devCenter.fX, devCenter.fY, fDevLightPos.fZ); in makeVertices()
449 static bool tilted(const SkPoint3& zPlaneParams) { in tilted()
453 static SkPoint3 map(const SkMatrix& m, const SkPoint3& pt) { in map()
454 SkPoint3 result; in map()
483 void SkShadowUtils::DrawShadow(SkCanvas* canvas, const SkPath& path, const SkPoint3& zPlaneParams, in DrawShadow()
484 const SkPoint3& devLightPos, SkScalar lightRadius, in DrawShadow()
524 SkPoint3 zPlaneParams = rec.fZPlaneParams; in drawShadow()
[all …]
DSkShadowTessellator.cpp25 SkBaseShadowTessellator(const SkPoint3& zPlaneParams, bool transparent);
63 SkPoint3 fZPlaneParams;
67 SkPoint3 fTransformedZParams;
125 SkBaseShadowTessellator::SkBaseShadowTessellator(const SkPoint3& zPlaneParams, bool transparent) in SkBaseShadowTessellator()
281 fTransformedZParams = SkPoint3::Make( in setTransformedHeightFunc()
341 const SkPoint3& zPlaneParams, bool transparent);
369 const SkPoint3& zPlaneParams, in SkAmbientShadowTessellator()
741 const SkPoint3& zPlaneParams, const SkPoint3& lightPos,
784 const SkPoint3& zPlaneParams, in SkSpotShadowTessellator()
785 const SkPoint3& lightPos, SkScalar lightRadius, in SkSpotShadowTessellator()
[all …]
/external/skia/tools/
Dsk_tool_utils.cpp303 SkPoint3 norm; in create_frustum_normal_map()
304 const SkPoint3 left = SkPoint3::Make(-SK_ScalarRoot2Over2, 0.0f, SK_ScalarRoot2Over2); in create_frustum_normal_map()
305 const SkPoint3 up = SkPoint3::Make(0.0f, -SK_ScalarRoot2Over2, SK_ScalarRoot2Over2); in create_frustum_normal_map()
306 const SkPoint3 right = SkPoint3::Make(SK_ScalarRoot2Over2, 0.0f, SK_ScalarRoot2Over2); in create_frustum_normal_map()
307 const SkPoint3 down = SkPoint3::Make(0.0f, SK_ScalarRoot2Over2, SK_ScalarRoot2Over2); in create_frustum_normal_map()
343 SkPoint3 norm; in create_tetra_normal_map()
344 const SkPoint3 leftUp = SkPoint3::Make(-k1OverRoot3, -k1OverRoot3, k1OverRoot3); in create_tetra_normal_map()
345 const SkPoint3 rightUp = SkPoint3::Make(k1OverRoot3, -k1OverRoot3, k1OverRoot3); in create_tetra_normal_map()
346 const SkPoint3 down = SkPoint3::Make(0.0f, SK_ScalarRoot2Over2, SK_ScalarRoot2Over2); in create_tetra_normal_map()
/external/skia/src/core/
DSkDrawShadowRec.h16 SkPoint3 fZPlaneParams;
17 SkPoint3 fLightPos;
DSkNormalSource.h15 struct SkPoint3;
41 virtual void fillScanLine(int x, int y, SkPoint3 output[], int count) const = 0;
DSkPoint3.cpp26 SkScalar SkPoint3::Length(SkScalar x, SkScalar y, SkScalar z) { in Length()
46 bool SkPoint3::normalize() { in normalize()
/external/skia/fuzz/
DFilterFuzz.cpp206 static SkPoint3 make_point() { in make_point()
210 return SkPoint3::Make(a, b, c); in make_point()
684 SkPoint3 p = make_point(); in make_image_filter()
697 SkPoint3 p = make_point(); in make_image_filter()
710 SkPoint3 p = make_point(); in make_image_filter()
718 ? SkLightingImageFilter::MakeSpotLitDiffuse(SkPoint3::Make(0, 0, 0), in make_image_filter()
720 : SkLightingImageFilter::MakeSpotLitSpecular(SkPoint3::Make(0, 0, 0), in make_image_filter()

12