Added HelpURLs
This commit is contained in:
parent
9771d3e9da
commit
6e75fff440
@ -92,8 +92,8 @@ $(function() {
|
|||||||
<div class="textblock"><p>A neuron is a basic Nucleus. </p>
|
<div class="textblock"><p>A neuron is a basic Nucleus. </p>
|
||||||
<p>A neuron combines the weighted input from other neurons and applies an activation function to it to compute the output value: </p><div class="fragment"><div class="line">Vector3 combination = <a class="code hl_function" href="class_nano_brain_1_1_neuron.html#a61f71c8a24ee7a78783648b0147048a5">NanoBrain::Neuron::Combinator</a>(bias, synapses);</div>
|
<p>A neuron combines the weighted input from other neurons and applies an activation function to it to compute the output value: </p><div class="fragment"><div class="line">Vector3 combination = <a class="code hl_function" href="class_nano_brain_1_1_neuron.html#a61f71c8a24ee7a78783648b0147048a5">NanoBrain::Neuron::Combinator</a>(bias, synapses);</div>
|
||||||
<div class="line">Vector3 output = <a class="code hl_function" href="class_nano_brain_1_1_neuron.html#a89bb3565b62b372f9a9baad1b4657fc5">NanoBrain::Neuron::Activator</a>(combination);</div>
|
<div class="line">Vector3 output = <a class="code hl_function" href="class_nano_brain_1_1_neuron.html#a89bb3565b62b372f9a9baad1b4657fc5">NanoBrain::Neuron::Activator</a>(combination);</div>
|
||||||
<div class="ttc" id="aclass_nano_brain_1_1_neuron_html_a61f71c8a24ee7a78783648b0147048a5"><div class="ttname"><a href="class_nano_brain_1_1_neuron.html#a61f71c8a24ee7a78783648b0147048a5">NanoBrain.Neuron.Combinator</a></div><div class="ttdeci">float3 Combinator(float3 bias, List< Synapse > synapses)</div><div class="ttdoc">The combinator which combines the bias with the values from all synapses.</div><div class="ttdef"><b>Definition</b> Neuron.cs:341</div></div>
|
<div class="ttc" id="aclass_nano_brain_1_1_neuron_html_a61f71c8a24ee7a78783648b0147048a5"><div class="ttname"><a href="class_nano_brain_1_1_neuron.html#a61f71c8a24ee7a78783648b0147048a5">NanoBrain.Neuron.Combinator</a></div><div class="ttdeci">float3 Combinator(float3 bias, List< Synapse > synapses)</div><div class="ttdoc">The combinator which combines the bias with the values from all synapses.</div><div class="ttdef"><b>Definition</b> Neuron.cs:340</div></div>
|
||||||
<div class="ttc" id="aclass_nano_brain_1_1_neuron_html_a89bb3565b62b372f9a9baad1b4657fc5"><div class="ttname"><a href="class_nano_brain_1_1_neuron.html#a89bb3565b62b372f9a9baad1b4657fc5">NanoBrain.Neuron.Activator</a></div><div class="ttdeci">float3 Activator(float3 inputValue)</div><div class="ttdoc">Apply the activation function to the input.</div><div class="ttdef"><b>Definition</b> Neuron.cs:441</div></div>
|
<div class="ttc" id="aclass_nano_brain_1_1_neuron_html_a89bb3565b62b372f9a9baad1b4657fc5"><div class="ttname"><a href="class_nano_brain_1_1_neuron.html#a89bb3565b62b372f9a9baad1b4657fc5">NanoBrain.Neuron.Activator</a></div><div class="ttdeci">float3 Activator(float3 inputValue)</div><div class="ttdoc">Apply the activation function to the input.</div><div class="ttdef"><b>Definition</b> Neuron.cs:440</div></div>
|
||||||
</div><!-- fragment --><p> The synapses are connections to other neurons. Each connection has a weight which is used to multiply the output of that other neuron before it is used by the combinator. </p>
|
</div><!-- fragment --><p> The synapses are connections to other neurons. Each connection has a weight which is used to multiply the output of that other neuron before it is used by the combinator. </p>
|
||||||
</div><div class="dynheader">
|
</div><div class="dynheader">
|
||||||
Inheritance diagram for Neuron:</div>
|
Inheritance diagram for Neuron:</div>
|
||||||
|
|||||||
@ -163,7 +163,8 @@ float </td><td class="memItemRight" valign="bottom"><b>output</b><code> [ge
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Performs a sampling function to retrieve a new sensor output value. </p>
|
<p>Performs a sampling function to retrieve a new sensor output value. </p>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>Sensor output value</dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>0.0</dd></dl>
|
||||||
|
<p>This is a dummy implementation which always returns 0.0 because this component is an abstract sensor </p>
|
||||||
|
|
||||||
<p>Reimplemented from <a class="el" href="class_nano_brain_1_1_unity_1_1_braitenberg_1_1_sensor.html#ae66e65fdb243952791ca6ebeb274aef3">Sensor</a>.</p>
|
<p>Reimplemented from <a class="el" href="class_nano_brain_1_1_unity_1_1_braitenberg_1_1_sensor.html#ae66e65fdb243952791ca6ebeb274aef3">Sensor</a>.</p>
|
||||||
|
|
||||||
|
|||||||
@ -157,7 +157,8 @@ float </td><td class="memItemRight" valign="bottom"><b>output</b><code> [ge
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Performs a sampling function to retrieve a new sensor output value. </p>
|
<p>Performs a sampling function to retrieve a new sensor output value. </p>
|
||||||
<dl class="section return"><dt>Returns</dt><dd>Sensor output value</dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>0.0</dd></dl>
|
||||||
|
<p>This is a dummy implementation which always returns 0.0 because this component is an abstract sensor </p>
|
||||||
|
|
||||||
<p>Reimplemented in <a class="el" href="class_nano_brain_1_1_unity_1_1_braitenberg_1_1_light_sensor.html#a8ddb9bc511dd66660dd4dda864b3c761">LightSensor</a>, and <a class="el" href="class_nano_brain_1_1_unity_1_1_braitenberg_1_1_touch_sensor.html#a8ddb9bc511dd66660dd4dda864b3c761">TouchSensor</a>.</p>
|
<p>Reimplemented in <a class="el" href="class_nano_brain_1_1_unity_1_1_braitenberg_1_1_light_sensor.html#a8ddb9bc511dd66660dd4dda864b3c761">LightSensor</a>, and <a class="el" href="class_nano_brain_1_1_unity_1_1_braitenberg_1_1_touch_sensor.html#a8ddb9bc511dd66660dd4dda864b3c761">TouchSensor</a>.</p>
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a9c7f0b34010ecd7e91e6daf22bd48f7
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4e39f2f342374e237beb37f70f727762
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 96024856ea208e4728e8e86944379590
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 13
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMipmapLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
customData:
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spriteCustomMetadata:
|
||||||
|
entries: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e6d9a9d410b135977b2794b9901f8495
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 13
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMipmapLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
customData:
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spriteCustomMetadata:
|
||||||
|
entries: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1678,8 +1678,9 @@ Performs a sampling function to retrieve a new sensor output value. }}\par
|
|||||||
\par
|
\par
|
||||||
{{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid
|
{{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid
|
||||||
Returns\par}\pard\plain \s82\li720\widctlpar\ql\adjustright \fs20\cgrid {\s17 \sa60 \sb30
|
Returns\par}\pard\plain \s82\li720\widctlpar\ql\adjustright \fs20\cgrid {\s17 \sa60 \sb30
|
||||||
Sensor output value\par
|
0.0\par
|
||||||
}}}{
|
}}This is a dummy implementation which always returns 0.0 because this component is an abstract sensor \par
|
||||||
|
}{
|
||||||
Reimplemented from {\field {\*\fldinst { HYPERLINK \\l "AAAAAAAAEW" }{}}{\fldrslt {\cs37\ul\cf2 Sensor}}}
|
Reimplemented from {\field {\*\fldinst { HYPERLINK \\l "AAAAAAAAEW" }{}}{\fldrslt {\cs37\ul\cf2 Sensor}}}
|
||||||
.}\par
|
.}\par
|
||||||
}
|
}
|
||||||
@ -5427,8 +5428,9 @@ Performs a sampling function to retrieve a new sensor output value. }}\par
|
|||||||
\par
|
\par
|
||||||
{{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid
|
{{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid
|
||||||
Returns\par}\pard\plain \s82\li720\widctlpar\ql\adjustright \fs20\cgrid {\s17 \sa60 \sb30
|
Returns\par}\pard\plain \s82\li720\widctlpar\ql\adjustright \fs20\cgrid {\s17 \sa60 \sb30
|
||||||
Sensor output value\par
|
0.0\par
|
||||||
}}}{
|
}}This is a dummy implementation which always returns 0.0 because this component is an abstract sensor \par
|
||||||
|
}{
|
||||||
Reimplemented in {\field {\*\fldinst { HYPERLINK \\l "AAAAAAAAET" }{}}{\fldrslt {\cs37\ul\cf2 LightSensor}}}
|
Reimplemented in {\field {\*\fldinst { HYPERLINK \\l "AAAAAAAAET" }{}}{\fldrslt {\cs37\ul\cf2 LightSensor}}}
|
||||||
, and {\field {\*\fldinst { HYPERLINK \\l "AAAAAAAAFD" }{}}{\fldrslt {\cs37\ul\cf2 TouchSensor}}}
|
, and {\field {\*\fldinst { HYPERLINK \\l "AAAAAAAAFD" }{}}{\fldrslt {\cs37\ul\cf2 TouchSensor}}}
|
||||||
.}\par
|
.}\par
|
||||||
|
|||||||
7
Documentation/html/search/classes_6.js.meta
Normal file
7
Documentation/html/search/classes_6.js.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3a660a0c5a6eac121a2f0c1f9a59e1fe
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
7
Documentation/html/search/classes_7.js.meta
Normal file
7
Documentation/html/search/classes_7.js.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 793684c257751ca56b7f66cae0c8ec7b
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
7
Documentation/html/search/properties_8.js.meta
Normal file
7
Documentation/html/search/properties_8.js.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bb515f8df2b8fd885840d93140450f0d
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
7
Documentation/html/search/variables_d.js.meta
Normal file
7
Documentation/html/search/variables_d.js.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c6bd8d0abaaba24d785386f2a141a6d7
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -6,6 +6,7 @@ namespace NanoBrain.Unity {
|
|||||||
/// The Unity ScriptableObject to implement re-usable Cluster Prefabs
|
/// The Unity ScriptableObject to implement re-usable Cluster Prefabs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[CreateAssetMenu(menuName = "Passer/Cluster")]
|
[CreateAssetMenu(menuName = "Passer/Cluster")]
|
||||||
|
[HelpURL("https://passer.life/documentation/nanobrain/Documentation/html/class_nano_brain_1_1_unity_1_1_cluster_prefab.html")]
|
||||||
public class ClusterPrefab : ScriptableObject {
|
public class ClusterPrefab : ScriptableObject {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ namespace NanoBrain.Unity.Braitenberg {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A light sensor
|
/// A light sensor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[HelpURL("https://passer.life/documentation/nanobrain/Documentation/html/class_nano_brain_1_1_unity_1_1_braitenberg_1_1_light_sensor.html")]
|
||||||
public class LightSensor : Sensor {
|
public class LightSensor : Sensor {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If true, perform occlusion checks with raycasts
|
/// If true, perform occlusion checks with raycasts
|
||||||
|
|||||||
@ -6,6 +6,7 @@ namespace NanoBrain.Unity.Braitenberg {
|
|||||||
/// A powered wheel collider, controlled by a NanoBrain::Neuron
|
/// A powered wheel collider, controlled by a NanoBrain::Neuron
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RequireComponent(typeof(WheelCollider))]
|
[RequireComponent(typeof(WheelCollider))]
|
||||||
|
[HelpURL("https://passer.life/documentation/nanobrain/Documentation/html/class_nano_brain_1_1_unity_1_1_braitenberg_1_1_motor.html")]
|
||||||
public class Motor : MonoBehaviour {
|
public class Motor : MonoBehaviour {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The name of the NanoBrain::Neuron to control this wheel
|
/// The name of the NanoBrain::Neuron to control this wheel
|
||||||
|
|||||||
@ -7,6 +7,7 @@ namespace NanoBrain.Unity.Braitenberg {
|
|||||||
/// A non-directional sensor
|
/// A non-directional sensor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// The sensor has a field of view, but the signal returned does not include a direction
|
/// The sensor has a field of view, but the signal returned does not include a direction
|
||||||
|
[HelpURL("https://passer.life/documentation/nanobrain/Documentation/html/class_nano_brain_1_1_unity_1_1_braitenberg_1_1_sensor.html")]
|
||||||
public class Sensor : MonoBehaviour {
|
public class Sensor : MonoBehaviour {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Maximum distance the sensor detects anything
|
/// Maximum distance the sensor detects anything
|
||||||
@ -79,27 +80,11 @@ namespace NanoBrain.Unity.Braitenberg {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs a sampling function to retrieve a new sensor output value
|
/// Performs a sampling function to retrieve a new sensor output value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Sensor output value</returns>
|
/// <returns>0.0</returns>
|
||||||
// Cast a short set of rays in a cone and accumulate "brightness" from hits.
|
/// This is a dummy implementation which always returns 0.0
|
||||||
|
/// because this component is an abstract sensor
|
||||||
protected virtual float SampleSensor() {
|
protected virtual float SampleSensor() {
|
||||||
int rays = 7;
|
return 0.0f;
|
||||||
float halfAngle = 30f;
|
|
||||||
float total = 0f;
|
|
||||||
|
|
||||||
for (int i = 0; i < rays; i++) {
|
|
||||||
float t = rays == 1 ? 0.5f : (float)i / (rays - 1);
|
|
||||||
float angle = Mathf.Lerp(-halfAngle, halfAngle, t);
|
|
||||||
Vector3 dir = Quaternion.AngleAxis(angle, this.transform.up) * this.transform.forward;
|
|
||||||
|
|
||||||
//Debug.DrawRay(this.transform.position, dir * sensorRange);
|
|
||||||
if (Physics.Raycast(this.transform.position, dir, out RaycastHit hit, sensorRange, senseLayer)) {
|
|
||||||
// Strength inversely proportional to distance, clamped to [0,1]
|
|
||||||
float str = 1f - (hit.distance / sensorRange);
|
|
||||||
// You can also sample material emission or color here if desired
|
|
||||||
total += Mathf.Clamp01(str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Mathf.Clamp01(total / rays);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5,6 +5,7 @@ namespace NanoBrain.Unity.Braitenberg {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A sensor which can detect contacts with static GameObjects or Rigidbodies
|
/// A sensor which can detect contacts with static GameObjects or Rigidbodies
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[HelpURL("https://passer.life/documentation/nanobrain/Documentation/html/class_nano_brain_1_1_unity_1_1_braitenberg_1_1_touch_sensor.html")]
|
||||||
public class TouchSensor : Sensor {
|
public class TouchSensor : Sensor {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -6,6 +6,7 @@ namespace NanoBrain.Unity.Braitenberg {
|
|||||||
/// A Braitenberg style vehicle with two sensors and two motors, powered by a Nanobrain
|
/// A Braitenberg style vehicle with two sensors and two motors, powered by a Nanobrain
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RequireComponent(typeof(Rigidbody))]
|
[RequireComponent(typeof(Rigidbody))]
|
||||||
|
[HelpURL("https://passer.life/documentation/nanobrain/Documentation/html/class_nano_brain_1_1_unity_1_1_braitenberg_1_1_vehicle.html")]
|
||||||
public class Vehicle : MonoBehaviour {
|
public class Vehicle : MonoBehaviour {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The NanoBrain::Cluster controlling the vehicle
|
/// The NanoBrain::Cluster controlling the vehicle
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user