How to do that in the ConTeXt way ? ;) I have read spec-tpd.tex but didn't know much...We need to be able to define some views... Variables are in facts CO, C2W, XN and BG needs to be annotation-wide...
Take care of the heart attack.... (I've done it the rookie way, reversed from movie15)
\starttext
\xdef\uthreedfilename{pa10}
\pdfobj {<</Subtype/P/FOV 30/PS/Min>>}%
\pdfrefobj\pdflastobj%
%
\pdfobj {<<%
/MS/M% define the view as C2W matrix
/CO 1200% orbital radius
/P \the\pdflastobj\space 0 R%
/C2W [-1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0 0.000000000000000000 -600.000000000000000000 -3200.000000000000000000]%
/XN(Default)% name of the view appearing in the drop down list
/BG<</CS/DeviceRGB/C[1 1 1]>>%
>>}\pdfrefobj\pdflastobj%
\xdef\defaultview{/3DV << /N \the\pdflastobj\space 0 R >>}
\pdfobj stream %"pretty raw pdf code in the key/val pairs, which is something alien to context" ;)
attr {%
/Subtype/U3D/VA [\the\pdflastobj\space0 R] /DV/F%
}%
file {\uthreedfilename.u3d}%
\pdfrefobj\pdflastobj%
\xdef\iiidstream{\the\pdflastobj}
\pdfobj stream {}\pdfrefobj\pdflastobj%Variables here are mainly 3DI, NM, mime type ?
\xdef\apdict{/AP << /N \the\pdflastobj\space 0 R >>}
\pdfannot width 200pt height 200pt depth 200pt {% don't know how to deal with w,h and d !!!
/Subtype/3D%
/F 4% we cannot put F 5 here; bug in Reader; 3D annot would be
/T (\uthreedfilename.u3d)% disabled even if plugin were available
/Contents (3D Object (model/u3d))% mime type
/NM (pa10)% label
/P 0 0 R%
\apdict%
\defaultview%
/3DI true%
/3DD \iiidstream\space 0 R% 3D stream object
/3DA << /A/PV/AIS/I/D/PI/DIS/I >>%
}%
\stoptext
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context