repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
gustavogino/projeto-sistema-embarcado
Firmware/Core/Src/functions.h
<gh_stars>0 #ifndef FUNCTIONS_H #define FUNCTIONS_H void Sleep_us(uint16_t delay); void Sleep_ms(uint16_t delay); void Sleep_sec(uint16_t delay); #endif
gustavogino/projeto-sistema-embarcado
Firmware/Core/Src/main.c
#include "main.h" #include "project_hal.h" #include "functions.h" #define MAX30100_I2C_ADDRESS 0xAE #define TIMEOUT 100 uint8_t RX_BLE_BUFFER[2] = {0}; uint8_t SENSOR_DATA_BUFFER[100] = {0}; STATUS CAPTURE = OFF; GPIO_PinState LED_STATE = GPIO_PIN_RESET; int main(void) { START_HAL(); CONFIG_CLOCK(); START_GPIO...
gustavogino/projeto-sistema-embarcado
Firmware/Core/Inc/main.h
<reponame>gustavogino/projeto-sistema-embarcado #ifndef __MAIN_H #define __MAIN_H #ifdef __cplusplus extern "C" { #endif #include "stm32l0xx_hal.h" #define I2C_SCL_SENSOR_Pin GPIO_PIN_9 #define I2C_SDA_SENSOR_Pin GPIO_PIN_10 #define LED_PIN GPIO_PIN_15 #define I2C_SDA_SENSOR_GPIO_Port GPIOA #d...
timonus/UIImageAnimatedGIF
Test Project/UIImageViewAnimatedGIFTestBed/ViewController.h
<gh_stars>1-10 // // ViewController.h // UIImageViewAnimatedGIFTestBed // // Created by <NAME> on 12/28/19. // Copyright © 2019 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
timonus/UIImageAnimatedGIF
Test Project/UIImageViewAnimatedGIFTestBed/AppDelegate.h
// // AppDelegate.h // UIImageViewAnimatedGIFTestBed // // Created by <NAME> on 12/28/19. // Copyright © 2019 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @end
timonus/UIImageAnimatedGIF
UIImageView+AnimatedGIF.h
// // UIImageView+AnimatedGIF.h // UIImageViewAnimatedGIF // // Created by <NAME> on 12/26/19. // Copyright © 2019 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface TJAnimatedImage : NSObject + (instancetype)animatedImageWithData:(nullable NSData *const)data; + (instance...
timonus/UIImageAnimatedGIF
Test Project/UIImageViewAnimatedGIFTestBed/SceneDelegate.h
<reponame>timonus/UIImageAnimatedGIF // // SceneDelegate.h // UIImageViewAnimatedGIFTestBed // // Created by <NAME> on 12/28/19. // Copyright © 2019 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface SceneDelegate : UIResponder <UIWindowSceneDelegate> @property (strong, nonatomic) UIWindow * wind...
Scobalula/PhilLibX
src/PhilLibX/PhilLibX.Interop/stdafx.h
<filename>src/PhilLibX/PhilLibX.Interop/stdafx.h<gh_stars>1-10 #pragma once // Building ZSTD as a Static Library #define ZSTD_STATIC_LINKING_ONLY // Standard Library Includes #include <memory> #include <stdint.h> #include <string>
Scobalula/PhilLibX
src/PhilLibX/PhilLibX.Interop/ScratchImage.h
<gh_stars>1-10 // ------------------------------------------------------------------------ // PhilLibX - My Utility Library // Copyright(c) 2018 Philip/Scobalula // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), t...
Scobalula/PhilLibX
src/PhilLibX/PhilLibX.Interop/LZ4Wrapper.h
// ------------------------------------------------------------------------ // PhilLibX - My Utility Library // Copyright(c) 2018 Philip/Scobalula // // 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 th...
Scobalula/PhilLibX
src/PhilLibX/ExternalLibraries/zstd/examples/utils.h
/* * Copyright (c) 2016-present, <NAME>, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may...
Christine0312/Sorting-Algorithm
src/parser.h
<gh_stars>0 #ifndef _DEFINE_PARSER_ #define _DEFINE_PARSER_ #include <string> #include <cstdio> #include <iostream> using namespace std; class AlgString{ public: string m_string; int m_line_number; int m_word_number; //int m_apperance_count; AlgString(void); AlgString( const string& set_string, ...
JGrauNakima/cantools
tests/files/c_source/padding_bit_order.h
<reponame>JGrauNakima/cantools /** * The MIT License (MIT) * * Copyright (c) 2018-2019 <NAME> * * 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 withou...
JGrauNakima/cantools
tests/files/c_source/padding_bit_order.c
<reponame>JGrauNakima/cantools<gh_stars>1-10 /** * The MIT License (MIT) * * Copyright (c) 2018-2019 <NAME> * * 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, in...
JGrauNakima/cantools
tests/files/c_source/motohawk_no_floating_point_numbers.c
<reponame>JGrauNakima/cantools /** * The MIT License (MIT) * * Copyright (c) 2018-2019 <NAME> * * 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 withou...
JGrauNakima/cantools
tests/main.c
<filename>tests/main.c /* Include the generated files first to test that all required header files are included. */ #include "files/c_source/motohawk.h" #include "files/c_source/padding_bit_order.h" #include "files/c_source/vehicle.h" #include "files/c_source/multiplex.h" #include "files/c_source/multiplex_2.h" #inc...
JGrauNakima/cantools
tests/files/c_source/min_max_only_6_0.c
/** * The MIT License (MIT) * * Copyright (c) 2018-2019 <NAME> * * 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,...
JGrauNakima/cantools
tests/main_bit_fields.c
/* Include the generated files first to test that all required header files are included. */ #include "files/c_source/motohawk.h" #include "files/c_source/motohawk_bit_fields.h" #include "files/c_source/floating_point.h" #include "files/c_source/floating_point_bit_fields.h" #include "files/c_source/signed.h" #includ...
JGrauNakima/cantools
tests/files/c_source/multiplex.h
<reponame>JGrauNakima/cantools /** * The MIT License (MIT) * * Copyright (c) 2018-2019 <NAME> * * 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 withou...
timmytimj/fastclick
elements/tunnel/gre.h
<filename>elements/tunnel/gre.h /* -*- mode: c; c-basic-offset: 4 -*- */ #ifndef GRE_H #define GRE_H #include <click/cxxprotect.h> CLICK_CXX_PROTECT /* * our own definitions of GRE headers * based on a file from one of the BSDs */ #define GRE_CP 0x8000 /* Checksum Present */ #define GRE_RP 0x400...
PascalSun/MIT-year2
Design/Geogre/c++/c-and-c-version/VirusSimulator/zika/ArbovirusSimulator.h
#pragma once class ArbovirusSimulator { public: static vector& vSum(const vector& u, const vector& v, vector& sumOUT); static vector vSum(const vector& u, const vector& v); // modifies first arg ie "to u add v" static void vAdd(vector& u, const vector& v); // modifies first arg ie "from u subtract v" static void...
PascalSun/MIT-year2
Design/Presentation/mpihello1.c
#include "mpi.h" #include <stdio.h> int main( int argc, char *argv[] ) { MPI_Init( &argc, &argv ); printf( "Hello, world!\n" ); MPI_Finalize(); return 0; }
PascalSun/MIT-year2
Design/Presentation/hello1.c
#include <stdio.h> #include <omp.h> int main(void) { omp_set_num_threads(8); //I have set the number of threads =4, you can change this. #pragma omp parallel printf("Hello, world.\n"); return 0; }
PascalSun/MIT-year2
Design/PythonMpi/repo/src/lib-mpi/fallback.h
#ifndef PyMPI_FALLBACK_H #define PyMPI_FALLBACK_H /* ---------------------------------------------------------------- */ #include <stdlib.h> #ifndef PyMPI_MALLOC #define PyMPI_MALLOC malloc #endif #ifndef PyMPI_FREE #define PyMPI_FREE free #endif /* ---------------------------------------------------------------...
PascalSun/MIT-year2
Design/PythonMpi/repo/src/lib-mpi/compat/openmpi.h
<filename>Design/PythonMpi/repo/src/lib-mpi/compat/openmpi.h #ifndef PyMPI_COMPAT_OPENMPI_H #define PyMPI_COMPAT_OPENMPI_H /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ /* * The hackery below redefines t...
PascalSun/MIT-year2
Design/PythonMpi/repo/src/pympivendor.h
/* Author: <NAME> */ /* Contact: <EMAIL> */ static int PyMPI_Get_vendor(const char **vendor_name, int *version_major, int *version_minor, int *version_micro) { const char *name = "unknown"; int major=0, m...
PascalSun/MIT-year2
Design/Presentation/hello3.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int nthreads, tid; omp_set_num_threads(4); int k =0; /* Fork a team of threads giving them their own copies of variables */ #pragma omp parallel for private(nthreads, tid) shared (k) for(k=0;k<8;k++) { /* Obtain thread...
PascalSun/MIT-year2
Design/Geogre/c++/c-and-c-version/VirusSimulator/zika/Config.h
#pragma once struct LocationItem { int cid; vector coordinates; vector neighbours; list hosts; double capacity; double immature; vector v_state; std::string ToString(); }; struct HostItem { int iid; int location; std::string i_state; int home; int hub; std::string ToString(); }; typedef std::map<int,...
PascalSun/MIT-year2
Design/Presentation/openmpmpi.c
<filename>Design/Presentation/openmpmpi.c #include "mpi.h" #include <omp.h> #include <stdio.h> #include <stdlib.h> void srandom (unsigned seed); double dboard (int darts); #define DARTS 500000 /* number of throws at dartboard */ #define ROUNDS 100 /* number of times "darts" is iterated */ #define MASTER 0 ...
PascalSun/MIT-year2
Design/Presentation/MPI/openmp.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <OpenCL/opencl.h> // #include <omp.h> //Student ID: 21804416 //Name: <NAME> //Where use openmp speed up: //Here we have four tasks using openmp to speed up //1. use openmp to sort all columns //2. use openmp to generate blocks //3. The key point her...
PascalSun/MIT-year2
Design/PythonMpi/repo/src/python.c
<reponame>PascalSun/MIT-year2<filename>Design/PythonMpi/repo/src/python.c<gh_stars>0 /* Author: <NAME> */ /* Contact: <EMAIL> */ /* -------------------------------------------------------------------------- */ #include <Python.h> #define MPICH_IGNORE_CXX_SEEK 1 #define OMPI_IGNORE_CXX_SEEK 1 #include <mpi.h> #if...
PascalSun/MIT-year2
Design/PythonMpi/develop/helloworld.c
/* file: helloworld.c */ void sayhello(MPI_Comm comm) { int size, rank; MPI_Comm_size(comm, &size); MPI_Comm_rank(comm, &rank); printf("Hello, World! " "I am process %d of %d.\n", rank, size); }
bmharper/winupdate
winupdate.h
<filename>winupdate.h #pragma once namespace winupdate { enum class Action { ContinueAsUsual, ExitNow, }; // Call this at program startup. If the return value is ExitNow, then you must exit immediately. // archiveURL is your update archive, for example https://example.com/windows/myprogram-update.zip.bz2 Action Up...
tuarua/TaskbarProgressANE
native_library/win/TaskbarProgressANE/TaskbarProgressANE/TaskbarProgressANE.h
#pragma once #include "FreSharpMacros.h" #include "FlashRuntimeExtensions.h" extern "C" { __declspec(dllexport) EXTENSION_INIT_DECL(TRTBP); __declspec(dllexport) EXTENSION_FIN_DECL(TRTBP); }
tuarua/TaskbarProgressANE
native_library/mac/TaskbarProgressANE/TaskbarProgressANE/TaskbarProgressANE_oc.h
/* Copyright 2017 Tua Rua Ltd. 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 applicable law or agreed to in writing, softwar...
tisaac/tictoc
tictoc.h
<filename>tictoc.h /** \file Master header for the library. */ #include "src/tictoc.h"
JHG777000/Fudge
src/fudge.c
/* Copyright (c) 2016-2017 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the followin...
JHG777000/Fudge
Example2/Example2.c
/* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following dis...
JHG777000/Fudge
Example1/Example.c
<filename>Example1/Example.c<gh_stars>1-10 /* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, th...
JHG777000/Fudge
include/fudge.h
<filename>include/fudge.h /* Copyright (c) 2016-2017 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of c...
JHG777000/Fudge
Example1/StringClass.c
/* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following dis...
JHG777000/Fudge
Example2/Square.c
<gh_stars>1-10 /* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
JHG777000/Fudge
Example2/Shape.c
/* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following dis...
JHG777000/Fudge
Example2/ShapeFactory.c
<gh_stars>1-10 /* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
JHG777000/Fudge
Example1/TestClass.c
/* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following dis...
JHG777000/Fudge
Example2/Circle.c
<gh_stars>1-10 /* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
JHG777000/Fudge
Example2/Rectangle.c
/* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following dis...
JHG777000/Fudge
Example1/BaseClass.c
/* Copyright (c) 2016 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following dis...
Jony635/Sym3DEngine
Sym3DEngine/Source/ComponentTransform.h
#pragma once #include "Component.h" #include "MathGeoLib/include/Math/float3.h" #include "MathGeoLib/include/Math/quat.h" #include "MathGeoLib/include/Math/float4x4.h" class ComponentTransform : public Component { public: ComponentTransform(GameObject* gameObject); void OnInspector(); public: void UpdateMatricesF...
Jony635/Sym3DEngine
Sym3DEngine/Source/ComponentRenderer.h
#pragma once #include "Component.h" class ComponentRenderer : public Component { public: ComponentRenderer(GameObject* gameObject, ComponentType type); public: virtual void Render() = 0; virtual void OnInspector() = 0; };
Jony635/Sym3DEngine
Sym3DEngine/Source/ComponentCamera.h
#pragma once #include "Component.h" #include "MathGeoLib/include/Geometry/Frustum.h" class ComponentCamera : public Component { public: ComponentCamera(GameObject* gameObject); void UpdateFrustum(); void OnTransformChanged(); math::float4x4 GetViewMatrix() const; math::float4x4 GetProjectionMatrix() const; pu...
Jony635/Sym3DEngine
Sym3DEngine/Source/Application.h
<reponame>Jony635/Sym3DEngine #pragma once #include <vector> #include "Globals.h" #include <random> class Module; class ModuleWindow; class ModuleRenderer; class ModuleInput; class ModuleImGUI; class ModuleScene; class ModuleTime; class Application { enum AppState { NO_STATE = -1, START, UPDATE, FINISH, ...
Jony635/Sym3DEngine
Sym3DEngine/Source/Panel.h
<filename>Sym3DEngine/Source/Panel.h #pragma once class Panel { friend class ModuleImGUI; public: inline void ToggleActive() { active = !active; } private: virtual void Draw() = 0; protected: bool active = true; };
Jony635/Sym3DEngine
Sym3DEngine/Source/ModuleResourceManager.h
#pragma once #include "Module.h" class ModuleResourceManager : public Module { bool Init(); bool Start(); bool CleanUp(); bool PreUpdate(); bool Update(); bool PostUpdate(); };
Jony635/Sym3DEngine
Sym3DEngine/Source/ModuleImGUI.h
#pragma once #include "Module.h" #include <vector> union SDL_Event; class Panel; class PanelHierarchy; class PanelInspector; class PanelScene; class ModuleImGUI : public Module { public: ModuleImGUI(); private: bool Start(); bool PreUpdate(); private: void DockSpace(); public: void NotifyEvent(SDL_Event eve...
Jony635/Sym3DEngine
Sym3DEngine/Source/Importer.h
<reponame>Jony635/Sym3DEngine #pragma once class Resource; class Importer { };
Jony635/Sym3DEngine
Sym3DEngine/Source/PanelInspector.h
<filename>Sym3DEngine/Source/PanelInspector.h<gh_stars>0 #pragma once #include "Panel.h" class PanelInspector : public Panel { private: void Draw(); };
Jony635/Sym3DEngine
Sym3DEngine/Source/Module.h
#pragma once class Module { public: virtual bool Init() { return true; } virtual bool Start() { return true; } virtual bool CleanUp() { return true; } virtual bool PreUpdate() { return true; } virtual bool Update() { return true; } virtual bool PostUpdate() { return true; } };
Jony635/Sym3DEngine
Sym3DEngine/Source/Component.h
#pragma once #include "Globals.h" enum class ComponentType { NO_TYPE = -1, TRANSFORM, MESHRENDERER, RENDERER2D, CAMERA }; class GameObject; class Component { public: Component(GameObject* gameObject, ComponentType type); virtual void OnInspector() {} virtual void OnTransformChanged() {} public: inline bo...
Jony635/Sym3DEngine
Sym3DEngine/Source/Default_FS.h
#pragma once #define DEFAULT_FS \ "#version 150"\ "void main()"\ "{"\ "gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);"\ "}"
Jony635/Sym3DEngine
Sym3DEngine/Source/PanelHierarchy.h
<reponame>Jony635/Sym3DEngine<filename>Sym3DEngine/Source/PanelHierarchy.h #pragma once #include "Panel.h" class GameObject; class PanelHierarchy : public Panel { public: void Draw(); private: void DrawGameObjectsRecursive(GameObject* root); };
Jony635/Sym3DEngine
Sym3DEngine/Source/ModuleWindow.h
<reponame>Jony635/Sym3DEngine #pragma once #include "Module.h" #include <stdint.h> struct SDL_Window; class ModuleWindow : public Module { private: bool Init(); bool CleanUp(); public: inline const SDL_Window* GetWindow() const { return window; } private: SDL_Window* window = nullptr; uint32_t flags = 0u; };
Jony635/Sym3DEngine
Sym3DEngine/Source/TextureImporter.h
<filename>Sym3DEngine/Source/TextureImporter.h #pragma once #include "Importer.h" class ResourceTexture; class TextureImporter : public Importer { public: static ResourceTexture* ImportTexture(const char* path); };
Jony635/Sym3DEngine
Sym3DEngine/Source/PanelScene.h
#pragma once #include "Panel.h" class PanelScene : public Panel { private: void Draw(); };
Jony635/Sym3DEngine
Sym3DEngine/Source/Resource.h
#pragma once class Resource { };
Jony635/Sym3DEngine
Sym3DEngine/Source/ResourceTexture.h
<reponame>Jony635/Sym3DEngine<filename>Sym3DEngine/Source/ResourceTexture.h #pragma once #include "Resource.h" #include "Globals.h" class ResourceTexture : public Resource { public: ResourceTexture(int width, int height, int nChannels, unsigned char* data) : width(width), height(height), nChannels(nChannels), data(d...
Jony635/Sym3DEngine
Sym3DEngine/Source/ModuleTime.h
<filename>Sym3DEngine/Source/ModuleTime.h #pragma once #include "Module.h" class ModuleTime : public Module { public: ModuleTime(); virtual ~ModuleTime(); bool PreUpdate(); bool Update(); bool PostUpdate(); public: inline float GetDt() const { return dt; } private: float lastFrameMS = 0.0f; float dt = 0....
Jony635/Sym3DEngine
Sym3DEngine/Source/DefaultShader.h
#pragma once #define DEFAULT_VS \ "#version 150 \n" \ \ "uniform mat4 projectionMatrix;\n" \ "uniform mat4 modelViewMatrix;\n" \ "attribute vec3 vertexPosition;\n" \ "attribut...
Jony635/Sym3DEngine
Sym3DEngine/Source/ModuleScene.h
<reponame>Jony635/Sym3DEngine<gh_stars>0 #pragma once #include "Module.h" #include "Selection.h" #include <vector> class GameObject; class ModuleScene : public Module { public: ModuleScene(bool createRoot = true); bool Update(); public: GameObject* CreateGameObject(); void GameObjectHierarchyClicked(GameObject...
Jony635/Sym3DEngine
Sym3DEngine/Source/ModuleRenderer.h
<reponame>Jony635/Sym3DEngine #pragma once #include "Module.h" #include "Component.h" #include <vector> class ComponentRenderer; class ModuleRenderer : public Module { private: bool Init(); bool Start(); bool Update(); bool PostUpdate(); public: inline const void* GetContext() const { return context; } Comp...
Jony635/Sym3DEngine
Sym3DEngine/Source/Selection.h
<filename>Sym3DEngine/Source/Selection.h #pragma once #include "Globals.h" enum SelectionType { GAMEOBJECT_SELECTION = 0x100 }; struct GameObjectSelection { uint type; void* gameObject; }; union Selection { uint type; GameObjectSelection goSelection; };
Jony635/Sym3DEngine
Sym3DEngine/Source/GameObject.h
#pragma once #include <string> #include <vector> #include "Globals.h" #include "Component.h" class ComponentTransform; class ComponentRenderer; class ComponentCamera; class GameObject { friend class ModuleScene; friend class PanelHierarchy; public: GameObject(GameObject* parent = nullptr); inline bool IsActi...
Jony635/Sym3DEngine
Sym3DEngine/Source/ModuleInput.h
#pragma once #include <iostream> #include "Module.h" #include "SDL/include/SDL.h" enum KeyState { KEY_IDLE, KEY_DOWN, KEY_REPEAT, KEY_UP }; class ModuleInput : public Module { public: KeyState GetKey(uint key); private: bool PreUpdate(); private: KeyState keyboardState[300]; };
Jony635/Sym3DEngine
Sym3DEngine/Source/ComponentMeshRenderer.h
#pragma once #include "ComponentRenderer.h" class ComponentMeshRenderer : public ComponentRenderer { public: ComponentMeshRenderer(GameObject* gameObject); static void InitializeShapesData(); private: void Render(); void OnInspector(); void SendUniformsToShader(); private: //TEMP static uint textureID; ...
anas-imtiaz/ble_app_ais
ble_ais.h
#ifndef BLE_AIS_H__ #define BLE_AIS_H__ #include <stdint.h> #include <stdbool.h> #include "ble.h" #include "ble_srv_common.h" // UUID : a51455bf-d64a-4579-b51c-f27eb4c9c343 #define AIS_UUID_BASE {0x43, 0xC3, 0xC9, 0xB4, 0x7E, 0xF2, 0x1C, 0xB5, 0x79, 0x45, 0x4A, 0xD6, 0xBF, 0x55, 0x14, 0xA5} #define AIS_UUID_SERVIC...
kevin-luvian/opengl
basic/src/scene/Scene.h
#pragma once #include <algorithm> #include <map> #include <utility> #include <unordered_map> #include "draw/shader/ShaderClass.h" #include "draw/shader/ShaderManager.h" #include "draw/renderer/RendererManager.h" #include "object/Object.h" #include "light/Lights.h" class Scene { protected: ShaderManager mSManager;...
kevin-luvian/opengl
basic/src/draw/shader/impl/LightShader.h
#pragma once #include "draw/shader/ShaderUniform.h" #include "draw/shader/ShaderClass.h" #include "screenview/Camera.h" #include "light/Lights.h" #include "draw/material/Material.h" class LightShader : public ShaderClass { private: const char *vShaderPath = "../res/shader/vLight.vert"; const char *fShaderPath...
kevin-luvian/opengl
basic/src/pch.h
#pragma once #include <GL/glew.h> #include <GLFW/glfw3.h> #include <SOIL/SOIL.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <cmath> #include <iostream> #include <string> #include <memory> #include <vector> #include <stdint.h> #include "util/Benchmark.h" #include "util/Utils.h" #include "ut...
kevin-luvian/opengl
basic/src/mesh/impl/Pyramid.h
#pragma once #include "mesh/Mesh.h" class Pyramid : public Mesh { public: Pyramid() {} ~Pyramid() {} void createMesh() override { const Vertex sVertices[5] = { {glm::vec3(0.0f, 1.0f, 0.0f)}, {glm::vec3(-1.0f, -1.0f, 1.0f)}, {glm::vec3(1.0f, -1.0f, 1.0f)}, ...
kevin-luvian/opengl
basic/src/mesh/impl/Sheet.h
#pragma once #include "mesh/Mesh.h" class Sheet : public Mesh { private: unsigned int width, height; public: Sheet() : Sheet(30, 30) {} Sheet(unsigned int width_, unsigned int height_) { width = width_; height = height_; } ~Sheet() {} void createMesh() override { ...
kevin-luvian/opengl
basic/src/object/Objects.h
#pragma once #include "Object.h" #include "impl/ShadedPyramid.h" #include "impl/ShadedSheet.h" #include "impl/DynamicSphere.h"
kevin-luvian/opengl
basic/src/screenview/ScreenState.h
#pragma once class ScreenState { public: static ScreenState &GET() { static ScreenState instance; return instance; } static bool *KeyState() { return GET().keyState; } static void UpdateSize(unsigned int width, unsigned int height) { GET().mWidth = width; GET()....
kevin-luvian/opengl
basic/src/draw/renderer/RendererManager.h
#pragma once #include "draw/shader/ShaderEnum.h" #include "impl/SimpleRenderer.h" #include "impl/LightRenderer.h" #include "Renderer.h" namespace Enum { enum class RendererType { Simple = 0, Light = 1, Count = 2 }; static const RendererType AllRendererType[] = {Enum::RendererT...
kevin-luvian/opengl
basic/src/draw/shader/ShaderEnum.h
#pragma once namespace Enum { enum class ShaderType { Simple = 0, Light = 1, Count = 2 }; static const ShaderType AllShaderType[] = {Enum::ShaderType::Simple, Enum::ShaderType::Light}; } // namespace Enum
kevin-luvian/opengl
basic/src/draw/renderer/Renderer.h
<reponame>kevin-luvian/opengl<gh_stars>0 #pragma once #include "mesh/Mesh.h" #include "screenview/ScreenState.h" class Renderer { protected: unsigned int VAO, VBO, IBO, IndicesSize; public: Renderer() { VAO = 0; VBO = 0; IBO = 0; IndicesSize = 0; } virtual ~Rendere...
kevin-luvian/opengl
basic/src/mesh/Indice.h
<filename>basic/src/mesh/Indice.h #pragma once struct Indice { unsigned int top, left, right; static unsigned long count() { return 3; } unsigned int operator[](int i) const { switch (i) { case 0: return left; case 1: return top; ...
kevin-luvian/opengl
basic/src/random/RGEN.h
<gh_stars>0 #pragma once #include <time.h> #include <string> #include "XorshiftP.h" #include "Splitmix64.h" // static const uint64_t BIG_PRIME = 0x7E94F28744587C87; class RGEN { private: xorshift128p_state superState; xorshift128p_state state; void updateSuperState(uint64_t superSeed) { supe...
kevin-luvian/opengl
basic/src/random/Splitmix64.h
#pragma once namespace Splitmix64 { static uint64_t Random(uint64_t seed) { uint64_t z = (seed += 0x9e3779b97f4a7c15); z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9; z = (z ^ (z >> 27)) * 0x94d049bb133111eb; return z ^ (z >> 31); } } // namespace Splitmix64
kevin-luvian/opengl
basic/src/object/Colors.h
#pragma once namespace Color { static const glm::vec4 ORANGE = glm::vec4(1, 0.73, 0.2, 1); static const glm::vec4 SAPPHIRE = glm::vec4(0, 0.27, 0.8, 1); } // namespace Color
kevin-luvian/opengl
basic/src/object/Renderables.h
<reponame>kevin-luvian/opengl #pragma once #include "Renderable.h" #include "impl/ShadedPyramid.h"
kevin-luvian/opengl
basic/src/object/impl/DynamicSphere.h
<reponame>kevin-luvian/opengl #pragma once #include "object/Object.h" class DynamicSphere : public Object { private: Enum::ShaderType dynamicSType; unsigned int sphereSegment; public: DynamicSphere() : DynamicSphere(10) {} DynamicSphere(unsigned int segment) : sphereSegment(segment), dynamicSType(Enu...
kevin-luvian/opengl
basic/src/screenview/Screen.h
#pragma once #include <functional> #include <string.h> #include "util/Benchmark.h" #include "ScreenState.h" #include "Camera.h" class Screen { private: GLFWwindow *mWindow; public: Screen(int width, int height); Screen() : Screen(800, 500){}; void run(std::function<void()> onCreate, std::function<vo...
kevin-luvian/opengl
basic/src/scene/Scenes.h
#pragma once #include "MainScene.h" #include "Scene.h"
kevin-luvian/opengl
basic/src/object/Object.h
<reponame>kevin-luvian/opengl<filename>basic/src/object/Object.h #pragma once #include "Renderable.h" #include "draw/renderer/RendererManager.h" #include "mesh/Meshes.h" class Object : public Renderable { protected: glm::mat4 mModel; glm::vec4 mColour; glm::vec3 mPosition; glm::vec3 mRotations; fl...
kevin-luvian/opengl
basic/src/draw/shader/Shaders.h
<filename>basic/src/draw/shader/Shaders.h #pragma once #include "ShaderEnum.h" #include "ShaderClass.h" #include "impl/LightShader.h" #include "impl/SimpleShader.h"
kevin-luvian/opengl
basic/src/mesh/impl/Sphere.h
#pragma once #include "mesh/Mesh.h" class Sphere : public Mesh { private: unsigned int segment; public: Sphere() : segment(3) {} Sphere(unsigned int count) { setSegment(count); } void setSegment(unsigned int segment_) { if (segment_ < 3) segment_ = 3; segment = segment...
kevin-luvian/opengl
basic/src/light/impl/SpotLight.h
<filename>basic/src/light/impl/SpotLight.h<gh_stars>0 #pragma once #include "screenview/Camera.h" #include "PointLight.h" class SpotLight : public PointLight { private: glm::vec3 mDirection; float mCuttoff; glm::vec3 flashCamDirectionOffset = glm::vec3(0.0, -0.05f, 0.0f); public: SpotLight() { ...
kevin-luvian/opengl
basic/src/light/Lights.h
#pragma once #include "Light.h" #include "impl/DirectionalLight.h" #include "impl/PointLight.h" #include "impl/ObjectPointLight.h" #include "impl/SpotLight.h"
kevin-luvian/opengl
basic/src/scene/MainScene.h
#pragma once #include "Scene.h" #include "object/Colors.h" #include "object/Objects.h" #include "draw/shader/Shaders.h" #include "light/Lights.h" class MainScene : public Scene { private: typedef Scene inherited; public: DynamicSphere *dSphere; ObjectPointLight *spl; SpotLight *spotl; MainScene(...
kevin-luvian/opengl
basic/src/util/Utils.h
#pragma once namespace util { static const float PI = 3.141592741f; // Utility function to calculate radian angles, overflow unsafe. static float toRadians(float degreeAngle) { return degreeAngle * PI / 180.0f; } // Utility function to calculate degree angles, overflow unsafe. static float toDegr...