Example #1
0
void LightSceneNode_SetLight(IntPtr light, M_SCOLORF ambient, 
                             M_SCOLORF diffuse, 
                             M_SCOLORF specular, 
                             M_VECT3DF pos,
                             M_VECT3DF dir,
                             M_VECT3DF attenuation,
                             float falloff,
                             float innercone,
                             float outercone,
                             float radius, 
                             bool castshadows, 
                             E_LIGHT_TYPE type)
{
    SLight slight = ((ILightSceneNode*)light)->getLightData();
    slight.AmbientColor = MU_SCOLORF(ambient);
    slight.DiffuseColor = MU_SCOLORF(diffuse);
    slight.SpecularColor = MU_SCOLORF(specular);
    slight.Position = MU_VECT3DF(pos);
    slight.Direction = MU_VECT3DF(dir);
    slight.Attenuation = MU_VECT3DF (attenuation);
    slight.Falloff = falloff;
    slight.InnerCone = innercone;
    slight.OuterCone = outercone;
    slight.Radius = radius;
    slight.CastShadows = castshadows;
    slight.Type = type;
	((ILightSceneNode*)light)->getLightData() = slight;
}
Example #2
0
IntPtr SceneManager_AddLightSceneNode(IntPtr scenemanager, IntPtr parent, M_VECT3DF position, M_SCOLORF color, float radius, int id)
{
   return GetSceneFromIntPtr(scenemanager)->addLightSceneNode((ISceneNode*) parent, MU_VECT3DF(position), MU_SCOLORF(color), radius, id);
}