Added ability to pass min and max speeds to Blobs.
This commit is contained in:
		
							parent
							
								
									a29e93ca55
								
							
						
					
					
						commit
						d340430e85
					
				
					 4 changed files with 12 additions and 2 deletions
				
			
		|  | @ -22,7 +22,11 @@ Blobs::Blobs( | ||||||
| 
 | 
 | ||||||
| void Blobs::init() { | void Blobs::init() { | ||||||
| 	for (const auto &data : _blobDatas) { | 	for (const auto &data : _blobDatas) { | ||||||
| 		auto blob = Paint::RadialBlob(data.segmentsCount, data.minScale); | 		auto blob = Paint::RadialBlob( | ||||||
|  | 			data.segmentsCount, | ||||||
|  | 			data.minScale, | ||||||
|  | 			data.minSpeed, | ||||||
|  | 			data.maxSpeed); | ||||||
| 		blob.setRadiuses({ data.minRadius, data.maxRadius }); | 		blob.setRadiuses({ data.minRadius, data.maxRadius }); | ||||||
| 		blob.generateBlob(); | 		blob.generateBlob(); | ||||||
| 		_blobs.push_back(std::move(blob)); | 		_blobs.push_back(std::move(blob)); | ||||||
|  |  | ||||||
|  | @ -22,6 +22,8 @@ public: | ||||||
| 		float maxRadius = 0; | 		float maxRadius = 0; | ||||||
| 		float speedScale = 0; | 		float speedScale = 0; | ||||||
| 		float alpha = 0; | 		float alpha = 0; | ||||||
|  | 		float minSpeed = 0; | ||||||
|  | 		float maxSpeed = 0; | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	Blobs( | 	Blobs( | ||||||
|  |  | ||||||
|  | @ -26,7 +26,9 @@ void LinearBlobs::init() { | ||||||
| 	for (const auto &data : _blobDatas) { | 	for (const auto &data : _blobDatas) { | ||||||
| 		auto blob = Paint::LinearBlob( | 		auto blob = Paint::LinearBlob( | ||||||
| 			data.segmentsCount, | 			data.segmentsCount, | ||||||
| 			_direction); | 			_direction, | ||||||
|  | 			data.minSpeed, | ||||||
|  | 			data.maxSpeed); | ||||||
| 		blob.setRadiuses({ data.minRadius, data.idleRadius }); | 		blob.setRadiuses({ data.minRadius, data.idleRadius }); | ||||||
| 		blob.generateBlob(); | 		blob.generateBlob(); | ||||||
| 		_blobs.push_back(std::move(blob)); | 		_blobs.push_back(std::move(blob)); | ||||||
|  |  | ||||||
|  | @ -22,6 +22,8 @@ public: | ||||||
| 		float idleRadius = 0; | 		float idleRadius = 0; | ||||||
| 		float speedScale = 0; | 		float speedScale = 0; | ||||||
| 		float alpha = 0; | 		float alpha = 0; | ||||||
|  | 		float minSpeed = 0; | ||||||
|  | 		float maxSpeed = 0; | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	LinearBlobs( | 	LinearBlobs( | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 23rd
						23rd