Skip to content

Instantly share code, notes, and snippets.

@bagobor
bagobor / Tree_Gen.ms
Created March 11, 2013 06:09
TreeGen for 3DSMax written by Ryan James Smith aka "Virtuosic" on polycount forums.
/*
TreeGen for 3DSMax written by Ryan James Smith aka "Virtuosic" on polycount forums.
This is creative commons, edit and redistribute as you please, just remember to give original credit
also, if you add some cool stuff, email me at [email protected] and let me know what you did so
i can be jealous i didn't think of it... Oh, and if you add something cool, sign your name below mine :D
*/
@bagobor
bagobor / gist:5108345
Created March 7, 2013 14:19
3ds max lights decay
inline float Decay(float att,float dist, float r0) {
float s;
if (decayType==DECAY_NONE || dist==0.0f) return att;
if ((s=r0/dist)>=1.0f) return att;
return (decayType==DECAY_INVSQ)? s*s*att: s*att;
}
float BaseObjLight::ApplyDistanceAtten( float dist )
{
float atten = 1.0f;
Evaluate the camera’s position expressed as a vector at a specific time.
NoteA transformation matrix is not needed to evaluate a camera's position.
// Given a scene, we can create a camera
FbxCamera* myCamera = FbxCamera::Create (myScene, "");
// Store the value of the property in an animation curve node
FbxAnimCurveNode& myCameraPositionVector;
// Get and store the value of the camera's local translation
myCameraPositionVector = mySceneEvaluator->GetPropertyValue (myCamera->Position, myTime);
+ [0] ("1024_1024_rgb_rgb_ub_1",{id=1 filename="../data/mission/box1/bg.pvr" width=1024 ...}) std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,PvrTexture>
+ [1] ("1024_1024_rgb_rgb_ub_18",{id=18 filename="../data/mission/box1/atombg.pvr" width=1024 ...}) std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,PvrTexture>
+ [2] ("1024_1024_rgb_rgb_ub_6",{id=6 filename="../data/eng/loading_bg.pvr" width=1024 ...}) std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,PvrTexture>
+ [3] ("1024_256_rgb_rgb_ub_10",{id=10 filename="../data/eng/room1nBtns.pvr" width=1024 ...}) std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,PvrTexture>
+ [4] ("1024_256_rgb_rgb_ub_12",{id=12 filename="../data/eng/room1_objects.pvr" width=1024 ...}) std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,PvrTexture>
+ [5] ("1024_256_rgb_rgb_ub_13",{id=13 filename="
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace test_custom_loop
{
static class Program
{
/// <summary>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace test_custom_loop
{
static class Program
{
/// <summary>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Three.js Cubes</title>
<script src="js/three.min.js"></script>
<script src="js/Stats.js"></script>
<script>
var STAGE_W = 960, STAGE_H = 540; // 画面サイズ
....
<after all includes>
#ifdef _WIN32 || _WIN64
#include <windows.h>
#endif
....
main() {
....
#ifdef _WIN32 || _WIN64
TCHAR module_filename[MAX_PATH];
drag: function (e, ui){
var thiz = this;
/* this.$el.css({
left: thiz.$el.data('left'),
top: thiz.$el.data('top')
});*/
if(this.isSelected){
_.each(this.relative.selected, function (id){
var item = this.relative.items[id];
//if(item == this) return;
#ifndef _WIN
class SomeClass...
#endif
class Game
{
#ifndef _WIN
SomeClass m_class;
some shit here
#endif