示例#1
0
文件: Draw.cpp 项目: 1170390/OpenNI2
void drawSelectionChanged(SelectionState state, IntRect selection)
{
	g_DrawUserInput.State = state;
	g_DrawUserInput.Rect = selection;

	if (state == SELECTION_DONE)
	{
		// Crop depth
		if (getDepthStream().isValid() && isDepthOn() && g_DrawConfig.Streams.Depth.Coloring != DEPTH_OFF)
		{
			drawCropStream(getDepthStream(), g_DrawConfig.DepthLocation, selection, 2);
		}

		// Crop image
		if (getColorStream().isValid() && isColorOn() && g_DrawConfig.Streams.Color.Coloring != COLOR_OFF)
		{
			drawCropStream(getColorStream(), g_DrawConfig.ColorLocation, selection, 4);
		}

		// Crop IR
		if (getIRStream().isValid() && isIROn() && g_DrawConfig.Streams.Color.Coloring != COLOR_OFF)
		{
			drawCropStream(getIRStream(), g_DrawConfig.ColorLocation, selection, 4);
		}
	}
}
示例#2
0
文件: Draw.cpp 项目: Wessi/OpenNI
void drawSelectionChanged(SelectionState state, IntRect selection)
{
	g_DrawUserInput.State = state;
	g_DrawUserInput.Rect = selection;

	if (state == SELECTION_DONE)
	{
		// Crop depth
		if (getDepthGenerator() != NULL && g_DrawConfig.Streams.Depth.Coloring != DEPTH_OFF)
		{
			drawCropStream(getDepthGenerator(), g_DrawConfig.DepthLocation, selection, 2);
		}

		// Crop image
		if (getImageGenerator() != NULL && g_DrawConfig.Streams.Image.Coloring != IMAGE_OFF)
		{
			drawCropStream(getImageGenerator(), g_DrawConfig.ImageLocation, selection, 4);
		}

		// Crop IR
		if (getIRGenerator() != NULL && g_DrawConfig.Streams.Image.Coloring != IMAGE_OFF)
		{
			drawCropStream(getIRGenerator(), g_DrawConfig.ImageLocation, selection, 4);
		}
	}
}