Exemple #1
0
void Light::applyOnlyRotation(int projection_nb)
{
	if(m_type == OMNI)
		return;
	if(m_type == SUN)
	{
#ifdef MERGEFORSUN
		return;
#endif
		Viewpoint* targetVp = RENDER_MANAGER.getRenderPassInfo()->lod_viewpoint;
		targetVp->applyOnlyRotation(projection_nb);
		return;
	}

	Transformf trans(node()->getGlobalTransform());
	Matrix3d rotation = trans.getRotation();
	Transformf transform(rotation.getInverse(),Vector3f(),Vector3f(1,1,1));
	transform.glMultd();
}