This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
360 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
-17.1 MB
(8.0%)
AugmentedImages/Content/AugmentedImage_TestImages/000.uasset
Binary file not shown.
Binary file modified
BIN
-12.2 MB
(6.6%)
AugmentedImages/Content/AugmentedImage_TestImages/001.uasset
Binary file not shown.
Binary file modified
BIN
-1.36 MB
(34%)
AugmentedImages/Content/AugmentedImage_TestImages/002.uasset
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-28.4 MB
(1.9%)
AugmentedImages/Content/AugmentedImage_TestImages/004.uasset
Binary file not shown.
Binary file modified
BIN
-8.36 MB
(9.4%)
AugmentedImages/Content/AugmentedImage_TestImages/005.uasset
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-9.6 MB
(7.7%)
AugmentedImages/Content/AugmentedImage_TestImages/007.uasset
Binary file not shown.
Binary file modified
BIN
-15.2 MB
(6.3%)
AugmentedImages/Content/AugmentedImage_TestImages/008.uasset
Binary file not shown.
Binary file modified
BIN
-27.6 MB
(5.9%)
AugmentedImages/Content/AugmentedImage_TestImages/009.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+5.48 KB
(100%)
AugmentedImages/Content/AugmentedImages_PictureFrame/PictureFrame.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# How to Contribute | ||
|
||
We'd love to accept your patches and contributions to the source code included | ||
in this project. There are just a few small guidelines you need to follow. | ||
|
||
## Contributor License Agreement | ||
|
||
Contributions to this project must be accompanied by a Contributor License | ||
Agreement. You (or your employer) retain the copyright to your contribution; | ||
this simply gives us permission to use and redistribute your contributions as | ||
part of the project. Head over to <https://cla.developers.google.com/> to see | ||
your current agreements on file or to sign a new one. | ||
|
||
You generally only need to submit a CLA once, so if you've already submitted one | ||
(even if it was for a different project), you probably don't need to do it | ||
again. | ||
|
||
## Code reviews | ||
|
||
Although we do not use the normal GitHub pull request process to incorporate | ||
contributions, it's okay to send us pull requests. Once we have received your | ||
CLA we will review and consider your contribution for inclusion in a future | ||
release of the SDK. | ||
|
||
## Community Guidelines | ||
|
||
This project follows | ||
[Google's Open Source Community | ||
Guidelines](https://opensource.google.com/conduct/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+20.5 KB
CloudARPin/Content/CloudARPin/Assets/Textures/GreenCircleButton.uasset
Binary file not shown.
Binary file modified
BIN
-6.85 KB
(96%)
CloudARPin/Content/CloudARPin/Blueprints/ARGameInstance.uasset
Binary file not shown.
Binary file modified
BIN
-6 Bytes
(100%)
CloudARPin/Content/CloudARPin/Blueprints/ARMacroLibrary.uasset
Binary file not shown.
Binary file modified
BIN
+67.8 KB
(150%)
CloudARPin/Content/CloudARPin/Blueprints/ARPlayerController.uasset
Binary file not shown.
Binary file modified
BIN
+42 Bytes
(100%)
CloudARPin/Content/CloudARPin/Blueprints/CloudARPinGameState.uasset
Binary file not shown.
Binary file modified
BIN
+39.2 KB
(100%)
CloudARPin/Content/CloudARPin/Blueprints/CloudARPinManager.uasset
Binary file not shown.
Binary file removed
BIN
-158 KB
CloudARPin/Content/CloudARPin/Blueprints/CloudARPinReplicator.uasset
Binary file not shown.
Binary file modified
BIN
-58 Bytes
(96%)
CloudARPin/Content/CloudARPin/Blueprints/CloudARPinSessionConfig.uasset
Binary file not shown.
Binary file modified
BIN
-52.3 KB
(60%)
CloudARPin/Content/CloudARPin/Blueprints/CloudARPinWidget.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+160 KB
CloudARPin/Content/CloudARPin/Blueprints/MultiplayerARSceneRoot.uasset
Binary file not shown.
Binary file added
BIN
+7.72 KB
CloudARPin/Content/CloudARPin/Blueprints/NetworkSessionWrapper.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
95 changes: 95 additions & 0 deletions
95
CloudARPin/Source/CloudARPinSample/ARPointCloudRenderer.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
// Copyright 2018 Google Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "ARPointCloudRenderer.h" | ||
#include "ARBlueprintLibrary.h" | ||
#include "DrawDebugHelpers.h" | ||
|
||
#if PLATFORM_ANDROID | ||
#include "GoogleARCoreFunctionLibrary.h" | ||
#endif | ||
|
||
#if PLATFORM_IOS | ||
#include "AppleARKitBlueprintLibrary.h" | ||
#endif | ||
|
||
|
||
// Sets default values | ||
AARPointCloudRenderer::AARPointCloudRenderer() | ||
{ | ||
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. | ||
PrimaryActorTick.bCanEverTick = true; | ||
|
||
} | ||
|
||
// Called when the game starts or when spawned | ||
void AARPointCloudRenderer::BeginPlay() | ||
{ | ||
Super::BeginPlay(); | ||
|
||
} | ||
|
||
// Called every frame | ||
void AARPointCloudRenderer::Tick(float DeltaTime) | ||
{ | ||
Super::Tick(DeltaTime); | ||
RenderPointCloud(); | ||
} | ||
|
||
void AARPointCloudRenderer::RenderPointCloud() | ||
{ | ||
UWorld* World = GetWorld(); | ||
if (!ARSystem.IsValid()) | ||
{ | ||
ARSystem = StaticCastSharedPtr<FARSystemBase>(GEngine->XRSystem); | ||
} | ||
|
||
if (UARBlueprintLibrary::GetTrackingQuality() == EARTrackingQuality::OrientationAndPosition) | ||
{ | ||
#if PLATFORM_ANDROID | ||
UGoogleARCorePointCloud* LatestPointCloud = nullptr; | ||
EGoogleARCoreFunctionStatus Status = UGoogleARCoreFrameFunctionLibrary::GetPointCloud(LatestPointCloud); | ||
if (Status == EGoogleARCoreFunctionStatus::Success && LatestPointCloud != nullptr && LatestPointCloud->GetPointNum() > 0) | ||
{ | ||
for (int i = 0; i < LatestPointCloud->GetPointNum(); i++) | ||
{ | ||
FVector PointPosition = FVector::ZeroVector; | ||
float PointConfidence = 0; | ||
LatestPointCloud->GetPoint(i, PointPosition, PointConfidence); | ||
DrawDebugPoint(World, PointPosition, PointSize, PointColor, false); | ||
} | ||
} | ||
#endif | ||
|
||
#if PLATFORM_IOS | ||
@autoreleasepool | ||
{ | ||
FAppleARKitFrame CurrentFrame; | ||
if (UAppleARKitBlueprintLibrary::GetCurrentFrame(this, CurrentFrame)) | ||
{ | ||
ARFrame* RawARKitFrame = reinterpret_cast<ARFrame*>(CurrentFrame.NativeFrame); | ||
ARPointCloud* PointCloud = RawARKitFrame.rawFeaturePoints; | ||
for (int i = 0; i < PointCloud.count; i++) | ||
{ | ||
const vector_float3* RawPosition = PointCloud.points + i; | ||
FVector PointTrackingPosition = FVector(-RawPosition->z, RawPosition->x, RawPosition->y) * 100; | ||
FVector PointPosition = (ARSystem->GetAlignmentTransform() * ARSystem->GetTrackingToWorldTransform()).TransformPosition(PointTrackingPosition); | ||
DrawDebugPoint(World, PointPosition, PointSize, PointColor, false); | ||
} | ||
} | ||
} | ||
#endif | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright 2018 Google Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "GameFramework/Actor.h" | ||
#include "ARSystem.h" | ||
#include "ARPointCloudRenderer.generated.h" | ||
|
||
UCLASS() | ||
class CLOUDARPINSAMPLE_API AARPointCloudRenderer : public AActor | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
// Sets default values for this actor's properties | ||
AARPointCloudRenderer(); | ||
|
||
/** The color of the point. */ | ||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GoogleARCore|PointCloudRenderer") | ||
FColor PointColor; | ||
|
||
/** The size of the point. */ | ||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GoogleARCore|PointCloudRenderer") | ||
float PointSize; | ||
|
||
protected: | ||
// Called when the game starts or when spawned | ||
virtual void BeginPlay() override; | ||
|
||
public: | ||
// Called every frame | ||
virtual void Tick(float DeltaTime) override; | ||
|
||
private: | ||
void RenderPointCloud(); | ||
|
||
TSharedPtr<FARSystemBase, ESPMode::ThreadSafe> ARSystem; | ||
|
||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-73 Bytes
(100%)
ComputerVision/Content/ComputerVision/ComputerVisionHud.uasset
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
ComputerVision/Source/ComputerVision/ComputerVisionGameModeBase.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
ComputerVision/Source/ComputerVision/ComputerVisionGameModeBase.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.