Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1140

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1140

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1141

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1141

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/ScheduledTasks.php on line 1167

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/Subs.php on line 786

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/Subs.php on line 786

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/Subs.php on line 799

Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/Sources/Subs.php on line 799

Strict Standards: trigger_error() [function.trigger-error]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/spintz5/public_html/3demon/forums/SSI.php on line 169

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/spintz5/public_html/3demon/forums/SSI.php on line 169
Loading Static and Dynamic Meshes

All meshes derive from IBaseMesh.  All meshes is a bit of overkill, there are 2 mesh types - static( IMesh ) and dynamic( IAnimatedMesh ).

Here's sample code that shows how to load a mesh, detect which type of mesh it is by using getMeshType, and the load that mesh into the appropriate Scene Node for rendering by the Scene Manager.

Code: [Select]
scene::IBaseMesh* mesh = smgr->getMesh( "mesh.x" );
if( mesh )
{
if( mesh->getMeshType() == scene::EMESHTYPE_STATIC )
{
scene::IMesh* sMesh = (scene::IMesh*)mesh;
sMesh->uploadMeshData( driver );
scene::IMeshSceneNode* node = smgr->addMeshSceneNode( sMesh );
}
else
{
scene::IAnimatedMesh* aMesh = (scene::IAnimatedMesh*)mesh;
aMesh->uploadMeshData( driver );
scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( aMesh );
}
}

If you'd rather use RTTI and dynamic_cast, you could do the following :

Code: [Select]
scene::IBaseMesh* mesh = smgr->getMesh( "mesh.x" );
scene::IMesh* sMesh = dynamic_cast< scene::IMesh* >( mesh );
if( sMesh != NULL )
{
sMesh->uploadMeshData( driver );
scene::IMeshSceneNode* node = smgr->addMeshSceneNode( sMesh );
}
else
{
// We can safely assume the mesh is an Animated Mesh, since that's the only other possible class available.
IAnimatedMesh* aMesh = (scene::IAnimatedMesh*)mesh;
aMesh->uploadMeshData( driver );
scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( aMesh );
}