A movie’s object track is a track that contains information
about the object nodes in a scene. The media type of the object
track is 'obje'.
Each sample in an object track corresponds to a single object node
in the scene. The samples of the object track contain information describing
the object images stored in the object image track.
These object information samples parallel the corresponding node samples in the QTVR track and are equal in time and duration to a particular object node’s image samples in the object’s image track as well as the object node’s hot spot samples in the object’s hot spot track.
Object tracks do not have a sample description (although QuickTime
requires that you specify a dummy sample description when you call AddMediaSample to
add a sample to an object track). The sample itself is an atom container
that contains a single object sample atom and other optional atoms.
object sample atom describes a single object, including information
about the default viewing angles and the view settings. The structure
of an object sample atom is defined by the QTVRObjectSampleAtom data
type:
typedef struct VRObjectSampleAtom { |
UInt16 majorVersion; |
UInt16 minorVersion; |
UInt16 movieType; |
UInt16 viewStateCount; |
UInt16 defaultViewState; |
UInt16 mouseDownViewState; |
UInt32 viewDuration; |
UInt32 columns; |
UInt32 rows; |
Float32 mouseMotionScale; |
Float32 minPan; |
Float32 maxPan; |
Float32 defaultPan; |
Float32 minTilt; |
Float32 maxTilt; |
Float32 defaultTilt; |
Float32 minFieldOfView; |
Float32 fieldOfView; |
Float32 defaultFieldOfView; |
Float32 defaultViewCenterH; |
Float32 defaultViewCenterV; |
Float32 viewRate; |
Float32 frameRate; |
UInt32 animationSettings; |
UInt32 controlSettings; |
} VRObjectSampleAtom, *VRObjectSampleAtomPtr; |
QT |
QT |
QT |
majorVersionThe major version number of the file format.
minorVersionThe minor version number of the file format.
movieTypeThe movie controller type.
viewStateCountThe number of view states of the object. A view state selects an alternate set of images for an object’s views. The value of this field must be positive.
defaultViewStateThe 1-based index of the default view state. The default view state image for a given view is displayed when the mouse button is not down.
mouseDownViewStateThe 1-based index of the mouse-down view state. The mouse-down view state image for a given view is displayed while the user holds the mouse button down and the cursor is over an object movie.
viewDurationThe total movie duration of all image frames contained in an object’s view. In an object that uses a single frame to represent a view, the duration is the image track’s sample duration time.
columnsThe number of columns in the object image array (that is, the number of horizontal positions or increments in the range defined by the minimum and maximum pan values). The value of this field must be positive.
rowsThe number of rows in the object image array (that is, the number of vertical positions or increments in the range defined by the minimum and maximum tilt values). The value of this field must be positive.
mouseMotionScaleThe mouse motion scale factor (that is, the number of degrees that an object is panned or tilted when the cursor is dragged the entire width of the VR movie image). The default value is 180.0.
minPanThe minimum pan angle, in degrees. The value of this
field must be less than the value of the maxPan field.
maxPanThe maximum pan angle, in degrees. The value of this
field must be greater than the value of the minPan field.
defaultPanThe default pan angle, in degrees. This is the pan angle
used when the object is first displayed. The value of this field
must be greater than or equal to the value of the minPan field
and less than or equal to the value of the maxPan field.
minTiltThe minimum tilt angle, in degrees. The default value
is +90.0. The value of this field must be less than the value of
the maxTilt field.
maxTiltThe maximum tilt angle, in degrees. The default value
is –90.0. The value of this field must be greater than the value
of the minTilt field.
defaultTiltThe default tilt angle, in degrees. This is the tilt
angle used when the object is first displayed. The value of this
field must be greater than or equal to the value of the minTilt field
and less than or equal to the value of the maxTilt field.
minFieldOfViewThe minimum field of view to which the object can zoom.
The valid range for this field is from 1 to the value of the fieldOfView field.
The value of this field must be positive.
fieldOfViewThe image field of view, in degrees, for the entire
object. The value in this field must be greater than or equal to
the value of the minFieldOfView field.
defaultFieldOfViewThe default field of view for the object. This
is the field of view used when the object is first displayed. The
value in this field must be greater than or equal to the value of
the minFieldOfView field
and less than or equal to the value of the fieldOfView field.
defaultViewCenterHThe default horizontal view center.
defaultViewCenterVThe default vertical view center.
viewRateThe view rate (that is, the positive or negative rate at which the view animation in the object plays, if view animation is enabled). The value of this field must be from –100.0 through +100.0, inclusive.
frameRateThe frame rate (that is, the positive or negative rate at which the frame animation in a view plays, if frame animation is enabled). The value of this field must be from –100.0 through +100.0, inclusive.
animationSettingsA set of 32-bit flags that encode information about the animation settings of the object.
controlSettingsA set of 32-bit flags that encode information about the control settings of the object.
The movieType field
of the object sample atom structure specifies an object controller
type, that is, the user interface to be used to manipulate the object.
QuickTime VR supports the following controller types:
enum ObjectUITypes { |
kGrabberScrollerUI = 1, |
kOldJoyStickUI = 2, |
kJoystickUI = 3, |
kGrabberUI = 4, |
kAbsoluteUI = 5 |
}; |
kGrabberScrollerUIThe default controller, which displays a hand for dragging and rotation arrows when the cursor is along the edges of the object window.
kOldJoyStickUIA joystick controller, which displays a joystick-like interface for spinning the object. With this controller, the direction of panning is reversed from the direction of the grabber.
kJoystickUIA joystick controller, which displays a joystick-like interface for spinning the object. With this controller, the direction of panning is consistent with the direction of the grabber.
kGrabberUIA grabber-only interface, which displays a hand for dragging but does not display rotation arrows when the cursor is along the edges of the object window.
kAbsoluteUIAn absolute controller, which displays a finger for pointing. The absolute controller switches views based on a row-and-column grid mapped into the object window.
The animationSettings field
of the object sample atom is a long integer that specifies a set of
animation settings for an object node. Animation settings specify
characteristics of the movie while it is playing. Use these constants
to specify animation settings:
enum QTVRAnimationSettings { |
kQTVRObjectAnimateViewFramesOn = (1 << 0), |
kQTVRObjectPalindromeViewFramesOn = (1 << 1), |
kQTVRObjectStartFirstViewFrameOn = (1 << 2), |
kQTVRObjectAnimateViewsOn = (1 << 3), |
kQTVRObjectPalindromeViewsOn = (1 << 4), |
kQTVRObjectSyncViewToFrameRate = (1 << 5), |
kQTVRObjectDontLoopViewFramesOn = (1 << 6), |
kQTVRObjectPlayEveryViewFrameOn = (1 << 7) |
}; |
kQTVRObjectAnimateViewFramesOnThe animation setting to play all frames in the current view state.
kQTVRObjectPalindromeViewFramesOnThe animation setting to play a back-and-forth animation of the frames of the current view state.
kQTVRObjectStartFirstViewFrameOnThe animation setting to play the frame animation starting with the first frame in the view (that is, at the view start time).
kQTVRObjectAnimateViewsOnThe animation setting to play all views of the current object in the default row of views.
kQTVRObjectPalindromeViewsOnThe animation setting to play a back-and-forth animation of all views of the current object in the default row of views.
kQTVRObjectSyncViewToFrameRateThe animation setting to synchronize the view animation to the frame animation and use the same options as for frame animation.
kQTVRObjectDontLoopViewFramesOnThe animation setting to stop playing the frame animation in the current view at the end.
kQTVRObjectPlayEveryViewFrameOnThe animation setting to play every view frame regardless of play rate. The play rate is used to adjust the duration in which a frame appears but no frames are skipped so the rate is not exact.
The controlSettings field
of the object sample atom is a long integer that specifies a set
of control settings for an object node. Control settings specify
whether the object can wrap during panning and tilting, as well
as other features of the node. The control settings are specified
using these bit flags:
enum QTVRControlSettings { |
kQTVRObjectWrapPanOn = (1 << 0), |
kQTVRObjectWrapTiltOn = (1 << 1), |
kQTVRObjectCanZoomOn = (1 << 2), |
kQTVRObjectReverseHControlOn = (1 << 3), |
kQTVRObjectReverseVControlOn = (1 << 4), |
kQTVRObjectSwapHVControlOn = (1 << 5), |
kQTVRObjectTranslationOn = (1 << 6) |
}; |
kQTVRObjectWrapPanOnThe control setting to enable wrapping during panning. When this control setting is enabled, the user can wrap around from the current pan constraint maximum value to the pan constraint minimum value (or vice versa) using the mouse or arrow keys.
kQTVRObjectWrapTiltOnThe control setting to enable wrapping during tilting. When this control setting is enabled, the user can wrap around from the current tilt constraint maximum value to the tilt constraint minimum value (or vice versa) using the mouse or arrow keys.
kQTVRObjectCanZoomOnThe control setting to enable zooming. When this control setting is enabled, the user can change the current field of view using the zoom-in and zoom-out keys on the keyboard (or using the VR controller buttons).
kQTVRObjectReverseHControlOnThe control setting to reverse the direction of the horizontal control.
kQTVRObjectReverseVControlOnThe control setting to reverse the direction of the vertical control.
kQTVRObjectSwapHVControlOnThe control setting to exchange the horizontal and vertical controls.
kQTVRObjectTranslationOnThe control setting to enable translation. When this setting is enabled, the user can translate using the mouse when either the translate key is held down or the controller translation mode button is toggled on.
Last updated: 2007-09-04