ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Setting Data For Q3ViewerUseData


Q: I've defined a pane where I want to display 3D objects with the 3DViewer. There is no problem if I load the 3D data from a file and use 'Q3ViewerUseFile'. But I couldn't figure out how I have to set the data for the 'Q3ViewerUseData' routine. From where do I get the "size"?

A: According to chapter 2 "3D Viewer" pg. 2-10 of 3D Graphics Programming with QuickDraw 3D: "You use the Q3ViewerUseData function to specify a 3D model whose data is already in memory (either on the Clipboard or elsewhere in RAM). Q3ViewerUseData takes a reference to an existing viewer object, a pointer to the metafile data in RAM, and the number of bytes occupied by that data."

Basically, the data you pass to Q3ViewerUseData must be in 3dmf object format. For example, if the user had copied a 3dmf file from the scrap.

In this case, you would get the size of the data from the Scrap Manager. Take a look at the Tumbler & Podium sample in the QD3D SDK for an example.

[Jul 11 1997]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.