repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/circle.h | <filename>PinballGame/PinballGame/circle.h
#pragma once
#include <Box2D/Box2D.h>
#include <GL/glut.h>
#include "setting.h"
class Circle {
public:
virtual ~Circle() {}
virtual void Render() = 0;
void RenderCircle();
protected:
body_ptr body_;
float radius_;
}; |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/sound_manager.h | <reponame>tofhddl9/Pinball-with-Box2D
#pragma once
#include "setting.h"
#include "sfx.h"
#include <map>
#define SOUND_FILE_BUMPER "../sound/collision_with_bumper.wav"
#define SOUND_FILE_WALL "../sound/collision_with_wall.wav"
#define SOUND_FILE_COIN "../sound/coin.wav"
#define SOUND_FILE_SHOOTING "../sound/shooting.wa... |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/setting.h | <filename>PinballGame/PinballGame/setting.h
#pragma once
#include <Box2D/Box2D.h>
//You just have to care about the release of b2World*
using body_ptr = b2Body*;
enum OBJECT_TYPE {
BALL = 0x0001,
WALL = 0x0002,
PISTON = 0x0004,
FLIPPER = 0x0008,
WATER = 0x0010,
WINDMILL = 0x0020,
WANDERER... |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/water.h | <filename>PinballGame/PinballGame/water.h<gh_stars>0
#pragma once
#include "Box2D/Box2D.h"
#include "GL/glut.h"
#include "setting.h"
class Water
{
public:
Water(b2World* world, b2Vec2 center, b2Vec2 LWH);
void Render();
private:
body_ptr body_;
b2Vec2 LWH_;
}; |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/pinball.h | #pragma once
#include "Box2D/Box2D.h"
#include "GL/glut.h"
#include "contact_listener.h"
#include "setting.h"
#include "ball.h"
#include "star.h"
#include "water.h"
#include "wall.h"
#include "piston.h"
#include "flipper.h"
#include "wanderer.h"
#include "bumper.h"
#include "rebounder.h"
#include "wormhole.h"
#include... |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/rebounder.h | <reponame>tofhddl9/Pinball-with-Box2D
#pragma once
#include <GL/glut.h>
#include <Box2D/Box2D.h>
#include "setting.h"
class Rebounder
{
public:
Rebounder(b2World *world, b2Vec2 p1, b2Vec2 p2, b2Vec2 other);
~Rebounder();
void Render();
private:
body_ptr body_;
b2Vec2* rebounder_points_;
b2Vec2... |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/wormhole.h | <filename>PinballGame/PinballGame/wormhole.h<gh_stars>0
#pragma once
#include "circle.h"
class Wormhole : Circle
{
public:
Wormhole(b2World* world, const b2Vec2 src, const float radius);
virtual void Render();
}; |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/star.h | <gh_stars>0
#pragma once
#include <GL/glut.h>
#include <Box2D/Box2D.h>
#include "setting.h"
class Star
{
public:
Star(b2World* world, b2Vec2 center,
const float centerToVertex, const int type);
void Render();
private:
body_ptr body_;
float size_;
}; |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/sfx.h | #include <fmod.h>
#include "setting.h"
#pragma once
class SFX {
public:
SFX();
SFX(const char* path, bool loop);
~SFX();
static int Init();
static int Release();
int Play();
int Pause();
int Resume();
int Stop();
int Update();
private:
static FMOD_SYSTEM* g_sound_system;
... |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/contact_listener.h | <gh_stars>0
#pragma once
#include <Box2D/Box2D.h>
#include <vector>
#include <set>
#include <map>
#include "setting.h"
#include "sound_manager.h"
typedef std::pair<b2Fixture*, b2Fixture*> fixturePair;
class ContactListener : public b2ContactListener
{
public:
ContactListener(SoundManager *soundManager);
~Co... |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/wall.h | #pragma once
#include "Box2D/Box2D.h"
#include "setting.h"
#include <algorithm>
enum WALL_TYPE {
LINE_CHAIN,
LINE_LOOP
};
class Wall
{
public:
Wall(b2World* world, const WALL_TYPE type,
b2Vec2* wall_points, const int num_points);
~Wall();
void Render();
private:
WALL_TYPE type_;
... |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/wanderer.h | #pragma once
#include "Box2D/Box2D.h"
#include "GL/glut.h"
#include "setting.h"
class Wanderer
{
public:
Wanderer(b2World* world, const b2Vec2 velocity,
const b2Vec2 head_pos, const b2Vec2 LWH, const b2Vec2 LR);
void Render();
void Wander();
private:
bool IsInsideOfMap();
body_ptr head_;
... |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/ball.h | #pragma once
#include "circle.h"
using b2World_ptr = std::unique_ptr<b2World>;
class Ball : Circle{
public:
Ball(b2World *world, const b2Vec2 pos,
const float radius, const int ballType);
virtual ~Ball();
virtual void Render();
body_ptr GetBody();
private:
int ballType_;
}; |
tofhddl9/Pinball-with-Box2D | PinballGame/PinballGame/bumper.h | #pragma once
#include "circle.h"
class Bumper : Circle
{
public:
Bumper(b2World *world, const b2Vec2 pos,
const float radius, const int type);
virtual void Render();
}; |
PipeDog/PDNetworking | PDNetworking/Classes/Cache/PDNetworkBuiltinCache.h | <reponame>PipeDog/PDNetworking
//
// PDNetworkBuiltinCache.h
// PDNetworking
//
// Created by liang on 2021/3/4.
//
#import <Foundation/Foundation.h>
#import "PDNetworkCache.h"
NS_ASSUME_NONNULL_BEGIN
@interface PDNetworkBuiltinCache : NSObject <PDNetworkCache>
@property (nonatomic, copy, readonly) NSString *pat... |
PipeDog/PDNetworking | PDNetworking/Classes/Executor/PDNetworkRequestUploadExecutor.h | <filename>PDNetworking/Classes/Executor/PDNetworkRequestUploadExecutor.h
//
// PDNetworkRequestUploadExecutor.h
// PDNetworking
//
// Created by liang on 2021/3/4.
//
#import "PDNetworkRequestExecutor.h"
NS_ASSUME_NONNULL_BEGIN
@interface PDNetworkRequestUploadExecutor : PDNetworkRequestExecutor
@end
NS_ASSUME_... |
PipeDog/PDNetworking | PDNetworking/Classes/Definition/PDNetworkDefinition.h | //
// PDNetworkDefinition.h
// Pods
//
// Created by liang on 2021/3/4.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXPORT NSTimeInterval const PDNetworkRequestDefaultTimeoutInterval;
FOUNDATION_EXPORT NSUInteger const PDNetworkRequestDefaultAutoRetryTimes;
FOUNDATION_EXPORT NSUInteger... |
PipeDog/PDNetworking | PDNetworking/Classes/Util/PDNetworkUUID.h | <gh_stars>0
//
// PDNetworkUUID.h
// PDNetworking
//
// Created by liang on 2021/3/4.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface PDNetworkUUID : NSObject
@property (readonly, copy) NSString *UUIDString;
+ (instancetype)UUID;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
@end
NS_... |
PipeDog/PDNetworking | PDNetworking/Classes/Util/PDNetworkDataUtil.h | //
// PDNetworkDataUtil.h
// PDNetworking
//
// Created by liang on 2021/3/4.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXTERN id _Nullable PDNTValueToJSONObject(id value);
FOUNDATION_EXTERN NSData * _Nullable PDNTValueToData(id value);
FOUNDATION_EXTERN NSString * _Nullable PDNTValu... |
PipeDog/PDNetworking | PDNetworking/Classes/Response/PDNetworkResponse.h | <filename>PDNetworking/Classes/Response/PDNetworkResponse.h
//
// PDNetworkResponse.h
// PDNetworking
//
// Created by liang on 2020/3/27.
// Copyright © 2020 liang. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol PDNetworkResponse <NSObject>
@property (nonatomic, str... |
PipeDog/PDNetworking | Example/Pods/Target Support Files/PDNetworking/PDNetworking-umbrella.h | #ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "PDNetworkBuiltinCache.h"
#import "PDNetworkCache.h"
#import "PDNetworkDefinition.h"
#import "PDNetworkRequestDownloa... |
PipeDog/PDNetworking | PDNetworking/Classes/Cache/PDNetworkCache.h | //
// PDNetworkCache.h
// PDNetworking
//
// Created by liang on 2020/4/24.
// Copyright © 2020 liang. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol PDNetworkCache <NSObject>
- (BOOL)containsObjectForKey:(NSString *)key;
- (void)containsObjectForKey:(NSString *)key ... |
PipeDog/PDNetworking | PDNetworking/Classes/Request/PDNetworkRequest+Internal.h | <reponame>PipeDog/PDNetworking
//
// PDNetworkRequest+Internal.h
// PDNetworking
//
// Created by liang on 2020/3/27.
// Copyright © 2020 liang. All rights reserved.
//
#import "PDNetworkRequest.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, PDNetworkRequestType) {
PDNetworkRequestTypeRegular = 0,
... |
PipeDog/PDNetworking | PDNetworking/Classes/Util/NSString+PDNetworking.h | <filename>PDNetworking/Classes/Util/NSString+PDNetworking.h
//
// NSString+PDNetworking.h
// PDNetworking
//
// Created by liang on 2020/3/30.
// Copyright © 2020 liang. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSString (PDNetworking)
- (NSString *)pdnt_urlStr... |
PipeDog/PDNetworking | PDNetworking/Classes/Executor/PDNetworkRequestExecutor.h | <reponame>PipeDog/PDNetworking
//
// PDNetworkRequestExecutor.h
// PDNetworking
//
// Created by liang on 2021/3/4.
//
#import <Foundation/Foundation.h>
#import "PDNetworkResponse.h"
#import "PDNetworkDataUtil.h"
#import "PDNetworkRequest+Internal.h"
#import "PDNetworkPluginManager.h"
#if __has_include(<AFNetworki... |
PipeDog/PDNetworking | PDNetworking/Classes/Plugin/PDNetworkPluginManager.h | //
// PDNetworkPluginManager.h
// PDNetworking
//
// Created by liang on 2021/3/4.
//
#import <Foundation/Foundation.h>
#import "PDNetworkPlugin.h"
NS_ASSUME_NONNULL_BEGIN
@protocol PDNetworkPluginNotify <NSObject>
- (void)requestWillStartLoad:(PDNetworkRequest *)request;
- (void)requestDidFinishLoad:(PDNetworkR... |
PipeDog/PDNetworking | PDNetworking/Classes/Executor/PDNetworkRequestRegularExecutor.h | //
// PDNetworkRequestRegularExecutor.h
// PDNetworking
//
// Created by liang on 2021/3/4.
//
#import "PDNetworkRequestExecutor.h"
NS_ASSUME_NONNULL_BEGIN
@interface PDNetworkRequestRegularExecutor : PDNetworkRequestExecutor
@end
NS_ASSUME_NONNULL_END
|
PipeDog/PDNetworking | PDNetworking/Classes/Request/PDNetworkRequest+Build.h | //
// PDNetworkRequest+Build.h
// PDNetworking
//
// Created by liang on 2019/7/6.
// Copyright © 2019 liang. All rights reserved.
//
#import "PDNetworkRequest.h"
NS_ASSUME_NONNULL_BEGIN
@protocol PDNetworkRequestBuilder <NSObject>
@property (nonatomic, weak, nullable) id owner;
@property (nonatomic, assign) PD... |
PipeDog/PDNetworking | PDNetworking/Classes/Manager/PDNetworkManager+Internal.h | //
// PDNetworkManager+Internal.h
// PDNetworking
//
// Created by liang on 2020/3/27.
// Copyright © 2020 liang. All rights reserved.
//
#import "PDNetworkManager.h"
#import "PDNetworkCache.h"
#if __has_include(<AFNetworking/AFNetworking.h>)
#import <AFNetworking/AFNetworking.h>
#else
#import "AFNetworking.h"
#e... |
PipeDog/PDNetworking | PDNetworking/Classes/Plugin/PDNetworkPlugin.h | <reponame>PipeDog/PDNetworking
//
// PDNetworkPlugin.h
// PDNetworking
//
// Created by liang on 2020/3/30.
// Copyright © 2020 liang. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PDNetworkRequest.h"
#import "PDNetworkResponse.h"
NS_ASSUME_NONNULL_BEGIN
typedef struct {
const char *plug... |
PipeDog/PDNetworking | PDNetworking/Classes/Manager/PDNetworkManager+Constructing.h | //
// PDNetworkManager+Constructing.h
// PDNetworking
//
// Created by liang on 2019/6/29.
// Copyright © 2019 liang. All rights reserved.
//
#import "PDNetworkManager.h"
NS_ASSUME_NONNULL_BEGIN
@interface PDNetworkManager (Constructing) /* AFURLSessionManager */
- (NSURLSessionDataTask *)dataTaskWithRequest:(N... |
PipeDog/PDNetworking | PDNetworking/Classes/Executor/PDNetworkRequestDownloadExecutor.h | <reponame>PipeDog/PDNetworking
//
// PDNetworkRequestDownloadExecutor.h
// PDNetworking
//
// Created by liang on 2021/3/4.
//
#import "PDNetworkRequestExecutor.h"
NS_ASSUME_NONNULL_BEGIN
@interface PDNetworkRequestDownloadExecutor : PDNetworkRequestExecutor
@end
NS_ASSUME_NONNULL_END
|
PipeDog/PDNetworking | PDNetworking/Classes/PDNetworking.h | //
// PDNetworking.h
// PDNetworking
//
// Created by liang on 2019/6/29.
// Copyright © 2019 liang. All rights reserved.
//
#ifndef PDNetworking_h
#define PDNetworking_h
#import "PDNetworkManager.h"
#import "PDNetworkRequest.h"
#import "PDNetworkResponse.h"
#import "PDNetworkManager+Constructing.h"
#import "PDNe... |
PipeDog/PDNetworking | PDNetworking/Classes/Manager/PDNetworkManager.h | <reponame>PipeDog/PDNetworking
//
// PDNetworkManager.h
// PDNetworking
//
// Created by liang on 2019/6/26.
// Copyright © 2019 liang. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PDNetworkCache.h"
@class PDNetworkRequest;
NS_ASSUME_NONNULL_BEGIN
@interface PDNetworkManager : NSObject
@p... |
PipeDog/PDNetworking | PDNetworking/Classes/Request/PDNetworkRequest.h | //
// PDNetworkRequest.h
// PDNetworking
//
// Created by liang on 2019/6/26.
// Copyright © 2019 liang. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PDNetworkResponse.h"
#import "PDNetworkDefinition.h"
#if __has_include(<AFNetworking/AFNetworking.h>)
#import <AFNetworking/AFNetworking.h>
#e... |
vvolkl/esc19 | hands-on/architecture/erfinv.h | <filename>hands-on/architecture/erfinv.h
#include <cstdint>
#include <cmath>
#include <limits>
#include <algorithm>
#include <cstring>
#include <array>
namespace approx_math {
union binary32 {
binary32() : ui32(0) {};
binary32(float ff) : f(ff) {};
binary32(int32_t ii) : i32(ii){}
binary32(uint32_t ... |
vvolkl/esc19 | hands-on/vectorization/fastSinCos.h | #include<cmath>
namespace details {
const float DP1F = 0.78515625;
const float DP2F = 2.4187564849853515625e-4;
const float DP3F = 3.77489497744594108e-8;
const float T24M1 = 16777215.;
const float ONEOPIO4F = 4./M_PI;
//------------------------------------------------------------------------------
/// Re... |
vvolkl/esc19 | hands-on/vectorization/nativeVector.h | <filename>hands-on/vectorization/nativeVector.h
#ifndef NATIVE_VECTOR_H
#define NATIVE_VECTOR_H
#include <cstdint>
#include <cmath>
#include <limits>
#include <algorithm>
#include <type_traits>
#include <cstring>
#include <x86intrin.h>
// only for float, easy to extend to double...
namespace nativeVector {
typedef... |
vvolkl/esc19 | hands-on/memory/memory_usage.h | <filename>hands-on/memory/memory_usage.h
#ifndef memory_usage_h
#define memory_usage_h
#include <cstdint>
namespace memory_usage {
bool is_available();
uint64_t allocated();
uint64_t deallocated();
uint64_t totlive();
};
#endif // memory_usage_h
|
vvolkl/esc19 | hands-on/architecture/AnyOf.h | <gh_stars>0
#ifndef ANYOF_H
#define ANYOF_H
//
// a simple class to store in place Objects from types derived from a common base type
// multiple inheritance is not supported
// relies on the base type to have a virtual destructor
// It does not have any additional memory or time overhead w/r/t in place new and sta... |
vvolkl/esc19 | hands-on/vectorization/simpleSinCos.h | #include <cmath>
// only for -45deg < x < 45deg
template<typename Float>
inline void sincosf0(Float x, Float & s, Float &c ) {
// constexpr float kk = (M_PI/8)*(M_PI/8);
auto z = x * x;
s = (((-1.9515295891E-4f * z
+ 8.3321608736E-3f) * z
- 1.6666654611E-1f) * z * x)
+ x;
c = (( 2.443315711... |
vvolkl/esc19 | hands-on/architecture/benchmark.h | <reponame>vvolkl/esc19
#ifndef BENCHMARK_H
#define BENCHMARK_H
#include <type_traits>
namespace benchmark {
#ifdef __x86_64__
#define MAX_GPR_SIZE 8
#else
#define MAX_GPR_SIZE 4
#endif
template<typename T>
__attribute__((always_inline))
inline std::enable_if_t<sizeof(T) <= MAX_GPR_SIZE>
keep(T&& x) noexcept
{... |
vvolkl/esc19 | hands-on/vectorization/approx_vlog.h | #ifndef APPROX_LOG_H
#define APPROX_LOG_H
/* Quick and dirty, branchless, log implementations
Author: <NAME>, Aric, ENS-Lyon
All right reserved
Warning + disclaimers:
- no special case handling (infinite/NaN inputs, even zero input, etc)
- no input subnormal handling, you'll get completely wrong results.
T... |
thegecko/TFLmicrospeech | RTE/_IMXRT1050-EVKB/Pre_Include_Global.h | <filename>RTE/_IMXRT1050-EVKB/Pre_Include_Global.h
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'microspeech.IMXRT1050-EVKB'
* Target: 'IMXRT1050-EVKB'
*/
#ifndef PRE_INCLUDE_GLOBAL_H
#define PRE_INCLUDE_GLOBAL_H
/* tensorflow::Machine Learning:Tens... |
JorisPrds/Arduino | PIC32MZEF/ArduCAM/Example/SingleShot_32MZEF/firmware/src/drivers/ArduCAM.c | <filename>PIC32MZEF/ArduCAM/Example/SingleShot_32MZEF/firmware/src/drivers/ArduCAM.c
/*******************************************************************************
* ArduCAM.c
* ArduCAM Library porting for OV5642 only on PIC32
* Source File
* Provides function implementation
* This file is strongly ins... |
JorisPrds/Arduino | PIC32MZEF/ArduCAM/Example/SingleShot_32MZEF/firmware/src/config/default/peripheral/tmr/plib_tmr9.c | <reponame>JorisPrds/Arduino
/*******************************************************************************
TMR Peripheral Library Interface Source File
Company
Microchip Technology Inc.
File Name
plib_tmr9.c
Summary
TMR9 peripheral library source file.
Description
This file implements th... |
JorisPrds/Arduino | PIC32MZEF/ArduCAM/ArduCAM.h | <filename>PIC32MZEF/ArduCAM/ArduCAM.h
/*******************************************************************************
* ArduCAM.h
* ArduCAM Library porting for OV5642 only on PIC32MZEF
* Header File
* Provides constants and function definitions
* This file is strongly inspired by the original ArduCAM Ar... |
JorisPrds/Arduino | PIC32MZEF/ArduCAM/Example/SingleShot_32MZEF/firmware/src/drivers/ov5642_regs.h | #ifndef OV5642_REGS_H
#define OV5642_REGS_H
#include "ArduCAM.h"
#define OV5642_CHIPID_HIGH 0x300a
#define OV5642_CHIPID_LOW 0x300b
const struct sensor_reg ov5642_RAW[] PROGMEM =
{
{0x3103,0x03},
{0x3008,0x82},
{0x3017,0x7f},
{0x3018,0xfc},
{0x3810,0xc2},
{0x3615,0xf0},
{0x3000,0x00},
{0x3001,0x00},
{0x3002,0x00},
{0x... |
JorisPrds/Arduino | PIC32MZEF/ArduCAM/Example/SingleShot_32MZEF/firmware/src/main.c | <reponame>JorisPrds/Arduino<gh_stars>0
/*******************************************************************************
* Main Source File
* JorisPrds, August 31, 2020
*******************************************************************************/
// *************************************************************... |
hluj00/planter_planter | src/Config.h |
//MQTT broker
#define MQTT_SERVER "192.168.1.166"
#define MQTT_USER "test"
#define MQTT_PASSWD "<PASSWORD>"
//updates every Nth minute
#define UPDATE_INTERVAL 1
//switch between pareing and operational mode
#define MODE_PIN 25
//dhtsensor
#define DHTPIN 14
#define DHTTYPE DHT11
//switches on watersensors
#defin... |
hluj00/planter_planter | src/AnalogSensor.h | <reponame>hluj00/planter_planter
#include <Arduino.h>
class AnalogSensor
{
private:
int pin;
int min;
int max;
double lastValue;
int controlPin;
double mesureValue();
bool invert;
bool customCalculation;
int (*calculation)(int);
public:
AnalogSensor(int pin, int min, int max, in... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Materials/Metal.h | <reponame>ClaudiaLapalme/RayTracingInOneWeekend
//
// Created by claul on 8/25/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_METAL_H
#define RAYTRACINGINONEWEEKEND_METAL_H
#include "Materials.h"
#include "../Utilities/Vec3.h"
#include "../Utilities/Ray.h"
#include "../Utilities/HitRecord.h"
/**
* The metal class reflects... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Assets/Sphere.h | //
// Created by claul on 8/21/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_SPHERE_H
#define RAYTRACINGINONEWEEKEND_SPHERE_H
#include "../Utilities/Vec3.h"
#include "Collidables.h"
class Sphere : public Collidables {
public:
Sphere() = default;
Sphere(const Point3 center, const double radius, std::sh... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Assets/Camera.h | //
// Created by claul on 8/22/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_CAMERA_H
#define RAYTRACINGINONEWEEKEND_CAMERA_H
#include "../Utilities/Vec3.h"
#include "../Utilities/Ray.h"
class Camera {
public:
Camera() = default;
Camera(const double viewportHeight, const double viewportWidth, const do... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Utilities/ray.h | <gh_stars>1-10
//
// Created by claul on 6/7/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_RAY_H
#define RAYTRACINGINONEWEEKEND_RAY_H
#include <optional>
#include "Vec3.h"
class Ray {
private:
Point3 origin;
Vec3 direction;
public:
Ray() = default;
Ray(const Point3& origin, const Vec3& direction) : origin(... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/main.h | <reponame>ClaudiaLapalme/RayTracingInOneWeekend
//
// Created by claul on 6/7/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_MAIN_H
#define RAYTRACINGINONEWEEKEND_MAIN_H
#include "Utilities/Vec3.h"
#include "Utilities/Colour.h"
#include "Utilities/Ray.h"
#include "Containers/CollidableList.h"
#include "Assets/Sphere.h"
#inc... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Materials/Matte.h | <gh_stars>1-10
//
// Created by claul on 8/25/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_MATTE_H
#define RAYTRACINGINONEWEEKEND_MATTE_H
#include "Materials.h"
#include "../Utilities/Vec3.h"
/**
* The matte material uses lambertian math to produce the desired finish
*/
class Matte : public Material {
public:
Matte... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Assets/Collidables.h | <gh_stars>1-10
//
// Created by claul on 8/21/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_COLLIDABLES_H
#define RAYTRACINGINONEWEEKEND_COLLIDABLES_H
#include "../Utilities/Ray.h"
#include "../Utilities/HitRecord.h"
class Collidables {
public:
Collidables() = default;
virtual bool hit(const Ray& ra... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Materials/Materials.h | //
// Created by claul on 8/25/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_MATERIALS_H
#define RAYTRACINGINONEWEEKEND_MATERIALS_H
#include "../Utilities/Vec3.h"
#include "../Utilities/Ray.h"
#include "../Utilities/HitRecord.h"
struct HitRecord;
class Material {
public:
virtual bool scatterLight(
const R... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Containers/CollidableList.h | <filename>Headers/Containers/CollidableList.h
//
// Created by claul on 8/21/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_COLLIDABLELIST_H
#define RAYTRACINGINONEWEEKEND_COLLIDABLELIST_H
#include "../Assets/Collidables.h"
#include <memory>
#include <vector>
class CollidableList : public Collidables {
public... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Utilities/colour.h | //
// Created by claul on 6/7/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_COLOUR_H
#define RAYTRACINGINONEWEEKEND_COLOUR_H
#include "Vec3.h"
#include "Ray.h"
#include "../Assets/Collidables.h"
#include <iostream>
void write_colour(std::ostream& out, Colour pixel_colour, int samplesPerPixel) {
// divide colours by t... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Utilities/MathFunctions.h | <reponame>ClaudiaLapalme/RayTracingInOneWeekend
//
// Created by claul on 8/24/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_MATHFUNCTIONS_H
#define RAYTRACINGINONEWEEKEND_MATHFUNCTIONS_H
#include <random>
static constexpr double pi = 3.1415926535897932385;
static std::random_device rd;
static std::mt19937 rand... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Utilities/vec3.h | <reponame>ClaudiaLapalme/RayTracingInOneWeekend
//
// Created by claul on 6/7/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_VEC3_H
#define RAYTRACINGINONEWEEKEND_VEC3_H
#include "MathFunctions.h"
#include <cmath>
#include <iostream>
class Vec3 {
private:
double e[3];
public:
Vec3() = default;
Vec3(double v1,... |
ClaudiaLapalme/RayTracingInOneWeekend | Headers/Utilities/HitRecord.h | //
// Created by claul on 8/21/2020.
//
#ifndef RAYTRACINGINONEWEEKEND_HITRECORD_H
#define RAYTRACINGINONEWEEKEND_HITRECORD_H
#include "Vec3.h"
#include "Ray.h"
#include "../Materials/Materials.h"
#include <memory>
class Material;
struct HitRecord {
Point3 point;
Vec3 normal; // closest no... |
CynricFeng/YCSB-C-T8 | db/t8_db.h | <filename>db/t8_db.h<gh_stars>0
#ifndef YCSB_C_T8_DB_H_
#define YCSB_C_T8_DB_H_
#include "core/db.h"
#include <iostream>
#include <string>
#include "client/client.hpp"
using std::cout;
using std::endl;
namespace ycsbc {
class T8DB : public DB {
public:
T8DB(t8db::NodeID cm_id) {
t8db_ = new client::Client(c... |
Mirmik/crow | bindings/arduino/src/crow/gateway.h | /** @file */
#ifndef CROW_GATEWAY_H
#define CROW_GATEWAY_H
#include <crow/packet.h>
#include <igris/datastruct/dlist.h>
#include <igris/sync/syslock.h>
/**
@brief Абстрактный класс врат. Врата отвечают за пересылку пакетов
между башнями.
@details Может некоторое время хранить отправляемые пакеты.
*/
name... |
Mirmik/crow | crow/proto/channel.h | #ifndef CROW_CHANNEL_H
#define CROW_CHANNEL_H
#include <crow/proto/node.h>
#include <igris/buffer.h>
#include <igris/event/delegate.h>
#include <igris/sync/syslock.h>
#define CROW_CHANNEL_INIT 0
#define CROW_CHANNEL_WAIT_HANDSHAKE_REQUEST 1
#define CROW_CHANNEL_WAIT_HANDSHAKE_ANSWER 2
#define CROW_CHANNEL_CONNECTED ... |
Mirmik/crow | bindings/arduino/src/crow/proto/retransler.h | <reponame>Mirmik/crow
#ifndef CROW_PROTO_RETRANSLER_H
#define CROW_PROTO_RETRANSLER_H
#include <crow/proto/node.h>
#include <crow/types.h>
#include <igris/event/delegate.h>
namespace crow
{
class service_retransler : public crow::node
{
crow::hostaddr_view host_a;
crow::hostaddr_view host_b;
... |
Mirmik/crow | bindings/java/crow/util.h | <reponame>Mirmik/crow
#include <jni.h>
template <class T> static T *getObject(JNIEnv *env, jobject self)
{
jclass cls = env->GetObjectClass(self);
if (!cls)
env->FatalError("GetObjectClass failed");
jfieldID nativeObjectPointerID = env->GetFieldID(cls, "instance", "J");
if (!nativeObjectPointe... |
Mirmik/crow | crow/nodes/beam.h | <filename>crow/nodes/beam.h
#ifndef CROW_BEAM_H
#define CROW_BEAM_H
#include <crow/proto/node.h>
namespace crow
{
class beam : public crow::node, public crow::alived_object
{
std::string client_name;
crow::hostaddr crowker;
nodeid_t nodeno = CROWKER_BEAMSOCKET_BROCKER_NODE_NO;
pub... |
Mirmik/crow | bindings/arduino/src/crow/brocker/tcp_subscriber.h | <reponame>Mirmik/crow
/** @file */
#ifndef CROW_BROCKER_TCP_SUBSCRIBER_H
#define CROW_BROCKER_TCP_SUBSCRIBER_H
#include <map>
#include <nos/inet/tcp_socket.h>
#include <string>
#include "subscriber.h"
namespace crowker_implementation
{
class tcp_subscriber : public subscriber
{
public:
nos::i... |
Mirmik/crow | bindings/java/crow/crow_CrowSpamSubscriber.h | <reponame>Mirmik/crow<filename>bindings/java/crow/crow_CrowSpamSubscriber.h
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class crow_CrowSpamSubscriber */
#ifndef _Included_crow_CrowSpamSubscriber
#define _Included_crow_CrowSpamSubscriber
#ifdef __cplusplus
extern "C" {
#endif
/*... |
Mirmik/crow | crow/nodes/subscriber_node.h | #ifndef CROW_SUBSCRIBER_NODE_H
#define CROW_SUBSCRIBER_NODE_H
#include <crow/nodes/publisher_node.h>
#include <crow/proto/node.h>
#include <igris/event/delegate.h>
#include <nos/print.h>
namespace crow
{
class abstract_subscriber_node : public crow::publisher_node,
public crow... |
Mirmik/crow | crow/hostaddr_view.h | <reponame>Mirmik/crow
/** @file */
#ifndef CROW_HOSTADDR_VIEW_H
#define CROW_HOSTADDR_VIEW_H
#include <igris/buffer.h>
#if __has_include(<vector>)
#include <vector>
#else
namespace std
{
template <class T, class Alloc> class vector;
}
#endif
namespace crow
{
class hostaddr;
class hostaddr_view
{
... |
Mirmik/crow | crow/iter.h | /** @file */
#ifndef CROW_ITER_H
#define CROW_ITER_H
#include <crow/gateway.h>
#include <crow/proto/node.h>
#include <vector>
namespace crow
{
std::vector<crow::gateway *> gates();
std::vector<crow::node *> nodes();
}
#endif
|
Mirmik/crow | bindings/arduino/src/crow/select.h | /** @file */
#ifndef CROW_SELECT_H
#define CROW_SELECT_H
namespace crow
{
extern int unselect_pipe[2];
extern bool add_unselect_to_fds;
void select_collect_fds();
void add_select_fd(int fd);
void select();
void unselect();
void unselect_init();
}
#endif
|
Mirmik/crow | bindings/java/crow/crow_CrowNode.h | <reponame>Mirmik/crow<gh_stars>1-10
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class crow_CrowNode */
#ifndef _Included_crow_CrowNode
#define _Included_crow_CrowNode
#ifdef __cplusplus
extern "C"
{
#endif
/*
* Class: crow_CrowNode
* Method: bind
* Sig... |
Mirmik/crow | bindings/arduino/src/crow/hostaddr.h | /** @file */
#ifndef CROW_HOSTADDR_H
#define CROW_HOSTADDR_H
#include <cstring>
#include <igris/buffer.h>
#include <vector>
namespace crow
{
class hostaddr_view;
class hostaddr
{
std::vector<uint8_t> _addr;
public:
hostaddr() = default;
const uint8_t *data() const { retur... |
Mirmik/crow | crow/addons/nospublisher.h | #ifndef CROW_ADDONS_NOSPUBLISHER_H
#define CROW_ADDONS_NOSPUBLISHER_H
#include <nos/io/ostream.h>
namespace crow
{
class nospublisher : public nos::ostream
{
uint8_t *addr;
uint8_t alen;
const char *theme;
public:
void init(uint8_t *addr, uint8_t alen, const char *theme)
... |
Mirmik/crow | crow/nodes/spammer.h | <filename>crow/nodes/spammer.h<gh_stars>0
/**
@file
*/
#ifndef CROW_NODE_SPAMMER_H
#define CROW_NODE_SPAMMER_H
#include <chrono>
#include <crow/nodeaddr.h>
#include <crow/proto/node.h>
#include <map>
#include <igris/event/delegate.h>
using namespace std::literals::chrono_literals;
namespace crow
{
class sp... |
Mirmik/crow | bindings/java/crow/crow_Crow.h | /* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class crow_Crow */
#ifndef _Included_crow_Crow
#define _Included_crow_Crow
#ifdef __cplusplus
extern "C"
{
#endif
/*
* Class: crow_Crow
* Method: init_crow_library
* Signature: ()V
*/
JNIEXPORT void ... |
Mirmik/crow | crow/brocker/crowker_pubsub_node.h | #ifndef CROW_NODES_CROWKER_PUBSUB_NODE_H
#define CROW_NODES_CROWKER_PUBSUB_NODE_H
#include <crow/proto/node.h>
#include <crow/brocker/crowker_api.h>
#include <memory>
namespace crow
{
class crowker_pubsub_node : public crow::node, public crowker_api
{
class node_client : public crowker_implementation:... |
Mirmik/crow | crow/brocker/theme.h | /** @file */
#ifndef CROWKER_THEME_H
#define CROWKER_THEME_H
#include <memory>
#include <set>
#include <string>
#include <mutex>
#include <deque>
#include <crow/defs.h>
#include <nos/print.h>
#include <igris/container/cyclic_buffer.h>
namespace crowker_implementation
{
class client;
class theme
{
... |
Mirmik/crow | crow/warn.h | /** @file */
#ifndef CROW_WARN_H
#define CROW_WARN_H
#include <igris/buffer.h>
namespace crow
{
#if defined(MEMORY_ECONOMY)
static inline void warn(igris::buffer) {}
#else
void warn(igris::buffer msg);
#endif
}
#endif |
Mirmik/crow | bindings/arduino/src/crow/gates/serial_gstuff_v1.h | <gh_stars>1-10
/**
@file
*/
#ifndef CROW_GATES_SERIAL_GSTUFF_V1_H
#define CROW_GATES_SERIAL_GSTUFF_V1_H
#include <stdbool.h>
#include <stdint.h>
#include <sys/cdefs.h>
#include <crow/gateway.h>
#include <igris/protocols/gstuff_v1/autorecv.h>
#include <igris/protocols/gstuff_v1/gstuff.h>
namespace crow
{
st... |
Mirmik/crow | bindings/arduino/src/crow/proto/request.h | #ifndef CROW_PROTO_REQUEST_H
#define CROW_PROTO_REQUEST_H
#include <crow/proto/node.h>
#include <crow/types.h>
namespace crow
{
class oneshoot_async_requester : public crow::node
{
void (*_dlg)(void *, int, crow_packet *);
void *_arg;
public:
oneshoot_async_requester(void (*dlg)... |
Mirmik/crow | bindings/arduino/src/crow/nodes/spammer.h | <reponame>Mirmik/crow
/**
@file
*/
#ifndef CROW_NODE_SPAMMER_H
#define CROW_NODE_SPAMMER_H
#include <chrono>
#include <crow/extra/nodeaddr.h>
#include <crow/proto/node.h>
#include <map>
#include <igris/event/delegate.h>
using namespace std::literals::chrono_literals;
namespace crow
{
class spammer : public... |
Mirmik/crow | crow/nodes/publisher_node.h | <reponame>Mirmik/crow<filename>crow/nodes/publisher_node.h
#ifndef CROW_NODE_PUBLISHER_H
#define CROW_NODE_PUBLISHER_H
#include <crow/hostaddr.h>
#include <crow/proto/node.h>
namespace crow
{
class abstract_publisher_node : public crow::node
{
bool _async = false;
public:
void set_async... |
Mirmik/crow | bindings/arduino/src/crow/proto/acceptor.h | #ifndef CROW_ACCEPTOR_H
#define CROW_ACCEPTOR_H
#include <crow/proto/channel.h>
#include <crow/proto/node.h>
namespace crow
{
struct acceptor : public crow::node
{
igris::delegate<crow::channel *> init_channel;
acceptor() = default;
acceptor(igris::delegate<crow::channel *> init_chan... |
Mirmik/crow | crow/brocker/crowker_api.h | #ifndef CROW_CROWKER_API_H
#define CROW_CROWKER_API_H
#include <crow/brocker/client.h>
#include <crow/brocker/crowker.h>
namespace crow
{
class crowker_api
{
public:
virtual void subscribe_on_theme(crow::hostaddr_view, int nid,
igris::buffer theme, uint8_t r... |
Mirmik/crow | bindings/arduino/src/crow.h | // PLACEHOLDER
|
Mirmik/crow | bindings/arduino/src/crow/proto/service.h | /**
Протокол для брокера на основе механизма нодов и почтового ящика.
Позволяет зарегистрировать сервис в брокере, передавать команды и получать
ответы.
*/
#include <crow/proto/msgbox.h>
#include <igris/binreader.h>
#include <igris/event/delegate.h>
namespace crow
{
}
|
Mirmik/crow | bindings/java/crow/crow_HostAddr.h | <gh_stars>1-10
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class crow_HostAddr */
#ifndef _Included_crow_HostAddr
#define _Included_crow_HostAddr
#ifdef __cplusplus
extern "C"
{
#endif
/*
* Class: crow_HostAddr
* Method: nativeNew
* Signature: (Ljava/l... |
Mirmik/crow | bindings/arduino/src/crow/crow.h | /** @file */
#ifndef CROW_CROW_H
#define CROW_CROW_H
#include <crow/address.h>
#include <crow/gates/udpgate.h>
#include <crow/pubsub/publisher.h>
#include <crow/pubsub/pubsub.h>
#include <crow/pubsub/subscriber.h>
#include <crow/tower.h>
#endif
|
Mirmik/crow | crow/nodes/pubsub_defs.h | #ifndef CROW_PUBSUB_DEFS_H
#define CROW_PUBSUB_DEFS_H
#include <crow/proto/node.h>
#include <igris/buffer.h>
namespace crow
{
enum class PubSubTypes : uint8_t
{
Publish = 0,
Subscribe = 1,
Consume = 2,
Request = 3,
Subscribe_v2 = 4,
Unsubscribe = 5,
};
... |
Mirmik/crow | bindings/arduino/src/crow/proto/node.h | <reponame>Mirmik/crow<filename>bindings/arduino/src/crow/proto/node.h
#ifndef CROW_NODE_H
#define CROW_NODE_H
#include <crow/packet.h>
#include <crow/proto/protocol.h>
#include <crow/types.h>
#include <igris/binreader.h>
#include <igris/datastruct/dlist.h>
#include <igris/sync/syslock.h>
#define CROW_NODEPACK_COMMON... |
Mirmik/crow | apps/ctrans/HIDE/binin.h | #pragma once
#include <string>
#include <vector>
#include <map>
#include <igris/buffer.h>
void flt32_conv(const std::string &str, void *tgt);
void int32_conv(const std::string &str, void *tgt);
void binin_mode_prepare(std::string infmt);
std::string input_binary(const std::string& fmt); |
Mirmik/crow | bindings/arduino/src/crow/types.h | /** @file */
#ifndef CROW_TYPES_H
#define CROW_TYPES_H
#include <stdint.h>
namespace crow
{
using nid_t = uint16_t;
}
#endif
|
Mirmik/crow | bindings/arduino/src/crow/brocker/service.h | /** @file */
#ifndef CROW_BROCKER_SERVICE_H
#define CROW_BROCKER_SERVICE_H
#include <crow/proto/node.h>
#include <crow/proto/request.h>
#include <crow/types.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <igris/util/bug.h>
#define CROW_SERVICE_ONESHOOT 0
#define CROW_SERVICE_NODE_R... |
Mirmik/crow | bindings/arduino/src/crow/nodes/cli.h | #ifndef CROW_CLI_NODE
#define CROW_CLI_NODE
#include <crow/proto/node.h>
#include <igris/datastruct/argvc.h>
#include <igris/shell/mshell.h>
#include <nos/print.h>
namespace crow
{
template <class Dictionary> class cli_node : public crow::node
{
Dictionary dictionary;
public:
bool debu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.