private static void ComposeRoot(Root node, StringBuilder expr) { expr.Append(s_Slash); }
private bool Setup() { root = new Root(); SetupResources(); bool carryOn = Configure(true); if (!carryOn) return false; ChooseSceneManager(); CreateCamera(); CreateViewports(); // Set default mipmap level (NB some APIs ignore this) TextureManager.Singleton.DefaultNumMipmaps = 5; // Create any resource listeners (for loading screens) CreateResourceListener(); // Load resources LoadResources(); // Create the scene CreateScene(); CreateFrameListener(); CreateInput(); return true; }
//>> LocationPathPattern ::= '/' | RelativePathPattern | '//' RelativePathPattern | '/' RelativePathPattern //>> | IdKeyPattern (('/' | '//') RelativePathPattern)? private AstNode ParseLocationPathPattern(AstNode qyInput) { AstNode opnd = null; switch (this.scanner.Kind) { case XPathScanner.LexKind.Slash : NextLex(); opnd = new Root(); if (this.scanner.Kind == XPathScanner.LexKind.Eof || this.scanner.Kind == XPathScanner.LexKind.Union) { return opnd; } break; case XPathScanner.LexKind.SlashSlash : NextLex(); opnd = new Axis(Axis.AxisType.DescendantOrSelf, new Root()); break; case XPathScanner.LexKind.Name : if (this.scanner.CanBeFunction) { opnd = ParseIdKeyPattern(qyInput); if (opnd != null) { switch (this.scanner.Kind) { case XPathScanner.LexKind.Slash : NextLex(); break; case XPathScanner.LexKind.SlashSlash : NextLex(); opnd = new Axis(Axis.AxisType.DescendantOrSelf, opnd); break; default : return opnd; } } } break; } return ParseRelativePathPattern(opnd); }
public void Go() { // show toolbox if (DebugMode){ (new Toolbox()).Show(); } if (!Setup()) return; root.StartRendering(); // clean up DestroyScene(); root.Dispose(); root = null; }
//>> LocationPath ::= RelativeLocationPath | AbsoluteLocationPath private AstNode ParseLocationPath(AstNode qyInput) { if (this.scanner.Kind == XPathScanner.LexKind.Slash) { NextLex(); AstNode opnd = new Root(); if (IsStep(this.scanner.Kind)) { opnd = ParseRelativeLocationPath(opnd); } return opnd; } else if (this.scanner.Kind == XPathScanner.LexKind.SlashSlash) { NextLex(); return ParseRelativeLocationPath(new Axis(Axis.AxisType.DescendantOrSelf, new Root())); } else { return ParseRelativeLocationPath(qyInput); } } // ParseLocationPath