//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
void EffectNodeRing::InitializeRenderedInstance(Instance& instance, Manager* manager)
{
	auto instanceGlobal = instance.m_pContainer->GetRootInstance();

	InstanceValues& instValues = instance.rendererValues.ring;

	InitializeSingleValues(ViewingAngle, instValues.viewingAngle, manager, instanceGlobal);

	InitializeLocationValues(OuterLocation, instValues.outerLocation, manager, instanceGlobal);
	InitializeLocationValues(InnerLocation, instValues.innerLocation, manager, instanceGlobal);
	
	InitializeSingleValues(CenterRatio, instValues.centerRatio, manager, instanceGlobal);

	InitializeColorValues(OuterColor, instValues.outerColor, manager, instanceGlobal);
	InitializeColorValues(CenterColor, instValues.centerColor, manager, instanceGlobal);
	InitializeColorValues(InnerColor, instValues.innerColor, manager, instanceGlobal);

	if (RendererCommon.ColorBindType == BindType::Always || RendererCommon.ColorBindType == BindType::WhenCreating)
	{
		instValues.outerColor.current = color::mul(instValues.outerColor.original, instance.ColorParent);
		instValues.centerColor.current = color::mul(instValues.centerColor.original, instance.ColorParent);
		instValues.innerColor.current = color::mul(instValues.innerColor.original, instance.ColorParent);
	}
	else
	{
		instValues.outerColor.current = instValues.outerColor.original;
		instValues.centerColor.current = instValues.centerColor.original;
		instValues.innerColor.current = instValues.innerColor.original;
	}

	instance.ColorInheritance = instValues.centerColor.current;
}
Example #2
0
//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
void EffectNodeRing::InitializeRenderedInstance(Instance& instance, Manager* manager)
{
	InstanceValues& instValues = instance.rendererValues.ring;

	InitializeSingleValues(ViewingAngle, instValues.viewingAngle, manager);

	InitializeLocationValues(OuterLocation, instValues.outerLocation, manager);
	InitializeLocationValues(InnerLocation, instValues.innerLocation, manager);
	
	InitializeSingleValues(CenterRatio, instValues.centerRatio, manager);

	InitializeColorValues(OuterColor, instValues.outerColor, manager);
	InitializeColorValues(CenterColor, instValues.centerColor, manager);
	InitializeColorValues(InnerColor, instValues.innerColor, manager);
}