You.i Engine
CYIAEViewTemplate Class Reference

Detailed Description

A specialized CYIViewTemplate providing data read from a layout file.

The class provides a variety of methods to instance and initialize CYIAEViewTemplate objects, and to retrieve information about the layout.

#include <import/YiAEViewTemplate.h>

Inheritance diagram for CYIAEViewTemplate:

Public Member Functions

 CYIAEViewTemplate (CYIAEViewTemplatePriv *pPriv)
 
virtual ~CYIAEViewTemplate ()
 
virtual void SetTimelineSource (uint32_t nTimelineHandle, std::shared_ptr< CYIAssetTimelineSource > pTimelineSource) override
 
virtual std::shared_ptr< CYIAssetTimelineSourceGetTimelineSource (uint32_t nTimelineHandle) override
 
virtual std::unique_ptr< CYITimelineBuildTimeline (CYISceneNode *pRootNode) override
 
virtual std::unique_ptr< CYITimelineBuildTimeline (CYISceneNode *pRootNode, const CYIString &rMarkerName) override
 
virtual std::unique_ptr< CYITimelineBuildTimeline (CYISceneNode *pRootNode, CYIMarkerData::MARKER_ID eID) override
 
virtual std::unique_ptr< CYITimelineBuildTimeline (CYISceneNode *pRootNode, int32_t nStartOffset, int32_t nDuration) override
 
virtual std::unique_ptr< CYITimelineBuildTimeline (CYISceneNode *pRootNode, uint32_t nTimelineHandle) override
 
virtual std::unique_ptr< CYITimelineBuildTimeline (CYISceneNode *pRootNode, uint32_t nTimelineHandle, const CYIString &rMarkerName) override
 
virtual std::unique_ptr< CYITimelineBuildTimeline (CYISceneNode *pRootNode, uint32_t nTimelineHandle, CYIMarkerData::MARKER_ID eID) override
 
virtual std::unique_ptr< CYITimelineBuildTimeline (CYISceneNode *pRootNode, uint32_t nTimelineHandle, int32_t nStartOffset, int32_t nDuration) override
 
virtual void GetSize (float &fWidth, float &fHeight) override
 
virtual float GetHeight () override
 
virtual float GetWidth () override
 
virtual float GetDefaultCameraDistance () override
 
virtual CYIString GetName () const override
 
virtual const CYIStringGetViewClassName () const override
 
virtual bool GetBackgroundColor (CYIColor *pColor) override
 
virtual bool GetProperty (const CYIString &rPropertyName, CYIString *pValue) const override
 
virtual const std::map< CYIString, CYIString > & GetProperties () const override
 
virtual const std::vector< CYIString > & GetChildTemplateNames () override
 
virtual std::vector< SourceGetSources () const override
 
virtual int32_t GetApproximateSize () const override
 
- Public Member Functions inherited from CYIViewTemplate
virtual ~CYIViewTemplate ()
 
std::unique_ptr< CYISceneViewBuildView (CYISceneManager *pSceneManager, const std::shared_ptr< CYIAssetViewTemplate > &pAssetViewTemplate)
 
- Public Member Functions inherited from IYIPropertiesSource
virtual ~IYIPropertiesSource ()
 
- Public Member Functions inherited from CYIScriptableRTTIObject
 CYIScriptableRTTIObject ()
 
virtual ~CYIScriptableRTTIObject ()
 
virtual const CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const override
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () const
 
void SetBindingImplementation (CYIBindingImplementation *pBindingImplementation)
 

Static Public Member Functions

static std::unique_ptr< CYIAEViewTemplateImportCompositionTemplate (const CYIString &filename)
 
static std::unique_ptr< CYIAEViewTemplateImportCompositionTemplateFromPath (const CYIString &path)
 
static std::unique_ptr< CYIAEViewTemplateImportCompositionTemplateFromStream (std::istream &data)
 
- Static Public Member Functions inherited from CYIViewTemplate
static std::shared_ptr< CYIAssetViewTemplateGetViewTemplate (const CYIString &viewTemplateName)
 
static glm::vec2 GetViewTemplateSize (const CYIString &viewTemplateName)
 

Friends

class CYIAESceneFilter
 

Additional Inherited Members

- Static Public Attributes inherited from CYIViewTemplate
static const uint32_t DEFAULT_TIMELINE_INDEX
 
- Protected Member Functions inherited from CYIViewTemplate
 CYIViewTemplate ()
 
- Protected Member Functions inherited from CYIScriptableRTTIObject
virtual std::pair< const CYIRuntimeTypeInfo *, const void * > GetRuntimeTypeInfoWithObject () const =0
 

Constructor & Destructor Documentation

CYIAEViewTemplate::CYIAEViewTemplate ( CYIAEViewTemplatePriv *  pPriv)
virtual CYIAEViewTemplate::~CYIAEViewTemplate ( )
virtual

Member Function Documentation

virtual std::unique_ptr<CYITimeline> CYIAEViewTemplate::BuildTimeline ( CYISceneNode pRootNode)
overridevirtual

Returns a timeline referencing the entire duration of the default timeline source associated with this template. The timeline's tracks will be associated with the tree rooted at pRootNode.

Implements CYIViewTemplate.

virtual std::unique_ptr<CYITimeline> CYIAEViewTemplate::BuildTimeline ( CYISceneNode pRootNode,
const CYIString markerName 
)
overridevirtual

Returns a timeline referencing a portion of the default timeline source associated with this template. The timeline's tracks will be associated with the tree rooted at pRootNode.

The portion to be returned is named by markerName. If markerName is not valid for this associated timeline source, null is returned.

See also
CYIMarkerData

Implements CYIViewTemplate.

virtual std::unique_ptr<CYITimeline> CYIAEViewTemplate::BuildTimeline ( CYISceneNode pRootNode,
CYIMarkerData::MARKER_ID  eID 
)
overridevirtual

Returns a timeline referencing a portion of the default timeline source associated with this template. The timeline's tracks will be associated with the tree rooted at pRootNode.

The portion to be returned is specified by eID, as an alternative to marker names. If eID is not valid for this associated timeline source, null is returned.

See also
CYIMarkerData

Implements CYIViewTemplate.

virtual std::unique_ptr<CYITimeline> CYIAEViewTemplate::BuildTimeline ( CYISceneNode pRootNode,
int32_t  nStartOffset,
int32_t  nDuration 
)
overridevirtual

Returns a timeline referencing a portion of the default timeline source associated with this template. The timeline's tracks will be associated with the tree rooted at pRootNode.

The portion to be returned starts at nStartOffset and has size nDuration. A non-null timeline will always be returned even if nStartOffset and nDuration are not valid for the timeline source.

Implements CYIViewTemplate.

virtual std::unique_ptr<CYITimeline> CYIAEViewTemplate::BuildTimeline ( CYISceneNode pRootNode,
uint32_t  uTimelineHandle 
)
overridevirtual

Returns a timeline referencing the entire duration of the timeline source with index uTimelineHandle. The timeline's tracks will be associated with the tree rooted at pRootNode.

Implements CYIViewTemplate.

virtual std::unique_ptr<CYITimeline> CYIAEViewTemplate::BuildTimeline ( CYISceneNode pRootNode,
uint32_t  uTimelineHandle,
const CYIString markerName 
)
overridevirtual

Returns a timeline referencing a portion of the timeline source with index uTimelineHandle. The timeline's tracks will be associated with the tree rooted at pRootNode.

The portion to be returned is named by markerName. If markerName is not valid for this associated timeline source, null is returned.

See also
CYIMarkerData

Implements CYIViewTemplate.

virtual std::unique_ptr<CYITimeline> CYIAEViewTemplate::BuildTimeline ( CYISceneNode pRootNode,
uint32_t  uTimelineHandle,
CYIMarkerData::MARKER_ID  eID 
)
overridevirtual

Returns a timeline referencing a portion of the timeline source with index uTimelineHandle. The timeline's tracks will be associated with the tree rooted at pRootNode.

The portion to be returned is specified by eID, as an alternative to marker names. If eID is not valid for this associated timeline source, null is returned.

See also
CYIMarkerData

Implements CYIViewTemplate.

virtual std::unique_ptr<CYITimeline> CYIAEViewTemplate::BuildTimeline ( CYISceneNode pRootNode,
uint32_t  uTimelineHandle,
int32_t  nStartOffset,
int32_t  nDuration 
)
overridevirtual

Returns a timeline referencing a portion of the timeline source with index uTimelineHandle. The timeline's tracks will be associated with the tree rooted at pRootNode.

The portion to be returned starts at nStartOffset and has size nDuration. A non-null timeline will always be returned even if nStartOffset and nDuration are not valid for the timeline source.

Implements CYIViewTemplate.

virtual int32_t CYIAEViewTemplate::GetApproximateSize ( ) const
overridevirtual

Returns the approximate size of this class, which has use in implementing asset caching strategies.

Implements CYIViewTemplate.

virtual bool CYIAEViewTemplate::GetBackgroundColor ( CYIColor pColor)
overridevirtual

Stores the background color of this template into pColor. Return false if this template does not have a background color.

Implements CYIViewTemplate.

virtual const std::vector<CYIString>& CYIAEViewTemplate::GetChildTemplateNames ( )
overridevirtual

Returns a unique list of names of view templates references by this view template. Names are in the form <AEPFile_<CompName>.

Note that view templates may have multiple references to the same template, but each name will only show up once in this list.

Implements CYIViewTemplate.

virtual float CYIAEViewTemplate::GetDefaultCameraDistance ( )
overridevirtual

The distance from which the view template was designed to be viewed.

Reimplemented from CYIViewTemplate.

virtual float CYIAEViewTemplate::GetHeight ( )
overridevirtual

Returns the height of this view template.

The height of the template will be the height of the view created from the template. The height of the view is expressed in local space of the created view.

Implements CYIViewTemplate.

virtual CYIString CYIAEViewTemplate::GetName ( ) const
overridevirtual

Returns the name of this template, corresponding to the AE comp name.

Implements CYIViewTemplate.

virtual const std::map<CYIString, CYIString>& CYIAEViewTemplate::GetProperties ( ) const
overridevirtual

Returns the map of all available properties.

Implements CYIViewTemplate.

virtual bool CYIAEViewTemplate::GetProperty ( const CYIString propertyName,
CYIString pValue 
) const
overridevirtual

Stores the value of a property specified by propertyName into pValue. Returns false if the property cannot be found.

Implements CYIViewTemplate.

virtual void CYIAEViewTemplate::GetSize ( float &  fWidth,
float &  fHeight 
)
overridevirtual

Returns the width and height of this view template, stored in fWidth and fHeight respectively.

The size of the template will be the size of the view created from the template. The size of the view is expressed in local space of the created view.

Implements CYIViewTemplate.

virtual std::vector<Source> CYIAEViewTemplate::GetSources ( ) const
overridevirtual

Returns a list of the view template's sources.

Implements CYIViewTemplate.

virtual std::shared_ptr<CYIAssetTimelineSource> CYIAEViewTemplate::GetTimelineSource ( uint32_t  uTimelineHandle)
overridevirtual

Returns the timeline source associated with this view template at index uTimelineHandle.

See also
SetTimelineSource

Implements CYIViewTemplate.

virtual const CYIString& CYIAEViewTemplate::GetViewClassName ( ) const
overridevirtual

Returns the name of the view class that should be instansiated when constructing a view with this template. An empty string can also be returned, implying the default view class.

Implements CYIViewTemplate.

virtual float CYIAEViewTemplate::GetWidth ( )
overridevirtual

Returns the width of this view template.

The width of the template will be the width of the view created from the template. The width of the view is expressed in local space of the created view.

Implements CYIViewTemplate.

static std::unique_ptr<CYIAEViewTemplate> CYIAEViewTemplate::ImportCompositionTemplate ( const CYIString filename)
static

This method accepts a layout filename. It behaves in the same way as ImportCompositionTemplateFromPath(), but will expand filename to a fully qualified path automatically using the CYIAssetRootLocator.

static std::unique_ptr<CYIAEViewTemplate> CYIAEViewTemplate::ImportCompositionTemplateFromPath ( const CYIString path)
static

Loads the specified layout file and returns a new CYIAEViewTemplate instance. The path must be fully qualified. Returns null if the layout cannot be found or loaded.

static std::unique_ptr<CYIAEViewTemplate> CYIAEViewTemplate::ImportCompositionTemplateFromStream ( std::istream &  data)
static

Loads a layout from the stream data and returns a new CYIAEViewTemplate instance. Returns null if the layout cannot be loaded.

virtual void CYIAEViewTemplate::SetTimelineSource ( uint32_t  uTimelineHandle,
std::shared_ptr< CYIAssetTimelineSource pTimelineSource 
)
overridevirtual

Associates pTimelineSource with this view template at index uTimelineHandle.

The timeline asset specifies how nodes generated by this view template will be animated.

Implements CYIViewTemplate.

Friends And Related Function Documentation

friend class CYIAESceneFilter
friend

The documentation for this class was generated from the following file: