From: Oliver O. <fr...@us...> - 2007-05-10 10:44:59
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25466 Modified Files: Tag: projectx staticmesh_c.cpp Log Message: - added methods to set/get flags if a mesh based object should cast shadows. This can be used by the graphics engine to disable/enable shadows for specific objects. The default value is "enabled" for all mesh based objects. Index: staticmesh_c.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/staticmesh_c.cpp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** staticmesh_c.cpp 5 Dec 2005 21:38:23 -0000 1.1 --- staticmesh_c.cpp 10 May 2007 10:44:49 -0000 1.1.4.1 *************** *** 65,68 **** --- 65,84 ---- } + FUNCTION(StaticMesh,setCastShadows) + { + bool shadows; + + if ( + (in.GetSize() == 0) || + (! in.GetValue(in[0], shadows)) + ) + { + return false; + } + + obj->SetCastShadows(shadows); + return true; + } + void CLASS(StaticMesh)::DefineClass() { *************** *** 70,72 **** --- 86,89 ---- DEFINE_FUNCTION(load); DEFINE_FUNCTION(setScale); + DEFINE_FUNCTION(setCastShadows) } |