3D test 1 cheat sheet

3D test 1 cheat sheet - index and vertex buffers. CW is...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
collision detection done on viewing plane. pipeline: model/local -> world -> camera -> perspective -> screen. local -> world [[1000][0100][0010][world.x world.y world.z 1]]. rot x: [[1000][cos - sin - 0][0 -sin - cos - 0][0001]]. rot y: [[cos - 0 -sin 0][0100] [sin - 0 cos - 0][0001]] rot z: [[cos - sin - 00][-sin - cos - 00][0010][0001]]. persp -> view: x[-1 1] -> [0 s_width - 1], y [-1/ar 1/ar] - > -[0 s_height-1]. bool d3d::InitD3D. D3VECTOR (float x, y, z;). planes: Ax+By+Cz+D=0, D=-NdotP, direction N, any point P on plane, Ndot(Q-P)=0, (A, B, C, D)dotP=0, D3DXPLANE(float a, b, c, d); dist d fr point p to line S+tV, S=start point, V=direction, d^2=(P-S)^2-[(P-S)dotV/||V||]^2, P(t)=S+tV is line, L=(N,D) is plane, find t so LdotP(t)=0, t=-LdotS/LdotV=- LxSx+LySy+LzSz+Lw/LxVx+LyVy+LzVz, if LdotV=0, parallel, P(t)=S-(LdotS/LdotV)V. D3DXPlaneFromPoint(DS_Plane, Const DSDXVECTORS *pvi //repeat for 3 vectors}.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: index and vertex buffers. CW is front-facing. struct Vertex{float x, y, z, nx, ny, nz}, FVF_POS_NORMAL(D3DFVF_XYZ|D3DFVF_NORM). buffer: contiguous memory space, vertex buffer: VRAM, memory, managed. speed b/w VRAM and system memory very fast, in terms of loading stuff. buffers into various pools, def: vertex, index, FVF. light: ambient: general, diffuse: direction, bounces off surfaces, relief, specular: bright, directional, emissive: from the object, power: sharpness at highlights. directional: one direction (sun), point light: all directions, spot: fuzzy sun. minification: point: simple, worst, uses nearest point, linear: interpolate across set of pixels, anistropic: corrects interp by accounting for perspective. mipmaps: scaled by power of 2, speed rendering, choose filtering mechanisms to create mipmaps, set in code...
View Full Document

Ask a homework question - tutors are online