You.i Engine
YiLayoutUtility.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_LAYOUT_UTILITY_H_
3 #define _YI_LAYOUT_UTILITY_H_
4 
6 #include "view/YiSceneView.h"
7 
18 {
19 public:
38  enum class AttachmentPosition
39  {
40  TopLeft = 0,
41  TopCenter,
42  TopRight,
43  CenterLeft,
44  Center,
46  BottomLeft,
49  };
50 
54  static glm::vec3 CalculateAttachmentPosition(glm::vec3 leftTop, glm::vec3 rightBottom, AttachmentPosition attachmentPosition);
55 
80  static glm::vec3 GetAttachmentPosition(CYISceneNode *pSceneNode, AttachmentPosition attachmentPosition);
81 
87  static glm::vec3 GetAttachmentPosition(CYIMesh *pMesh, AttachmentPosition attachmentPosition);
88 
94  static glm::vec3 GetAttachmentPosition(std::shared_ptr<CYIMesh> pMesh, AttachmentPosition attachmentPosition);
95 
99  static glm::vec3 ConvertAttachmentPositionToWorldSpace(CYISceneNode *pSceneNode, glm::vec3 attachmentPosition);
100 
104  static AttachmentPosition ConvertAttachmentPositionNameToEnum(CYIString const &rAttachmentPointName);
105 };
106 
109 #endif // _YI_LAYOUT_UTILITY_H_
static glm::vec3 ConvertAttachmentPositionToWorldSpace(CYISceneNode *pSceneNode, glm::vec3 attachmentPosition)
Class representing an instance of geometry information.
Definition: YiMesh.h:33
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:36
AttachmentPosition
Definition: YiLayoutUtility.h:38
static AttachmentPosition ConvertAttachmentPositionNameToEnum(CYIString const &rAttachmentPointName)
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 glm::vec3 CalculateAttachmentPosition(glm::vec3 leftTop, glm::vec3 rightBottom, AttachmentPosition attachmentPosition)
A utility class that helps retrieving attachment positions relative to an object. ...
Definition: YiLayoutUtility.h:17
static glm::vec3 GetAttachmentPosition(CYISceneNode *pSceneNode, AttachmentPosition attachmentPosition)