Skip to content

Instantly share code, notes, and snippets.

uint cubeVertIndices[8];
cubeVertIndices[0] = (compactedCubeArray[index].x + compactedCubeArray[index].y * size + compactedCubeArray[index].z * size * size) * 2;
cubeVertIndices[1] = (compactedCubeArray[index].x * 2 + compactedCubeArray[index].y * 2 * size + (compactedCubeArray[index].z * 2 + 1) * size * size);
cubeVertIndices[2] = ((compactedCubeArray[index].x * 2 + 1) + compactedCubeArray[index].y * 2 * size + (compactedCubeArray[index].z * 2 + 1) * size * size);
cubeVertIndices[3] = ((compactedCubeArray[index].x* 2 + 1) + compactedCubeArray[index].y * 2 * size + compactedCubeArray[index].z * 2 * size * size);
cubeVertIndices[4] = (compactedCubeArray[index].x * 2 + (compactedCubeArray[index].y * 2 + 1) * size + compactedCubeArray[index].z * 2 * size * size);
cubeVertIndices[5] = (compactedCubeArray[index].x * 2 + (compactedCubeArray[index].y * 2 + 1) * size + (compactedCubeArray[index].z * 2 + 1) * size * size);
cubeVertIndices[6] = ((compactedCubeArray[index].x * 2 + 1) + (compactedCubeArray[index
@panbaked
panbaked / gist:4055207
Created November 11, 2012 15:22
density calculations opencl
// MarchingCubesGPU.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "CL\cl.hpp"
#include "CL\opencl.h"
#include <iostream>
#include <string>
#include <vector>
#include <utility>
@panbaked
panbaked / gridcell
Created November 8, 2012 19:30
Vertex undeclared identifier
#pragma once
#ifndef GRIDCELL_H
#define GRIDCELL_H
#include "ApplicationGeometry.h"
#include "MarchingCubesTables.h"
#include <math.h>
#include <stdio.h>
#include <vector>
#include <glm/glm.hpp>
using Server.Mobiles;
using Server.Spells;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Server.Engines.XmlSpawner2
{
class XmlTimedCast : XmlAttachment
@panbaked
panbaked / woodharvested290912
Created September 29, 2012 14:23
Wood harvested at 29/09/12
Asmodan 50290
luban 52015
Lou Blackoak 58514
Corp Por 78245
Wallalla 78768
Gr'Gubbug 94845
Skunk Worker 95470
Asmus Compte 98360
Miner Rich 102282
Jooz'Mumm 107007
@panbaked
panbaked / oremined290912
Created September 29, 2012 14:22
Ore mined at 29/09/12
Name TotalOreMinedΞΞ
James W Marshall 51329
Ruk 53750
a nagger 53942
Tatermericorp 55169
luban 58539
Jameson 63206
Bongo 63511
wandering peon 64274
Brian rich 64390
Seaniewaunie 110443
Trak'kar 213548
Beatbox Blackguy 120266
Gti 137423
Zawazuki 102572
Slein 115111
PurPlEpEoplEatR 103148
Vennim 163877
Crematorium 238276
Pepito 178473
CommonwealthResourceBonus crb = pm.CitizenshipPlayerState.GetResourceBonus(ResourceBonusTypes.Adventurer);
if (crb != null)
{
double goldMultiplier = 1 + ((double)crb.HarvestBonus / 100);
Gold gold = (Gold)c.FindItemByType(typeof(Gold));
if (gold != null)
{
Name GoldInBankΞΞ
Seaniewaunie 110443
Trak'kar 112321
Redbeard 180647
Slein 115111
Gore 102854
Methodman 253074
Tmap Smallwood 114631
Ava 115062
Pepito 178473
@panbaked
panbaked / wwcconstructor
Created September 17, 2012 17:26
worldwarscontroller constructor
[Constructable]
public WorldWarsController() : base(0x1B74)
{
if (m_Instance == null || m_Instance.Deleted)
{
m_Instance = this;
}
else
{