Esempio n. 1
0
std::vector<SceneObject*> Scene::GetWholeSceneObjects() {
    std::vector<SceneObject*> sceneObjects(GetChildren());
    for (int i = 0; i < sceneObjects.size(); ++i) {
        std::vector<SceneObject*> children(sceneObjects[i]->GetChildren());
        for (auto it = children.begin(); it != children.end(); ++it) {
            sceneObjects.push_back(*it);
        }
    }

    return sceneObjects;
}
Esempio n. 2
0
Array<SceneObject*> Scene::GetWholeSceneObjects() {
    Array<SceneObject*> sceneObjects(GetChildren());
    for (int i = 0; i < sceneObjects.GetSize(); ++i) {
        Array<SceneObject*> children(sceneObjects[i]->GetChildren());
        for (auto it = children.Begin(); it != children.End(); ++it) {
            sceneObjects.PushBack(*it);
        }
    }

    return sceneObjects;
}
	void ScriptSceneObjectDragDropData::internal_CreateInstance(MonoObject* managedInstance, MonoArray* objects)
	{
		ScriptArray objectsArray = ScriptArray(objects);

		Vector<HSceneObject> sceneObjects(objectsArray.size());
		for (UINT32 i = 0; i < objectsArray.size(); i++)
		{
			ScriptSceneObject* scriptSO = ScriptSceneObject::toNative(objectsArray.get<MonoObject*>(i));
			if (scriptSO != nullptr)
				sceneObjects[i] = scriptSO->getNativeSceneObject();
		}

		new (bs_alloc<ScriptSceneObjectDragDropData>()) ScriptSceneObjectDragDropData(managedInstance, sceneObjects);
	}