Class HPTransform
The HPTransform is the High-Precision Framework's primary class. It acts very similarly to an ordinary transform, however its position is in 64 bit precision rather than being in 32 bit precision. The HPTransform can be used with or without an HPRoot parent. However, in order to truly benefit from the 64 bit precision, it should be the child of an HPRoot.
Inherited Members
Namespace: Unity.Geospatial.HighPrecision
Assembly: solution.dll
Syntax
[ExecuteAlways]
[DisallowMultipleComponent]
[AddComponentMenu("HighPrecision/HPTransform")]
public class HPTransform : HPNode
Properties
Forward
The HPTransform's forward vector, in universe space.
Declaration
public float3 Forward { get; }
Property Value
Type | Description |
---|---|
float3 |
LocalMatrix
Translation, rotation and scaling information relative to its direct parent.
Declaration
public override double4x4 LocalMatrix { get; }
Property Value
Type | Description |
---|---|
double4x4 |
Overrides
LocalPosition
The position of the HPTransform relative to its parent HPRoot or HPTransform
Declaration
public override double3 LocalPosition { get; set; }
Property Value
Type | Description |
---|---|
double3 |
Overrides
LocalRotation
The rotation of the HPTransform relative to its parent HPTransform or HPRoot
Declaration
public override quaternion LocalRotation { get; set; }
Property Value
Type | Description |
---|---|
quaternion |
Overrides
LocalScale
The scale of the HPTransform, relative to its parent HPTransform or HPRoot. If the HPTransform is not a leaf node (i.e. if it contains another HPTransform) only uniform scales will be possible. Under these circumstances, only the x component of the scale will count towards the uniform scale.
Declaration
public override float3 LocalScale { get; set; }
Property Value
Type | Description |
---|---|
float3 |
Overrides
Parent
Set or get the parent of the HPTransform. When changing the parent, the HPTransform's position in the world will be preserved.
Declaration
public Transform Parent { get; set; }
Property Value
Type | Description |
---|---|
Transform |
Right
The HPTransform's right vector, in universe space.
Declaration
public float3 Right { get; }
Property Value
Type | Description |
---|---|
float3 |
ScaleType
The type of scale that is currently supported by the HPTransform. When in uniform scale, only the x component of the set scale will be considered for the uniform scale.
Declaration
public HPNode.ScaleTypes ScaleType { get; }
Property Value
Type | Description |
---|---|
HPNode.ScaleTypes |
UniverseMatrix
Translation, rotation and scaling information relative to the center of the universe.
Declaration
public override double4x4 UniverseMatrix { get; }
Property Value
Type | Description |
---|---|
double4x4 |
Overrides
UniversePosition
The position of the HPTransform, in universe space.
Declaration
public override double3 UniversePosition { get; set; }
Property Value
Type | Description |
---|---|
double3 |
Overrides
UniverseRotation
The rotation of the HPTransform, in universe space
Declaration
public override quaternion UniverseRotation { get; set; }
Property Value
Type | Description |
---|---|
quaternion |
Overrides
Up
The HPTransform's up vector, in universe space.
Declaration
public float3 Up { get; }
Property Value
Type | Description |
---|---|
float3 |
WorldMatrix
Translation, rotation and scaling information relative to the Unity world center.
Declaration
public override double4x4 WorldMatrix { get; }
Property Value
Type | Description |
---|---|
double4x4 |
Overrides
Methods
RegisterChild(HPTransform)
Set a as a child of this instance.
Declaration
public override void RegisterChild(HPTransform child)
Parameters
Type | Name | Description |
---|---|---|
HPTransform | child | Node to register |
Overrides
SetLocalPosition(double3)
Set the position of the HPTransform relative to its parent HPRoot or HPTransform
Declaration
public void SetLocalPosition(double3 position)
Parameters
Type | Name | Description |
---|---|---|
double3 | position | Change the LocalPosition to this value. |
UnregisterChild(HPTransform)
Remove a HPTransform from the list of registered children.
Declaration
public override void UnregisterChild(HPTransform child)
Parameters
Type | Name | Description |
---|---|---|
HPTransform | child | Node to unregister. |