Skip to content

Instantly share code, notes, and snippets.

View connorjak's full-sized avatar

Connor Jakubik connorjak

View GitHub Profile
@connorjak
connorjak / CameraStackTypes.cpp
Last active February 5, 2024 21:32
Copy pasted source code from UE 4.27.2 that shows math details of how camera perspective matrices are calculated.
// COPY PASTED FROM UNREAL 4.27.2 SOURCE CODE
// Copyright Epic Games, Inc. All Rights Reserved.
//...
FMatrix FMinimalViewInfo::CalculateProjectionMatrix() const
{
FMatrix ProjectionMatrix;
if (ProjectionMode == ECameraProjectionMode::Orthographic)
@connorjak
connorjak / RuntimeMesh.cpp
Created February 27, 2023 23:02
Additions to RuntimeMesh (RMCv4) functionality that provide somewhat more consistent simultaneous setting of multiple meshes' visibility and shadow-casting
void URuntimeMesh::SetSectionVisibility(int32 LODIndex, int32 SectionId, bool bIsVisible)
{
RMC_LOG_VERBOSE("SetSectionVisibility called: LOD:%d Section:%d IsVisible:%d", LODIndex, SectionId, bIsVisible);
check(LODs.IsValidIndex(LODIndex));
check(LODs[LODIndex].Sections.Contains(SectionId));
FScopeLock Lock(&SyncRoot);
@connorjak
connorjak / Cleaned_ISSLive.cpp
Last active December 8, 2019 11:25
ISS Telemetry Stream
#include "./../include/ISSLIVE_Telemetry.h"
#include "./../include/TelemIdents.h"
#include "./../../../server/SystemUtils/HelperMacros.h"
#include <map>
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
@connorjak
connorjak / VisProgBar.py
Created October 4, 2018 05:01
Variable-length progress bar with percent complete and activity visualizer.
# VisProgBar 1.0
#
# Copyright 2018 Connor Jakubik
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions: