-
Notifications
You must be signed in to change notification settings - Fork 3.7k
docs: document classes implementing GeometryFactory #13131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,70 @@ | ||
| import DeveloperError from "../Core/DeveloperError.js"; | ||
|
|
||
| /** | ||
| * Base class for all geometry creation utility classes that can be passed to {@link GeometryInstance} | ||
| * for asynchronous geometry creation. | ||
| * Describes a geometry type that can be converted into a {@link Geometry}. | ||
| * <p> | ||
| * Implementations of this interface are the core geometry "description" classes | ||
| * such as {@link BoxGeometry}, {@link RectangleGeometry}, | ||
| * {@link EllipsoidGeometry}, and other classes with a static | ||
| * <code>createGeometry</code> function. Instances of these classes can be | ||
| * passed to {@link GeometryInstance} and {@link Primitive} to have their | ||
| * vertices and indices created either asynchronously on a web worker or | ||
| * synchronously on the main thread. | ||
| * </p> | ||
| * <p> | ||
| * This type describes an interface and is not intended to be instantiated | ||
| * directly. | ||
| * </p> | ||
| * | ||
| * @alias GeometryFactory | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't believe this needs an alias since it matches the function name itself |
||
| * @constructor | ||
| * @class | ||
| * @abstract | ||
| * | ||
| * @see BoxGeometry | ||
| * @see BoxOutlineGeometry | ||
| * @see CircleGeometry | ||
| * @see CircleOutlineGeometry | ||
| * @see CoplanarPolygonGeometry | ||
| * @see CoplanarPolygonOutlineGeometry | ||
| * @see CorridorGeometry | ||
| * @see CorridorOutlineGeometry | ||
| * @see CylinderGeometry | ||
| * @see CylinderOutlineGeometry | ||
| * @see EllipseGeometry | ||
| * @see EllipseOutlineGeometry | ||
| * @see EllipsoidGeometry | ||
| * @see EllipsoidOutlineGeometry | ||
| * @see FrustumGeometry | ||
| * @see FrustumOutlineGeometry | ||
| * @see GroundPolylineGeometry | ||
| * @see PlaneGeometry | ||
| * @see PlaneOutlineGeometry | ||
| * @see PolygonGeometry | ||
| * @see PolygonOutlineGeometry | ||
| * @see PolylineGeometry | ||
| * @see PolylineVolumeGeometry | ||
| * @see PolylineVolumeOutlineGeometry | ||
| * @see RectangleGeometry | ||
| * @see RectangleOutlineGeometry | ||
| * @see SimplePolylineGeometry | ||
| * @see SphereGeometry | ||
| * @see SphereOutlineGeometry | ||
| * @see WallGeometry | ||
| * @see WallOutlineGeometry | ||
|
Comment on lines
+50
to
+53
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm kinda on the fence about the usefullness of this simply because it's such a big list. I could see it easily going out of sync with the actual classes. I don't think there's been much change in this area so maybe it doesn't matter. @donmccurdy or @javagl this is sorta related to recent discussions we've had around classes and inheritance. Any thoughts here?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you @MohammadShujaullah for compiling the list! However I think I agree with @jjspace, I'd (personally) be hesitant to commit to maintaining such a list by hand. I can't speak for every code editor, but using TypeScript language services in Zed, there are "Find All References" and "Go to Implementation" tools built into the editor. These don't work on GeometryFactory for me today (TS language service limitations with JSDoc probably), unless I either:
Getting that information out of the language server, and into published docs, might require more steps — if that's the goal. But at least we'd have confidence that the list will remain up to date. If we do merge #13104, adding the missing
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No strong opinion on this particular case. Pro:
Con:
Some of the back-and-forth links are currently broken anyhow (e.g.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the input @donmccurdy and @javagl. I think given the stability of this area which hasn't changed much I'm going to lean towards "any info is better than no info" for now. These can stay. We should definitely look into improving this area in the future since things like this should be automated. This may come "free" or easier after some of the |
||
| */ | ||
| function GeometryFactory() { | ||
| DeveloperError.throwInstantiationError(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns a geometry. | ||
| * Creates a {@link Geometry} from a geometry description. | ||
| * <p> | ||
| * Concrete geometry classes (for example {@link RectangleGeometry}) implement | ||
| * this function as a static method that takes an instance of the corresponding | ||
| * geometry description and returns the computed vertices and indices. | ||
| * </p> | ||
| * | ||
| * @param {GeometryFactory} geometryFactory A description of the circle. | ||
| * @param {GeometryFactory} geometryFactory The geometry description to create. | ||
| * @returns {Geometry|undefined} The computed vertices and indices. | ||
| */ | ||
| GeometryFactory.createGeometry = function (geometryFactory) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to add the
<p>tags yourself. This should be handled by JSDoc itself AFAIK.