03.04.2013 Views

Uma Arquitetura de Suporte a Interações 3D ... - DCA - Unicamp

Uma Arquitetura de Suporte a Interações 3D ... - DCA - Unicamp

Uma Arquitetura de Suporte a Interações 3D ... - DCA - Unicamp

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

184 Sha<strong>de</strong>rs <strong>de</strong> estimativa <strong>de</strong> elementos <strong>de</strong> geometria diferencial <strong>de</strong> segunda e terceira or<strong>de</strong>m<br />

}<br />

}<br />

// Variação da curvatura ao longo da aresta até o vértice<br />

float3 dfcurv = fcurv_n - fcurv_i;<br />

float3 e = vPosNei - vPos;<br />

float u = dot( e, vPDir1 );<br />

float v = dot( e, vPDir2 );<br />

float u2 = u*u, v2 = v*v, uv = u*v;<br />

w[0][0] += u2;<br />

w[0][1] += uv;<br />

w[3][3] += v2;<br />

m[0] += u*dfcurv[0];<br />

m[1] += v*dfcurv[0];<br />

m[2] += u*dfcurv[2];<br />

m[3] += v*dfcurv[2];<br />

iCt++;<br />

w[1][1] = 2.0f * w[0][0] + w[3][3];<br />

w[1][2] = 2.0f * w[0][1];<br />

w[2][2] = w[0][0] + 2.0f * w[3][3];<br />

w[2][3] = w[0][1];<br />

m = ldltsv( w, m, 4 );<br />

// Grava elementos do tensor <strong>de</strong> <strong>de</strong>rivada <strong>de</strong> curvatura<br />

Out.vColor = m;<br />

return Out;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!