24#pragma region Properties
42 BlueprintGetter = GetGeoreference,
43 BlueprintSetter = SetGeoreference,
45 Meta = (AllowPrivateAccess))
46 TSoftObjectPtr<ACesiumGeoreference> Georeference =
nullptr;
61 BlueprintGetter = GetResolvedGeoreference,
63 Meta = (AllowPrivateAccess))
88 BlueprintGetter = GetAdjustOrientationForGlobeWhenMoving,
89 BlueprintSetter = SetAdjustOrientationForGlobeWhenMoving,
91 Meta = (AllowPrivateAccess))
92 bool AdjustOrientationForGlobeWhenMoving =
true;
103 BlueprintGetter = GetTeleportWhenUpdatingTransform,
104 BlueprintSetter = SetTeleportWhenUpdatingTransform,
106 Meta = (AllowPrivateAccess))
107 bool TeleportWhenUpdatingTransform =
true;
125 BlueprintGetter = GetActorToEarthCenteredEarthFixedMatrix,
126 BlueprintSetter = SetActorToEarthCenteredEarthFixedMatrix,
128 Meta = (AllowPrivateAccess))
129 FMatrix ActorToEarthCenteredEarthFixedMatrix;
133#pragma region Property Accessors
144 UFUNCTION(BlueprintGetter)
156 UFUNCTION(BlueprintSetter)
168 UFUNCTION(BlueprintGetter)
178 UFUNCTION(BlueprintCallable, Category = "Cesium")
185 UFUNCTION(BlueprintGetter, Category = "Cesium")
198 UFUNCTION(BlueprintGetter, Category = "Cesium")
199 FMatrix GetActorToEarthCenteredEarthFixedMatrix() const;
214 UFUNCTION(BlueprintSetter, Category = "Cesium")
215 void SetActorToEarthCenteredEarthFixedMatrix(const FMatrix& Value);
223 UFUNCTION(BlueprintGetter, Category = "Cesium")
224 bool GetTeleportWhenUpdatingTransform() const;
232 UFUNCTION(BlueprintSetter, Category = "Cesium")
233 void SetTeleportWhenUpdatingTransform(
bool Value);
254 UFUNCTION(BlueprintGetter, Category = "Cesium")
255 bool GetAdjustOrientationForGlobeWhenMoving() const;
276 UFUNCTION(BlueprintSetter, Category = "Cesium")
277 void SetAdjustOrientationForGlobeWhenMoving(
bool Value);
281#pragma region Public Methods
295 Meta = (ReturnDisplayName =
"LongitudeLatitudeHeight"))
296 FVector GetLongitudeLatitudeHeight() const;
304 Meta = (ReturnDisplayName = "Longitude"))
305 double GetLongitude()
const {
return this->GetLongitudeLatitudeHeight().X; }
313 Meta = (ReturnDisplayName =
"Latitude"))
314 double GetLatitude()
const {
return this->GetLongitudeLatitudeHeight().Y; }
326 Meta = (ReturnDisplayName =
"Height"))
327 double GetHeight()
const {
return this->GetLongitudeLatitudeHeight().Z; }
341 UFUNCTION(BlueprintCallable, Category =
"Cesium")
342 void MoveToLongitudeLatitudeHeight(const FVector& LongitudeLatitudeHeight);
351 meta = (ReturnDisplayName = "EarthCenteredEarthFixedPosition"))
352 FVector GetEarthCenteredEarthFixedPosition() const;
363 UFUNCTION(BlueprintCallable, Category = "Cesium")
364 void MoveToEarthCenteredEarthFixedPosition(
365 const FVector& EarthCenteredEarthFixedPosition);
376 meta = (ReturnDisplayName = "EastSouthUpRotation"))
377 FQuat GetEastSouthUpRotation() const;
390 UFUNCTION(BlueprintCallable, Category = "Cesium")
391 void SetEastSouthUpRotation(const FQuat& EastSouthUpRotation);
406 meta = (ReturnDisplayName = "EarthCenteredEarthFixedRotation"))
407 FQuat GetEarthCenteredEarthFixedRotation() const;
419 UFUNCTION(BlueprintCallable, Category = "Cesium")
420 void SetEarthCenteredEarthFixedRotation(
421 const FQuat& EarthCenteredEarthFixedRotation);
427 UFUNCTION(BlueprintCallable, Category = "Cesium")
428 void SnapLocalUpToEllipsoidNormal();
435 UFUNCTION(BlueprintCallable, Category = "Cesium")
436 void SnapToEastSouthUp();
455 UFUNCTION(BlueprintCallable, Category = "Cesium")
460#pragma region Obsolete
469 "Cesium For Unreal v2.0",
470 "The resolved georeference can no longer be explicitly invalidated. To change the georeference, call SetGeoreference or ReregisterComponent.")
477 "The resolved georeference can no longer be explicitly invalidated. To change the georeference, call SetGeoreference or ReregisterComponent."))
478 void InvalidateResolvedGeoreference();
481#pragma region Unreal Lifecycle
507 PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override;
529#pragma region Implementation Details
533 USceneComponent* _getRootComponent(
bool warnIfNull)
const;
535 FTransform _getCurrentRelativeTransform()
const;
537 void _setCurrentRelativeTransform(
const FTransform& relativeTransform);
540 _createOrUpdateNativeGlobeAnchorFromRelativeTransform(
541 const FTransform& newRelativeTransform);
544 _createOrUpdateNativeGlobeAnchorFromECEF(
const FMatrix& newActorToECEFMatrix);
546 void _updateFromNativeGlobeAnchor(
549 void _setNewActorToECEFFromRelativeTransform();
551#if WITH_EDITORONLY_DATA
554 UPROPERTY(
Meta = (DeprecatedProperty))
555 double _actorToECEF_Array_DEPRECATED[16];
565 bool _actorToECEFIsValid = false;
572 bool _updatingActorTransform = false;
574 bool _lastRelativeTransformIsValid = false;
575 FTransform _lastRelativeTransform{};
585 void _onActorTransformChanged(
586 USceneComponent* InRootComponent,
587 EUpdateTransformFlags UpdateTransformFlags,
588 ETeleportType Teleport);
596 UFUNCTION(CallInEditor)
597 void _onGeoreferenceChanged();
599 friend class FCesiumGlobeAnchorCustomization;