Skip to content

Instantly share code, notes, and snippets.

View rishabh-battulwar's full-sized avatar

Rishabh Battulwar rishabh-battulwar

  • Loom AI
  • San Francisco
View GitHub Profile
@rishabh-battulwar
rishabh-battulwar / kCVPixelFormatType
Last active April 3, 2023 01:33
CVPixelFormatType OSType
kCVSMPTETimeType24 = 0;
kCVSMPTETimeType25 = 1;
kCVSMPTETimeType30Drop = 2;
kCVSMPTETimeType30 = 3;
kCVSMPTETimeType2997 = 4;
kCVSMPTETimeType2997Drop = 5;
kCVSMPTETimeType60 = 6;
kCVSMPTETimeType5994 = 7;
kCVSMPTETimeValid = (1 shl 0);
kCVSMPTETimeRunning = (1 shl 1);
@rishabh-battulwar
rishabh-battulwar / XcodeBuildSettingsReference.md
Created September 21, 2021 21:30 — forked from NSExceptional/XcodeBuildSettingsReference.md
The Xcode Build Settings Reference in a searchable document, as of Xcode 8.3.2

Build settings reference

Active Build Action (ACTION)

A string identifying the build system action being performed.

Additional SDKs (ADDITIONAL_SDKS)

The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.

Alternate Install Group (ALTERNATE_GROUP)

@rishabh-battulwar
rishabh-battulwar / CoordinateSystems.md
Last active April 29, 2024 04:04
Math and 3D Graphics

Metal

NDC
Point(-1, -1) in NDC is located at the the bottom left corner (Y up)

Viewport coordinate For writing into attachment or reading from attachment or copy/blit between attachments, we use framebuffer coordiante to specify the location.
The origin(0, 0) is located at the top-left corner (Y down).

@rishabh-battulwar
rishabh-battulwar / quaternion_average.h
Created June 1, 2020 17:50 — forked from PeteBlackerThe3rd/quaternion_average.h
Rotation quaternion average calculation function using Eigen
#include <Eigen/SVD>
/// Method to find the average of a set of rotation quaternions using Singular Value Decomposition
/*
* The algorithm used is described here:
* https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20070017872.pdf
*/
Eigen::Vector4f quaternionAverage(std::vector<Eigen::Vector4f> quaternions)
{
if (quaternions.size() == 0)