This object provides a frame of reference for other objects, allowing them to be positioned relative to each other in world space. In addition, a frame object can also be linked to parent and/or child frames in a hierarchical manner. Combined, these features make the frame among the most important RenderWare Graphics objects. It is used primarily in conjunction with RenderWare Graphics' Retained Mode API, exposed by the RpWorld Plugin.
More information can be found in the Fundamentals chapter of the User Guide.
|
RwFrameCallBack type represents the function called from RwFrameForAllChildren for all child frames linked to a given frame. This function should return a pointer to the current frame to indicate success. The callback may return NULL to terminate further callbacks on the child frames.
|
|
RwFrameAddChild adds the specified child frame to the hierarchy containing the given parent frame. The child is attached to the frame hierarchy directly beneath the parent and therefore inherits movements resulting from changes made to its parent. Frame loops within a given hierarchy are not permitted, therefore, the child must not already exist within the hierarchy it is being added to. This function should be used to construct hierarchies of objects that can be transformed via joints. Whenever the child's frame is processed its Local Transform Matrix (LTM) is the concatenation of all the modeling matrices up to the root frame. (Note that the root frame has identical LT and modeling matrices.)
|
|
RwFrameCloneHierarchy makes a copy of a frame hierarchy whose root is specified by the given frame. All frames below and including the given frame are copied together with their modeling matrices. This function also marks the frame, hence the whole hierarchy, as dirty so that all LT matrices will be recalculated at the next synchronization stage.
|
|
RwFrameCount determines the number of frames in a hierarchy starting at the specified frame. The specified frame is included in the count.
|
|
RwFrameCreate creates a new frame. Frames define the spatial relationships between the objects to which they are attached. The newly created frame has no parent and is its own root. To be of any use the frame should be attached to an object; frames can be added to cameras and lights. In addition, frames may be used in a plugin attached to geometry. Frames contain position and orientation information. They define object hierarchies. The frame contains two matrices: the local transformation matrix (LTM) and the modeling matrix. The modeling matrix describes how the frame (and hence the object attached to it) is transformed relative to its local origin while the LTM describes the absolute transformation from local to world coordinates. If the frame is not part of a hierarchy, or forms the hierarchy's root, the modeling and LT matrices are identical. Otherwise, the modeling matrix is taken to be relative to the frame's parent and the LTM becomes the concatenation of all the modeling matrices up to the root frame. This ensures that any change in the parent's position or orientation will transfer through to the child frames.
|
|
RwFrameDeInit de-initializes the specified frame. If the frame is a member of a hierarchy it will be removed from the hierarchy and all frames below it will be lost. It is recommended that all objects should be detached from the frame prior to destruction.
|
|
RwFrameDestroy destroys the specified frame. If the frame is a member of a hierarchy it will be removed from the hierarchy and all frames below it will be lost. It is recommended that all objects should be detached from the frame prior to destruction.
|
|
RwFrameDestroyHierarchy destroys or de-inits the hierarchy of frames below and including the specified frame. All previously attached types (e.g. lights, atomics) should either be detached from the frames that are about to be destroyed or attached to new frames. All frames above the specified one will survive.
|
|
RwFrameDirty checks the specified frame and returns TRUE if it is dirty.
|
|
RwFrameForAllChildren applies the given callback function to a frame's immediate children (the next level down). The format of the callback function is: RwFrame * (*RwFrameCallBack)(RwFrame *frame, void *data) Note that if any invocation of the callback function returns a failure status the iteration is terminated. However, RwFrameForAllChildren will still return successfully.
|
|
RwFrameForAllObjects is used applies the given callback function to all objects attached to the specified frame. The format of the callback function is: RwObject * (*RwObjectCallBack)(RwObject *object, void *data) Note that if any invocation of the callback function returns a failure status the iteration is terminated. However, RwFrameForAllObjects will still return successfully.
|
|
RwFrameGetLTM retrieves the specified frame's local transformation matrix (LTM).
|
|
RwFrameGetMatrix retrieves the specified frame's modeling matrix.
|
|
RwFrameGetParent determines the immediate parent of the specified frame. If the frame is not part of a hierarchy or is the root frame of a hierarchy then its parent is undefined.
|
|
RwFrameGetPluginOffset is used to get the offset of a previously registered plugin.
|
|
RwFrameGetRoot retrieves the root frame of the hierarchy that the specified frame belongs to. If the frame is not part of any hierarchy the frame is its own root.
|
|
RwFrameInit initializes a static frame. Frames define the spatial relationships between the objects to which they are attached. The newly initialized frame has no parent and is its own root. To be of any use the frame should be attached to an object; frames can be added to cameras and lights. In addition, frames may be used in a plugin attached to geometry. Frames contain position and orientation information. They define object hierarchies. The frame contains two matrices: the local transformation matrix (LTM) and the modeling matrix. The modeling matrix describes how the frame (and hence the object attached to it) is transformed relative to its local origin while the LTM describes the absolute transformation from local to world coordinates. If the frame is not part of a hierarchy, or forms the hierarchy's root, the modeling and LT matrices are identical. Otherwise, the modeling matrix is taken to be relative to the frame's parent and the LTM becomes the concatenation of all the modeling matrices up to the root frame. This ensures that any change in the parent's position or orientation will transfer through to the child frames. Do not call this if RwFrameCreate has been called to create the frame as the frame has already been initialized and this may result in the frame not being freed properly.
|
|
RwFrameOrthoNormalize orthonormalizes the modeling matrix of the specified frame. Orthonormalization is required if the frame is rotated often, as small errors in the calculation will accumulate. This will cause the frame to acquire unwanted scale or shear factors. To prevent the significant build-up of such factors RwFrameOrthoNormalize should be periodically applied to ensure the frame's modeling matrix remains orthonormal. The minimal satisfactory frequency of orthonormalzation will depend on the nature of the application. Typically, a frequency of once every 128 updates is adequate. This function also marks the frame as dirty so that it's LTM will be recalculated at the next synchronization stage.
|
|
RwFrameRegisterPlugin registers a plugin and reserve some space within a frame. This must happen after the engine has been initialized, but before the engine is opened.
|
|
RwFrameRegisterPluginStream associates a set of binary stream functionality with a previously registered plugin.
|
|
RwFrameRemoveChild removes the specified frame from the hierarchy it is a member of. Once removed the frame becomes the root of a new hierarchy comprising itself and all of its descendents.
|
|
RwFrameRotate is used to build a rotation matrix from the given axis and angle of rotation and apply it to the modeling matrix of the specified frame. The combine operation may be pre-concatenation, post-concatenation or replacement. This function also marks the frame as dirty so that it's LTM will be recalculated at the next synchronization stage.
|
|
RwFrameScale applies the given scale to the modeling matrix of the specified frame. The combine operation may be pre-concatenation, post-concatenation or replacement. This function also marks the frame as dirty so that it's LTM will be recalculated at the next synchronization stage.
|
|
RwFrameSetFreeListCreateParams allows the developer to specify how many RwFrame s to preallocate space for. Call before RwEngineInit.
|
|
RwFrameSetIdentity resets the modeling matrix of the specified frame to the identity matrix. This will remove any transformations previously applied to the frame. This function also marks the frame as dirty so that it's LTM will be recalculated at the next synchronization stage.
|
|
RwFrameSetStaticPluginsSize tells RenderWare Graphics how much memory is statically allocated for plugins. This must happen after the engine has been initialized, but before the engine is opened.
|
|
RwFrameSetStreamAlwaysCallBack associates a binary stream callback with a previously registered frame plugin. This callback is called for all plugins after stream data reading has completed.
|
|
RwFrameTransform applies the given general transformation matrix to the modeling matrix of the specified frame. The combine operation may be pre-concatenation, post-concatenation or replacement. This function also marks the frame as dirty so that it's LTM will be recalculated at the next synchronization stage.
|
|
RwFrameTranslate applies the given translation vector to the modeling matrix of the specified frame. The combine operation may be pre-concatenation, post-concatenation or replacement. This function also marks the frame as dirty so that it's LTM will be recalculated at the next synchronization stage.
|
|
RwFrameUpdateObjects marks the specified frame as dirty following a modeling matrix transformation. This will cause the frame's LTM to be recalculated, and all objects attached to the frame to be updated, at the next synchronization stage (for example, during a call to RwCameraBeginUpdate). If the frame resides within a hierarchy the entire hierarchy is marked as dirty, hence all LTMs and objects will be updated.
|
|
RwFrameValidatePlugins validates the plugin memory allocated within the specified frame. This function is useful to help determine where memory stomping may be occurring within an application. This function only returns a meaningful response under a debug library.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |