forked from Eusth/VRGIN.Template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
457 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,8 @@ sysinfo.txt | |
# Builds | ||
*.apk | ||
*.unitypackage | ||
|
||
*.exe | ||
*.suo | ||
*/bin | ||
*/obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "VRGIN"] | ||
path = VRGIN | ||
url = git@github.com:Eusth/VRGIN.git |
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Xml.Serialization; | ||
using UnityEngine; | ||
using VRGIN.Controls.Speech; | ||
using VRGIN.Core; | ||
using VRGIN.Visuals; | ||
|
||
namespace VRGIN.Template | ||
{ | ||
/// <summary> | ||
/// Context class that can be serialized as an XML. Normally, you would implement this yourself and simply override getters with sensible values. | ||
/// </summary> | ||
[XmlRoot("Context")] | ||
public class ConfigurableContext : IVRManagerContext | ||
{ | ||
DefaultMaterialPalette _Materials; | ||
VRSettings _Settings; | ||
|
||
public ConfigurableContext() | ||
{ | ||
// We'll keep those always the same | ||
_Materials = new DefaultMaterialPalette(); | ||
_Settings = VRSettings.Load<VRSettings>("VRSettings.xml"); | ||
|
||
// Set defaults | ||
ConfineMouse = true; | ||
EnforceDefaultGUIMaterials = true; | ||
GUIAlternativeSortingMode = false; | ||
GuiLayer = "Default"; | ||
GuiFarClipPlane = 1000f; | ||
GuiNearClipPlane = -1000f; | ||
IgnoreMask = 0; | ||
InvisibleLayer = "Ignore Raycast"; | ||
PrimaryColor = Color.cyan; | ||
SimulateCursor = true; | ||
UILayer = "UI"; | ||
UILayerMask = LayerMask.GetMask(UILayer); | ||
UnitToMeter = 1f; | ||
NearClipPlane = 0.1f; | ||
} | ||
|
||
[XmlIgnore] | ||
public IMaterialPalette Materials { get { return _Materials; } } | ||
|
||
[XmlIgnore] | ||
public VRSettings Settings { get { return _Settings; } } | ||
|
||
[XmlIgnore] | ||
public Type VoiceCommandType { get { return typeof(VoiceCommand); } } | ||
|
||
public bool ConfineMouse { get; set; } | ||
|
||
public bool EnforceDefaultGUIMaterials { get; set; } | ||
|
||
public bool GUIAlternativeSortingMode { get; set; } | ||
|
||
public float GuiFarClipPlane { get; set; } | ||
|
||
public string GuiLayer { get; set; } | ||
|
||
public float GuiNearClipPlane { get; set; } | ||
|
||
public int IgnoreMask { get; set; } | ||
|
||
public string InvisibleLayer { get; set; } | ||
|
||
public Color PrimaryColor { get; set; } | ||
|
||
public bool SimulateCursor { get; set; } | ||
|
||
public string UILayer { get; set; } | ||
|
||
public int UILayerMask { get; set; } | ||
|
||
public float UnitToMeter { get; set; } | ||
|
||
public float NearClipPlane { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using VRGIN.Controls; | ||
using VRGIN.Core; | ||
using VRGIN.Helpers; | ||
using VRGIN.Modes; | ||
|
||
namespace VRGIN.Template | ||
{ | ||
class GenericSeatedMode : SeatedMode | ||
{ | ||
protected override IEnumerable<IShortcut> CreateShortcuts() | ||
{ | ||
return base.CreateShortcuts().Concat(new IShortcut[] { | ||
new MultiKeyboardShortcut(new KeyStroke("Ctrl+C"), new KeyStroke("Ctrl+C"), () => { VR.Manager.SetMode<GenericStandingMode>(); }) | ||
}); | ||
} | ||
|
||
protected override void ChangeModeOnControllersDetected() | ||
{ | ||
VR.Manager.SetMode<GenericStandingMode>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using VRGIN.Controls; | ||
using VRGIN.Core; | ||
using VRGIN.Helpers; | ||
using VRGIN.Modes; | ||
|
||
namespace VRGIN.Template | ||
{ | ||
class GenericStandingMode : StandingMode | ||
{ | ||
protected override IEnumerable<IShortcut> CreateShortcuts() | ||
{ | ||
return base.CreateShortcuts().Concat(new IShortcut[] { | ||
new MultiKeyboardShortcut(new KeyStroke("Ctrl+C"), new KeyStroke("Ctrl+C"), () => { VR.Manager.SetMode<GenericSeatedMode>(); }) | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("VRGIN.Template")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("VRGIN.Template")] | ||
[assembly: AssemblyCopyright("Copyright © 2017")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("1f634b93-f4c6-45e9-894d-2f3556a74d67")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Oops, something went wrong.