Example #1
0
WARP *Copy_Warps (WARP *Old)
{
	WARP *New;

	if (Old != NULL)
	{
		New=Create_Warp(Old->Warp_Type);

		switch (Old->Warp_Type)
		{
			case CYLINDRICAL_WARP:
				POV_MEMCPY(New,Old,sizeof(CYLW));
				break;

			case PLANAR_WARP:
				POV_MEMCPY(New,Old,sizeof(PLANARW));
				break;

			case SPHERICAL_WARP:
				POV_MEMCPY(New,Old,sizeof(SPHEREW));
				break;

			case TOROIDAL_WARP:
				POV_MEMCPY(New,Old,sizeof(TOROIDAL));
				break;

			case CLASSIC_TURB_WARP:
			case EXTRA_TURB_WARP:
				POV_MEMCPY(New,Old,sizeof(TURB));
				break;

			case REPEAT_WARP:
				POV_MEMCPY(New,Old,sizeof(REPEAT));
				break;

			case BLACK_HOLE_WARP:
				POV_MEMCPY(New,Old,sizeof(BLACK_HOLE));
				break;

			case TRANSFORM_WARP:
				POV_MEMCPY(New,Old,sizeof(TRANS));
				break;

			// JN2007: Cubic warp
			case CUBIC_WARP:
				POV_MEMCPY(New,Old,sizeof(WARP));
				break;
		}
		New->Next_Warp = Copy_Warps(Old->Next_Warp);
		if(New->Next_Warp != NULL)
			New->Next_Warp->Prev_Warp = New;
	}
	else
	{
		New = NULL;
	}
	return(New);
}
Example #2
0
FOG *Copy_Fog(const FOG *Old)
{
	FOG *New;

	New = Create_Fog();

	*New = *Old;

	New->Turb = reinterpret_cast<TURB *>(Copy_Warps((reinterpret_cast<WARP *>(Old->Turb))));

	return (New);
}
Example #3
0
FOG *Copy_Fog(const FOG *Old)
{
	FOG *New;

	New = Create_Fog();

	*New = *Old;

	New->Turb = (TURB *)Copy_Warps(((WARP *)Old->Turb));

	return (New);
}