OMIDIV
VisualsComponent Class Referenceabstract

The base class for a component that draws a visualization. More...

Inheritance diagram for VisualsComponent:
OmidivComponent IVideoFeature Base3D< TrackInfo > Circle2D Standard2D

Static Public Attributes

static readonly SortedList< int, Color > TrackColors = new SortedList<int, Color>()
 

Protected Member Functions

void CreateVisuals ()
 Create your visualization here. Happens every time visuals reload after a call to ClearVisuals.
 
void ClearVisuals ()
 Clear all created visuals here.
 
void MovePlay (decimal ticks, decimal microseconds)
 Move your visualization forward or backward (in case midi delay is adjusted).
 
override void OnEnable ()
 
override void OnDisable ()
 
override void OnDestroy ()
 
override void ReadConfig ()
 
override void WriteConfig ()
 
virtual void Update ()
 
override void LoadVisuals ()
 Clears and creates the visuals.
 
override void DrawGUI ()
 
override void Restart ()
 Override this. Called when the visualization restarts (R is pressed).
 
- Protected Member Functions inherited from OmidivComponent
virtual void Awake ()
 
virtual void OnPlayStart ()
 Override this. Called when the visualization starts playing. May be starting from the beginning or resuming.
 
virtual void OnPlayStop ()
 Override this. Called when the visualization stops playing.
 
virtual void Reset_ ()
 Override this. Called when SceneController.OnReset is fired. LoadAudio and LoadMidi will also be called afterwards, so don't do any of that here, but do reload any other resources your component needs.
 
virtual void LoadMidi ()
 Override this. Called when the midi information needs to be loaded from the file. LoadVisuals will also be called afterwards, so don't do any of that here.
 
virtual void LoadAudio ()
 Override this. Called when the audio needs to be loaded from the file.
 

Properties

bool IsVideoFeatureDone = false [get, protected set]
 Whether this component has reached the end of all its visuals, and the video recording can end.
 
bool AutoRegisterVideoFeature = true [get, set]
 Whether to automatically add and remove this component to the video recorder's recorded features in OnEnable and OnDisable.
 
bool AutoApplyChanges = true [get, set]
 Whether changes that require recreating the visualization should apply automatically (true) or manually with F6 (false).
 
- Properties inherited from OmidivComponent
static bool IsPlaying [get]
 Is the visualization currently playing.
 
static double FrameDeltaTime [get]
 Time.deltaTime when not recording, 1/recording framerate when recording. In most cases, use this instead of Time.deltaTime so that recordings work properly.
 
- Properties inherited from IVideoFeature

Additional Inherited Members

- Public Attributes inherited from OmidivComponent
string ConfigTag = "def"
 Use this to give different instances in difference scenes different saved config.

 

Detailed Description

The base class for a component that draws a visualization.

Member Function Documentation

◆ ClearVisuals()

void VisualsComponent.ClearVisuals ( )
abstractprotected

Clear all created visuals here.

May be called before visuals have been created, so don't assume the visuals will be there.

◆ DrawGUI()

override void VisualsComponent.DrawGUI ( )
protectedvirtual

Please call base.DrawGUI() if overriding this.

Reimplemented from OmidivComponent.

◆ LoadVisuals()

override void VisualsComponent.LoadVisuals ( )
protectedvirtual

Clears and creates the visuals.

Please call base.LoadVisuals() if overriding this.

Reimplemented from OmidivComponent.

◆ MovePlay()

void VisualsComponent.MovePlay ( decimal ticks,
decimal microseconds )
abstractprotected

Move your visualization forward or backward (in case midi delay is adjusted).

Parameters
ticksWill usually be 1 except if the midi uses SMPTE time format, or the midi delay is adjusted.

◆ OnDestroy()

override void VisualsComponent.OnDestroy ( )
protectedvirtual

Clears visuals by default.
Please call base.OnDestroy() if overriding this, unless you really know what you're doing.

Reimplemented from OmidivComponent.

◆ OnDisable()

override void VisualsComponent.OnDisable ( )
protectedvirtual

Please call base.OnDisable() if overriding this, unless you really know what you're doing.

Reimplemented from OmidivComponent.

◆ OnEnable()

override void VisualsComponent.OnEnable ( )
protectedvirtual

Please call base.OnEnable() if overriding this, unless you really know what you're doing.

Reimplemented from OmidivComponent.

◆ ReadConfig()

override void VisualsComponent.ReadConfig ( )
protectedvirtual

Please call base.ReadConfig() if overriding this unless you know what you're doing.

Reimplemented from OmidivComponent.

◆ Restart()

override void VisualsComponent.Restart ( )
protectedvirtual

Override this. Called when the visualization restarts (R is pressed).

Reimplemented from OmidivComponent.

◆ Update()

virtual void VisualsComponent.Update ( )
protectedvirtual

Please call base.Update() if overriding this unless you know what you're doing.

Reimplemented in Base3D< TrackInfo >, Circle2D, and Standard2D.

◆ WriteConfig()

override void VisualsComponent.WriteConfig ( )
protectedvirtual

Please call base.WriteConfig() if overriding this unless you know what you're doing.

Reimplemented from OmidivComponent.

Property Documentation

◆ AutoApplyChanges

bool VisualsComponent.AutoApplyChanges = true
getset

Whether changes that require recreating the visualization should apply automatically (true) or manually with F6 (false).

Note to subclasses:
Doesn't make changes you make automatically apply. Instead, chack the value of this for whether or not you should apply the changes when they happen.

◆ AutoRegisterVideoFeature

bool VisualsComponent.AutoRegisterVideoFeature = true
getsetprotected

Whether to automatically add and remove this component to the video recorder's recorded features in OnEnable and OnDisable.

See also
IsVideoFeatureDone

◆ IsVideoFeatureDone

bool VisualsComponent.IsVideoFeatureDone = false
getprotected set

Whether this component has reached the end of all its visuals, and the video recording can end.

Register this component via VideoRecorder.RegisterFeature(IVideoFeature). Register and de-register features in OnEnable and OnDisable. Only registered features will prevent the recording from ending.

See also
AutoRegisterVideoFeature

Implements IVideoFeature.


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