Tools that can be used to get information adapted to the screen size.
|
Vector3 | CalculateNewPositionWithDepth (Vector3 point, float depth) |
| Calculates the new position in relation to the main camera, for the skleleton joints with clamped depth of -1 and 1.
|
|
Vector3 | CalculateScreenPosition (Vector3 point) |
| Calculates the screen position of a normalized position. Used for bounding box.
|
|
void | OrientMeshRenderer (MeshRenderer meshRenderer) |
| Properly orients a MeshRenderer in order to be displayed properly.
|
|
void | ShouldBackgroundCoverScreen (bool shouldCoverScreen) |
| Update value that decides how the camera image is displayed. If true it will cover the entire screen, if false the entire image will be visible.
|
|
void | SetOrientation (SupportedOrientation orientation) |
| Set the orientation. Used when locking the screen in certain scenes.
|
|
|
static Vector3 | GetCenter (params Vector3[] points) |
|
|
void | AdjustBorders (MeshRenderer meshRenderer, Session session, int padding=0) |
| Adjust the transform in the received mesh renderer to fit the screen without stretching.
|
|
float | CalculateRatio (Session session) |
| Calculates the current ratio depending on the device orientation.
|
|
float | CalculateSize (MeshRenderer meshRenderer, Session session, float ratio) |
| Gets the size for the AdjustBorders method.
|
|
void | AdjustMeshScale (MeshRenderer meshRenderer, Session session, float ratio, float size) |
| Adjust the scale of the mesh render.
|
|
void | CalculateCorrectionPoint (MeshRenderer meshRenderer, Session session, float ratio, float size) |
| Calculate a correction point depending on the orientation.
|
|
◆ AdjustBorders()
void ManoMotion.ManoUtils.AdjustBorders |
( |
MeshRenderer | meshRenderer, |
|
|
Session | session, |
|
|
int | padding = 0 ) |
|
inlinepackage |
◆ AdjustMeshScale()
void ManoMotion.ManoUtils.AdjustMeshScale |
( |
MeshRenderer | meshRenderer, |
|
|
Session | session, |
|
|
float | ratio, |
|
|
float | size ) |
|
inlinepackage |
◆ Awake()
void ManoMotion.ManoUtils.Awake |
( |
| ) |
|
|
inlineprotected |
◆ CalculateCorrectionPoint()
void ManoMotion.ManoUtils.CalculateCorrectionPoint |
( |
MeshRenderer | meshRenderer, |
|
|
Session | session, |
|
|
float | ratio, |
|
|
float | size ) |
|
inlinepackage |
◆ CalculateNewPositionWithDepth()
Vector3 ManoMotion.ManoUtils.CalculateNewPositionWithDepth |
( |
Vector3 | point, |
|
|
float | depth ) |
|
inline |
◆ CalculateRatio()
float ManoMotion.ManoUtils.CalculateRatio |
( |
Session | session | ) |
|
|
inlinepackage |
◆ CalculateScreenPosition()
Vector3 ManoMotion.ManoUtils.CalculateScreenPosition |
( |
Vector3 | point | ) |
|
|
inline |
◆ CalculateSize()
float ManoMotion.ManoUtils.CalculateSize |
( |
MeshRenderer | meshRenderer, |
|
|
Session | session, |
|
|
float | ratio ) |
|
inlinepackage |
◆ CheckForScreenOrientationChange()
void ManoMotion.ManoUtils.CheckForScreenOrientationChange |
( |
| ) |
|
|
inlineprivate |
◆ GetCenter()
static Vector3 ManoMotion.ManoUtils.GetCenter |
( |
params Vector3[] | points | ) |
|
|
inlinestatic |
◆ OrientMeshRenderer()
void ManoMotion.ManoUtils.OrientMeshRenderer |
( |
MeshRenderer | meshRenderer | ) |
|
|
inline |
- Parameters
-
meshRenderer | Mesh renderer. |
◆ SetOrientation()
◆ ShouldBackgroundCoverScreen()
void ManoMotion.ManoUtils.ShouldBackgroundCoverScreen |
( |
bool | shouldCoverScreen | ) |
|
|
inline |
◆ Start()
void ManoMotion.ManoUtils.Start |
( |
| ) |
|
|
inlineprivate |
◆ Update()
void ManoMotion.ManoUtils.Update |
( |
| ) |
|
|
inlineprivate |
◆ cam
Camera ManoMotion.ManoUtils.cam |
|
private |
◆ correctionRatio
Vector3 ManoMotion.ManoUtils.correctionRatio = Vector3.one |
|
private |
◆ currentOrientation
◆ instance
◆ OnOrientationChanged
Action ManoMotion.ManoUtils.OnOrientationChanged |
|
static |
◆ shouldBackgroundCoverScreen
bool ManoMotion.ManoUtils.shouldBackgroundCoverScreen = true |
|
private |
◆ updateOrientation
bool ManoMotion.ManoUtils.updateOrientation = true |
◆ zoomValue
float ManoMotion.ManoUtils.zoomValue = 1f |
|
private |
◆ Instance
◆ Orientation
◆ Zoom
float ManoMotion.ManoUtils.Zoom |
|
getprivate |