text
stringlengths
1
24.5M
/* * Copyright (C) 2015 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2015 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2022 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2022 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2017 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2015 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2017 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2016 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2018 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2016 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2020 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2020 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2021 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2020 The Android Open Source Project * * 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 app...
/* * Copyright (C) 2020 The Android Open Source Project * * 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 app...
// // Created by Marc Rousavy on 20.02.24. // #include "RNFAndroidFilamentProxy.h" #include "RNFWithJNIScope.h" namespace margelo { using namespace facebook; AndroidFilamentProxy::AndroidFilamentProxy(jni::alias_ref<JFilamentProxy::javaobject> proxy, std::shared_ptr<Dispatcher> jsDispatcher) : _proxy(jni::make_...
// // Created by Marc Rousavy on 20.02.24. // #pragma once #include "RNFFilamentProxy.h" #include "java-bindings/RNFJFilamentProxy.h" #include <fbjni/fbjni.h> #include <jni.h> namespace margelo { using namespace facebook; /** * Implementation for the abstract class FilamentProxy, which uses the JNI * Hybrid Clas...
// // Created by Marc Rousavy on 05.03.24. // #include "RNFLogger.h" #include <android/log.h> #include <string> namespace margelo { void Logger::log(const std::string& tag, const std::string& message) { #if RNF_ENABLE_LOGS #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-security" __android...
// // Created by Marc Rousavy on 05.03.24. // #pragma once #include "RNFManagedBuffer.h" #include <fbjni/ByteBuffer.h> #include <fbjni/fbjni.h> namespace margelo { using namespace facebook; class AndroidManagedBuffer : public ManagedBuffer { public: explicit AndroidManagedBuffer(const jni::alias_ref<jni::JByteBu...
// // Created by Marc Rousavy on 20.02.24. // #include "RNFAndroidSurface.h" #include <android/log.h> #include <android/native_window_jni.h> namespace margelo { using namespace facebook; // This gets called in onSurfaceCreated on the main UI thread AndroidSurface::AndroidSurface(jni::alias_ref<jobject> javaSurface)...
// // Created by Marc Rousavy on 20.02.24. // #pragma once #include "RNFSurface.h" #include <android/native_window.h> #include <fbjni/fbjni.h> #include <jni.h> namespace margelo { using namespace facebook; /** * Implementation for the abstract class Surface, which uses the "ANativeWindow" * (android.media.Surfac...
#include "RNFFilamentInstaller.h" #include "RNFJChoreographer.h" #include "RNFJDispatcher.h" #include "RNFJFilamentProxy.h" #include "RNFJFilamentRecorder.h" #include "RNFJFilamentView.h" #include "RNFJSurfaceProvider.h" #include <fbjni/fbjni.h> #include <jni.h> JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) { ...
#include "RNFFilamentInstaller.h" #include "RNFAndroidFilamentProxy.h" #include "threading/RNFCallInvokerDispatcher.h" #include <fbjni/fbjni.h> #include <jni.h> #include <jsi/jsi.h> namespace margelo { void FilamentInstaller::install(jni::alias_ref<jni::JClass> clazz, jni::alias_ref<JFilamentProxy::javaobject> proxy)...
// // Created by Marc Rousavy on 20.02.24. // #include "RNFJFilamentProxy.h" #include <fbjni/fbjni.h> #include <jni.h> namespace margelo { using namespace facebook; class FilamentInstaller : public jni::JavaClass<FilamentInstaller> { public: static auto constexpr kJavaDescriptor = "Lcom/margelo/filament/FilamentI...
// // Created by Marc Rousavy on 21.02.24. // #include "RNFJNISharedPtr.h" namespace margelo {} // namespace margelo
// // Created by Marc Rousavy on 21.02.24. // #pragma once #include <fbjni/fbjni.h> #include <memory> namespace margelo { using namespace facebook; template <typename T> struct GlobalRefDeleter { explicit GlobalRefDeleter(jni::global_ref<typename T::javaobject> ref) : _ref(ref) {} void operator()(T* ptr) { ...
// // Created by Marc Rousavy on 12.03.24. // #pragma once #include <fbjni/fbjni.h> #include <functional> namespace facebook { namespace jni { template <typename T> T WithJNIScope(std::function<T()>&& lambda) { // std::optional delays default constructor std::optional<T> result; jni::ThreadScope::With...
// // Created by Marc Rousavy on 23.02.24. // #include "RNFJChoreographer.h" #include <android/choreographer.h> namespace margelo { void JChoreographer::registerNatives() { registerHybrid({ makeNativeMethod("initHybrid", JChoreographer::initHybrid), makeNativeMethod("onFrame", JChoreographer::onFrameLo...
// // Created by Marc Rousavy on 23.02.24. // #pragma once #include "RNFChoreographer.h" #include <fbjni/fbjni.h> namespace margelo { using namespace facebook; class JChoreographer : public jni::HybridClass<JChoreographer>, public Choreographer { public: static void registerNatives(); void start() override; ...
// // Created by Marc Rousavy on 12.03.24. // #include "RNFJDispatcher.h" #include <android/log.h> namespace margelo { JDispatcher::~JDispatcher() { __android_log_print(ANDROID_LOG_INFO, "JDispatcher", "Destructor called"); } JDispatcher::JDispatcher(const jni::alias_ref<jhybridobject>& javaThis) : _javaPart(jni:...
// // Created by Marc Rousavy on 12.03.24. // #pragma once #include "threading/RNFDispatcher.h" #include <fbjni/fbjni.h> namespace margelo { using namespace facebook; class JDispatcher : public jni::HybridClass<JDispatcher>, public Dispatcher { public: ~JDispatcher(); static void registerNatives(); public: ...
// // Created by Marc Rousavy on 20.02.24. // #include "RNFJFilamentProxy.h" #include "RNFAndroidManagedBuffer.h" #include "RNFJChoreographer.h" #include "RNFJDispatcher.h" #include "RNFJFilamentRecorder.h" #include "RNFJFilamentView.h" #include "RNFJNISharedPtr.h" #include <fbjni/ByteBuffer.h> #include <fbjni/fbjni.h...
// // Created by Marc Rousavy on 20.02.24. // #pragma once #include "RNFChoreographer.h" #include "RNFFilamentBuffer.h" #include "RNFFilamentRecorder.h" #include "RNFFilamentView.h" #include "threading/RNFDispatcher.h" #include <ReactCommon/CallInvokerHolder.h> #include <fbjni/fbjni.h> #include <jni.h> #include <jsi/...
// // Created by Marc Rousavy on 21.02.24. // #include "RNFJFilamentRecorder.h" #include "RNFJNISharedPtr.h" #include "java-bindings/RNFJDispatcher.h" #include <android/native_window_jni.h> namespace margelo { JFilamentRecorder::JFilamentRecorder(const jni::alias_ref<jhybridobject>& javaThis, std::shared_ptr<Dispatc...
// // Created by Marc Rousavy on 21.02.24. // #pragma once #include "RNFFilamentRecorder.h" #include "java-bindings/RNFJDispatcher.h" #include <android/native_window.h> #include <fbjni/fbjni.h> #include <jni.h> namespace margelo { using namespace facebook; class JFilamentRecorder : public jni::HybridClass<JFilamen...
// // Created by Marc Rousavy on 21.02.24. // #include "RNFJFilamentView.h" #include "RNFJNISharedPtr.h" #include "RNFJSurfaceProvider.h" namespace margelo { JFilamentView::JFilamentView(const jni::alias_ref<jhybridobject>& javaThis, const jni::alias_ref<JSurfaceProvider::javaobject>& su...
// // Created by Marc Rousavy on 21.02.24. // #pragma once #include "RNFFilamentView.h" #include "RNFJSurfaceProvider.h" #include "RNFSurfaceProvider.h" #include <fbjni/fbjni.h> #include <jni.h> namespace margelo { using namespace facebook; class JFilamentView : public jni::HybridClass<JFilamentView>, public Filam...
// // Created by Marc Rousavy on 21.02.24. // #include "RNFJSurfaceProvider.h" #include <android/log.h> namespace margelo { JSurfaceProvider::JSurfaceProvider(const jni::alias_ref<jhybridobject>& javaThis) : SurfaceProvider(), _javaPart(make_global(javaThis)) {} JSurfaceProvider::~JSurfaceProvider() { __android_l...
// // Created by Marc Rousavy on 21.02.24. // #pragma once #include "RNFAndroidSurface.h" #include "RNFSurfaceProvider.h" #include <fbjni/fbjni.h> #include <jni.h> namespace margelo { using namespace facebook; class JSurfaceProvider : public jni::HybridClass<JSurfaceProvider>, public SurfaceProvider { public: ~J...
// // Created by Marc Rousavy on 23.02.24. // #include "RNFChoreographer.h" #include "RNFListenerManager.h" namespace margelo { std::shared_ptr<Listener> Choreographer::addOnFrameListener(Choreographer::OnFrameCallback onFrameCallback) { return _listeners->add(std::move(onFrameCallback)); } void Choreographer::on...
// // Created by Marc Rousavy on 23.02.24. // #pragma once #include "RNFListener.h" #include "RNFListenerManager.h" #include <functional> namespace margelo { class Choreographer { public: explicit Choreographer() {} ~Choreographer() { Logger::log("Choreographer", "(MEMORY) Deleting Choreographer... âŒ"); ...
// // Created by Hanno Gödecke on 02.05.24. // #include "RNFChoreographerWrapper.h" namespace margelo { // Will be called on automatic removal (can happen when the runtime gets destroyed, and onRuntimeDestroyed would be called later) ChoreographerWrapper::~ChoreographerWrapper() { std::unique_lock lock(_mutex); ...
// // Created by Hanno Gödecke on 02.05.24. // #pragma once #include "RNFChoreographer.h" #include "jsi/RNFPointerHolder.h" #include "jsi/RNFRuntimeCache.h" namespace margelo { using FrameInfo = std::unordered_map<std::string, double>; using RenderCallback = std::function<void(FrameInfo)>; class ChoreographerWrap...
#pragma once #include "RNFManagedBuffer.h" #include "jsi/RNFPointerHolder.h" namespace margelo { class FilamentBuffer : public PointerHolder<ManagedBuffer> { public: explicit FilamentBuffer(std::shared_ptr<ManagedBuffer> buffer) : PointerHolder("FilamentBuffer", buffer) {} void loadHybridMethods() override {} ...
// // Created by Marc Rousavy on 20.02.24. // #include "RNFFilamentProxy.h" #include <jsi/jsi.h> #include "RNFReferences.h" #include "core/RNFEngineBackendEnum.h" #include "core/RNFEngineConfigHelper.h" #include "jsi/RNFPromise.h" #include "threading/RNFDispatcher.h" #include <memory> #include <string> #include <uti...
// // Created by Marc Rousavy on 20.02.24. // #pragma once #include <jsi/jsi.h> #include <future> #include <string> #include <vector> #include "RNFChoreographer.h" #include "RNFChoreographerWrapper.h" #include "RNFFilamentBuffer.h" #include "RNFFilamentRecorder.h" #include "RNFFilamentView.h" #include "bullet/RNFBu...
// // Created by Marc Rousavy on 02.05.24. // #include "RNFFilamentRecorder.h" #include <jsi/jsi.h> namespace margelo { using namespace facebook; FilamentRecorder::FilamentRecorder(std::shared_ptr<Dispatcher> renderThreadDispatcher, int width, int height, int fps, double bitRate) : HybridObject("FilamentRecorde...
// // Created by Marc Rousavy on 20.02.24. // #pragma once #include <functional> #include <future> #include <jsi/jsi.h> #include <string> #include "RNFListener.h" #include "RNFListenerManager.h" #include "jsi/RNFHybridObject.h" #include "threading/RNFDispatcher.h" namespace margelo { using namespace facebook; cla...
// // Created by Marc Rousavy on 20.02.24. // #include "RNFFilamentView.h" namespace margelo { FilamentView::~FilamentView() { if (_choreographer) { // When the view gets destroyed we must stop the linked choreographer Logger::log(TAG, "The FilamentView is being destroyed, stop the linked choreographer.");...
// // Created by Marc Rousavy on 20.02.24. // #pragma once #include <jsi/jsi.h> #include "RNFChoreographerWrapper.h" #include "RNFSurfaceProvider.h" #include "jsi/RNFHybridObject.h" #include <string> #include <vector> namespace margelo { using namespace facebook; class FilamentView : public HybridObject { public:...
// // Created by Marc Rousavy on 21.02.24. // #include "RNFListener.h" #include "RNFLogger.h" namespace margelo { Listener::Listener(ListenerRemover&& remove) : HybridObject(TAG), _remove(std::move(remove)), _isRemoved(false) { Logger::log(TAG, "Creating Listener..."); } Listener::~Listener() { Logger::log(TAG,...
// // Created by Marc Rousavy on 21.02.24. // #pragma once #include "jsi/RNFHybridObject.h" #include <functional> #include <memory> namespace margelo { class Listener : public HybridObject { public: using ListenerRemover = std::function<void()>; public: explicit Listener(ListenerRemover&& remove); void load...
// // Created by Marc Rousavy on 24.02.24. // #pragma once #include "RNFListener.h" #include <algorithm> #include <atomic> #include <functional> #include <list> #include <memory> #include <mutex> namespace margelo { template <typename Callback> class ListenerManager : public std::enable_shared_from_this<ListenerMan...
// // Created by Marc Rousavy on 05.03.24. // #pragma once #include <string> namespace margelo { class Logger { private: Logger() = delete; private: template <typename... Args> static std::string string_format(const std::string& format, Args... args) { int size_s = std::snprintf(nullptr, 0, format.c_str(),...
// // Created by Marc Rousavy on 05.03.24. // #pragma once #include <stddef.h> #include <stdint.h> namespace margelo { class ManagedBuffer { public: virtual ~ManagedBuffer() {} virtual const uint8_t* getData() const = 0; virtual size_t getSize() const = 0; // Note: in general we don't want to manually relea...
// // Created by Marc Rousavy on 23.02.24. // #pragma once #include <filament/Engine.h> #include <functional> #include <memory> namespace margelo { template <typename T> struct References { public: using CleanupRefFunction = std::function<void(T* ref)>; using CleanupEngineRefFunction = std::function<void(std::s...
// // Created by Marc Rousavy on 20.02.24. // #include "RNFSurface.h" namespace margelo { void Surface::loadHybridMethods() { registerHybridGetter("width", &Surface::getWidth, this); registerHybridGetter("height", &Surface::getHeight, this); } } // namespace margelo
// // Created by Marc Rousavy on 20.02.24. // #pragma once #include "jsi/RNFHybridObject.h" #include <string> #include <vector> namespace margelo { class Surface : public HybridObject { public: explicit Surface() : HybridObject("Surface") {} public: /** * Returns the surface ("native window") that can be us...
// // Created by Marc Rousavy on 20.02.24. // #include "RNFSurfaceProvider.h" #include "RNFLogger.h" namespace margelo { void SurfaceProvider::loadHybridMethods() { registerHybridMethod("getSurface", &SurfaceProvider::getSurface, this); registerHybridMethod("addOnSurfaceCreatedListener", &SurfaceProvider::addOnS...
// // Created by Marc Rousavy on 20.02.24. // #pragma once #include "RNFListener.h" #include "RNFListenerManager.h" #include "RNFSurface.h" #include "jsi/RNFHybridObject.h" #include <functional> #include <memory> #include <mutex> #include <vector> namespace margelo { class SurfaceProvider : public HybridObject { pu...
// // Created by Hanno Gödecke on 05.03.24. // #pragma once #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "jsi/RNFEnumMapper.h" namespace margelo { enum class ActivationState : int { STATE_ACTIVE_TAG = ACTIVE_TAG, STATE_ISLAND_SLEEPING = ISLAND_SLEEPING, STATE_WANTS_DEACTIVATION =...
// // Created by Hanno Gödecke on 15.03.24. // #pragma once #include "RNFShapeWrapper.h" namespace margelo { class BoxShapeWrapper : public ShapeWrapper { public: explicit BoxShapeWrapper(double x, double y, double z) : ShapeWrapper("BoxShapeWrapper", std::make_shared<btBoxShape>(btVector3(x, y, z))) {} };...
// // Created by Hanno Gödecke on 05.03.24. // #include "RNFBulletWrapper.h" namespace margelo { void BulletWrapper::loadHybridMethods() { registerHybridMethod("createDiscreteDynamicWorld", &BulletWrapper::createDiscreteDynamicWorld, this); registerHybridMethod("createRigidBody", &BulletWrapper::createRigidBody...
// // Created by Hanno Gödecke on 05.03.24. // #pragma once #include "RNFBoxShapeWrapper.h" #include "RNFCylinderShapeWrapper.h" #include "RNFCylinderShapeWrapperX.h" #include "RNFCylinderShapeWrapperZ.h" #include "RNFDiscreteDynamicWorldWrapper.h" #include "RNFRigidBodyWrapper.h" #include "RNFSphereShapeWrapper.h" ...
// // Created by Hanno Gödecke on 15.03.24. // #pragma once #include "RNFShapeWrapper.h" namespace margelo { class CylinderShapeWrapper : public ShapeWrapper { public: explicit CylinderShapeWrapper(double x, double y, double z) : ShapeWrapper("CylinderShapeWrapper", std::make_shared<btCylinderShape>(btVect...
// // Created by Hanno Gödecke on 15.03.24. // #pragma once #include "RNFShapeWrapper.h" namespace margelo { class CylinderShapeWrapperX : public ShapeWrapper { public: explicit CylinderShapeWrapperX(double x, double y, double z) : ShapeWrapper("CylinderShapeWrapperX", std::make_shared<btCylinderShapeX>(bt...
// // Created by Hanno Gödecke on 15.03.24. // #pragma once #include "RNFShapeWrapper.h" namespace margelo { class CylinderShapeWrapperZ : public ShapeWrapper { public: explicit CylinderShapeWrapperZ(double x, double y, double z) : ShapeWrapper("CylinderShapeWrapperZ", std::make_shared<btCylinderShapeZ>(bt...
// // Created by Hanno Gödecke on 05.03.24. // #include "RNFDiscreteDynamicWorldWrapper.h" namespace margelo { DiscreteDynamicWorldWrapper::DiscreteDynamicWorldWrapper(double gravityX, double gravityY, double gravityZ) : HybridObject("DiscreteDynamicWorldWrapper") { broadphase = std::make_unique<btDbvtBroadpha...
// // Created by Hanno Gödecke on 05.03.24. // #pragma once #include "RNFRigidBodyWrapper.h" #include "jsi/RNFHybridObject.h" #include <btBulletDynamicsCommon.h> #include <list> namespace margelo { class DiscreteDynamicWorldWrapper : public HybridObject { public: explicit DiscreteDynamicWorldWrapper(double grav...
// // Created by Hanno Gödecke on 05.03.24. // #include "RNFRigidBodyWrapper.h" #include "RNFActivationStateEnum.h" #include "jsi/RNFEnumMapper.h" namespace margelo { RigidBodyWrapper::RigidBodyWrapper(double mass, std::shared_ptr<btCollisionShape> shape, std::unique_ptr<btMotionState> motionState, ...
// // Created by Hanno Gödecke on 05.03.24. // #pragma once #include "RNFActivationStateEnum.h" #include "core/RNFFilamentAssetWrapper.h" #include "core/math/RNFTMat44Wrapper.h" #include "jsi/RNFHybridObject.h" #include <btBulletDynamicsCommon.h> namespace margelo { class RigidBodyWrapper; /** * first arg: "thi...
// // Created by Hanno Gödecke on 18.03.24. // #include "RNFShapeWrapper.h" namespace margelo { void margelo::ShapeWrapper::loadHybridMethods() { registerHybridGetter("localScaling", &ShapeWrapper::getLocalScaling, this); registerHybridSetter("localScaling", &ShapeWrapper::setLocalScaling, this); registerHybr...
// // Created by Hanno Gödecke on 15.03.24. // #pragma once #include "jsi/RNFHybridObject.h" #include <btBulletDynamicsCommon.h> namespace margelo { /** * Base class for all bullet collision shapes. * Every new collision shape we want to support in the API should be derived from this class. */ class ShapeWrappe...
// // Created by Hanno Gödecke on 15.03.24. // #pragma once #include "RNFShapeWrapper.h" namespace margelo { class SphereShapeWrapper : public ShapeWrapper { public: explicit SphereShapeWrapper(double radius) : ShapeWrapper("SphereShapeWrapper", std::make_shared<btSphereShape>(radius)) {} }; } // namespace marg...
// // Created by Hanno Gödecke on 15.03.24. // #pragma once #include "RNFShapeWrapper.h" namespace margelo { class StaticPlaneShapeWrapper : public ShapeWrapper { public: explicit StaticPlaneShapeWrapper(double x, double y, double z, double planeConstant) : ShapeWrapper("StaticPlaneShapeWrapper", std::make...
// // Created by Hanno Gödecke on 18.03.24. // #include "RNFAABBWrapper.h" namespace margelo { void AABBWrapper::loadHybridMethods() { registerHybridGetter("center", &AABBWrapper::getCenter, this); registerHybridGetter("halfExtent", &AABBWrapper::getHalfExtent, this); registerHybridGetter("min", &AABBWrapper::...
// // Created by Hanno Gödecke on 18.03.24. // #pragma once #include <filament/Box.h> #include <jsi/RNFHybridObject.h> namespace margelo { using namespace filament; class AABBWrapper : public HybridObject { public: explicit AABBWrapper(const Aabb& aabb) : HybridObject("AABBWrapper"), _aabb(aabb) {} void loadH...
// // Created by Hanno Gödecke on 12.04.24. // #pragma once #include "RNFQualityLevel.h" #include "jsi/RNFHybridObject.h" #include <filament/Options.h> namespace margelo { using namespace filament; class AmbientOcclusionOptionsWrapper : public HybridObject, public AmbientOcclusionOptions { public: explicit Ambi...
// // Created by Hanno Gödecke on 29.02.24. // #include "RNFAnimatorWrapper.h" #include <filament/Engine.h> #include <filament/TransformManager.h> #include <utils/NameComponentManager.h> namespace margelo { void AnimatorWrapper::loadHybridMethods() { registerHybridMethod("applyAnimation", &AnimatorWrapper::applyAn...
// // Created by Hanno Gödecke on 29.02.24. // #pragma once #include "RNFFilamentAssetWrapper.h" #include "RNFFilamentInstanceWrapper.h" #include "jsi/RNFHybridObject.h" #include <gltfio/Animator.h> #include <utils/NameComponentManager.h> #include <map> namespace margelo { using namespace filament::gltfio; using ...
// // Created by Hanno Gödecke on 29.02.24. // #pragma once #include "jsi/RNFEnumMapper.h" #include <filament/Options.h> namespace margelo { namespace EnumMapper { using namespace filament; static void convertJSUnionToEnum(const std::string& inUnion, AntiAliasing* outEnum) { if (inUnion == "none") *...
// RNFBloomOptionsWrapper.h // Created by Hanno Gödecke on 30.06.25. #pragma once #include "RNFQualityLevel.h" #include "jsi/RNFHybridObject.h" #include <filament/Options.h> namespace margelo { using namespace filament; class BloomOptionsWrapper : public HybridObject, public BloomOptions { public: explicit Bloom...
// // Created by Hanno Gödecke on 18.03.24. // #include "RNFBoxWrapper.h" namespace margelo { void BoxWrapper::loadHybridMethods() { registerHybridGetter("center", &BoxWrapper::getCenter, this); registerHybridGetter("halfExtent", &BoxWrapper::getHalfExtent, this); registerHybridGetter("min", &BoxWrapper::getMi...
// // Created by Hanno Gödecke on 18.03.24. // #pragma once #include <filament/Box.h> #include <jsi/RNFHybridObject.h> namespace margelo { using namespace filament; class BoxWrapper : public HybridObject { public: explicit BoxWrapper(const Box& box) : HybridObject("BoxWrapper"), _box(box) {} void loadHybridMe...
// // Created by Marc Rousavy on 22.02.24. // #pragma once #include "jsi/RNFEnumMapper.h" #include <filament/Camera.h> namespace margelo { using namespace filament; namespace EnumMapper { static void convertJSUnionToEnum(const std::string& inUnion, Camera::Fov* outEnum) { if (inUnion == "horizontal") *o...
#include "RNFCameraWrapper.h" #include "RNFCameraFovEnum.h" void margelo::CameraWrapper::loadHybridMethods() { registerHybridMethod("lookAtCameraManipulator", &CameraWrapper::lookAtCameraManipulator, this); registerHybridMethod("lookAt", &CameraWrapper::lookAt, this); registerHybridMethod("setLensProjection", &C...
#pragma once #include "jsi/RNFPointerHolder.h" #include "utils/RNFManipulatorWrapper.h" #include <filament/Camera.h> namespace margelo { using namespace filament; class CameraWrapper : public PointerHolder<Camera> { public: explicit CameraWrapper(std::shared_ptr<Camera> camera) : PointerHolder("CameraWrapper", ca...
// // Created by Marc Rousavy on 22.02.24. // #pragma once #include "jsi/RNFEnumMapper.h" #include <backend/DriverEnums.h> namespace margelo { using namespace filament; namespace EnumMapper { static void convertJSUnionToEnum(const std::string& inUnion, backend::CullingMode* outEnum) { if (inUnion == "none") ...
// // Created by Hanno Gödecke on 29.02.24. // #pragma once #include "jsi/RNFEnumMapper.h" #include <filament/Options.h> namespace margelo { namespace EnumMapper { using namespace filament; static void convertJSUnionToEnum(const std::string& inUnion, Dithering* outEnum) { if (inUnion == "none") *out...
// // Created by Hanno Gödecke on 19.04.24. // #pragma once #include "RNFQualityLevel.h" #include "jsi/RNFHybridObject.h" #include <filament/Options.h> namespace margelo { using namespace filament; class DynamicResolutionOptionsWrapper : public HybridObject, public DynamicResolutionOptions { public: explicit Dy...
// // Created by Hanno Gödecke on 11.04.24. // #pragma once #include "jsi/RNFEnumMapper.h" #include <filament/Engine.h> namespace margelo { namespace EnumMapper { using namespace filament; static void convertJSUnionToEnum(const std::string& inUnion, Engine::Backend* outEnum) { if (inUnion == "default") ...
// // Created by Hanno Gödecke on 11.04.24. // #include "RNFEngineConfigHelper.h" namespace margelo { Engine::Config EngineConfigHelper::makeConfigFromUserParams(std::optional<std::unordered_map<std::string, int>> arguments) { Engine::Config config = {}; if (!arguments.has_value()) { return config; } a...
// // Created by Hanno Gödecke on 11.04.24. // #pragma once #include <filament/Engine.h> #include <optional> #include <unordered_map> namespace margelo { using namespace filament; class EngineConfigHelper { public: static Engine::Config makeConfigFromUserParams(std::optional<std::unordered_map<std::string, int>...
// // Created by Marc Rousavy on 21.02.24. // #include "RNFEngineImpl.h" #include "RNFReferences.h" #include "utils/RNFConverter.h" #include <filament/Camera.h> #include <filament/Color.h> #include <filament/Engine.h> #include <filament/Fence.h> #include <filament/IndirectLight.h> #include <filament/LightManager.h> ...
// // Created by Marc Rousavy on 21.02.24. // #pragma once #include "jsi/RNFPointerHolder.h" #include "RNFChoreographer.h" #include "RNFFilamentAssetWrapper.h" #include "RNFFilamentBuffer.h" #include "RNFFilamentRecorder.h" #include "RNFLightManagerWrapper.h" #include "RNFMaterialWrapper.h" #include "RNFNameComponen...
// // Created by Hanno Gödecke on 30.04.24. // #include "RNFEngineImpl.h" #include "RNFReferences.h" #include "utils/RNFConverter.h" #include <filament/Scene.h> #include <filament/Skybox.h> #include <ktxreader/Ktx1Reader.h> namespace margelo { void EngineImpl::createAndSetSkybox(std::string hexColor, std::optiona...
// // Created by Marc Rousavy on 21.02.24. // #include "RNFEngineWrapper.h" #include "RNFReferences.h" #include "RNFRendererWrapper.h" #include "utils/RNFConverter.h" #include <filament/Color.h> #include <filament/Engine.h> #include <filament/Fence.h> #include <filament/IndirectLight.h> #include <filament/LightManag...
// // Created by Marc Rousavy on 21.02.24. // #pragma once #include "jsi/RNFPointerHolder.h" #include "RNFCameraWrapper.h" #include "RNFChoreographer.h" #include "RNFFilamentAssetWrapper.h" #include "RNFFilamentBuffer.h" #include "RNFRenderableManagerWrapper.h" #include "RNFRendererWrapper.h" #include "RNFSceneWrapp...
#include "RNFFilamentAssetWrapper.h" #include "RNFAnimatorWrapper.h" #include "RNFFilamentInstanceWrapper.h" #include "RNFSceneWrapper.h" #include <utils/Entity.h> #include <utils/EntityInstance.h> namespace margelo { using namespace utils; void FilamentAssetWrapper::loadHybridMethods() { registerHybridMethod("ge...
#pragma once #include "RNFAABBWrapper.h" #include "RNFNameComponentManagerWrapper.h" #include "core/utils/RNFEntityWrapper.h" #include "jsi/RNFPointerHolder.h" #include <filament/TransformManager.h> #include <gltfio/FilamentAsset.h> namespace margelo { class SceneWrapper; class AnimatorWrapper; class FilamentInstanc...