mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 12:25:30 +00:00
commit
39f0e269d6
48 changed files with 317 additions and 102 deletions
|
|
@ -97,7 +97,6 @@ void ForestEditorCtrl::onSleep()
|
|||
|
||||
bool ForestEditorCtrl::updateActiveForest( bool createNew )
|
||||
{
|
||||
mForest = dynamic_cast<Forest*>( Sim::findObject( "theForest" ) );
|
||||
Con::executef( this, "onActiveForestUpdated", mForest ? mForest->getIdString() : "", createNew ? "1" : "0" );
|
||||
|
||||
if ( mTool )
|
||||
|
|
@ -400,4 +399,13 @@ DefineConsoleMethod( ForestEditorCtrl, deleteMeshSafe, void, ( const char * obj
|
|||
DefineConsoleMethod( ForestEditorCtrl, isDirty, bool, (), , "" )
|
||||
{
|
||||
return object->isDirty();
|
||||
}
|
||||
|
||||
DefineConsoleMethod(ForestEditorCtrl, setActiveForest, void, (const char * obj), , "( Forest obj )")
|
||||
{
|
||||
Forest *forestObject;
|
||||
if (!Sim::findObject(obj, forestObject))
|
||||
return;
|
||||
|
||||
object->setActiveForest(forestObject);
|
||||
}
|
||||
|
|
@ -86,6 +86,9 @@ class ForestEditorCtrl : public EditTSCtrl
|
|||
/// Causes the editor to reselect the active forest.
|
||||
bool updateActiveForest( bool createNew );
|
||||
|
||||
/// Sets the active Forest
|
||||
void setActiveForest(Forest* forestObject) { mForest = forestObject; }
|
||||
|
||||
/// Returns the active Forest.
|
||||
Forest *getActiveForest() const { return mForest; }
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public:
|
|||
const Vector<S32>& getLOSDetails() const { return mLOSDetails; }
|
||||
|
||||
// ForestItemData
|
||||
const Box3F& getObjBox() const { return mShape ? mShape->bounds : Box3F::Invalid; }
|
||||
const Box3F& getObjBox() const { return mShape ? mShape->bounds : Box3F::Zero; }
|
||||
bool render( TSRenderState *rdata, const ForestItem& item ) const;
|
||||
ForestCellBatch* allocateBatch() const;
|
||||
bool canBillboard( const SceneRenderState *state, const ForestItem &item, F32 distToCamera ) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue