| 45 | } |
| 46 | |
| 47 | void ForestCreateUndoAction::addItem( ForestItemData *data, |
| 48 | const Point3F &position, |
| 49 | F32 rotation, |
| 50 | F32 scale ) |
| 51 | { |
| 52 | const ForestItem &item = mData->addItem( data, position, rotation, scale ); |
| 53 | mItems.push_back( item ); |
| 54 | |
| 55 | // We store the datablock ID rather than the actual pointer |
| 56 | // since the pointer could go bad. |
| 57 | SimObjectId dataId = item.getData()->getId(); |
| 58 | mItems.last().setData( (ForestItemData*)(uintptr_t)dataId ); |
| 59 | } |
| 60 | |
| 61 | void ForestCreateUndoAction::redo() |
| 62 | { |