diff --git a/packages/vector_math/CHANGELOG.md b/packages/vector_math/CHANGELOG.md index a232ed01..4ba08dc6 100644 --- a/packages/vector_math/CHANGELOG.md +++ b/packages/vector_math/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.4.3 + +* Documents the public `CircleGenerator` API. + ## 2.4.2 * Documents the public geometry filter APIs. diff --git a/packages/vector_math/lib/src/vector_math_geometry/generators/circle_generator.dart b/packages/vector_math/lib/src/vector_math_geometry/generators/circle_generator.dart index 45b46285..08b0bbe0 100644 --- a/packages/vector_math/lib/src/vector_math_geometry/generators/circle_generator.dart +++ b/packages/vector_math/lib/src/vector_math_geometry/generators/circle_generator.dart @@ -2,12 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(stuartmorgan): Remove this and fix violations. See -// https://github.com/flutter/flutter/issues/186827 -// ignore_for_file: public_member_api_docs - part of '../../../vector_math_geometry.dart'; +/// Generates a flat, circular (or partial circle/pie-slice) mesh in the +/// XZ plane, centered at the origin. class CircleGenerator extends GeometryGenerator { late double _radius; late int _segments; @@ -20,6 +18,11 @@ class CircleGenerator extends GeometryGenerator { @override int get indexCount => _segments * 3; + /// Creates a circle mesh of the given [radius]. + /// + /// [segments] controls how many triangles are used around the + /// circumference. [thetaStart] and [thetaLength] can be used to generate + /// only a slice of the circle, both given in radians. MeshGeometry createCircle( double radius, { GeometryGeneratorFlags? flags, diff --git a/packages/vector_math/pubspec.yaml b/packages/vector_math/pubspec.yaml index 89b201e2..fa38b2ed 100644 --- a/packages/vector_math/pubspec.yaml +++ b/packages/vector_math/pubspec.yaml @@ -5,7 +5,7 @@ name: vector_math description: A vector math library for 2D and 3D applications, supporting 2D, 3D, and 4D matrices. repository: https://github.com/flutter/core-packages/tree/main/packages/vector_math issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+vector_math%22 -version: 2.4.2 +version: 2.4.3 environment: sdk: ^3.10.0