mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	 767e374dce
			
		
	
	
		767e374dce
		
	
	
	
	
		
			
			Since Embree v3.13.0 supports AARCH64, switch back to the official repo instead of using Embree-aarch64. `thirdparty/embree/patches/godot-changes.patch` should now contain an accurate diff of the changes done to the library.
		
			
				
	
	
		
			41 lines
		
	
	
	
		
			891 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
	
		
			891 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // Copyright 2009-2021 Intel Corporation
 | |
| // SPDX-License-Identifier: Apache-2.0
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include "accel.h"
 | |
| #include "builder.h"
 | |
| 
 | |
| namespace embree
 | |
| {
 | |
|   class AccelInstance : public Accel
 | |
|   {
 | |
|   public:
 | |
|     AccelInstance (AccelData* accel, Builder* builder, Intersectors& intersectors)
 | |
|       : Accel(AccelData::TY_ACCEL_INSTANCE,intersectors), accel(accel), builder(builder) {}
 | |
| 
 | |
|     void immutable () {
 | |
|       builder.reset(nullptr);
 | |
|     }
 | |
| 
 | |
|   public:
 | |
|     void build () {
 | |
|       if (builder) builder->build();
 | |
|       bounds = accel->bounds;
 | |
|     }
 | |
| 
 | |
|     void deleteGeometry(size_t geomID) {
 | |
|       if (accel  ) accel->deleteGeometry(geomID);
 | |
|       if (builder) builder->deleteGeometry(geomID);
 | |
|     }
 | |
|     
 | |
|     void clear() {
 | |
|       if (accel) accel->clear();
 | |
|       if (builder) builder->clear();
 | |
|     }
 | |
| 
 | |
|   private:
 | |
|     std::unique_ptr<AccelData> accel;
 | |
|     std::unique_ptr<Builder> builder;
 | |
|   };
 | |
| }
 |