A utility class that helps retrieving attachment positions relative to an object.
#include <utility/YiLayoutUtility.h>
Static Public Member Functions | |
static glm::vec3 | CalculateAttachmentPosition (glm::vec3 leftTop, glm::vec3 rightBottom, AttachmentPosition attachmentPosition) |
static glm::vec3 | GetAttachmentPosition (CYISceneNode *pSceneNode, AttachmentPosition attachmentPosition) |
static glm::vec3 | GetAttachmentPosition (CYIMesh *pMesh, AttachmentPosition attachmentPosition) |
static glm::vec3 | GetAttachmentPosition (std::shared_ptr< CYIMesh > pMesh, AttachmentPosition attachmentPosition) |
static glm::vec3 | ConvertAttachmentPositionToWorldSpace (CYISceneNode *pSceneNode, glm::vec3 attachmentPosition) |
static AttachmentPosition | ConvertAttachmentPositionNameToEnum (CYIString const &rAttachmentPointName) |
|
strong |
|
static |
Calculate the attachment position from leftTop and rightBottom vectors.
|
static |
Returns the conversion of an attachment point name string to the AttachmentPosition enumeration.
|
static |
Returns the conversion of pSceneNode attachmentPosition in world space.
|
static |
Returns one of the CYISceneNode attachment positions as glm::vec3 in local space. Child CYISceneNodes can be positioned relative to these attachment positions.
When used on a CYITextSceneNode, the tight text rectangle will be used. When used on a CYISceneView, the world logical size will be used. When used on a CYISceneNode with a mesh, the mesh Axis Aligned Bounding Box will be used. When used on a CYISceneNode without a mesh, (0,0,0) is returned.
example of use:
See AttachmentPosition for the available attachment positions.
|
static |
Returns one of the CYIMesh attachment positions as glm::vec3 in local space.
|
static |
Returns one of the std::shared_ptr<CYIMesh> attachment positions as glm::vec3 in local space.