This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HslCircleGeometry extends THREE.CircleGeometry { | |
constructor(radius: number, segments: number, thetaStart?: number, thetaLength?: number) { | |
super(radius, segments, thetaStart, thetaLength); | |
for (let i = 0; i < segments; ++i) { | |
let color = new THREE.Color().setHSL(i / segments, 1, 0.5); | |
this.faces[i].vertexColors.push(color); | |
this.faces[i].vertexColors.push(color); | |
this.faces[i].vertexColors.push(color); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VertexColorBoxGeometry extends THREE.BoxGeometry { | |
constructor(width: number, height: number, depth: number, widthSegments?: number, heightSegments?: number, depthSegments?: number) { | |
super(width, height, depth, widthSegments, heightSegments, depthSegments); | |
let faceIndices = ['a', 'b', 'c', 'd']; | |
for (let face of this.faces) { | |
let numberOfSides = (face instanceof THREE.Face3) ? 3 : 4; | |
for (let i = 0; i < numberOfSides; i++) { | |
let vertexIndex = face[faceIndices[i]]; | |
let point = this.vertices[vertexIndex]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FaceColorBoxGeometry extends THREE.BoxGeometry { | |
constructor(width: number, height: number, depth: number, widthSegments?: number, heightSegments?: number, depthSegments?: number) { | |
super(width, height, depth, widthSegments, heightSegments, depthSegments); | |
for (let face of this.faces) { | |
let color = new THREE.Color(); | |
if (face.normal.x < 0 || face.normal.y < 0 || face.normal.z < 0) { | |
color.setRGB(1, 1, 1); | |
if (face.normal.x < 0) color.r = 0; | |
if (face.normal.y < 0) color.g = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto operator await(std::chrono::system_clock::duration duration) | |
{ | |
class awaiter | |
{ | |
public: | |
explicit awaiter(std::chrono::system_clock::duration duration) : | |
_duration(duration) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Dapper; | |
using HtmlAgilityPack; | |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <nanodbc.h> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
auto cs = L"Driver={Sql Server Native Client 11.0};Server=(localdb)\\MSSQLLocalDB;Trusted_Connection=yes;Database=test"; | |
auto conn = nanodbc::connection{ cs }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Drawing.Drawing2D; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json.Linq; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.0) | |
project(directxtk) | |
add_library(directxtk | |
Src/AlphaTestEffect.cpp | |
Src/BasicEffect.cpp | |
Src/BinaryReader.cpp | |
Src/CommonStates.cpp | |
Src/DDSTextureLoader.cpp | |
Src/DGSLEffect.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DeviceResources.h - A wrapper for the Direct3D 11 device and swapchain | |
// | |
#pragma once | |
namespace DX | |
{ | |
// Provides an interface for an application that owns DeviceResources to be notified of the device being lost or created. | |
interface IDeviceNotify |
OlderNewer