Chunks
Moddable voxel sandbox for room-scale VR.
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Chunks.Interface.TrackPadDial Class Reference

Emulates a rotating dial on the controller track pad. More...

Inheritance diagram for Chunks.Interface.TrackPadDial:
Chunks.Entities.Component Chunks.Entities.Object Chunks.Entities.IComponent Chunks.Entities.IObject

Classes

class  EventArgs
 

Public Member Functions

 TrackPadDial ()
 
void ResetToDefaults ()
 Resets the needle angle, minimum and maximum angles, and minimum and maximum integer values for the dial to the default values. More...
 
- Public Member Functions inherited from Chunks.Entities.Component
void DestroyComponent ()
 Removes this component from the entity that contains it. More...
 
void DestroyEntity ()
 Removes the entity containing this component from the world, along with any child entities. More...
 
override string ToString ()
 Returns a string representing this component with the format "TypeName (EntityName)." 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

const float DefaultMinAngle = -135f
 Default minimum clamping angle of rotation in degrees. More...
 
const float DefaultMaxAngle = 135f
 Default maximum clamping angle of rotation in degrees. More...
 
const int DefaultMinIntValue = 0
 Default integer value of the dial when at the minimum angle. More...
 
const int DefaultMaxIntValue = 10
 Default integer value of the dial when at the maximum angle. More...
 
- Public Attributes inherited from Chunks.Entities.Component
override bool IsValid => Behaviour != null
 Tests to see if this component hasn't been removed. More...
 

Protected Member Functions

override void OnInitialize ()
 Called only once, when the component is first attached to an entity and is ready to add or retrieve other components. More...
 
override void OnEnable ()
 Called each time this component goes from being disabled to enabled. More...
 
override void OnDisable ()
 Called each time this component goes from being enabled to disabled. More...
 
override void OnDestroy ()
 Called when this component is removed, or the parent entity is destroyed. More...
 
override void OnUpdate ()
 Called once per world update if this component and its parent entity are enabled. More...
 
- Protected Member Functions inherited from Chunks.Entities.Component
object Wait (float timeSeconds)
 Suspends coroutine operation for the given time when yielded. More...
 
object StartCoroutine (IEnumerator routine)
 Starts execution of a coroutine. More...
 
virtual void OnSave (BinaryWriter writer)
 Implement this and OnLoad to enable serialization of this component when the parent entity saves. More...
 
virtual void OnLoad (BinaryReader reader)
 Implement this and OnSave to enable serialization of this component when the parent entity saves. More...
 
virtual void OnPhysicsUpdate ()
 Called at a fixed time step for any time dependant physics calculations. More...
 
virtual void OnPreRender ()
 Called just before the entity containing this component is rendered. More...
 

Properties

EventHandler< EventArgsRotated
 
bool IsVisible [get, set]
 
float MinAngle [get, set]
 Minimum clamping angle of rotation in degrees. More...
 
float MaxAngle [get, set]
 Maximum clamping angle of rotation in degrees. More...
 
int MinIntValue [get, set]
 Integer value of the dial when at the minimum angle. More...
 
int MaxIntValue [get, set]
 Integer value of the dial when at the maximum angle. More...
 
bool SnapToTouchPosition [get, set]
 
bool ClampAngle [get, set]
 
float Value [get, set]
 Current value of the dial between 0 and 1. The value is 0 when the dial is rotated to the minimum angle, and 1 when it is rotated to the maximum angle. More...
 
float DeltaAngle [get, set]
 
int DeltaIntValue [get, set]
 
int IntValue [get, set]
 Current integer value of the dial between MinIntValue and MaxIntValue. The value is MinIntValue when the dial is rotated to the minimum angle, and MaxIntValue when it is rotated to the maximum angle. More...
 
float NeedleAngle [get, set]
 Current angle of the dial's needle in degrees. An angle of zero points towards the forward tip of the wand. More...
 
- Properties inherited from Chunks.Entities.Component
Entity Entity [get]
 The entity this instance is attached to. More...
 
bool IsSavingImplemented [get]
 If true, OnSave and OnLoad have been implemented for this type. More...
 
bool Enabled [get, set]
 Enabled components will be updated, assuming they are within enabled entities. 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...
 
- Properties inherited from Chunks.Entities.IComponent
Entity Entity [get]
 
bool IsSavingImplemented [get]
 
bool Enabled [get, set]
 
- Properties inherited from Chunks.Entities.IObject
bool IsValid [get]
 
string Name [get, set]
 
Transform Transform [get]
 
IWorld World [get]
 

Detailed Description

Emulates a rotating dial on the controller track pad.

Constructor & Destructor Documentation

Chunks.Interface.TrackPadDial.TrackPadDial ( )

Member Function Documentation

override void Chunks.Interface.TrackPadDial.OnDestroy ( )
protectedvirtual

Called when this component is removed, or the parent entity is destroyed.

Reimplemented from Chunks.Entities.Component.

override void Chunks.Interface.TrackPadDial.OnDisable ( )
protectedvirtual

Called each time this component goes from being enabled to disabled.

Reimplemented from Chunks.Entities.Component.

override void Chunks.Interface.TrackPadDial.OnEnable ( )
protectedvirtual

Called each time this component goes from being disabled to enabled.

Reimplemented from Chunks.Entities.Component.

override void Chunks.Interface.TrackPadDial.OnInitialize ( )
protectedvirtual

Called only once, when the component is first attached to an entity and is ready to add or retrieve other components.

Reimplemented from Chunks.Entities.Component.

override void Chunks.Interface.TrackPadDial.OnUpdate ( )
protectedvirtual

Called once per world update if this component and its parent entity are enabled.

Reimplemented from Chunks.Entities.Component.

void Chunks.Interface.TrackPadDial.ResetToDefaults ( )

Resets the needle angle, minimum and maximum angles, and minimum and maximum integer values for the dial to the default values.

Member Data Documentation

const float Chunks.Interface.TrackPadDial.DefaultMaxAngle = 135f

Default maximum clamping angle of rotation in degrees.

const int Chunks.Interface.TrackPadDial.DefaultMaxIntValue = 10

Default integer value of the dial when at the maximum angle.

const float Chunks.Interface.TrackPadDial.DefaultMinAngle = -135f

Default minimum clamping angle of rotation in degrees.

const int Chunks.Interface.TrackPadDial.DefaultMinIntValue = 0

Default integer value of the dial when at the minimum angle.

Property Documentation

bool Chunks.Interface.TrackPadDial.ClampAngle
getset
float Chunks.Interface.TrackPadDial.DeltaAngle
getset
int Chunks.Interface.TrackPadDial.DeltaIntValue
getset
int Chunks.Interface.TrackPadDial.IntValue
getset

Current integer value of the dial between MinIntValue and MaxIntValue. The value is MinIntValue when the dial is rotated to the minimum angle, and MaxIntValue when it is rotated to the maximum angle.

bool Chunks.Interface.TrackPadDial.IsVisible
getset
float Chunks.Interface.TrackPadDial.MaxAngle
getset

Maximum clamping angle of rotation in degrees.

int Chunks.Interface.TrackPadDial.MaxIntValue
getset

Integer value of the dial when at the maximum angle.

float Chunks.Interface.TrackPadDial.MinAngle
getset

Minimum clamping angle of rotation in degrees.

int Chunks.Interface.TrackPadDial.MinIntValue
getset

Integer value of the dial when at the minimum angle.

float Chunks.Interface.TrackPadDial.NeedleAngle
getset

Current angle of the dial's needle in degrees. An angle of zero points towards the forward tip of the wand.

EventHandler<EventArgs> Chunks.Interface.TrackPadDial.Rotated
addremove
bool Chunks.Interface.TrackPadDial.SnapToTouchPosition
getset
float Chunks.Interface.TrackPadDial.Value
getset

Current value of the dial between 0 and 1. The value is 0 when the dial is rotated to the minimum angle, and 1 when it is rotated to the maximum angle.


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