07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ADOBE DIRECTOR BASICS<br />

3D: Controlling action<br />

otherwise<br />

vTransform = aModel.getWorldTransform()<br />

end case<br />

if not vTransform then<br />

vTransform = transform()<br />

end if<br />

vModifiers = aModel.modifier<br />

if not vModifiers.getPos(#meshDeform) then<br />

aModel.addModifier(#meshDeform)<br />

vRemove = TRUE<br />

else<br />

vRemove = FALSE<br />

end if<br />

-- Iterate through the meshes<br />

vMeshCount = aModel.shaderList.count<br />

repeat with ii = 1 to vMeshCount<br />

vVertexList = aModel.meshDeform.mesh[ii].vertexList<br />

vVertexCount = vVertexList.count<br />

repeat with jj = 1 to vVertexCount<br />

vVertex = vVertexList.getAt(jj)<br />

vWorldPosition = vTransform * vVertex<br />

vWorldPosition = vVertexList.getAt(jj)<br />

vX = vWorldPosition.x<br />

if vMaxX < vX then<br />

vMaxX = vX<br />

end if<br />

if vMinX > vX then<br />

vMinX = vX<br />

end if<br />

vY = vWorldPosition.y<br />

if vMaxY < vY then<br />

vMaxY = vY<br />

end if<br />

if vMinY > vY then<br />

vMinY = vY<br />

end if<br />

vZ = vWorldPosition.z<br />

if vMaxZ < vZ then<br />

vMaxZ = vZ<br />

end if<br />

Last updated 8/26/2011<br />

386

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

Saved successfully!

Ooh no, something went wrong!