The node
information atom container includes general information about the
node such as the node’s type, ID, and name. The node information
atom container also contains the list of hot spot atoms for the
node. A QuickTime VR movie contains one node information atom container
for each node in the file. The routine QTVRGetNodeInfo allows
you to obtain the node information atom container for the current
node or for any other node in the movie.
Figure 3-17 shows the structure of the node information atom container.
Node Header Atom Structure
Hot Spot Parent Atom
Hot Spot Information Atom
Specific Information Atoms
Link Hot Spot Atom
A node header atom is a leaf atom that describes the type
and ID of a node, as well as other information about the node. Its
atom type is kQTVRNodeHeaderAtomType ('ndhd').
The structure of a node header atom is defined by the QTVRNodeHeaderAtom data
type:
typedef struct VRNodeHeaderAtom { |
UInt16 majorVersion; |
UInt16 minorVersion; |
OSType nodeType; |
QTAtomID nodeID; |
QTAtomID nameAtomID; |
QTAtomID commentAtomID; |
UInt32 reserved1; |
UInt32 reserved2; |
} VRNodeHeaderAtom, *VRNodeHeaderAtomPtr; |
majorVersionThe major version number of the file format.
minorVersionThe minor version number of the file format.
nodeTypeThe node type. This field should contain either kQTVRPanoramaType or kQTVRObjectType.
nodeIDThe node ID.
nameAtomIDThe ID of the string atom that contains the name of the node. This atom should be a sibling of the node header atom. The value of this field is 0 if no name string atom exists.
commentAtomIDThe ID of the string atom that contains a comment for the node. This atom should be a sibling of the node header atom. The value of this field is 0 if no comment string atom exists.
reserved1Reserved. This field must be 0.
reserved2Reserved. This field must be 0.
The hot spot parent atom is the parent for all hot
spot atoms for the node. The atom type of the hot spot parent atom
is kQTVRHotSpotParentAtomType ('hspa')
and the atom type of the each hot spot atom is kQTVRHotSpotAtomType ('hots'). The
atom ID of each hot spot atom is the hot spot ID for the corresponding
hot spot. The hot spot ID is determined by its color index value
as it is stored in the hot spot image track.
The hot spot track is an 8-bit video track that contains color information that indicates hot spots. For more information, refer to Programming With QuickTime VR.
Each hot spot atom is the parent of a number of atoms that contain information about each hot spot.
The hot spot information atom contains general information
about a hot spot. Its atom type is kQTVRHotSpotInfoAtomType ('hsin').
Every hot spot atom should have a hot spot information atom as a
child.
The structure of a hot spot information atom
is defined by the QTVRHotSpotInfoAtom data type:
typedef struct VRHotSpotInfoAtom { |
UInt16 majorVersion; |
UInt16 minorVersion; |
OSType hotSpotType; |
QTAtomID nameAtomID; |
QTAtomID commentAtomID; |
SInt32 cursorID[3]; |
Float32 bestPan; |
Float32 bestTilt; |
Float32 bestFOV; |
FloatPoint bestViewCenter; |
Rect hotSpotRect; |
UInt32 flags; |
UInt32 reserved1; |
UInt32 reserved2; |
} VRHotSpotInfoAtom, *QTVRHotSpotInfoAtomPtr; |
majorVersionThe major version number of the file format.
minorVersionThe minor version number of the file format.
hotSpotTypeThe hot spot type. This type specifies which other information
atoms—if any—are siblings to this one. QuickTime VR recognizes
three types: kQTVRHotSpotLinkType, kQTVRHotSpotURLType,
and kQTVRHotSpotUndefinedType.
nameAtomIDThe ID of the string atom that contains the name of the hot spot. This atom should be a sibling of the hot spot information atom. This string is displayed in the QuickTime VR controller bar when the mouse is moved over the hot spot.
commentAtomIDThe ID of the string atom that contains a comment for the hot spot. This atom should be a sibling of the hot spot information atom. The value of this field is 0 if no comment string atom exists.
cursorIDAn array of three IDs for custom hot spot cursors (that
is, cursors that override the default hot spot cursors provided
by QuickTime VR). The first ID (cursorID[0])
specifies the cursor that is displayed when it is in the hot spot.
The second ID (cursorID[1])
specifies the cursor that is displayed when it is in the hot spot
and the mouse button is down. The third ID (cursorID[2])
specifies the cursor that is displayed when it is in the hot spot and
the mouse button is released. To retain the default cursor for any
of these operations, set the corresponding cursor ID to 0. Custom
cursors should be stored in the VR world atom container, as described
in “VR World Atom Container.”
bestPanThe best pan angle for viewing this hot spot.
bestTiltThe best tilt angle for viewing this hot spot.
bestFOVThe best field of view for viewing this hot spot.
bestViewCenterThe best view center for viewing this hot spot; applies only to object nodes.
hotSpotRectThe boundary box for this hot spot, specified as the number of pixels in full panoramic space. This field is valid only for panoramic nodes.
flagsA set of hot spot flags. This field is unused.
reserved1Reserved. This field must be 0.
reserved2Reserved. This field must be 0.
Note: In QuickTime VR movie files, all angular values are stored as 32-bit floating-point values that specify degrees. In addition, all floating-point values conform to the IEEE Standard 754 for binary floating-point arithmetic, in big-endian format.
Depending on the value of the hotSpotType field
in the hot spot info atom there may also be a type specific information
atom. The atom type of the type-specific atom is the hot spot type.
The link
hot spot atom specifies information for hot spots of type kQTVRHotSpotLinkType ('link'). Its
atom type is thus 'link'. The
link hot spot atom contains specific information about a link hot
spot.
The structure of a link hot spot atom is defined by the QTVRLinkHotSpotAtom data
type:
typedef struct VRLinkHotSpotAtom { |
UInt16 majorVersion; |
UInt16 minorVersion; |
UInt32 toNodeID; |
UInt32 fromValidFlags; |
Float32 fromPan; |
Float32 fromTilt; |
Float32 fromFOV; |
FloatPoint fromViewCenter; |
UInt32 toValidFlags; |
Float32 toPan; |
Float32 toTilt; |
Float32 toFOV; |
FloatPoint toViewCenter; |
Float32 distance; |
UInt32 flags; |
UInt32 reserved1; |
UInt32 reserved2; |
} VRLinkHotSpotAtom, *VRLinkHotSpotAtomPtr; |
majorVersionThe major version number of the file format.
minorVersionThe minor version number of the file format.
toNodeIDThe ID of the destination node (that is, the node to which this hot spot is linked).
fromValidFlagsA set of flags that indicate which source node view settings are valid.
fromPanThe preferred from-pan angle at the source node (that is, the node containing the hot spot).
fromTiltThe preferred from-tilt angle at the source node.
fromFOVThe preferred from-field of view at the source node.
fromViewCenterThe preferred from-view center at the source node.
toValidFlagsA set of flags that indicate which destination node view settings are valid.
toPanThe pan angle to use when displaying the destination node.
toTiltThe tilt angle to use when displaying the destination node.
toFOVThe field of view to use when displaying the destination node.
toViewCenterThe view center to use when displaying the destination node.
distanceThe distance between the source node and the destination node.
flagsA set of link hot spot flags. This field is unused and should be set to 0.
reserved1Reserved. This field must be 0.
reserved2Reserved. This field must be 0.
Certain fields in the link hot spot atom are not used by QuickTime
VR. The fromValidFlags field
is generally set to 0 and the other from fields
are not used. However, these fields could be quite useful if you
have created a transition movie from one node to another. The from angles
can be used to swing the current view of the source node to align
with the first frame of the transition movie. The distance field
is intended for use with 3D applications, but is also not used by
QuickTime VR.
The toValidFlags field
in the link hot spot atom structure specifies which view settings
are to be used when moving to a destination node from a hot spot.
You can use these bit flags to specify a value for that field:
enum { |
kQTVRValidPan = 1 << 0, |
kQTVRValidTilt = 1 << 1, |
kQTVRValidFOV = 1 << 2, |
kQTVRValidViewCenter = 1 << 3 |
}; |
kQTVRValidPanThe setting for using the destination pan angle.
kQTVRValidTiltThe setting for using the destination tilt angle.
kQTVRValidFOVThe setting for using the destination field of view.
kQTVRValidViewCenterThe setting for using the destination view center.
Last updated: 2007-09-04