A utility class that helps retrieving attachement positions relative to an object.
#include <utility/YiLayoutUtility.h>
Static Public Member Functions | |
| static glm::vec3 | CalculateAttachmentPosition (glm::vec3 vLeftTop, glm::vec3 vRightBottom, YI_ATTACHMENT_POSITION eAttachmentPosition) |
| static glm::vec3 | GetAttachmentPosition (CYISceneNode *pSceneNode, YI_ATTACHMENT_POSITION eAttachmentPosition) |
| static glm::vec3 | GetAttachmentPosition (CYIMesh *pMesh, YI_ATTACHMENT_POSITION eAttachmentPosition) |
| static glm::vec3 | GetAttachmentPosition (std::shared_ptr< CYIMesh > pMesh, YI_ATTACHMENT_POSITION eAttachmentPosition) |
| static glm::vec3 | ConvertAttachmentPositionToWorldSpace (CYISceneNode *pSceneNode, glm::vec3 vAttachmentPosition) |
| static YI_ATTACHMENT_POSITION | ConvertAttachmentPositionNameToEnum (CYIString const &rAttachmentPointName) |
Attachment positions:
|
static |
Calculate the attachment position from vLeftTop and vRightBottom vectors.
|
static |
Returns the conversion of an attachment point name string to the YI_ATTACHMENT_POSITION enumeration.
|
static |
Returns the conversion of pSceneNode vAttachmentPosition 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 YI_ATTACHMENT_POSITION 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.