13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

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.

Some Useful Examples and ScenariosAdding Custom Atoms in a QuickTime VR Moviefield of the node header structure. Accordingly, the MyGetNodeName function then calls QTFindChildByIDonce again to find that string atom. If the string atom is found, MyGetNodeName calls QTGetAtomDataPtrto get a pointer to the string atom data. Finally, MyGetNodeName copies the string data into the appropriatelocation and cleans up after itself before returning.Adding Custom Atoms in a QuickTime VR MovieIf you author a QuickTime VR movie, you may choose to add custom atoms to either the VR world or nodeinformation atom containers. Those atoms can be extracted within an application to provide additionalinformation that the application may use.Information that pertains to the entire scene might be stored in a custom atom within the VR world atomcontainer. Node-specific information could be stored in the individual node information atom containers oras sibling atoms to the node location atoms within the VR world.Custom hot spot atoms should be stored as siblings to the hot spot information atoms in the node informationatom container. Generally, its atom type is the same as the custom hot spot type. You can set up an interceptprocedure in your application in order to process clicks on the custom hot spots.If you use custom atoms, you should install your hot spot intercept procedure when you open the movie.Listing 6-15 (page 363) is an example of such an intercept procedure.Listing 6-15Typical hot spot intercept procedureQTVRInterceptProc MyProc = NewQTVRInterceptProc (MyHotSpot);QTVRInstallInterceptProc (qtvr, kQTVRTriggerHotSpotSelector, myProc, 0, 0);pascal void MyHotSpot (QTVRInstance qtvr, QTVRInterceptPtr qtvrMsg,SInt32 refCon, Boolean *cancel){UInt32 hotSpotID = (UInt32) qtvrMsg->parameter[0];QTAtomContainer nodeInfo =(QTAtomContainer) qtvrMsg->parameter[1];QTAtom hotSpotAtom = (QTAtom) qtvrMsg->parameter[2];OSType hotSpotType;CustomData myCustomData;QTAtom myAtom;<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.363

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

Saved successfully!

Ooh no, something went wrong!