Neodroid
0.2.0
Machine Learning Environment Prototyping Tool
ExternalTextureConfigurable.cs
Go to the documentation of this file.
1
using
droid
.
Runtime
.
Interfaces
;
2
using
droid
.
Runtime
.
Messaging
.
Messages
;
3
using
droid
.
Runtime
.
Utilities
.
Misc
;
4
using
droid
.
Runtime
.
Utilities
.
Structs
;
5
using
UnityEngine
;
6
7
namespace
droid
.Runtime.Prototyping.Configurables.Experimental {
11
[AddComponentMenu(ConfigurableComponentMenuPath._ComponentMenuPath
12
+
"ExternalTexture"
13
+ ConfigurableComponentMenuPath._Postfix)]
14
public
class
ExternalTextureConfigurable
:
Configurable
{
18
string
_texture_str;
19
20
[SerializeField] Texture _texture = null;
21
25
protected
override
void
PreSetup
() { this._texture_str = this.Identifier +
"Texture"
; }
26
30
protected
override
void
RegisterComponent
() {
31
this.ParentEnvironment =
32
NeodroidUtilities.RegisterComponent(this.ParentEnvironment, (
Configurable
)
this
, this._texture_str);
33
}
34
38
protected
override
void
UnRegisterComponent
() {
39
this.ParentEnvironment?.UnRegister(
this
, this._texture_str);
40
}
41
42
public
override
ISpace
ConfigurableValueSpace {
get
; }
43
47
public
override
void
ApplyConfiguration
(
IConfigurableConfiguration
configuration) {
48
#if NEODROID_DEBUG
49
if
(this.Debugging) {
50
DebugPrinting.ApplyPrint(this.Debugging, configuration, this.Identifier);
51
}
52
#endif
53
54
if
(configuration.
ConfigurableName
==
this
._texture_str) {
55
if
(this._texture) {
56
this._texture.anisoLevel = (int)configuration.
ConfigurableValue
;
57
}
58
}
59
}
60
65
public
override
Configuration
[]
SampleConfigurations
() {
66
return
new
[] {
new
Configuration
(this._texture_str,
Space1
.
ZeroOne
.
Sample
())};
67
}
68
}
69
}
droid.Runtime.Utilities.Misc
Definition:
DebugPrinting.cs:4
droid.Runtime.Utilities.Structs.Space1.Sample
dynamic Sample()
Definition:
Space1.cs:52
droid.Runtime.Interfaces
Definition:
IAbstractPrototypingEnvironment.cs:5
droid.Runtime.Prototyping.Configurables.Experimental.ExternalTextureConfigurable.ApplyConfiguration
override void ApplyConfiguration(IConfigurableConfiguration configuration)
Definition:
ExternalTextureConfigurable.cs:47
droid.Runtime.Messaging.Messages
Definition:
Body.cs:3
droid.Runtime.Utilities.Structs
Definition:
DoubleVector3.cs:4
droid.Runtime.Interfaces.ISpace
Definition:
ISpace.cs:7
droid.Runtime.Prototyping.Configurables.Experimental.ExternalTextureConfigurable.RegisterComponent
override void RegisterComponent()
Definition:
ExternalTextureConfigurable.cs:30
droid
droid.Runtime.Interfaces.IConfigurableConfiguration.ConfigurableValue
float ConfigurableValue
Definition:
IConfigurableConfiguration.cs:3
droid.Runtime.Prototyping.Configurables.Experimental.ExternalTextureConfigurable.PreSetup
override void PreSetup()
Definition:
ExternalTextureConfigurable.cs:25
droid.Runtime.Utilities
droid.Runtime.Utilities.Structs.Space1
Definition:
Space1.cs:11
droid.Runtime.Messaging.Messages.Configuration
Definition:
Configuration.cs:7
droid.Runtime.Interfaces.IConfigurableConfiguration.ConfigurableName
string ConfigurableName
Definition:
IConfigurableConfiguration.cs:4
droid.Runtime.Interfaces.IConfigurableConfiguration
Definition:
IConfigurableConfiguration.cs:2
droid.Runtime.Prototyping.Configurables.Experimental.ExternalTextureConfigurable.UnRegisterComponent
override void UnRegisterComponent()
Definition:
ExternalTextureConfigurable.cs:38
droid.Runtime
droid.Runtime.Prototyping.Configurables.Configurable
Definition:
Configurable.cs:17
droid.Runtime.Prototyping.Configurables.Experimental.ExternalTextureConfigurable
Definition:
ExternalTextureConfigurable.cs:14
droid.Runtime.Prototyping.Configurables.Experimental.ExternalTextureConfigurable.SampleConfigurations
override Configuration [] SampleConfigurations()
Definition:
ExternalTextureConfigurable.cs:65
droid.Runtime.Utilities.Structs.Space1.ZeroOne
static Space1 ZeroOne
Definition:
Space1.cs:85
UnityEngine
droid.Runtime.Messaging
Runtime
Prototyping
Configurables
Experimental
ExternalTextureConfigurable.cs
Generated by
1.8.13