3D test 1 cheat sheet

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

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

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}.
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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern