MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addItem

Method addItem

Engine/source/forest/editor/forestUndo.cpp:47–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void 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
61void ForestCreateUndoAction::redo()
62{

Callers 3

_paintMethod · 0.45
redoMethod · 0.45
undoMethod · 0.45

Calls 5

getIdMethod · 0.65
push_backMethod · 0.45
getDataMethod · 0.45
setDataMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected