[NTG-context] U3D (embedded 3D objects)

Renaud AUBIN aubin at nibua-r.org
Wed Jul 26 01:37:34 CEST 2006


Renaud AUBIN a écrit :

> How to do that in the ConTeXt way ? ;) I have read spec-tpd.tex but
> didn't know much...
>
> 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 >>}
>
We need to be able to define some views... Variables are in facts CO,
C2W, XN and BG needs to be annotation-wide...
I need more time to manage coordinates possibilities...

> \pdfobj stream %
> attr {%
>   /Subtype/U3D/VA [\the\pdflastobj\space0 R] /DV/F%
> }%
> file {\uthreedfilename.u3d}%
> \pdfrefobj\pdflastobj%
> \xdef\iiidstream{\the\pdflastobj}

"pretty raw pdf code in the key/val pairs, which is something alien to
context" ;)

> \pdfobj stream {}\pdfrefobj\pdflastobj%
> \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 >>%
>         }%
>
Variables here are mainly 3DI, NM, mime type ?

> \stoptext
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ntg-context mailing list
>ntg-context at ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ntg.nl/pipermail/ntg-context/attachments/20060726/f62f498b/attachment.html 


More information about the ntg-context mailing list