(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#include <iostream> | |
#include <vector> | |
#include <cmath> | |
#include <cstring> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <cassert> | |
using namespace std; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
using UnityEngine; | |
using System.Collections; | |
[RequireComponent (typeof (MeshFilter))] | |
public class Cone : MonoBehaviour { | |
/// subdivision | |
public int subdivisions = 10; | |
/// height and radius | |
public float radius = 1f; |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
// an Editor method to create a cone primitive (so far no end caps) | |
// the top center is placed at (0/0/0) | |
// the bottom center is placed at (0/0/length) | |
// if either one of the radii is 0, the result will be a cone, otherwise a truncated cone | |
// note you will get inevitable breaks in the smooth shading at cone tips | |
// note the resulting mesh will be created as an asset in Assets/Editor |