class RED::FileInfo
This class stores miscellaneous info about a .red file's content. More...
#include <REDIREDFile.h>
Inherits: Object.
Public functions:
FileInfo ( bool iMultipleTracks, unsigned int iFrameRate, float iClippingNear, float iClippingFar, unsigned int iDefaultViewID, const RED::Map< unsigned int, RED::String > & iIDToNames, const RED::Map< unsigned int, RED::Vector< unsigned int > > & iTracksHierarchy ) | |
~FileInfo ( ) | |
virtual void * | As ( const RED::CID & iCID ) |
virtual const void * | As ( const RED::CID & iCID ) const |
template< class T_As > const T_As * | As ( ) const |
template< class T_As > T_As * | As ( ) |
const RED::Map< unsigned int, RED::Vector< unsigned int > > & | GetAnimationTracksHierarchy ( ) const |
float | GetClippingFar ( ) const |
float | GetClippingNear ( ) const |
unsigned int | GetDefaultViewID ( ) const |
unsigned int | GetFrameRate ( ) const |
const RED::Map< unsigned int, RED::String > & | GetIDToNamesMap ( ) const |
bool | GetMultipleTracks ( ) const |
bool | IsValid ( ) const |
Public static functions:
static RED::CID | GetClassID ( ) |
Protected variables:
float | _clippingfar |
float | _clippingnear |
unsigned int | _framerate |
RED::Map< unsigned int, RED::Vector< unsigned int > > | _hierarchy |
RED::Map< unsigned int, RED::String > | _idtonames |
bool | _isvalid |
bool | _multitracks |
unsigned int | _viewid |
Detailed description:
This class stores miscellaneous info about a .red file's content.
A .red file may or may not fill information in the FileInfo class that is returned after the file has been loaded.
If the FileInfo is empty, then the RED::FileInfo::IsValid method will return false.
Information stored in that object are mostly related to file data display. It gives information about data animations and optionally, the desired default camera to render the data (camera ID and clipping planes).
Last but not least, a correspondence table between file objects IDs and real objects names can also be retrieved.
Functions documentation
public RED::FileInfo::FileInfo | ( | bool | iMultipleTracks, |
unsigned int | iFrameRate, | ||
float | iClippingNear, | ||
float | iClippingFar, | ||
unsigned int | iDefaultViewID, | ||
const RED::Map< unsigned int, RED::String > & | iIDToNames, | ||
const RED::Map< unsigned int, RED::Vector< unsigned int > > & | iTracksHierarchy | ||
) |
Constructor.
Parameters:
iMultipleTracks: | Flag indicating if the animations are exported per object or for the whole scene. |
iFrameRate: | Animation play-back requested framerate. |
iClippingNear: | Camera near clip distance suitable for a correct scene exploration. |
iClippingFar: | Camera far clip distance suitable for a correct scene exploration. |
iDefaultViewID: | Camera ID value that is selected as main camera for viewing the file. |
iIDToNames: | Map of the RED::Object instances IDs to real names. |
iTracksHierarchy: | Map of the animation tracks hierarchy. It stores, for each animation tracks, the IDs of the track parents in the DAG. |
public RED::FileInfo::~FileInfo | ( | ) |
FileInfo default destruction method.
public static RED::CID RED::FileInfo::GetClassID | ( | ) |
Reimplements: RED::Object::GetClassID.
public virtual void * RED::FileInfo::As | ( | const RED::CID & | iCID | ) |
Converts the object to an instance of the given type.
Parameters:
iCID: | Requested class. |
Returns:
Reimplements: RED::Object::As.
public virtual const void * RED::FileInfo::As | ( | const RED::CID & | iCID | ) const |
Converts the object to an instance of the given type.
Parameters:
iCID: | Requested class. |
Returns:
Reimplements: RED::Object::As.
template< class T_As > public const T_As * RED::FileInfo::As | ( | ) const |
Template version of the as const method.
Simply set T to be the class you want to retrieve an interface to.
Returns:
Reimplements: RED::Object::As.
template< class T_As > public T_As * RED::FileInfo::As | ( | ) |
Template version of the as method.
Simply set T to be the class you want to retrieve an interface to.
Returns:
Reimplements: RED::Object::As.
public const RED::Map< unsigned int, RED::Vector< unsigned int > > & RED::FileInfo::GetAnimationTracksHierarchy | ( | ) const |
Returns the hierarchy map of the animation tracks.
Each animation track can be linked to zero or multiple DAG nodes. This map stores for each animation track ID the list of the nodes to which it is linked.
Returns:
public float RED::FileInfo::GetClippingFar | ( | ) const |
Returns:
public float RED::FileInfo::GetClippingNear | ( | ) const |
Returns:
public unsigned int RED::FileInfo::GetDefaultViewID | ( | ) const |
Returns:
public unsigned int RED::FileInfo::GetFrameRate | ( | ) const |
Returns:
public const RED::Map< unsigned int, RED::String > & RED::FileInfo::GetIDToNamesMap | ( | ) const |
Returns:
public bool RED::FileInfo::GetMultipleTracks | ( | ) const |
Returns:
public bool RED::FileInfo::IsValid | ( | ) const |
Do we have valid file information?
Returns:
Variables documentation
Correct far clip distance.
Correct near clip distance.
Animation playback rate.
Map of the animation tracks parent IDs.
Map of conversion between RED::Object instances IDs and names.
Do we have valid class contents?
Multiple tracks flag.
Default camera name.