repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
MintaiDS/White
Source/Engine/Graphics/Drawing/Camera.h
<reponame>MintaiDS/White #pragma once #include "ITransformable.h" #include "Matrix.h" #include <sstream> #include <fstream> using namespace White::Util::Math; namespace White { namespace Engine { template<typename T> class Camera : public ITransformable { public: Camera(); virtual void Scale(const Vector<...
MintaiDS/White
Source/Engine/Graphics/Core/Pipeline.h
#pragma once namespace White { namespace Engine { namespace Graphics { struct Pipeline { }; } } }
MintaiDS/White
Source/GraphVisualizer/GraphVisualizer.h
#pragma once #include "Game.h" #include "Overseer.h" #include "Vector.h" #include "GraphView.h" #include "Camera.h" #include "Thread.h" #include <string> #include <chrono> using namespace White::Util::Math; using namespace Threading; namespace White { namespace Engine { namespace Graphics { class GraphVisualizer :...
MintaiDS/White
Source/Util/System/Logger.h
<gh_stars>0 #pragma once #include <fstream> namespace White { namespace Util { class Logger { public: static Logger& GetInstance(); void Init(std::string filename); void Close(); template<typename T> void Log(T value); Logger& operator<<(short value); Logger& operator<<(unsigne...
MintaiDS/White
Source/Engine/Graphics/Drawing/VertexAttribute.h
#pragma once #include "Vector.h" #include <algorithm> using namespace White::Util::Math; namespace White { namespace Engine { namespace Graphics { template<typename T> struct VertexAttribute { VertexAttribute(); VertexAttribute(const Vector<T>& data); VertexAttribute(const VertexAttribute<T>& other); ...
MintaiDS/White
Source/Engine/Graphics/Drawing/DigitMeshCreator.h
<filename>Source/Engine/Graphics/Drawing/DigitMeshCreator.h #pragma once #include "MeshLoader.h" namespace White { namespace Engine { namespace Graphics { class DigitMeshCreator { public: void Load(); Mesh<float> GetMeshForDigit(int digit); protected: std::vector<Mesh<float>> digitMeshes; }; } } }
MintaiDS/White
Source/Engine/Graphics/Shader/Shader.h
<reponame>MintaiDS/White<filename>Source/Engine/Graphics/Shader/Shader.h #pragma once #include "GLFunctions.h" #include <string> namespace White { namespace Engine { namespace Graphics { struct Shader { Shader(); ~Shader(); void Create(GLenum shaderType = GL_VERTEX_SHADER); void Source(const s...
MintaiDS/White
Source/Util/Math/Color.h
<filename>Source/Util/Math/Color.h #pragma once namespace White { namespace Util { namespace Math { template<typename T> struct Color { Color(T r = 0, T g = 0, T b = 0, T a = 0); T& r = rgba[0]; T& g = rgba[1]; T& b = rgba[2]; T& a = rgba[3]; T rgba[4]; }; template<typename T> Color<T>::Colo...
MintaiDS/White
Source/Engine/Graphics/Drawing/Mesh.h
<reponame>MintaiDS/White #pragma once #include "ObjectIDProvider.h" #include "InterfaceProvider.h" #include "ITransformable.h" #include "VertexData.h" #include "IDrawable.h" #include "Polygon.h" #include "Matrix.h" #include "Object.h" #include <windows.h> #include <gl/gl.h> using namespace White::Util::Math; namesp...
MintaiDS/White
Source/Util/Math/Algo.h
<reponame>MintaiDS/White #pragma once #include "Graph.h" #include <vector> #include <queue> #include <algorithm> #include <map> #include "Logger.h" namespace White { namespace Util { namespace Math { std::vector<std::pair<Edge*, bool>> Dijkstra(Graph& g, int id, const std::map<int, int>* for...
MintaiDS/White
Source/Engine/Graphics/Core/ContextState.h
#pragma once #include "DrawingCommand.h" #include "RenderData.h" #include "Program.h" #include "Shader.h" namespace White { namespace Engine { namespace Graphics { class ContextState { public: ContextState(); bool IsInitialized() const; void Init(); void Activate(); void Destroy(); void Rend...
MintaiDS/White
Source/Util/Math/Connection.h
#pragma once #include <string> #include <vector> #ifdef __unix__ #include <unistd> #define on_Windows 0 #else #include <winsock.h> #define on_Windows 1 //#pragma comment(lib, "Ws2_32.lib") #endif #include "Logger.h" namespace White { namespace Util { namespace Math { #define SERVER_ADDR "wgfo...
MintaiDS/White
Source/Engine/Graphics/Drawing/BufferObject.h
<reponame>MintaiDS/White<gh_stars>0 #pragma once #include "GLFunctions.h" namespace White { namespace Engine { namespace Graphics { class BufferObject { public: void Create(); void Bind(GLenum target); void Delete(); void SetData(GLsizeiptr size, const GLvoid* data, GLenum usage); void SetSu...
MintaiDS/White
Source/Engine/Graphics/Drawing/VertexData.h
#pragma once #include "VertexAttribute.h" using namespace White::Util::Math; namespace White { namespace Engine { namespace Graphics { template<typename T> struct VertexData { VertexData(); VertexData(const std::vector<VertexAttribute<T>>& attributes); std::size_t GetSize() const; std::size_t GetCo...
MintaiDS/White
Source/Util/Math/Edge.h
<gh_stars>0 #pragma once namespace White { namespace Util { namespace Math { class Edge { public: Edge() {} Edge(int idx, int length, int from, int to) : idx(idx), length(length) { v[0] = from; v[1] = to; } int GetIdx() { return idx; } ...
MintaiDS/White
Source/Engine/Graphics/Drawing/VertexArrayObject.h
<filename>Source/Engine/Graphics/Drawing/VertexArrayObject.h #pragma once #include "GLFunctions.h" namespace White { namespace Engine { namespace Graphics { class VertexArrayObject { public: void Create(); void Bind(); void Delete(); private: GLuint id; }; } } }
MintaiDS/White
Source/Engine/Graphics/Core/Interface/IObject.h
#pragma once namespace White { class Object { public: virtual ~Object(); }; }
MintaiDS/White
Source/Engine/Graphics/Core/Object.h
#pragma once #include <vector> namespace White { class Object { public: virtual ~Object(); virtual void AddChild(unsigned child); protected: std::vector<unsigned> childs; }; }
MintaiDS/White
Source/Engine/Graphics/Core/RenderData.h
<filename>Source/Engine/Graphics/Core/RenderData.h #pragma once #include "Model.h" #include "BufferObject.h" #include "VertexArrayObject.h" namespace White { namespace Engine { namespace Graphics { class RenderData { public: RenderData(); void Init(); void Activate(); void AddModel(unsigned model); ...
MintaiDS/White
Source/Engine/Threading/Mutex.h
<filename>Source/Engine/Threading/Mutex.h #pragma once #include <windows.h> namespace Threading { class Mutex { public: Mutex(); void Create(); void Wait(); void Release(); protected: HANDLE hMutex; }; }
MintaiDS/White
Source/Engine/Graphics/Core/IndexProvider.h
<gh_stars>0 #pragma once #include <deque> #include <map> #include <iterator> namespace White { namespace Engine { template<typename T = unsigned, typename U = unsigned> class IndexProvider { public: IndexProvider(); void Add(T key, U index); void Remove(T key); U Get(T key); protected: std::map...
MintaiDS/White
Source/Engine/Graphics/Core/ObjectManager.h
#pragma once #include "ObjectStorage.h" #include "ObjectIDProvider.h" #include <memory> namespace White { namespace Engine { class ObjectManager { public: static ObjectManager& GetInstance(); std::weak_ptr<Object> GetObjectById(unsigned id); void AddObject(std::weak_ptr<Object> object); template<cla...
MintaiDS/White
Source/Engine/Graphics/Core/MeshManager.h
#pragma once namespace White { namespace Engine { namespace Graphics { } } }
MintaiDS/White
Source/Engine/Graphics/Core/Interface/ITransformable.h
<reponame>MintaiDS/White<gh_stars>0 #pragma once #include "IScalable.h" #include "IRotatable.h" #include "ITranslatable.h" using namespace White::Util::Math; namespace White { namespace Engine { class ITransformable : public IScalable, public IRotatable, public ITransl...
MintaiDS/White
Source/Util/Math/Common.h
<filename>Source/Util/Math/Common.h #pragma once namespace White { namespace Util { namespace Math { constexpr double pi = 3.14159265358979; template<typename T> T ToRadians(T angle) { return angle * pi / 180.0; } template<typename T> T ToDegrees(T angle) { return angle * 180.0 / pi; } } } }
MintaiDS/White
Source/Engine/Graphics/Util/BMPLoader.h
<gh_stars>0 #pragma once #include "BMPImage.h" #include <string> namespace White { namespace Engine { namespace Util { class BMPLoader { public: BMPLoader(); void Import(std::wstring filename); void Export(std::wstring filename); BMPImage GetImage(); protected: BMPImage image; }; } } }
MintaiDS/White
Source/Engine/Graphics/OpenGL/GLFunctions.h
<filename>Source/Engine/Graphics/OpenGL/GLFunctions.h #pragma once #include <windows.h> #include <gl/gl.h> #include <gl/glext.h> #include <gl/glcorearb.h> #define EXTERN_FUNCTION_ADDRESS(type, name) \ typedef type name##_gl_type; \ extern name##_gl_type name namespace White { namespace Engine { name...
MintaiDS/White
Source/Engine/Graphics/Drawing/DrawElements.h
#pragma once #include <windows.h> #include <gl/gl.h> namespace White { namespace Engine { namespace Render { struct DrawElements { void Invoke(); GLenum mode; }; } } }
MintaiDS/White
Source/Engine/Graphics/Core/StartupSettings.h
#pragma once #include <windows.h> #include <string> #include <vector> namespace White { namespace Engine { class StartupSettings { public: static StartupSettings& GetInstance(); std::vector<std::wstring> GetArgs(); void PushArg(std::wstring arg); void ParseCommandLineArgs(); HWND GetWindowHandl...
MintaiDS/White
Source/Util/Math/Matrix.h
#pragma once #include <memory> #include <algorithm> #include "Vector.h" namespace White { namespace Util { namespace Math { template<typename T> struct Matrix { Matrix(); Matrix(std::size_t dimension); Matrix(std::size_t rows, std::size_t columns); Matrix(std::size_t rows, std::size_t columns, T** v...
MintaiDS/White
Source/Engine/Threading/Thread.h
<filename>Source/Engine/Threading/Thread.h #pragma once #include <windows.h> namespace Threading { template<typename T> class Thread { public: Thread(); void Create(); void Start(T* obj, DWORD (T::*ExecuteFunction)()); protected: DWORD ExecuteThread(); static DWORD WINAPI StartThread(LPVOID lp...
MintaiDS/White
Source/Util/Math/Rectangle.h
#pragma once #include "Shape.h" namespace White { namespace Util { namespace Math { template<typename T, typename U = unsigned> struct Rectangle : public Shape<T> { Rectangle(const T w, const T h); Mesh<T, U> ToMesh(const Vector<T>& color, int verticesCnt); virtual Polygon<T> ToPolygon(int verticesCnt);...
MintaiDS/White
Source/Util/Math/Overseer.h
#pragma once #include "Graph.h" #include "Connection.h" #include <set> #include <map> #include <string> #include <time.h> namespace White { namespace Util { namespace Math { class Overseer { public: Overseer(); void Init(std::string playerName, std::string game, st...
MintaiDS/White
Source/Engine/Graphics/Core/RawDataBlock.h
#pragma once namespace White { template<typename T> class RawDataBlock { public: template<typename T> T* GetDestPtr(); template<typename T> const T* GetSrcPtr(); private std::unique_ptr<void*> dataPtr; }; template<typename T> T* RawDataBlock.GetDestPtr() { return reinterpret_cast<T*>(dataPt...
MintaiDS/White
Source/Util/Math/Disk.h
#pragma once #include "Circle.h" #include <iostream> #include <fstream> namespace White { namespace Util { namespace Math { template<typename T, typename U = unsigned> struct Disk : public Circle<T> { Disk(T r); virtual Polygon<GLfloat> ToPolygon(int verticesCnt); virtual Mesh<T, U> ToMesh(const Vector...
MintaiDS/White
Source/Engine/Graphics/Interface/IDrawable.h
<reponame>MintaiDS/White #pragma once #include "Vector.h" using namespace White::Util::Math; namespace White { namespace Engine { namespace Graphics { template<typename T> struct IDrawable { virtual void Rotate(const Vector<T>& rotation); virtual void Scale(const Vector<T>& scaling); virtual void Transl...
MintaiDS/White
Source/Engine/Graphics/Drawing/ModelFormat.h
#pragma once #include <string> #include <vector> namespace White { namespace Engine { namespace Graphics { struct ModelFormat { ModelFormat(); bool operator==(const ModelFormat& other) const; int numAttributes; int numShaders; bool isIndexed; bool isTextured; std::vector<unsigned> numCo...
MintaiDS/White
Source/Engine/Graphics/Core/MotionController.h
<gh_stars>0 #pragma once #include "ITransformable.h" namespace White { namespace Engine { template<typename T> class MotionController : public Controller, public ITransformable { public: MotionController(); virtual void Scale(const Vector<float>& scaling); virtual void Rotate(const Vector<float>& rotati...
MintaiDS/White
Source/Engine/Graphics/Core/Controller.h
#pragma once #include "Object.h" namespace White { namespace Engine { class Controller : public Object { }; } }
MintaiDS/White
Source/Engine/Graphics/Core/InterfaceProvider.h
#pragma once #include "Object.h" #include "ObjectManager.h" #include <memory> using namespace White::Engine; namespace White { class InterfaceProvider { public: InterfaceProvider(unsigned id = 0); template<typename T> std::shared_ptr<T> Query(); template<typename T> std::shared_ptr<T> Query(...
MintaiDS/White
Source/Engine/Graphics/Core/ObjectStorage.h
<filename>Source/Engine/Graphics/Core/ObjectStorage.h<gh_stars>0 #pragma once #include "Object.h" #include <vector> #include <memory> namespace White { class ObjectStorage { public: std::weak_ptr<Object> GetObjectById(unsigned id); void AddObject(std::weak_ptr<Object> object); protected: std::vector<s...
MintaiDS/White
Source/Engine/Graphics/Core/Core.h
#pragma once #include "Renderer.h" namespace White { namespace Engine { namespace Graphics { struct Core { Renderer renderer; }; } } }
MintaiDS/White
Source/Engine/Graphics/Util/ModelLoader.h
#pragma once #include "MeshLoader.h" #include "TextureLoader.h" #include "ModelFormat.h" #include "Model.h" namespace White { namespace Engine { namespace Graphics { class ModelLoader { public: ModelLoader(std::wstring dir = L""); Model Import(std::wstring filename); void Export(std::wstring filename);...
MintaiDS/White
Source/GraphVisualizer/Grid.h
<filename>Source/GraphVisualizer/Grid.h<gh_stars>0 #pragma once #include "Vector.h" #include "Cell.h" #include <vector> namespace White { struct Grid { Grid(float gridPositionX = 0.0f, float gridPositionY = 0.0f, int gridWidth = 0, int gridHeight = 0, float cellWidth = 0.0f, float cellHeight ...
MintaiDS/White
Source/Engine/Graphics/Util/BMPImage.h
#pragma once #include <memory> namespace White { namespace Engine { namespace Util { class BMPImage { public: BMPImage(); BMPImage(const BMPImage& other); BMPImage& operator=(const BMPImage& other); void SetData(int size, const std::unique_ptr<unsigned char[]>& data); void SetWidth(int width); ...
MintaiDS/White
Source/Engine/Graphics/Core/ObjectIDProvider.h
#pragma once #include <deque> namespace White { namespace Engine { template<typename T> class ObjectIDProvider { public: ObjectIDProvider(); T GetNextID(); void Free(T id); protected: T lastID; std::deque<T> freeIDs; }; template<typename T> ObjectIDProvider<T>::ObjectIDProvider() : lastID(0) {...
MintaiDS/White
Source/Util/Math/Segment.h
#pragma once #include "Vector.h" #include "Polygon.h" #include "Rectangle.h" #include "Shape.h" namespace White { namespace Util { namespace Math { template<typename T, typename U = unsigned> struct Segment : public Shape<T> { Segment(const Vector<T>& begin, const Vector<T>& end); virtual Polygon<GLfloat> T...
MintaiDS/White
Source/GraphVisualizer/Cell.h
#pragma once #include "Vector.h" namespace White { struct Cell { Cell(const Util::Math::Vector<int>& cellPosition = {0, 0}, const Util::Math::Vector<float>& vertexPosition = {0.0f, 0.0f}); Util::Math::Vector<int> cellPosition; Util::Math::Vector<float> vertexPosition; }; }
MintaiDS/White
Source/GraphVisualizer/GraphView.h
#pragma once #include "Graph.h" #include "Vector.h" #include "Grid.h" #include "Renderer.h" #include "Train.h" using namespace White::Util::Math; class GraphView { public: GraphView(); void Init(); void Display(); void DisplayNode(int node); void DisplayPost(int node); void DisplayEdge(Edge*...
MintaiDS/White
Source/Engine/Graphics/Core/Renderer.h
<reponame>MintaiDS/White<gh_stars>0 #pragma once #include "BufferObject.h" #include "VertexArrayObject.h" #include "Program.h" #include "Mesh.h" #include "Model.h" #include "ContextState.h" #include <chrono> namespace White { namespace Engine { namespace Graphics { class GraphVisualizer; class Game; class Renderer...
MintaiDS/White
Source/Engine/Graphics/Core/Game.h
#pragma once #include "Renderer.h" namespace White { namespace Engine { namespace Graphics { class Renderer; class Game { public: Game(Renderer& renderer); virtual void Play(); protected: Renderer& renderer; }; } } }
MintaiDS/White
Source/Engine/Graphics/OpenGL/GLInitializer.h
#pragma once namespace White { namespace Engine { namespace Graphics { namespace GL { struct GLInitializer { static void Init(); }; } } } }
MintaiDS/White
Source/Engine/Graphics/Util/Context.h
#pragma once #include "Window.h" #include "Program.h" #include "Core.h" using namespace White::Util::System; namespace White { namespace Engine { namespace Graphics { class Context : public Window { public: Context(); ~Context(); void Init(); void CreateWindowClass(); void RegisterWindowClass()...
MintaiDS/White
Source/Util/Math/Shape.h
<gh_stars>0 #pragma once #include "Polygon.h" #include "Mesh.h" using namespace White::Engine::Graphics; namespace White { namespace Util { namespace Math { template<typename T, typename U = unsigned> class Shape { public: virtual Polygon<GLfloat> ToPolygon(int verticesCnt); virtual Mesh<T, U> ToMesh(const ...
MintaiDS/White
Source/Engine/Graphics/Util/TextureLoader.h
#pragma once #include "BMPLoader.h" #include "Texture.h" namespace White { namespace Engine { namespace Graphics { class TextureLoader { public: TextureLoader(std::wstring dir = L""); Texture Import(std::wstring filename); void SetDirectory(std::wstring dir); Texture GetTexture(); protected: T...
MintaiDS/White
Source/Util/Math/Vector.h
#pragma once #include <vector> #include <memory> #include <algorithm> #include <initializer_list> namespace White { namespace Util { namespace Math { template<typename T> struct Vector { Vector(); Vector(std::size_t size); Vector(std::size_t size, T* values); Vector(std::vector<T> values); ...
MintaiDS/White
Source/Util/Math/Line.h
#pragma once #include "Segment.h" namespace White { namespace Util { namespace Math { template<typename T> struct Line : public Segment<T> { Line(const Vector<T>& begin, const Vector<T>& end); }; template<typename T> Line<T>::Line(const Vector<T>& begin, const Vector<T>& end) : Segment(begin, end) {} ...
MintaiDS/White
Source/Engine/Graphics/Drawing/CharacterBlock.h
<reponame>MintaiDS/White<gh_stars>0 #pragma once #include "DigitMeshCreator.h" #include "IDrawable.h" #include "Grid.h" namespace White { namespace Engine { namespace Graphics { class CharacterBlock : public IDrawable<float> { public: CharacterBlock(const Vector<float>& blockPosition, const Ve...
MintaiDS/White
Source/Engine/Graphics/Drawing/DrawingCommand.h
#pragma once #include "ModelFormat.h" namespace White { namespace Engine { namespace Graphics { class DrawingCommand { public: DrawingCommand(); struct Arguments { int topology; int first; int count; int indicesCnt; int indexType; const void* offset; }; ...
MintaiDS/White
Source/Engine/Graphics/Drawing/Model.h
#pragma once #include "Mesh.h" #include "Texture.h" #include "ModelFormat.h" #include <memory> namespace White { namespace Engine { namespace Graphics { class Model : public Object { public: Model(); unsigned GetMesh() const; Texture& GetTexture(); ModelFormat GetFormat() const; void SetMesh(un...
MintaiDS/White
Source/Util/Math/Ring.h
#pragma once #include "Shape.h" #include "Circle.h" namespace White { namespace Util { namespace Math { template<typename T, typename U = unsigned> struct Ring : public Shape<T> { Ring(const Circle<T>& inner, const Circle<T>& outer); Ring(const T radiusInner, const T radiusOuter); virtual Polygon<GLfloa...
MintaiDS/White
Source/Engine/Graphics/Drawing/Scene.h
#pragma once #include "IndexProvider.h" #include <vector> namespace White { namespace Engine { class Scene { public: Scene(); void AddObject(unsigned object); void RemoveObject(unsigned object); protected: std::vector<unsigned> objects; IndexProvider<> ip; }; } }
wusyong/iota.rs
bindings/c/src/main.c
<reponame>wusyong/iota.rs<filename>bindings/c/src/main.c #include <stdint.h> #include <stdio.h> /** * @brief The data structure of the get node info response. * */ typedef struct GetNodeInfoResponse { /** * Name of IRI node. */ const char *app_name; /** * Version of IRI node. */ const char *app...
StevenUpForever/CtCI-objective-c
CtCI-objective-c/arrays_strings/StringCompression.h
<filename>CtCI-objective-c/arrays_strings/StringCompression.h<gh_stars>0 // // StringCompression.h // CtCI-objective-c // // Created by <NAME> on 2/25/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface StringCompression : NSObject - (NSString *)stringCompression:...
StevenUpForever/CtCI-objective-c
CtCI-objective-c/arrays_strings/URLify.h
<reponame>StevenUpForever/CtCI-objective-c // // URLify.h // CtCI-objective-c // // Created by <NAME> on 2/25/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface URLify : NSObject - (NSString *)URLify: (NSString *)s; @end
StevenUpForever/CtCI-objective-c
CtCI-objective-c/arrays_strings/StringRotation.h
// // StringRotation.h // CtCI-objective-c // // Created by <NAME> on 2/25/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface StringRotation : NSObject - (BOOL)isRotated: (NSString *)origin rotate: (NSString *)rotate; @end
StevenUpForever/CtCI-objective-c
CtCI-objective-c/arrays_strings/OneWay.h
// // OneWay.h // CtCI-objective-c // // Created by <NAME> on 2/25/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface OneWay : NSObject - (BOOL)oneWay: (NSString *)s p: (NSString *)p; @end
StevenUpForever/CtCI-objective-c
CtCI-objective-c/arrays_strings/PalindromePermutation.h
<filename>CtCI-objective-c/arrays_strings/PalindromePermutation.h // // PalindromePermutation.h // CtCI-objective-c // // Created by <NAME> on 2/25/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface PalindromePermutation : NSObject - (BOOL)palindromePermutationS1...
StevenUpForever/CtCI-objective-c
CtCI-objective-c/arrays_strings/CheckPermutation.h
<filename>CtCI-objective-c/arrays_strings/CheckPermutation.h // // check_permutation.h // CtCI-objective-c // // Created by <NAME> on 2/25/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface CheckPermutation: NSObject - (BOOL)permutation: (NSString *)s t: (NSStrin...
StevenUpForever/CtCI-objective-c
CtCI-objective-c/arrays_strings/IsUnique.h
// // IsUnique.h // CtCI-objective-c // // Created by <NAME> on 2/25/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface IsUnique : NSObject - (BOOL)isUnique: (NSString *)s; @end
BonJovi1/xv6-customised
test.c
<filename>test.c #include "types.h" #include "stat.h" #include "user.h" #include "fcntl.h" int main(int argc, char *argv[]) { long double d1, d2 = 3.76, d3 = 19.543, d4 = 225.43; for (int i=0;i<6;i++) { for (int k=0;k<12;k++) { for (d1=0;d1<7324578;d1=d1+1) { ...
BonJovi1/xv6-customised
invertcase.c
#include "types.h" #include "stat.h" #include "user.h" int main(int argc, char *argv[]) { int i,j; for(i = 1; i < argc; i++) { for(j=0; j<strlen(argv[i]); j++) if( argv[i][j]>=97 && argv[i][j]<=122 )//small case alphabets argv[i][j]-=32; else if( argv[i][j]>=65 && argv[i][j]<=90 )//capital alphabets a...
BonJovi1/xv6-customised
set_priority.c
<reponame>BonJovi1/xv6-customised<gh_stars>0 #include "types.h" #include "stat.h" #include "user.h" #include "fcntl.h" int main(int argc, char *argv[]) { if(atoi(argv[2]) <= 100 && atoi(argv[2]) >= 0) setPriority(atoi(argv[1]), atoi(argv[2])); else printf(1,"Priority is between [0,100]"); exit(); }
nanzaimakoto/Class
dentaku5.c
<reponame>nanzaimakoto/Class #include<stdio.h> #include<math.h> double tfun(char a, double f); int sqr(int sq); int cange(void); int main(void){ int b = 1, w = 1, sq; double f, s, ans, ans2, k; char a, c, d, e, fun; /*eはエンター読み取り専用*/ /*平方根*/ printf("平方根を求めたい場合は's'を、電卓機能を使いたい場合はそれ以外をを入力してください。\n"); scan...
Parrot-Developers/libmediacodec-wrapper
src/mcw_ndk.c
<reponame>Parrot-Developers/libmediacodec-wrapper /** * Copyright (c) 2018 <NAME> SAS * Copyright (c) 2017 <NAME> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain th...
Parrot-Developers/libmediacodec-wrapper
src/mcw.c
<reponame>Parrot-Developers/libmediacodec-wrapper /** * Copyright (c) 2018 <NAME> * Copyright (c) 2017 <NAME> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the ab...
Parrot-Developers/libmediacodec-wrapper
src/mcw_jni.c
/** * Copyright (c) 2018 Parrot Drones SAS * Copyright (c) 2017 <NAME> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list ...
chasedig/RabbitEngine
RabbitEngine/include/RBT/components/PointLightComponent.h
<reponame>chasedig/RabbitEngine<filename>RabbitEngine/include/RBT/components/PointLightComponent.h #pragma once #include <RBT/components/LightComponent.h> namespace RBT { struct PointLightComponent : LightComponent { PointLightComponent(Color color, float power) { this->color = color; this->power = power; ...
chasedig/RabbitEngine
RabbitEngine/include/RBT/components/LightComponent.h
#pragma once #include <RBT/graphics/Color.h> namespace RBT { struct LightComponent : Component // Light base class { Color color; float power; }; }
chasedig/RabbitEngine
RabbitEngine/include/RBT/graphics/Shader.h
<filename>RabbitEngine/include/RBT/graphics/Shader.h #pragma once #include <string> #include "glm/glm.hpp" #include "glm/gtc/type_ptr.hpp" namespace RBT { class Shader { public: int program; int vs, fs; Shader(std::string vs_filename, std::string fs_filename); void bind(); void unbind(); // Unifo...
chasedig/RabbitEngine
RabbitEngine/include/RBT/core/World.h
#pragma once #include <map> #include <typeindex> #include <RBT/components/Component.h> #include <vector> namespace RBT { class Entity; class World { public: World(); std::vector<Entity*> entities; std::map<Entity*, std::map<std::type_index, Component*>> components; int AddEntity(Entity* entity); ...
chasedig/RabbitEngine
RabbitEngine/include/RBT/graphics/Mesh.h
<filename>RabbitEngine/include/RBT/graphics/Mesh.h #pragma once #include "Vertex.h" #include <vector> namespace RBT { class Mesh { public: unsigned int VAO, VBO, EBO; std::vector<Vertex> vertices; std::vector<unsigned int> indices; Mesh(); Mesh(std::vector<Vertex> vertices, std::vector<unsigned int> ...
chasedig/RabbitEngine
RabbitEngine/include/RBT/core/Logger.h
<reponame>chasedig/RabbitEngine #pragma once #include <string> #include <iostream> namespace RBT { namespace Logger { static void Log(std::string message) { std::cout << message << std::endl; } } }
chasedig/RabbitEngine
RabbitEngine/include/RBT/components/ColorMaterialComponent.h
#pragma once #include "Component.h" #include <RBT/graphics/Color.h> namespace RBT { struct ColorMaterialComponent : Component { ColorMaterialComponent(Color color) { this->color = color; } Color color; }; }
chasedig/RabbitEngine
RabbitEngine/include/RBT/components/RendererComponent.h
<reponame>chasedig/RabbitEngine #pragma once #include "Component.h" namespace RBT { struct RendererComponent : Component { RendererComponent() { this->enabled = true; this->doubleSided = false; } bool enabled; bool doubleSided; }; }
chasedig/RabbitEngine
RabbitEngine/include/RBT/graphics/Camera.h
#pragma once #include "glm/ext.hpp" namespace RBT { class Camera { public: Camera(float FOV, float near, float far); glm::mat4 getViewMatrix(); void updateCameraVectors(); void ProcessMouseMovement(double xoffset, double yoffset, bool constrainPitch); float FOV; float near; float far; float...
chasedig/RabbitEngine
RabbitEngine/include/RBT/components/Component.h
#pragma once namespace RBT { class Entity; // Forward declaration struct Component { Entity* entity; virtual ~Component() {}; }; }
chasedig/RabbitEngine
RabbitEngine/include/RBT/graphics/Vertex.h
#pragma once #include "glm/glm.hpp" namespace RBT { struct Vertex { glm::vec3 Position; glm::vec3 Normal; glm::vec2 TextureCoordinates; Vertex(glm::vec3 position, glm::vec3 normal, glm::vec2 texCoord) { this->Position = position; this->Normal = normal; this->TextureCoordinates = texCoord; } }; }
chasedig/RabbitEngine
RabbitEngine/include/RBT/graphics/RendererSystem.h
<filename>RabbitEngine/include/RBT/graphics/RendererSystem.h #pragma once #include <vector> #include <RBT/graphics/Mesh.h> #include <RBT/graphics/Shader.h> #include <RBT/graphics/Camera.h> #include <RBT/core/World.h> #include <RBT/core/System.h> namespace RBT { class Window; // forward declaration class RendererSys...
chasedig/RabbitEngine
RabbitEngine/include/RBT/core/Entity.h
<gh_stars>1-10 #pragma once #include "RBT/components/Component.h" #include <iostream> #include <RBT/core/World.h> namespace RBT { class World; class Entity { public: World* world; template<typename ComponentType> ComponentType* GetComponent() { return this->world->GetComponent<ComponentType>(this); } ...
chasedig/RabbitEngine
RabbitEngine/include/RBT/core/System.h
#pragma once #include "World.h" namespace RBT { class System { public: virtual void Update(World* world) = 0; }; }
chasedig/RabbitEngine
RabbitEngine/include/RBT/components/MeshComponent.h
#pragma once #include "Component.h" #include <vector> #include <RBT/graphics/Vertex.h> #include <RBT/graphics/Mesh.h> namespace RBT { struct MeshComponent : Component { MeshComponent(Mesh* mesh) { this->mesh = mesh; } Mesh* mesh; }; }
chasedig/RabbitEngine
RabbitEngine/include/RBT/core/Window.h
<gh_stars>1-10 #pragma once #include <string> #include <iostream> #include <glad/glad.h> #include <glfw/glfw3.h> #include <RBT/graphics/Camera.h> namespace RBT { class Window { public: Window(Camera* camera, const char* title, int width, int height); void Run(); float getAspectRatio(); int getWidth(); ...
chasedig/RabbitEngine
RabbitEngine/include/RBT/components/TransformComponent.h
#pragma once #include "Component.h" #include <glm/ext/matrix_float4x4.hpp> namespace RBT { struct TransformComponent : Component { TransformComponent() { this->transform = glm::mat4(1.0f); } TransformComponent(glm::mat4 transform) { this->transform = transform; } glm::mat4 transform; }; }
chasedig/RabbitEngine
RabbitEngine/src/RabbitEngine.h
<reponame>chasedig/RabbitEngine #include <RBT/core/Logger.h> #define RBT_LOG RBT::Logger::Log int main() { }
chasedig/RabbitEngine
RabbitEngine/include/RBT/Engine.h
#pragma once #include "RBT/core/Window.h" #include "RBT/core/World.h" #include "RBT/core/System.h" #include <thread> namespace RBT { class Engine { public: Engine(); void Run(); std::vector<System*> systems; Window* window; World* world; Camera* camera; float deltaTick = 0; private: void ...
chasedig/RabbitEngine
RabbitEngine/include/RBT/graphics/AssetLoader.h
<reponame>chasedig/RabbitEngine<gh_stars>1-10 #pragma once #include <string> #include <RBT/graphics/Mesh.h> namespace RBT { namespace AssetLoader { Mesh* LoadMeshFromPath(std::string filepath); // Loads the entire scene as a singular mesh, despite it having possibly multiple components } }
chasedig/RabbitEngine
RabbitEngine/include/RBT/graphics/Color.h
<reponame>chasedig/RabbitEngine #pragma once namespace RBT { struct Color { float R; float G; float B; Color() { R = 0.0f; G = 0.0f; B = 0.0f; } Color(float R, float G, float B) { this->R = R; this->G = G; this->B = B; } static Color fromRGB(int R, int G, int B) { return Col...
hesiod/pulse-binding-rust
includes/introspect.h
<reponame>hesiod/pulse-binding-rust #ifndef foointrospecthfoo #define foointrospecthfoo /*** This file is part of PulseAudio. Copyright 2004-2006 <NAME> Copyright 2006 <NAME> <<EMAIL>> for Cendio AB PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Gene...
jxjgssylsg/SDHudViewProgram
SDHudViewProgram/ViewController.h
// // ViewController.h // SDHudViewProgram // // Created by Novo on 16/1/29. // Copyright © 2016年 Novo. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end