Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace test_custom_loop
{
static class Program
{
/// <summary>
+ [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="
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);
@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;
@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
*/
<html>
<head>
<script src='/js/libs/jquery-1.7.2.min.js'></script>
<script src='/js/libs/underscore.js'></script>
<script src='/js/libs/backbone.js'></script>
</head>
<body>
<div class='test'>Test</div>
<button class='btn'>Update</button>
@bagobor
bagobor / gist:6452933
Created September 5, 2013 16:54
opengl txaa?
#version 330 core
#extension GL_ARB_shading_language_420pack: require
#extension GL_ARB_separate_shader_objects: require
#extension GL_ARB_shader_image_load_store: require
#extension GL_ARB_bindless_texture: require
#define ENABLE_BINDLESS_TEX
#define FRAGMENT_SHADER 1
#define ps_main main
#define PS_FST 0
#define PS_WMS 0
@bagobor
bagobor / mongoose-cpp-test.cpp
Created October 21, 2013 20:53
embeded webserver test
#include "./mongoose/mongoose.h"
// url, query string
typedef std::function<void(const char*, const char*)> request_handler_t;
typedef std::map<std::string, request_handler_t> req_handlers_t;
req_handlers_t req_handlers;
static int begin_request_handler(struct mg_connection *conn) {
const struct mg_request_info *request_info = mg_get_request_info(conn);