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
floatGetClippingFar ( ) const
floatGetClippingNear ( ) const
unsigned intGetDefaultViewID ( ) const
unsigned intGetFrameRate ( ) const
const RED::Map< unsigned int, RED::String > &GetIDToNamesMap ( ) const
boolGetMultipleTracks ( ) const
boolIsValid ( ) const

Public static functions:

static RED::CIDGetClassID ( )

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(booliMultipleTracks,
unsigned intiFrameRate,
floatiClippingNear,
floatiClippingFar,
unsigned intiDefaultViewID,
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.

FileInfo default destruction method.

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:

An object pointer of the given class on success, NULL otherwise.

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:

An object pointer of the given class on success, NULL otherwise.

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:

A pointer to a const instance of class T on success, NULL otherwise.

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:

A pointer to an instance of class T on success, NULL otherwise.

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:

The hierarchy map of the animation tracks.
public float RED::FileInfo::GetClippingFar() const

Returns:

A camera far clip distance suitable for a correct scene exploration.
public float RED::FileInfo::GetClippingNear() const

Returns:

A camera near clip distance suitable for a correct scene exploration.
public unsigned int RED::FileInfo::GetDefaultViewID() const

Returns:

The ID corresponding to the name of the camera chosen as main camera at the file's creation time.
public unsigned int RED::FileInfo::GetFrameRate() const

Returns:

The framerate that must be used for the file's animation playback.
public const RED::Map< unsigned int, RED::String > & RED::FileInfo::GetIDToNamesMap() const

Returns:

The conversion map between RED::Object instances IDs and real names.

Returns:

true if animations were exported per object, false otherwise (one track for the whole scene).
public bool RED::FileInfo::IsValid() const

Do we have valid file information?

Returns:

true if there are valid information in the class, false otherwise.

Variables documentation

Correct far clip distance.

Correct near clip distance.

protected unsigned int RED::FileInfo::_framerate

Animation playback rate.

protected RED::Map< unsigned int, RED::Vector< unsigned int > > RED::FileInfo::_hierarchy

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.

protected unsigned int RED::FileInfo::_viewid

Default camera name.