Skip to content
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

Add splitDirection property for PointPrimitive #11982

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

YunVlad
Copy link

@YunVlad YunVlad commented May 14, 2024

Description

Add the splitDirection property for PointPrimitive.
Objects for which splitDirection is set as SplitDirection.NONE (by default) will be displayed to the right and left of Scene.splitPosition.
Objects for which splitDirection is set as SplitDirection.LEFT will be displayed to the left of Scene.splitPosition.
Objects for which splitDirection is set as SplitDirection.RIGHT will be displayed to the right of Scene.splitPosition.

This property is necessary for marking points of interest and subsequent analysis of changes over time.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have update the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Added the splitDirection property to PointPrimitive.
Updated PointPrimitive Collection and shaders to work with the property.
Added the splitDirection property to PointPrimitive.
Updated PointGraphics and PointVisualizer.
Updated Specs PointPrimitive Collection, Point Graphics and PointVisualizer to work with the new splitDirection property
Copy link

Thank you for the pull request, @YunVlad!

✅ We can confirm we have a CLA on file for you.

@ggetz
Copy link
Contributor

ggetz commented May 14, 2024

Awesome, thanks for the contribution @YunVlad! We'll review this shortly!

YunVlad and others added 3 commits May 14, 2024 16:22
Fixed formatting in PointGraphics, PointVisualizer, PointPrimitive, PointGraphicsSpec
Resolving conflict
Copy link
Contributor

@ggetz ggetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome @YunVlad!

It would be great to include sample code for this in a Sandcastle example. Would you be open to either adding a new example, or extending an existing example such as this one to showcase this feature?

CHANGES.md Outdated
@@ -1,5 +1,7 @@
# Change Log

- Added SplitDirection property for display PointPrimitive relative to the `Scene.splitPosition`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please

  • merge in the main branch and resolve any conflicts
  • Add a link to this PR, ie [11982](https://github.com/CesiumGS/cesium/pull/11982)

@@ -497,6 +500,12 @@ function createVAF(context, numberOfPointPrimitives, buffersUsage) {
componentDatatype: ComponentDatatype.FLOAT,
usage: buffersUsage[DISTANCE_DISPLAY_CONDITION_INDEX],
},
{
index: attributeLocations.splitDirection,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To save on the number of attributes, which is limited, let's pack this single float component along with distanceDisplayConditionAndDisableDepth as a 4th component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants