Update Unity wrapper with c# changes, added SLAM sample for T265, som… · IntelRealSense/librealsense@9841e2d · GitHub
Skip to content

Commit

Permalink
Update Unity wrapper with c# changes, added SLAM sample for T265, som…
Browse files Browse the repository at this point in the history
…e UI changes and other fixes.
  • Loading branch information
ogoshen committed Feb 19, 2019
1 parent 45eb153 commit 9841e2d
Show file tree
Hide file tree
Showing 84 changed files with 11,517 additions and 4,736 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ private float GetElementHeightCallback(int index)
enterChildren = false;
}

iterator.Dispose();
obj.Dispose();

return h;
}

Expand All @@ -164,26 +167,6 @@ private void DrawListHeader(Rect rect)
GUI.Label(rect, "Processing Blocks");
}

private static GUIStyle inspectorTitlebar;
private static GUIStyle inspectorTitlebarText;

public static bool InspectorFoldout(Rect position, bool foldout, UnityEngine.Object[] targetObjs)
{
if (inspectorTitlebar == null)
{
inspectorTitlebar = "IN Title";
inspectorTitlebarText = "IN TitleText";
}

foldout = EditorGUI.Foldout(position, foldout, GUIContent.none, true, inspectorTitlebar);

position = inspectorTitlebar.padding.Remove(position);
if (Event.current.type == EventType.Repaint)
inspectorTitlebarText.Draw(position, ObjectNames.GetInspectorTitle(targetObjs[0]), false, false, foldout, false);

return foldout;
}

private void DrawListElement(Rect rect, int index, bool isActive, bool isFocused)
{
var item = _property.GetArrayElementAtIndex(index);
Expand All @@ -206,6 +189,7 @@ private void DrawListElement(Rect rect, int index, bool isActive, bool isFocused
if (!item.isExpanded)
{
obj.ApplyModifiedProperties();
obj.Dispose();
return;
}

Expand All @@ -226,8 +210,8 @@ private void DrawListElement(Rect rect, int index, bool isActive, bool isFocused
enterChildren = false;
r.y += r.height + 4f;
}

obj.ApplyModifiedProperties();
obj.Dispose();
}

protected override bool ShouldHideOpenButton()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Material:
m_PrefabInternal: {fileID: 0}
m_Name: ARBackgroundMat
m_Shader: {fileID: 4800000, guid: 66fdfcada2704184485a90166c079a87, type: 3}
m_ShaderKeywords: _COLORMAP_VIRIDIS
m_ShaderKeywords: _COLORMAP_RAINBOW
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
Expand All @@ -31,7 +31,8 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Colormap: 6
- _Colormap: 4
- _MaxRange: 5.4285717
- _MinRange: 0
m_Colors: []
m_Colors:
- _BgColor: {r: 0.003921569, g: 0.7098039, b: 0.9333333, a: 1}
100 changes: 100 additions & 0 deletions wrappers/unity/Assets/RealSenseSDK2.0/Materials/GridMatMajor.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: GridMatMajor
m_Shader: {fileID: 4800000, guid: 836d1e4aaa198ef439a5f3299f2e3630, type: 3}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _COLORCOLOR_ON _EMISSION
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BlendOp: 0
- _BumpScale: 1
- _CameraFadingEnabled: 0
- _CameraFarFadeDistance: 2
- _CameraNearFadeDistance: 1
- _ColorMode: 4
- _Cull: 2
- _Cutoff: 0.425
- _DetailNormalMapScale: 1
- _DistortionBlend: 0.5
- _DistortionEnabled: 0
- _DistortionStrength: 1
- _DistortionStrengthScaled: 0
- _DstBlend: 10
- _EmissionEnabled: 0
- _FlipbookMode: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 1
- _LightingEnabled: 0
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Shininess: 0.7
- _SmoothnessTextureChannel: 0
- _SoftParticlesEnabled: 0
- _SoftParticlesFarFadeDistance: 1
- _SoftParticlesNearFadeDistance: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 0
m_Colors:
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 0.5019608}
- _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
- _Emission: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 1, g: 1, b: 1, a: 0}
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 100 additions & 0 deletions wrappers/unity/Assets/RealSenseSDK2.0/Materials/GridMatMinor.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: GridMatMinor
m_Shader: {fileID: 4800000, guid: 836d1e4aaa198ef439a5f3299f2e3630, type: 3}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _COLORCOLOR_ON _EMISSION
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BlendOp: 0
- _BumpScale: 1
- _CameraFadingEnabled: 0
- _CameraFarFadeDistance: 2
- _CameraNearFadeDistance: 1
- _ColorMode: 4
- _Cull: 2
- _Cutoff: 0.425
- _DetailNormalMapScale: 1
- _DistortionBlend: 0.5
- _DistortionEnabled: 0
- _DistortionStrength: 1
- _DistortionStrengthScaled: 0
- _DstBlend: 10
- _EmissionEnabled: 0
- _FlipbookMode: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 1
- _LightingEnabled: 0
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Shininess: 0.7
- _SmoothnessTextureChannel: 0
- _SoftParticlesEnabled: 0
- _SoftParticlesFarFadeDistance: 1
- _SoftParticlesNearFadeDistance: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 0
m_Colors:
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 0.11764706}
- _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
- _Emission: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 1, g: 1, b: 1, a: 0}
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PointCloudMat
m_Shader: {fileID: 4800000, guid: 3a8f8c691fcc38d4c956485dfc073ab4, type: 3}
Expand Down
Loading

0 comments on commit 9841e2d

Please sign in to comment.