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
Animation Subsystem | |
AnimInstance is the runtime animation class that maintains runtime data & plays shit | |
- This is the parent class of the animation blueprint | |
- Get Bone Transforms from a specific time t: | |
○ Sequence->GetAnimationPose(Output.Pose, Output.Curve, FAnimExtractContext(CurrentTime, Sequence->bEnableRootMotion)); | |
UAnimationAsset is the classes that contain the actual data and also calculates bones & curves | |
- UAnimSequence |
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
#include "Misc/AutomationTest.h" | |
#if WITH_DEV_AUTOMATION_TESTS | |
// 테스트들이 공통되는 기능을 갖는다. | |
// IMPLEMENT_CUSTOM_SIMPLE_AUTOMATION_TEST()로 테스트당 클래스가 1개씩 생기는 개념 | |
class FMyTestBase : public FAutomationTestBase | |
{ | |
public: | |
FMyTestBase(const FString& InName, const bool bInComplexTask) |
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
void TestLambda() | |
{ | |
int i = 0; | |
double d = 0.0; | |
auto f0 = []() { puts("aa"); }; // sizeof(empty struct) == 1 | |
auto f1 = [myI = i]() { }; // sizeof(struct { int }) == 4 | |
auto f2 = [myD = d]() { }; // sizeof(struct { double }) == 8 | |
printf("sizeof f0[%zu] f1[%zu] f2[%zu]", sizeof(f0), sizeof(f1), sizeof(f2)); |
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
#pragma warning(disable : 4100) | |
#define DO_NOTHING(...) | |
template<typename... T_VARIADIC> | |
void ProcessVariadicParams_T(T_VARIADIC... params) | |
{ | |
DO_NOTHING(params...); | |
} |
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
#pragma warning(disable : 4710 4514) | |
#include <stdio.h> | |
#include <errno.h> | |
class CMutable | |
{ | |
private: | |
mutable int m_Val = 0; | |
public: |
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
UCLASS() | |
class FORTHEDAYSANDBOX_API UMyObject : public UObject | |
{ | |
GENERATED_BODY() | |
public: | |
virtual void BeginDestroy() override; | |
}; | |
//------------------------------------------------------------------------------ |
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
#pragma warning(disable : 4710 4514) | |
#include <vector> | |
#include <functional> | |
struct SMemHolder | |
{ | |
char *m_pBuf; | |
SMemHolder() : m_pBuf(nullptr) | |
{ |
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
#include <functional> | |
class FScopedExecuter | |
{ | |
private: | |
using T_FUNC = std::function<void(void)>; | |
T_FUNC m_Func; | |
public: | |
FScopedExecuter(T_FUNC &&rvFunc) : m_Func(rvFunc) {} |
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
class FMyTasks | |
{ | |
private: | |
using TSinglecasterArray = TArray<FSimpleDelegate>; | |
TSinglecasterArray m_Singlecasters; | |
public: | |
void AddDelegate(FSimpleDelegate &&rvDelegate) | |
{ | |
m_Singlecasters.Add(rvDelegate); |
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
class CRValue | |
{ | |
public: | |
void f() const && { puts("&&"); } | |
void f() const & { puts("& or inst"); } | |
}; | |
CRValue inst; | |
CRValue &rInst = inst; | |
inst.f(); // & or inst |
NewerOlder