mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-18 22:23:48 +00:00
Initial implementation of the Scene object for handling scenes/levels in a more consistent and deliberate way.
This commit is contained in:
parent
e0627973fb
commit
1c2f90a190
37 changed files with 509 additions and 140 deletions
|
|
@ -45,6 +45,8 @@
|
|||
#include "materials/materialDefinition.h"
|
||||
#include "T3D/prefab.h"
|
||||
|
||||
#include "T3D/Scene.h"
|
||||
|
||||
IMPLEMENT_CONOBJECT(GuiMeshRoadEditorCtrl);
|
||||
|
||||
ConsoleDocClass( GuiMeshRoadEditorCtrl,
|
||||
|
|
@ -420,12 +422,14 @@ void GuiMeshRoadEditorCtrl::on3DMouseDown(const Gui3DMouseEvent & event)
|
|||
|
||||
newRoad->registerObject();
|
||||
|
||||
// Add to MissionGroup
|
||||
SimGroup *missionGroup;
|
||||
if ( !Sim::findObject( "MissionGroup", missionGroup ) )
|
||||
Con::errorf( "GuiMeshRoadEditorCtrl - could not find MissionGroup to add new MeshRoad" );
|
||||
// Add to scene
|
||||
Scene *scene;
|
||||
|
||||
scene = Scene::getRootScene();
|
||||
if ( !scene)
|
||||
Con::errorf( "GuiMeshRoadEditorCtrl - could not find Scene to add new MeshRoad" );
|
||||
else
|
||||
missionGroup->addObject( newRoad );
|
||||
scene->addObject( newRoad );
|
||||
|
||||
Point3F pos( endPnt );
|
||||
pos.z += mDefaultDepth * 0.5f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue