コード例 #1
0
	void CoreObject2D_Imp::SetCullingUpdate(CoreObject2D_Imp* obj)
	{
#if __CULLING_2D__

		for (auto ite = obj->children.begin(); ite != obj->children.end();)
		{
			if (!(*ite)->GetIsAlive())
			{
				obj->children.erase(ite++);
			}
			else
			{
				ite++;
			}
		}


		if (!obj->GetAlreadyCullingUpdated())
		{
			if (obj->GetLayer() != nullptr&&obj->GetIsAlive())
			{
				auto layerImp = (CoreLayer2D_Imp*)obj->GetLayer();
				layerImp->AddTransformedObject(obj->GetCullingObject());
			}
			obj->SetAlreadyCullingUpdated(true);
		}

		for (auto& cld : obj->children)
		{
			auto cld_Imp = CoreObject2DToImp(cld);
			SetCullingUpdate(cld_Imp);
		}
#endif
	}
コード例 #2
0
	void CoreGeometryObject2D_Imp::SetShape(CoreShape* shape)
	{
		SetCullingUpdate(this);
		if (m_shape != nullptr)
		{
			CoreShape2DToImp(m_shape)->SetGeometryObject2D(nullptr);
		}
		CoreShape2DToImp(shape)->SetGeometryObject2D(this);
		SafeSubstitute(m_shape, shape);
	}
コード例 #3
0
	void CoreGeometryObject2D_Imp::SetCenterPosition(Vector2DF position)
	{
		SetCullingUpdate(this);
		centerPosition = centerPosition;
	}
コード例 #4
0
	void CoreGeometryObject2D_Imp::SetIsUpdateBoundingCircle()
	{
		SetCullingUpdate(this);
	}