2005-04-01から1ヶ月間の記事一覧

flash

http://www.kazsh.com/ http://www.hoogerbrugge.com/

jpypeでswing

javaのコード http://www.hellohiro.com/swing.htm import javax.swing.*; public class HelloWorldSwing { public static void main(String[] args) { JFrame frame = new JFrame("HelloWorldSwing"); final JLabel label = new JLabel("Hello World"); fra…

2Dで法線を求める

void Vec2dPerp(D3DXVECTOR2 *ov, D3DXVECTOR2 *iv) { ov->x = -iv->y; ov->y = iv->x; }

pythonからjava呼ぶ

http://jpype.sourceforge.net/ テストソース from jpype import * startJVM("C:/Program Files/Java/jre1.5.0_02/bin/client/jvm.dll", "-ea") java.lang.System.out.println("hello world") shutdownJVM() 結果 hello world JVM activity report : classes…

Nevrax Library

http://www.nevrax.org/tiki-index.php

ポリゴンと点の内外チェック(凸に限る)

// 点がポリゴン内にあるかチェック(外積版) bool checkPointInPolygon(D3DXVECTOR3 &point, D3DXVECTOR3 polygon[], int polygonNum) { D3DXVECTOR2 v1, v2; for (int i = 0; i < polygonNum-1; i++) { // ポリゴンの1辺のベクトル v1 = D3DXVECTOR2(poly…

ODE

http://f42.aaa.livedoor.jp/~hassaku/crswikicrs/?ODE

forza motorsport

http://www.xbox.com/assets/ja-jp/games/forza/index.html 背景がきれい

COLLADAの穴(解決?)

三角形分割用の頂点データと、表示に使う頂点データが別だった #include<windows.h> #include<stdio.h> #include "triangulate.h" #include <GL/gl.h> #include <GL/glut.h> #include <GL/glaux.h> CvPolygon cvp; CvVertexNode cvvn[] = { {0, NULL}, {1, NULL}, {2, NULL}, {3, NULL}, {-1, NULL}, {4, NULL}, {</gl/glaux.h></gl/glut.h></gl/gl.h></stdio.h></windows.h>…

todo

行列を作る為の関数 D3DXMatrixLookAtLH() D3DXMatrixPerspectiveFovLH() を自作する

スクリーン変換関数

viにプロジェクション変換までしたものを渡すとvoにスクリーン座標が返る void convertScreen(D3DXVECTOR3 *vo, D3DXVECTOR3 *vi, int screenWidth, int screenHeight) { vo->x = (vi->x + 1) * screenWidth / 2; vo->y = (-vi->y + 1) * screenWidth / 2; v…

3D変換行列を自分でやる

DirectXの行列による変換は、普通IDirect3DDevice9::SetTransform()を使って 自動で行っているが、この仕組みを使わずに頂点変換するには、 world変換 * view変換 * projection変換 を、頂点に掛けることでできる。 // テストコード #include <stdio.h> #include <windows.h> #in</windows.h></stdio.h>…

3D 座標変換

http://www.c3.club.kyutech.ac.jp/~sukiyaki/3dt/afin.html#screen

マウスによるポリゴン選択

http://www.tsg.ne.jp/sept/prg/memo/polypick.asp

pyogre demo

ogreすごい

中学生のためのゲームクリエーター講座

http://www.yoot.com/lecture.html

FLTK

http://www.fltk.org/0からプロジェクトを作ったとき リンク中... snCL -- Detected win32 build...passing to link.exe fltkd.lib(Fl_x.obj) : error LNK2001: 外部シンボル "___WSAFDIsSet@8" は未解決です fltkd.lib(Fl_x.obj) : error LNK2001: 外部シン…

COLLADAの穴(CvPolygonについて)

●vettexNodesに頂点インデクスが入っている インデクスの-1は穴インデクスとの区切り ポリゴンインデクス, ..., -1, 穴インデクス1, ..., -1, 穴インデクス2, ... ●vettexNodes.GLVertexは使っていない? 実際の頂点データはCvVetrexに入っている ●NumOgVe…

COLLADAの穴(ポリゴン分割)

使われていないほうのポリゴン分割法 これでは穴があかない? d:/COLLADA/viewer/Triangulation.c(308): // Stupid triangulation // Polygon->Triangulation = Cv_TriangleArrayAlloc(Polygon->NumOfVertexNodes-2); for(i=0;i<Polygon->NumOfVertexNodes-2;++i) { Po</polygon->…

Blenderのビルド

VC6ではとにかく問題が多い気がしますがとりあえずビルドできました。 とにかく面倒くさいです 最新のBlenderソース http://download.blender.org/projects/bf-blender/daily-checkouts/ bf-blender-2005-04-07.tgzをダウンロード クイックタイムSDKを…

NotGNU

http://www.notgnu.org/ 日本語が入りません

Ng

http://tillanosoft.com/ce/ngj.html ng06j.zip

Gnu Emacs

ftp://ftp.gnu.org/gnu/windows/emacs/ emacs-21.3-bin-i386.tar.gz 設定 (set-language-environment "Japanese") (set-default-coding-systems 'shift_jis-dos) (set-terminal-coding-system 'shift_jis-dos) (set-keyboard-coding-system 'shift_jis-dos) …

xemacs

http://www.suiyokai.org/tomonori/xemacs/ xemacs-i586-pc-win32-21.4.13-mule.tar.gz ftp://ftp.xemacs.org/tux/xemacs/packages/ xemacs-sumo.tar.gz xemacs-mule-sumo.tar.gz 設定 (set-language-environment "Japanese") (set-default-coding-systems '…

COLLADAの穴について

ポリゴンに穴のデータを含めることが出来るようです hタグ以降のデータがそれになります <polygons count="1"> <input semantic="VERTEX" source="#meshFromFace-Vtx" idx="0"/> <p>0 1 2 3<h/>4 5 6 7<h/>8 9 10 11</p> </polygons>上のデータでは <p>ポリゴン頂点<h/>穴1の頂点<h/>穴2の頂点</p>となりますが、表示するにはポリゴンの分割をしないといけないのでめんどくさいです

perlで3D?

http://www.perl.com/pub/a/2004/12/01/3d_engine.html

particle習作(pygame)

proce55ingで作ろうとしましたが、画像のアルファがうまく出来なかったので、pygameで # -*- coding:sjis -*- # http://sansa.s16.xrea.com/text/pygame_sample.html # http://mail.unixuser.org/~euske/doc/pygame/ChimpLineByLine-j.html import pygame, s…

colladaのフォーマットについて

polygonsタグに頂点やnormalがまとめて入っている <polygons count="5" material="#Blue"> <input semantic="VERTEX" source="#box-Vtx" idx="0"/> <input semantic="NORMAL" source="#box-0-Normal" idx="1"/> <p>0 0 1 1 5 2 4 3</p>この場合、頂点インデクス1 normalインデクス1 頂点インデクス2 normalインデクス2 ... となる inputタグのsource属性がarrayタグと関連づいている。</polygons>

pythonMagickテスト

from PythonMagick import * img=Image('30x30','red') img.write('test1.png') data=file('test1.png','rb').read() img=Image(Blob(data)) img.write('test2.png') print "now you should have two png files"

http://public.procoders.net/cgi-bin/trac.cgi/wiki/PythonMagick http://ftp.surfnet.nl/pub/ImageMagick/python/README.txt