A view template defines information about a view, so it can be built automatically.
This class defines an interface for view construction information.
#include <import/YiViewTemplate.h>

Classes | |
| class | Source |
| Defines information about the sources a view template may have. More... | |
Public Member Functions | |
| virtual | ~CYIViewTemplate () |
| std::unique_ptr< CYISceneView > | BuildView (CYISceneManager *pSceneManager, const std::shared_ptr< CYIAssetViewTemplate > &pAssetViewTemplate) |
| virtual void | SetTimelineSource (uint32_t uTimelineHandle, std::shared_ptr< CYIAssetTimelineSource > pTimelineSource)=0 |
| virtual std::shared_ptr< CYIAssetTimelineSource > | GetTimelineSource (uint32_t uTimelineHandle)=0 |
| virtual std::unique_ptr< CYITimeline > | BuildTimeline (CYISceneNode *pRootNode)=0 |
| virtual std::unique_ptr< CYITimeline > | BuildTimeline (CYISceneNode *pRootNode, const CYIString &markerName)=0 |
| virtual std::unique_ptr< CYITimeline > | BuildTimeline (CYISceneNode *pRootNode, CYIMarkerData::MARKER_ID eID)=0 |
| virtual std::unique_ptr< CYITimeline > | BuildTimeline (CYISceneNode *pRootNode, int32_t nStartOffset, int32_t nDuration)=0 |
| virtual std::unique_ptr< CYITimeline > | BuildTimeline (CYISceneNode *pRootNode, uint32_t uTimelineHandle)=0 |
| virtual std::unique_ptr< CYITimeline > | BuildTimeline (CYISceneNode *pRootNode, uint32_t uTimelineHandle, const CYIString &markerName)=0 |
| virtual std::unique_ptr< CYITimeline > | BuildTimeline (CYISceneNode *pRootNode, uint32_t uTimelineHandle, CYIMarkerData::MARKER_ID eID)=0 |
| virtual std::unique_ptr< CYITimeline > | BuildTimeline (CYISceneNode *pRootNode, uint32_t uTimelineHandle, int32_t nStartOffset, int32_t nDuration)=0 |
| virtual void | GetSize (float &fWidth, float &fHeight)=0 |
| virtual float | GetHeight ()=0 |
| virtual float | GetWidth ()=0 |
| virtual float | GetDefaultCameraDistance () |
| virtual CYIString | GetName () const =0 |
| virtual const CYIString & | GetViewClassName () const =0 |
| virtual bool | GetBackgroundColor (CYIColor *pColor)=0 |
| virtual bool | GetProperty (const CYIString &propertyName, CYIString *pValue) const override=0 |
| virtual const std::map< CYIString, CYIString > & | GetProperties () const override=0 |
| virtual const std::vector< CYIString > & | GetChildTemplateNames ()=0 |
| virtual int32_t | GetApproximateSize () const =0 |
| virtual std::vector< Source > | GetSources () const =0 |
Public Member Functions inherited from IYIPropertiesSource | |
| virtual | ~IYIPropertiesSource () |
Public Member Functions inherited from CYIScriptableRTTIObject | |
| CYIScriptableRTTIObject () | |
| virtual | ~CYIScriptableRTTIObject () |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const override |
Public Member Functions inherited from CYIScriptableObject | |
| CYIScriptableObject () | |
| CYIScriptableObject (const CYIScriptableObject &other) | |
| CYIScriptableObject & | operator= (const CYIScriptableObject &other) |
| virtual | ~CYIScriptableObject () |
| CYIBindingImplementation * | GetBindingImplementation () const |
| void | SetBindingImplementation (CYIBindingImplementation *pBindingImplementation) |
Static Public Member Functions | |
| static std::shared_ptr< CYIAssetViewTemplate > | GetViewTemplate (const CYIString &viewTemplateName) |
| static glm::vec2 | GetViewTemplateSize (const CYIString &viewTemplateName) |
Static Public Attributes | |
| static const uint32_t | DEFAULT_TIMELINE_INDEX |
Protected Member Functions | |
| CYIViewTemplate () | |
Protected Member Functions inherited from CYIScriptableRTTIObject | |
| virtual std::pair< const CYIRuntimeTypeInfo *, const void * > | GetRuntimeTypeInfoWithObject () const =0 |
Friends | |
| class | CYISceneView |
|
inlinevirtual |
|
inlineprotected |
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
| std::unique_ptr<CYISceneView> CYIViewTemplate::BuildView | ( | CYISceneManager * | pSceneManager, |
| const std::shared_ptr< CYIAssetViewTemplate > & | pAssetViewTemplate | ||
| ) |
Constructs a view instance from pAssetViewTemplate.
Consider the following example to construct and initialize a CYISceneView:
The caller is responsible for destroying the view.
|
pure virtual |
Returns the approximate size of this class, which has use in implementing asset caching strategies.
Implemented in CYIAEViewTemplate.
|
pure virtual |
Stores the background color of this template into pColor. Return false if this template does not have a background color.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
virtual |
The distance from which the view template was designed to be viewed.
Reimplemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
Returns the name of this template, corresponding to the AE comp name.
Implemented in CYIAEViewTemplate.
|
overridepure virtual |
Returns the map of all available properties.
Implements IYIPropertiesSource.
Implemented in CYIAEViewTemplate.
|
overridepure virtual |
Stores the value of a property specified by propertyName into pValue. Returns false if the property cannot be found.
Implements IYIPropertiesSource.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
Returns a list of the view template's sources.
Implemented in CYIAEViewTemplate.
|
pure virtual |
Returns the timeline source associated with this view template at index uTimelineHandle.
Implemented in CYIAEViewTemplate.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
static |
Returns a view template named viewTemplateName. If the view template was never loaded, it will be loaded automatically and added to the asset manager.
If the view template could not be found or could not be loaded, this function returns null.
|
static |
Returns the size of a view template with name viewTemplateName. This uses GetViewTemplate internally, so if you already have a view template it would be better to query its size directly.
If the view template could not be found, size (0,0) is returned.
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.
|
pure virtual |
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.
Implemented in CYIAEViewTemplate.
|
pure virtual |
Associates pTimelineSource with this view template at index uTimelineHandle.
The timeline asset specifies how nodes generated by this view template will be animated.
Implemented in CYIAEViewTemplate.
|
friend |
|
static |