You.i Engine
YiSceneBuilder.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_SCENE_BUILDER_H_
3 #define _YI_SCENE_BUILDER_H_
4 
6 
8 class CYIRenderTarget;
10 class CYISceneNode;
11 class CYISceneManager;
12 class CYISceneView;
16 
23 {
24 public:
26  {
28  int32_t viewportWidth;
29  int32_t viewportHeight;
30  };
31 
37  static std::unique_ptr<CYISceneNode> CreateSolid(CYISceneManager *pSceneManager, const CYIColor &color, float width, float height);
38 
48  static std::unique_ptr<CYIImageSceneNode> CreateImage(CYISceneManager *pSceneManager, const CYIString &assetPath);
49 
59  static std::unique_ptr<CYIImageSceneNode> CreateImage(CYISceneManager *pSceneManager, const CYIString &assetPath, float width, float height);
60 
69  static std::unique_ptr<CYIImageSceneNode> CreateImage(CYISceneManager *pSceneManager, const std::shared_ptr<CYIAssetTextureBase> &pTextureAsset, float width, float height);
70 
78  static std::unique_ptr<CYIScreenRenderTarget> CreateScreenRenderTarget(const CYIViewport &viewport);
79 
86  static std::unique_ptr<CYIOffscreenRenderTarget> CreateOffscreenRenderTarget(CYIRenderTarget::Type targetType, uint32_t targetWidth, uint32_t targetHeight);
87 
94  static std::unique_ptr<CYIRenderTarget> CreateRenderTarget(CYIRenderTarget::Type renderTargetType, size_t width, size_t height);
95 
101  static std::unique_ptr<CYIOrthographicCameraSceneNode> CreateOrthographicCameraSceneNode(CYISceneManager *pSceneManager, const YI_RECT_REL &worldRegionOfInterest);
102 
108  static std::unique_ptr<CYIPerspectiveCameraSceneNode> CreatePerspectiveCameraSceneNode(CYISceneManager *pSceneManager, const YI_RECT_REL &worldRegionOfInterest, float desiredCameraDistance);
109 
117  static std::unique_ptr<CYISceneView> CreateOrthographicScene(CYISceneManager *pSceneManager, const YI_RECT_REL &worldRegionOfInterest, const RenderTargetConfiguration &renderTargetConfiguration);
118 
126  static std::unique_ptr<CYISceneView> CreatePerspectiveScene(CYISceneManager *pSceneManager, const YI_RECT_REL &worldRegionOfInterest, float desiredCameraDistance, const RenderTargetConfiguration &renderTargetConfiguration);
127 };
128 
131 #endif //_YI_SCENE_BUILDER_H_
int32_t viewportWidth
Definition: YiSceneBuilder.h:28
int32_t viewportHeight
Definition: YiSceneBuilder.h:29
static std::unique_ptr< CYIRenderTarget > CreateRenderTarget(CYIRenderTarget::Type renderTargetType, size_t width, size_t height)
Provides special resize behaviour typically useful for images.
Definition: YiImageSceneNode.h:26
Scene trees composed of CYISceneNode objects are registered with the scene manager in order for them ...
Definition: YiSceneManager.h:75
Definition: YiPredef.h:291
The base class for all view types. Views are containers of renderable elements that often define inte...
Definition: YiSceneView.h:47
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:36
static std::unique_ptr< CYIOffscreenRenderTarget > CreateOffscreenRenderTarget(CYIRenderTarget::Type targetType, uint32_t targetWidth, uint32_t targetHeight)
CYIRenderTarget::Type renderTargetType
Definition: YiSceneBuilder.h:27
static std::unique_ptr< CYIScreenRenderTarget > CreateScreenRenderTarget(const CYIViewport &viewport)
Definition: YiOrthographicCameraSceneNode.h:27
Definition: YiViewport.h:12
static std::unique_ptr< CYIImageSceneNode > CreateImage(CYISceneManager *pSceneManager, const CYIString &assetPath)
Defines a target for the rendering results to be sent to.
Definition: YiRenderTarget.h:51
A scene node is the base type for all nodes which are used by the scene manager; it is an integral pa...
Definition: YiSceneNode.h:99
static std::unique_ptr< CYISceneNode > CreateSolid(CYISceneManager *pSceneManager, const CYIColor &color, float width, float height)
Type
Definition: YiRenderTarget.h:67
Defines an offscreen target for the rendering results to be sent to.
Definition: YiOffscreenRenderTarget.h:26
Definition: YiSceneBuilder.h:22
static std::unique_ptr< CYISceneView > CreateOrthographicScene(CYISceneManager *pSceneManager, const YI_RECT_REL &worldRegionOfInterest, const RenderTargetConfiguration &renderTargetConfiguration)
static std::unique_ptr< CYIOrthographicCameraSceneNode > CreateOrthographicCameraSceneNode(CYISceneManager *pSceneManager, const YI_RECT_REL &worldRegionOfInterest)
Definition: YiScreenRenderTarget.h:17
Definition: YiPerspectiveCameraSceneNode.h:39
static std::unique_ptr< CYISceneView > CreatePerspectiveScene(CYISceneManager *pSceneManager, const YI_RECT_REL &worldRegionOfInterest, float desiredCameraDistance, const RenderTargetConfiguration &renderTargetConfiguration)
static std::unique_ptr< CYIPerspectiveCameraSceneNode > CreatePerspectiveCameraSceneNode(CYISceneManager *pSceneManager, const YI_RECT_REL &worldRegionOfInterest, float desiredCameraDistance)
A class used to represent a color value.
Definition: YiColor.h:31
Definition: YiSceneBuilder.h:25