Global Namespace

Overview

// namespaces

namespace Collections;
namespace Diagnostics;
namespace DotNETCommon;
namespace ELicenseType;
namespace ESyncTransformFlags;
namespace ExitGames;
    namespace ExitGames::Common;
    namespace ExitGames::LoadBalancing;
namespace IO;
namespace MagesMath;
namespace MagesNetworkStatusCode;
namespace System;
namespace UnrealBuildTool;

// typedefs

typedef int EMagesNetworkStatusCode;

// enums

enum EActionType;
enum EAmbientAudioType;
enum EAnalyticsColliderBehavior;
enum EAnalyticsErrorType;
enum EAnalyticsFactorImportance;
enum EAudioClipType;
enum ECollisionType;
enum EControllerDOF;
enum EControllerTypes;
enum EDifficulty;
enum EErrorType;
enum EFactorImportance;
enum EHandState;
enum EInteractionStyle;
enum ELoginStatus;
enum EMagesButtonInteractionMethod;
enum EMagesButtons;
enum EMagesControllerButtons;
enum EMagesDeformableMeshType;
enum EMagesSDKIntegrations;
enum EMagesSyncTransformMode;
enum ENetVarType;
enum EOperationDifficulty;
enum EOvidVRHand;
enum EOwnershipOption;
enum EScoringMethod;
enum ESendMethod;
enum EUIType;
enum EVisibilityLevel;
enum InheritTransformFrom;
enum NetKeyCode;
enum OnPrefabDetachFeature;
enum ParticleGroupMehod;
enum PrefabActionOnPerform;
enum PrefabInteractableType;
enum PrefabType;
enum PumpMode;
enum ToolFlashType;
enum ToolGrabbingType;
enum ToolRotationAxis;
enum ToolTriggerButton;
enum UseColliderTrigger;

// structs

struct FActionAnalyticsData;
struct FActionGroup;
struct FActionSummary;
struct FAnalyticsErrorData;
struct FAnalyticsTimeData;
struct FAnimationGroup;
struct FAudioAsset;
struct FAvoidObjectsData;
struct FDrillCategorizeFacesDesc;
struct FDrillEvalIntersectionDesc;
struct FDrillSplitCertainFacesDesc;
struct FDuo;
struct FErrorsStayData;
struct FGenerateTearSegmentTrianglesDesc;
struct FHoloGroup;
struct FIActionGroup;
struct FInsertGroup;
struct FLineSegment;
struct FMagesActionAnalyticsEntry;
struct FMagesActionPath;
struct FMagesActionPathEntry;
struct FMagesPrepareTearResult;
struct FMagesUserEventAssetEntry;
struct FNamedTimeProfileContext;
struct FOrientationContext;
struct FPostCheckoutProduct;
struct FPumpGroup;
struct FQuestionData;
struct FQuestionOptionData;
struct FQuestionScoringData;
struct FRaiseEventBatch;
struct FRecalculateNormalsDesc;
struct FRecalculateNormalsVertexEntry;
struct FRecalculateNormalsVertexKey;
struct FRemoveGroup;
struct FReplicaCacheEntry;
struct FRetriangulateInitialTearPointsDesc;
struct FRoomInfo;
struct FScoringFactorData;
struct FScoringFactorRef;
struct FSerializationMessageInfo;
struct FSerializeViewBatch;
struct FSpawnActorDesc;
struct FTimeData;
struct FTimeProfileContext;
struct FUserCredentials;
struct FVelocityData;
struct FVelocityScoringData;
struct LocalPlayer;

// classes

class AAction;
class AActorNode;
class AAnalyticsExporter;
class AAnalyticsManager;
class AAnimationAction;
class ABPAnimationAction;
class ABPBasePrototype;
class ABPCombinedAction;
class ABPInsertAction;
class ABPParallelAction;
class ABPPumpAction;
class ABPQuestionAction;
class ABPRemoveAction;
class ABPUseAction;
class ABasePrototype;
class ACameraRigInputController;
class ACombinedAction;
class ACreateDeformMesh;
class AEventManager;
class AInsertAction;
class AJSONParser;
class ALesson;
class AMagesController;
class AMagesPlayer;
class AMagesSceneGraph;
class AMagesWidgetActor;
class AMarker;
class AOperationAnalytics;
class AParallelAction;
class APhotonLBClient;
class APickUpTransform;
class AProceduralActorComponent;
class APumpAction;
class AQuestionAction;
class ARemoveAction;
class ARigidbodyAnimationController;
class ASoftParticleHelper;
class AStage;
class AUIExtraExpNotification;
class AUINotification;
class AUseAction;
class AUserAccountManager;
class AUserPathTracer;
class AnalyticsRuntimeImporter;
class ApplicationUser;
class BaseView;
class ClientConfiguration;
class DeveloperCredentials;
class FCurrentRequest;
class FDeformableHelper;
class FMAGES_SDKModule;
class FMagesActionNode;
class FMagesInteractables;
class FMagesNetStream;
class FReplicaCache;
class FUserAction;
class IDeviceControllerInterface;
class IIAction;
class IMagesInputDevice;
class IMagesNetObservable;
class IMagesNetTransform;
class IMagesNetworkMessage;
class LoadBalancingListener;
class MAGES_SDK;
class NetMessageClass;
class PeerStatesStrChecker;
class PhotonEventHandler;
class PostRefreshLicense;
class RigidBodyAnimationBase;
class RigidBodyMoveAndRotateDualQuat;
class RigidBodyMoveDualQuat;
class Tenant;
class UAssetsImporter;
class UAuthenticationHandler;
class UAvoidObjectFactor;
class UCountDownFactor;
class UCredentialsManager;
class UDeviceControllerInterface;
class UIAction;
class UMagesActionAnalyticsListEntry;
class UMagesActionAnalyticsWidget;
class UMagesAnalyticsAsset;
class UMagesAudioSubsystem;
class UMagesButtonInput;
class UMagesButtonWidget;
class UMagesButtonsHelper;
class UMagesConfig;
class UMagesControllerClass;
class UMagesDeformableMeshData;
class UMagesDevice;
class UMagesGameplayUtility;
class UMagesInputDevice;
class UMagesInstance;
class UMagesLiveScenegraphSubsystem;
class UMagesNetObservable;
class UMagesNetTransform;
class UMagesNetwork;
class UMagesNetworkBackend;
class UMagesQuestionButtonWidget;
class UMagesScrollBox;
class UMagesSyncTransform;
class UMagesTextBoxWidget;
class UMagesTextWidget;
class UMagesUserEventAsset;
class UMagesView;
class UMagesWidget;
class UOrama_Util;
class UQuestionScoringFactor;
class URemoveWithToolConstructor;
class UScoringFactor;
class UToolNetSync;
class UUIManagement;
class UUserCredentialsSaveGame;
class UVelocityScoringFactor;
class UserAccessToken;

// global variables

static const TCHAR* Importances[] = {   TEXT("VeryLittle"),     TEXT("Little"),     TEXT("Neutral"),    TEXT("Big"),  };
static const TCHAR* ErrorTypeStrings[] = {  TEXT("Warning"),    TEXT("Error"),  TEXT("Critical Error"), };
static const TCHAR* ColliderBehaviorStrings[] = {   TEXT("Avoid Objects"),  TEXT("Must Hit Objects"),   TEXT("Stay While Interacting"), };
static uint8 USER_CREDENTIALS_KEY[FAES::FAESKey::KeySize] =  {    0x16,0x23,0x45,0x4a,0xba,0x96,0x7c,0x16,0x43,0x85,0xa0,0xcf,0x69,0x0b,0xe1,0x5f,    0x97,0x64,0x39,0x22,0xde,0x33,0xd9,0x47,0x5c,0xa9,0x6b,0xc8,0xfb,0x42,0x31,0x26  };
const ExitGames::Common::JString PeerStatesStr[] = {  L"Uninitialized",   L"PeerCreated",     L"ConnectingToNameserver",  L"ConnectedToNameserver",   L"DisconnectingFromNameserver",     L"Connecting",  L"Connected",   L"WaitingForCustomAuthenticationNextStepCall",  L"Authenticated",   L"JoinedLobby",     L"DisconnectingFromMasterserver",   L"ConnectingToGameserver",  L"ConnectedToGameserver",   L"AuthenticatedOnGameServer",   L"Joining",     L"Joined",  L"Leaving",     L"Left",    L"DisconnectingFromGameserver",     L"ConnectingToMasterserver",    L"ConnectedComingFromGameserver",   L"AuthenticatedComingFromGameserver",   L"Disconnecting",   L"Disconnected" };
class PeerStatesStrChecker checker;
static float QUESTION_ANIMATION_TIMES[(int) UQuestionPrefabConstructor::AnimationState::Count] =  {                                  0.6f,                               0.35f,                          0.5f,     -1.f,                                  0.6f,                                             -1.f, };

// global functions

static void CategorizeFaces(
    UMagesDeformableMeshData* MeshData,
    FDrillCategorizeFacesDesc* Desc
    );

static bool FindAffectedIds(
    UMagesDeformableMeshData* MeshData,
    FLineSegment Line,
    const TArray<int32>& IdsInside,
    TArray<int32>& OutAffectedIds,
    UMagesDrillComponent* This
    );

static void EvalAllIntersections(
    UMagesDeformableMeshData* MeshData,
    FDrillEvalIntersectionDesc* Desc
    );

static void EvalIntersection(
    UMagesDeformableMeshData* MeshData,
    FDrillEvalIntersectionDesc* Desc
    );

static void TriangulateModel(
    UMagesDeformableMeshData* MeshData,
    TArray<int32>& AffectedIds,
    TArray<FQuadruplet>& VRelation,
    TArray<int32>& Inside,
    TArray<int32>& IdsToBeDeleted,
    TArray<FTriplet>& AllNewFaces
    );

static void SplitCertainFaces(
    UMagesDeformableMeshData* MeshData,
    FDrillSplitCertainFacesDesc* Desc
    );

static int32 IsWithinDrill(
    const FLineSegment& DrillLine,
    float DrillRadius,
    FVector Point
    );

static void DisableShadows(AActor* actor);
void AppendToFile(FString path, FString content);
FString DoubleDigit(FString str);
FString DifficultyToString(EDifficulty diff);
const TCHAR* FactorImportanceToString(const EAnalyticsFactorImportance& Importance);
const TCHAR* ErrorTypeToString(const EAnalyticsErrorType& Type);
const TCHAR* ColliderBehaviorToString(const EAnalyticsColliderBehavior& Type);

static void CopyMaterialAttributes(
    UPrimitiveComponent* From,
    UPrimitiveComponent* To
    );

static void InternalRecalculateNormals(FRecalculateNormalsDesc* Desc);
static void InternalEnsureMatchAttributes(UMagesDeformableMeshData* Data);

static void CreateMeshSectionsForPredicates(
    UProceduralMeshComponent* Mesh,
    UMagesDeformableMeshData* Data,
    const TArray<UShapeComponent*>& Predicates,
    TArray<UMagesDeformableMeshData*>& MeshDatas,
    bool EnableDebug
    );

static FORCEINLINE bool operator == (
    const FRecalculateNormalsVertexKey& A,
    const FRecalculateNormalsVertexKey& B
    );

static FORCEINLINE bool operator != (
    const FRecalculateNormalsVertexKey& A,
    const FRecalculateNormalsVertexKey& B
    );

static FORCEINLINE uint32 GetTypeHash(const FRecalculateNormalsVertexKey& VertexKey);

template <typename T>
TArray<T> GetUniqueArray(const TArray<T>& InArray);

static TArray<FVector> GetUniqueVertices(
    const TArray<int32>& InBetween,
    const TArray<int32>& UniqueInBetween,
    const TArray<FVector>& InBetweenVertices
    );

static FVector GetFaceType(
    FVector F0,
    FVector F1,
    FVector F2,
    FPointNormalPlane Plane
    );

static int ClassifyConflictingType(FVector FaceType);

static void GenerateTearSegmentTriangles(
    FGenerateTearSegmentTrianglesDesc* Desc,
    TArray<int32>& NewTriangles,
    int32 F0,
    int32 F1,
    int32 F2
    );

static void DebugDrawTriangle(
    UWorld* World,
    FVector A,
    FVector B,
    FVector C,
    FColor Color
    );

static int32 ClosestIntersectionPointToTearPoint(
    TArray<int32>& Triangles,
    TArray<FVector>& Vertices,
    TArray<int32>& FinalPointsTriangles,
    int32 Face
    );

static int randomColor(int from = 0, int to = 256);

static void TranslateObject(
    ExitGames::Common::Hashtable& Hashtable,
    UObject* Object,
    UClass* ObjectClass,
    bool ShouldDecode
    );

static FORCEINLINE FSoftClassPath SoftClassPathFromUClass(UClass* Class);
static FORCEINLINE UClass* ClassFromSoftClassPath(FSoftObjectPath& SoftClass);

template <typename T>
static void TranslatePrimitiveValue(
    ExitGames::Common::Hashtable& Hashtable,
    UObject* Object,
    const ExitGames::Common::JString& Name,
    FProperty* Property,
    bool ShouldDecode
    );

static bool TryTranslateString(
    ExitGames::Common::Hashtable& Hashtable,
    UObject* Object,
    FProperty* Property,
    const ExitGames::Common::JString& Name,
    bool ShouldDecode
    );

static bool TryTranslateBool(
    ExitGames::Common::Hashtable& Hashtable,
    UObject* Object,
    FProperty* Property,
    const ExitGames::Common::JString& Name,
    bool ShouldDecode
    );

static bool TryTranslateNumber(
    ExitGames::Common::Hashtable& Hashtable,
    UObject* Object,
    FProperty* Property,
    const ExitGames::Common::JString& Name,
    bool ShouldDecode
    );

static void _ValidateFilePath(
    TArray<FText>& ValidationError,
    const FFilePath& Path,
    bool bCanBeEmpty,
    const char* Name
    );

static bool PackagedValidateKey(const TArray<FString> Components);
static FString EncryptDecryptKey(FString text, FString key);
static int32 DecodeKey(FString Key);

void SetWidgetInteractionComponentEnabled(
    UWidgetInteractionComponent* Component,
    bool enabled
    );

static UMagesWidgetComponent* SpawnWidgetComponent(
    AActor* ActorToAttach,
    USceneComponent* OptRoot,
    TSubclassOf<UMagesWidgetComponent> Class
    );

static AActor* BindActorReplica(UWorld* World, UClass* ActorClass);
static FString GetFullBlueprintPath(FString BasePath, FString BlueprintPath);

static FVector MoveTowards(
    FVector current,
    FVector target,
    float maxDistanceDelta
    );

static void ClampLocation(
    FVector& V,
    FVector Origin,
    float DistX,
    float DistY,
    float DistZ
    );

const MAGES_SDK_API TCHAR* FactorImportanceToString(const EAnalyticsFactorImportance& Importance);
const MAGES_SDK_API TCHAR* ErrorTypeToString(const EAnalyticsErrorType& Type);
const MAGES_SDK_API TCHAR* ColliderBehaviorToString(const EAnalyticsColliderBehavior& Type);

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FORamaAnimator,
    FString,
    AnimationName
    );

DECLARE_DYNAMIC_DELEGATE(FEventDelegate);
DECLARE_DYNAMIC_DELEGATE(FORamaVR);
DECLARE_DYNAMIC_DELEGATE_OneParam(FORamaVRSetPath, int, numberOfPath);

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FIsUserLoginSuccessfull,
    bool,
    _RESULT
    );

DECLARE_EVENT_OneParam(FIsUserLoginSuccessfull, IsLoginSuccessTEST, bool);

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnUserLoginResponse,
    ELoginStatus,
    Status
    );

DECLARE_DELEGATE_OneParam(FMagesAuthenticationCallback, ELoginStatus);
DECLARE_DELEGATE_OneParam(FMagesAuthClientCallback, FString);
DECLARE_DELEGATE_OneParam(FMagesAuthClientLicenseCallback, ELicenseType::Type);
DECLARE_DELEGATE_OneParam(FMagesAuthClientAppUserCallback, ApplicationUser*);
DECLARE_DYNAMIC_DELEGATE(FHandInteractDelegate);
DECLARE_DYNAMIC_DELEGATE(FInteractactionDelegate);
DECLARE_DELEGATE(FInteractactionStaticDelegate);

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FOnEvent,
    int,
    PlayerNumber,
    uint8,
    EventCode
    );

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnPlayerEnteredRoom,
    int,
    PlayerNumber
    );

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnCreatedRoom);
DECLARE_MULTICAST_DELEGATE_OneParam(FMagesNetDelegate, int);

FORCEINLINE bool operator == (
    const FRaiseEventBatch& Left,
    const FRaiseEventBatch& Right
    );

FORCEINLINE uint32 GetTypeHash(const FRaiseEventBatch& Batch);

DECLARE_DYNAMIC_DELEGATE_TwoParams(
    FOnMagesUserEvent,
    int,
    Sender,
    UObject*,
    EventData
    );

FORCEINLINE bool operator == (
    const FReplicaCacheEntry& A,
    const FReplicaCacheEntry& B
    );

FORCEINLINE uint32 GetTypeHash(const FReplicaCacheEntry& Entry);

DECLARE_DYNAMIC_DELEGATE_TwoParams(
    FOnMagesScenegraphEvent,
    int,
    Sender,
    FString,
    EventData
    );

DECLARE_DYNAMIC_DELEGATE(FSceneGraphEventDelegate);

DECLARE_DYNAMIC_DELEGATE_OneParam(
    FSceneGraphChangeDelegate,
    ABasePrototype*,
    Action
    );

DECLARE_DELEGATE_OneParam(
    FAuthenticationDelegate,
    class UAuthenticationHandler*
    );

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnMagesButtonClicked,
    class UMagesButtonWidget*,
    ButtonWidget
    );

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FOnMagesButtonToggled,
    class UMagesButtonWidget*,
    ButtonWidget,
    bool,
    bIsToggled
    );

DECLARE_DYNAMIC_DELEGATE_OneParam(FOnRequestDestroySelf, bool, ForceNoAnim);

DECLARE_DYNAMIC_DELEGATE_RetVal(
    class UMagesWidgetComponent*,
    FOnRequestOwnerRef
    );

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FOramaOnAnswerSubmission,
    TArray<FString>,
    GivenAsnwers,
    TArray<FString>,
    CorrectAnswers
    );

DECLARE_DYNAMIC_DELEGATE_OneParam(FOnStayTimeDelegate, float, timeValue);
FORCEINLINE uint32 GetTypeHash(const ASoftParticleHelper& Helper);

// macros

#define GET_SUBSYSTEM(T)
#define LOCTEXT_NAMESPACE
#define MAGES_DESTROY(Actor)
#define MAGES_VALID_ACTOR(Actor)
#define VALIDATE_FILE_PATH(ValidationError, Path, bCanBeEmpty)

Detailed Documentation

Global Functions

static void CategorizeFaces(
    UMagesDeformableMeshData* MeshData,
    FDrillCategorizeFacesDesc* Desc
    )

Categorize faces by their orientation with respect to the drill circle

static bool FindAffectedIds(
    UMagesDeformableMeshData* MeshData,
    FLineSegment Line,
    const TArray<int32>& IdsInside,
    TArray<int32>& OutAffectedIds,
    UMagesDrillComponent* This
    )

Find all the affected ids on the drill circle excluding the ones one the opposite side of the model

static void EvalAllIntersections(
    UMagesDeformableMeshData* MeshData,
    FDrillEvalIntersectionDesc* Desc
    )

Stores the intersection point of each edge of the mesh

static void EvalIntersection(
    UMagesDeformableMeshData* MeshData,
    FDrillEvalIntersectionDesc* Desc
    )

Stores the intersection point of the edge defined by v[i] and v[j] by the drill

static void TriangulateModel(
    UMagesDeformableMeshData* MeshData,
    TArray<int32>& AffectedIds,
    TArray<FQuadruplet>& VRelation,
    TArray<int32>& Inside,
    TArray<int32>& IdsToBeDeleted,
    TArray<FTriplet>& AllNewFaces
    )

Re triangulates the model to include the new vertices and “remove” the ones inside the drill circle

static void SplitCertainFaces(
    UMagesDeformableMeshData* MeshData,
    FDrillSplitCertainFacesDesc* Desc
    )

Split faces for affected vertices

static int32 IsWithinDrill(
    const FLineSegment& DrillLine,
    float DrillRadius,
    FVector Point
    )

Get where the point is situated with respect to the drill sector Return Value: 1 - Inside of the sector -1 - Outside of the sector 0 - On top of the sector (inside the sector boundary)

static void InternalEnsureMatchAttributes(UMagesDeformableMeshData* Data)

Ensures that UVs, normals, and tangents match up to the total number of vertices.

static void CreateMeshSectionsForPredicates(
    UProceduralMeshComponent* Mesh,
    UMagesDeformableMeshData* Data,
    const TArray<UShapeComponent*>& Predicates,
    TArray<UMagesDeformableMeshData*>& MeshDatas,
    bool EnableDebug
    )

Creates multiple mesh section depending on the predicates array, which should be populated (or not) properly before the call to Initialize()

Todo : Each section can only have a single material, can we provide an easy way to merge them?

static int ClassifyConflictingType(FVector FaceType)

Given the tuple corresponding the vertices of a face f, it returns the conflict type that corresponds to this face.

DECLARE_DYNAMIC_DELEGATE_TwoParams(
    FOnMagesScenegraphEvent,
    int,
    Sender,
    FString,
    EventData
    )

Required path definitions for scenegraph data sheets

DECLARE_DYNAMIC_DELEGATE_OneParam(FOnStayTimeDelegate, float, timeValue)

TODO: offsetTimer

Macros

#define GET_SUBSYSTEM(T)

C++ Only Shorthands