Chunks
Moddable voxel sandbox for room-scale VR.
Properties | List of all members
Chunks.Controls.ControlTransform Class Reference

Specialized Entities.Transform used by Control instances to describe how they are positioned relative to their parent. More...

Inheritance diagram for Chunks.Controls.ControlTransform:
Chunks.Entities.Transform Chunks.Entities.Object

Properties

float RowHeight [get, set]
 
Bounds Offset = 64f [get, set]
 Defines how far the left, right, upper and lower edges are offset from the anchoring rectangle. More...
 
float OffsetLeft [get, set]
 
float OffsetTop [get, set]
 
float OffsetRight [get, set]
 
float OffsetBottom [get, set]
 
Bounds Anchor [get, set]
 Defines an anchoring rectangle relative to the parent control. Each value in the Bounds is in the range [0, 1], with (0, 0) being the upper left corner and (1, 1) being the lower right. More...
 
float AnchorLeft [get, set]
 
float AnchorTop [get, set]
 
float AnchorRight [get, set]
 
float AnchorBottom [get, set]
 
Bounds Rect [get]
 
float Width [get]
 Absolute width of the control. More...
 
float Height [get]
 Absolute height of the control. More...
 
Vector Size [get]
 
- Properties inherited from Chunks.Entities.Transform
bool IsReadOnly [get, set]
 This transform cannot be modified if true. More...
 
Vector Position [get, set]
 The world space position of this transform. More...
 
Vector LocalPosition [get, set]
 The position of this transform inside its parent. More...
 
Vector LocalScale [get, set]
 Scale of this transform relative to its parent. More...
 
Quaternion Rotation [get, set]
 The world space rotation of this transform. More...
 
Quaternion LocalRotation [get, set]
 The rotation of this transform relative to its parent. More...
 
Transform Parent [get, protected set]
 The transform of the parent entity, or null if this transform has no parent. More...
 
IEnumerable< TransformChildren [get]
 An enumeration of the transforms of any entities parented to this one. More...
 
- Properties inherited from Chunks.Entities.Object
abstract bool IsValid [get]
 Tests to see if this object hasn't been removed. More...
 
virtual string Name [get, set]
 Custom name associated with this Object's Entity, used to find the Entity in the hierarchy. More...
 
virtual Transform Transform [get]
 Transformation of this Object's Entity. More...
 
virtual IWorld World [get]
 The IWorld that contains this Object. More...
 

Additional Inherited Members

- Public Member Functions inherited from Chunks.Entities.Transform
void Add (Transform transform, bool worldPositionStays)
 Adds a child transform, optionally keeping its transformation in world space intact. More...
 
void DetachFromParent (bool worldPositionStays)
 Removes this transform as a child of its current parent, and makes it a root transform. More...
 
Vector TransformPosition (Vector position)
 Applies this transformation to a position, moving it from local space to world space. More...
 
Vector TransformVector (Vector vector)
 Applies this transformation to a vector, moving it from local space to world space without offsetting it by this transform's position. More...
 
Vector InverseTransformPosition (Vector position)
 Applies the inverse of this transformation to a position, moving it from world space to local space. More...
 
Vector InverseTransformVector (Vector vector)
 Applies the inverse of this transformation to a vector, moving it from world space to local space without offsetting it by this transform's position. More...
 
void Rotate (Vector axis, float angle)
 Rotates this transform about a given axis by the given angle in degrees. More...
 
void Save (BinaryWriter writer)
 Serializes this transformation to a BinaryWriter. More...
 
void Load (BinaryReader reader)
 Deserializes this transformation from a BinaryReader. More...
 
override string ToString ()
 Returns the name of the entity this transform is attached to. More...
 
- Public Member Functions inherited from Chunks.Entities.Object
Entity CreateChild ()
 Creates a new Entity parented to this one. More...
 
TComponent CreateChildWithComponent< TComponent > ()
 Creates a new Entity parented to this one with a component of the given type, which is returned. More...
 
Entity FindChild (string name, bool recurse=true)
 Attempts to find a child Entity of this one with the given name, and optionally searches recursively through all children. Null is returned if no matches are found. More...
 
TComponent FindChildComponent< TComponent > (string name, bool recurse=true)
 Attempts to find a child Entity of this one with the given name, and optionally searches recursively through all children. If a matching Entity is found, a component of the given type is retrieved from it. Null is returned if no matches are found. More...
 
Entity FindParent (string name)
 Attempts to find an Entity that contains this Object's Entity with the given Name. Returns null if no match is found. More...
 
TComponent FindParentComponent< TComponent > ()
 Attempts to find an Entity that contains this Object's Entity with a component of the given type. If a matching Entity is found, the component of the given type is retrieved from it. Returns null if no match is found. More...
 
TComponent FindParentComponent< TComponent > (string name)
 Attempts to find an Entity that contains this Object's Entity with the given Name. If a matching Entity is found, a component of the given type is retrieved from it. Returns null if no match is found. More...
 
TComponent AddComponent< TComponent > ()
 Adds a component of the specified type to this entity, returning the new component. More...
 
TComponent GetOrAddComponent< TComponent > ()
 Attempts to get a component of the specified type from this entity, adding it if one doesn't already exist. More...
 
TComponent GetComponent< TComponent > ()
 Attempts to get a component of the specified type from this entity, returning null if one doesn't exist. More...
 
IEnumerable< TComponent > GetComponents< TComponent > ()
 Gets all components derived from the given type. More...
 
- Public Attributes inherited from Chunks.Entities.Transform
override bool IsValid => Inner != null
 Tests to see if this transform's entity hasn't been removed. More...
 
Vector Forward => new Vector(Inner.forward)
 The world space forward facing vector of this transform. More...
 
Vector Up => new Vector(Inner.up)
 The world space upwards facing vector of this transform. More...
 
Vector Right => new Vector(Inner.right)
 The world space right facing vector of this transform. More...
 
Vector LossyScale => new Vector(Inner.lossyScale)
 Approximate scale of this transform in world space. More...
 
Matrix4 WorldToLocal => new Matrix4(Inner.worldToLocalMatrix)
 
Matrix4 LocalToWorld => new Matrix4(Inner.localToWorldMatrix)
 
Entity Entity => _entity ?? (_entity = Inner.GetComponent<EntityBehaviour>().Entity)
 The entity that this transform represents. More...
 
int ChildCount => Inner.childCount
 The number of entities that are parented to this one. More...
 

Detailed Description

Specialized Entities.Transform used by Control instances to describe how they are positioned relative to their parent.

Property Documentation

Bounds Chunks.Controls.ControlTransform.Anchor
getset

Defines an anchoring rectangle relative to the parent control. Each value in the Bounds is in the range [0, 1], with (0, 0) being the upper left corner and (1, 1) being the lower right.

float Chunks.Controls.ControlTransform.AnchorBottom
getset
float Chunks.Controls.ControlTransform.AnchorLeft
getset
float Chunks.Controls.ControlTransform.AnchorRight
getset
float Chunks.Controls.ControlTransform.AnchorTop
getset
float Chunks.Controls.ControlTransform.Height
get

Absolute height of the control.

Bounds Chunks.Controls.ControlTransform.Offset = 64f
getset

Defines how far the left, right, upper and lower edges are offset from the anchoring rectangle.

float Chunks.Controls.ControlTransform.OffsetBottom
getset
float Chunks.Controls.ControlTransform.OffsetLeft
getset
float Chunks.Controls.ControlTransform.OffsetRight
getset
float Chunks.Controls.ControlTransform.OffsetTop
getset
Bounds Chunks.Controls.ControlTransform.Rect
get
float Chunks.Controls.ControlTransform.RowHeight
getset
Vector Chunks.Controls.ControlTransform.Size
get
float Chunks.Controls.ControlTransform.Width
get

Absolute width of the control.


The documentation for this class was generated from the following file: