public SavedViews(Camera camera, CoordinateUtility coordinateUtility, BackendRouter backend) { _camera = camera; _coordinateUtility = coordinateUtility; _backend = backend; _entries = new List <Entry>(); }
public GraphicsStreaming(BackendRouter backend, ExportMeshRequestManager meshRequestManager, CoordinateUtility coordinateUtility) { _backend = backend; _meshRequestManager = meshRequestManager; _coordinateUtility = coordinateUtility; _camera = Camera.main; _cameraTransform = _camera.transform; _forceRequest = true; // force initial request }
private void Start() { Physics.queriesHitBackfaces = true; // Address must match ProtobufRpcServer.ts _backend = new BackendRouter("ws://localhost:3005", () => { _isBackendSetup = true; _coordinateUtility.CalculateOffsetFromProjectExtents(); _savedViews.RequestViewsFromBackend(); }); _coordinateUtility = new CoordinateUtility(_backend); _savedViews = new SavedViews(Camera.main, _coordinateUtility, _backend); _userInput = new DesktopUserInput(OpaqueMaterial, _backend, _savedViews); _meshReader = new ElementMeshReader(_coordinateUtility); _meshRequestManager = new ExportMeshRequestManager(_backend, _meshReader); _graphicsStreaming = new GraphicsStreaming(_backend, _meshRequestManager, _coordinateUtility); _textureCache = new TextureCache(_backend); _meshHandler = new ElementGameObjectCreator(OpaqueMaterial, TransparentMaterial, _textureCache); }
private byte[] _meshDataBuffer = new byte[20 * 1024 * 1024]; // try to avoid realloc on big terrain meshes public ElementMeshReader(CoordinateUtility coordinateUtility) { _coordinateUtility = coordinateUtility; }