Ejemplo n.º 1
0
	void SourcesManager::clearAll()
	{

		for(int i = 0; i <= getMaximumIndexOfSource(); i++)
			sourceRemove(i);
		for(int i = 0; i <= getMaximumIndexOfGroup(); i++)
			groupRemove(i);
	}
Ejemplo n.º 2
0
	void SourcesManager::groupRemoveWithSources(long groupIndex)
	{
		for(int i = 0; i < getMaximumIndexOfSource(); i++)
		{
			if (m_sources[i]->isOwnedByGroup(groupIndex)) {
				sourceRemove(i);
			}
		}
		groupRemove(groupIndex);
	}
Ejemplo n.º 3
0
    void SourcesManager::sourceNewPolar(double radius, double azimuth, double elevation)
	{
		for (int i = 0; i < getMaximumIndexOfSource()+2; i++)
		{
			if(!sourceGetExistence(i))
			{
				sourceSetPolar(i, radius, azimuth, elevation);
				return;
			}
		}
	}
Ejemplo n.º 4
0
    void SourcesManager::sourceNewCartesian(double abscissa, double ordinate, double height)
	{
		for(int i = 0; i < getMaximumIndexOfSource()+2; i++)
		{
			if(!sourceGetExistence(i))
			{
				sourceSetCartesian(i, abscissa, ordinate, height);
				return;
			}
		}
	}
Ejemplo n.º 5
0
	void SourcesManager::copyTo(SourcesManager* sourcesManagerDestination)
	{
		double* color;
		sourcesManagerDestination->setExistence(0);
		if(getExistence() == 1)
		{
			sourcesManagerDestination->setExistence(1);
			sourcesManagerDestination->setMaximumRadius(getLimitMaximum());
			
			for(long i = 0; i <= getMaximumIndexOfSource(); i++)
			{
				if(sourceGetExistence(i) == 1)
				{
					color = sourceGetColor(i);
					sourcesManagerDestination->sourceSetRadius(i, sourceGetRadius(i));
					sourcesManagerDestination->sourceSetAzimuth(i, sourceGetAzimuth(i));
					sourcesManagerDestination->sourceSetElevation(i, sourceGetElevation(i));
					sourcesManagerDestination->sourceSetColor(i, color[0], color[1], color[2], color[3]);
					sourcesManagerDestination->sourceSetDescription(i, sourceGetDescription(i));
					sourcesManagerDestination->sourceSetMute(i, sourceGetMute(i));
				}
			}
			for(long i = 0; i <= getMaximumIndexOfGroup(); i++)
			{
				if(groupGetExistence(i) == 1)
				{
					for(long j = 0; j < groupGetNumberOfSources(i); j++)
					{
						sourcesManagerDestination->groupSetSource(i, groupGetSourceIndex(i, j));
					}
					color = groupGetColor(i);
					sourcesManagerDestination->groupSetColor(i, color[0], color[1], color[2], color[3]);
					sourcesManagerDestination->groupSetDescription(i, groupGetDescription(i));
				}
			}
		}
	}