Axiom.SceneManagers.Bsp.BspSceneManager.SetWorldGeometry C# (CSharp) Method

SetWorldGeometry() public method

public SetWorldGeometry ( Stream stream, string typeName ) : void
stream Stream
typeName string
return void
		public override void SetWorldGeometry( Stream stream, string typeName )
		{
			// Load using resource manager
			this.level = (BspLevel)BspResourceManager.Instance.Load( stream, ResourceGroupManager.Instance.WorldResourceGroupName );

			//if (this.level.IsSkyEnabled)
			//{
			//    // Quake3 is always aligned with Z upwards
			//    Quaternion q = Quaternion.FromAngleAxis(Utility.HALF_PI, Vector3.UnitX);
			//    // Also draw last, and make close to camera (far clip plane is shorter)
			//    SetSkyDome(true, this.level.SkyMaterialName, this.level.SkyCurvature, 12, 2000, false, q);
			//}
			//else
			//{
			//    SetSkyDome(false, String.Empty);
			//}

			// Init static render operation
			this.renderOp.vertexData = this.level.VertexData;
			// index data is per-frame
			this.renderOp.indexData = new IndexData();
			this.renderOp.indexData.indexStart = 0;
			this.renderOp.indexData.indexCount = 0;
			// Create enough index space to render whole level
			this.renderOp.indexData.indexBuffer = HardwareBufferManager.Instance
				.CreateIndexBuffer(
					IndexType.Size32, // always 32-bit
					this.level.NumIndexes,
					BufferUsage.DynamicWriteOnlyDiscardable, false );

			this.renderOp.operationType = OperationType.TriangleList;
			this.renderOp.useIndices = true;
		}

Same methods

BspSceneManager::SetWorldGeometry ( string filename ) : void