Пример #1
0
GLC_3DViewInstance GLC_Factory::createBox(const GLC_BoundingBox& boundingBox) const
{
	const double lx= boundingBox.upperCorner().x() - boundingBox.lowerCorner().x();
	const double ly= boundingBox.upperCorner().y() - boundingBox.lowerCorner().y();
	const double lz= boundingBox.upperCorner().z() - boundingBox.lowerCorner().z();
	GLC_Box* pBox= new GLC_Box(lx, ly, lz);
	GLC_3DViewInstance newBox(pBox);
	newBox.translate(boundingBox.center().x(), boundingBox.center().y()
					, boundingBox.center().z());
	return newBox;
}
Пример #2
0
void groupCutManager::loadVoxelArray()
{
	// index of voxel start from left down to right up
	// NX
	// Hash function: idx = i*NX*NY + j*NY + k
	std::vector<int> voxelHash;
	voxelHash.resize(NumXYZ[0] * NumXYZ[1] * NumXYZ[2]);
	std::fill(voxelHash.begin(), voxelHash.end(), -1);

	std::vector<octreeSNode*> *leaves = &m_octree->leaves;
	boxes.resize(leaves->size());
	for (int i = 0; i < leaves->size(); i++)
	{
		octreeSNode* node = leaves->at(i);
		// List
		voxelBox newBox(node->leftDownf, node->rightUpTight);
		Vec3i xyzIdx = hashTable.getVoxelCoord(newBox.center);
		newBox.xyzIndex = xyzIdx;

		boxes[i] = newBox;

		// Hash
		int hashF = xyzIdx[2] * NumXYZ[0] * NumXYZ[1] + xyzIdx[1] * NumXYZ[0] + xyzIdx[0];

		voxelHash[hashF] = i;
		node->idxInLeaf = i;
	}

	hashTable.voxelHash = voxelHash;

	// neighbor information
	// neighbor
	neighborVoxel.resize(boxes.size());

	for (int i = 0; i < NumXYZ[0]; i++){
		for (int j = 0; j < NumXYZ[1]; j++){
			for (int k = 0; k < NumXYZ[2]; k++){
				int idx = hashTable.getBoxIndexFromVoxelCoord(Vec3i(i, j, k));
				if (idx != -1){
					for (int xyz = 0; xyz < 3; xyz++){
						Vec3i nb(i, j, k);
						nb[xyz] ++;

						int idxN = hashTable.getBoxIndexFromVoxelCoord(nb);
						if (idxN != -1 && idx != idxN){
							neighborVoxel[idx].push_back(idxN);
							neighborVoxel[idxN].push_back(idx);
						}
					}
				}
			}
		}
	}
}
Пример #3
0
bool mmdcGameState::TryMove(int index, float x, float y)
{
	std::shared_ptr<mmdcActor> curActor = std::dynamic_pointer_cast<mmdcActor>(actors[index]);
	rect_t<float> newBox(x, y, curActor->GetHitbox()->w, curActor->GetHitbox()->h);

	if (rect_t<float>::Collision(newBox, *std::dynamic_pointer_cast<mmdcActor>(actors[1])->GetHitbox()))
	{
		// Pass actor collision to actor, in case they need to do something with it
		actors[index]->OnCollision(actors[1]);
		return false;
	}
	// Move actor
	curActor->Move(x, y);
	return true;
}
Пример #4
0
csBox3 csReversibleTransform::This2Other (const csBox3 &box) const
{
  if (m_t2o.IsIdentity())
  {
    csBox3 newBox (box);
    newBox.SetCenter (This2Other (box.GetCenter()));
    return newBox;
  }
  else
  {
    const csVector3 minA = box.Min ();
    const csVector3 maxA = box.Max ();

    csVector3 minB (v_o2t);
    csVector3 maxB (v_o2t);

    for (size_t i = 0; i < 3; ++i)
    {
      const csVector3 row = m_t2o.Row (i);
      for (size_t j = 0; j < 3; ++j)
      {
        float a = row[j] * minA[j];
        float b = row[j] * maxA[j];
        if (a < b)
        {
          minB[i] += a;
          maxB[i] += b;
        }
        else
        {
          minB[i] += b;
          maxB[i] += a;
        }
      }
    }

    return csBox3 (minB, maxB);
  }
}
Пример #5
0
int psLinearMovement::MoveSprite (float delta)
{
  int ret = PS_MOVE_SUCCEED;

  csReversibleTransform fulltransf = mesh->GetMovable ()
  	->GetFullTransform ();
  //  const csMatrix3& transf = fulltransf.GetT2O ();

  // Calculate the total velocity (body and world) in OBJECT space.
  csVector3 bodyVel (fulltransf.Other2ThisRelative (velWorld) + velBody);

  float local_max_interval =
     csMin(csMin((bodyVel.y==0.0f) ? MAX_CD_INTERVAL : ABS (intervalSize.y/bodyVel.y),
               (bodyVel.x==0.0f) ? MAX_CD_INTERVAL : ABS (intervalSize.x/bodyVel.x)
             ),(bodyVel.z==0.0f) ? MAX_CD_INTERVAL : ABS (intervalSize.z/bodyVel.z)
        );

  // Err on the side of safety (95% error margin)
  local_max_interval *= 0.95f;

  //printf("local_max_interval=%f, bodyVel is %1.2f, %1.2f, %1.2f\n",local_max_interval, bodyVel.x, bodyVel.y, bodyVel.z);
  //printf("velWorld is %1.2f, %1.2f, %1.2f\n", velWorld.x, velWorld.y, velWorld.z);
  //printf("velBody is %1.2f, %1.2f, %1.2f\n", velBody.x, velBody.y, velBody.z);

  // Sanity check on time interval here.  Something is messing it up. -KWF
  //local_max_interval = csMax(local_max_interval, 0.1F);

  if (colldet)
  {
    while (delta > local_max_interval)
    {

        csVector3 oldpos(mesh->GetMovable ()->GetFullTransform ().GetOrigin());
        
        // Perform brutal optimisation here for falling with no obstacles
        if(velWorld.y < -20.0f && mesh->GetMovable()->GetSectors()->GetCount() > 0)
        {
            csVector3 worldVel (fulltransf.This2OtherRelative (velBody) + velWorld);
            bool hit = false;
            
            // We check for other meshes at the start and end of the box with radius * 2 to be on the safe side
            {
                csRef<iMeshWrapperIterator> objectIter = engine->GetNearbyMeshes(mesh->GetMovable()->GetSectors()->Get(0), 
                                                                             oldpos + boundingBox.GetCenter(), boundingBox.GetSize().Norm() * 2);
                if(objectIter->HasNext())
                    hit = true;
            }
            if(!hit)
            {
                csRef<iMeshWrapperIterator> objectIter = engine->GetNearbyMeshes(mesh->GetMovable()->GetSectors()->Get(0), 
                                                                                 oldpos + worldVel * delta + boundingBox.GetCenter(), boundingBox.GetSize().Norm() * 2);
                if(objectIter->HasNext())
                    hit = true;
            }
            if(!hit)
            {
                csOrthoTransform transform_newpos(csMatrix3(), oldpos + worldVel * delta);
                csBox3 fullBox(fulltransf.This2OtherRelative(boundingBox.Min()), fulltransf.This2OtherRelative(boundingBox.Max()));
                csBox3 newBox( transform_newpos.This2OtherRelative(boundingBox.Min()), transform_newpos.This2OtherRelative(boundingBox.Max()));

                
                fullBox.AddBoundingBox(newBox);
                csRef<iMeshWrapperIterator> objectIter = engine->GetNearbyMeshes(mesh->GetMovable()->GetSectors()->Get(0), fullBox);
                if(objectIter->HasNext())
                    hit = true;
            }
            if(!hit)
                local_max_interval = delta;
        }

        ret = MoveV (local_max_interval);

        csVector3 displacement(fulltransf.GetOrigin() - oldpos);
        
        displacement = fulltransf.Other2ThisRelative(displacement);
        
        // Check the invariants still hold otherwise we may jump walls
        if(!(fabs(displacement.x) <= intervalSize.x))
        {
        	printf("X (%g) out of bounds when performing CD > %g!\n", fabs(displacement.x), intervalSize.x);
        	CS_ASSERT(false);
        }
        if(!(fabs(displacement.z) <= intervalSize.z))
        {
            printf("Z (%g) out of bounds when performing CD > %g!\n", fabs(displacement.y), intervalSize.y);
            CS_ASSERT(false);
        }
        if(!(fabs(displacement.y) <= intervalSize.y))
        {
            printf("Y (%g) out of bounds when performing CD > %g!\n", fabs(displacement.z), intervalSize.z);
            CS_ASSERT(false);
        }

        RotateV (local_max_interval);
        
        // We must update the transform after every rotation!
        fulltransf = mesh->GetMovable ()->GetFullTransform ();

      if (ret == PS_MOVE_FAIL)
          return ret;

      // The velocity may have changed by now
      bodyVel = fulltransf.Other2ThisRelative(velWorld) + velBody;

      delta -= local_max_interval;
      local_max_interval = csMin(csMin((bodyVel.y==0.0f)
      	? MAX_CD_INTERVAL
      	: ABS (intervalSize.y/bodyVel.y), (bodyVel.x==0.0f)
      	? MAX_CD_INTERVAL
      	: ABS (intervalSize.x/bodyVel.x)), (bodyVel.z==0.0f)
      	? MAX_CD_INTERVAL
      	: ABS (intervalSize.z/bodyVel.z));
      // Err on the side of safety (95% error margin)
      local_max_interval *= 0.95f;

      // Sanity check on time interval here.  Something is messing it up. -KWF
      // local_max_interval = csMax(local_max_interval, 0.1F);
    }
  }

  if (!colldet || delta)
  {
    ret = MoveV (delta);
    RotateV(delta);
  }

  return ret;
}
Пример #6
0
	// Load blend shape poses
	bool BlendShape::loadPoses(ParamList &params, std::vector<vertex> &vertices,long numVertices,long offset,long targetIndex)
	{
		if (params.useSharedGeom)
		{
			assert(targetIndex == 0);
			m_target = T_MESH;
		}
		else
		{
			assert(offset == 0);
			poseGroup new_pg;
			m_target = T_SUBMESH;
			new_pg.targetIndex = targetIndex;
			m_poseGroups.insert(std::pair<int,poseGroup>(targetIndex,new_pg));
		}
		poseGroup& pg = m_poseGroups.find(targetIndex)->second;

		if(m_pGameNode && m_pMorphR3)
		{
            // Disable all skin Modifiers.
            std::vector<Modifier*> disabledSkinModifiers;
            IGameObject* pGameObject = m_pGameNode->GetIGameObject();
            if( pGameObject )
            {
                int numModifiers = pGameObject->GetNumModifiers();
                for( int i = 0; i < numModifiers; ++i )
                {
                    IGameModifier* pGameModifier = pGameObject->GetIGameModifier(i);
                    if( pGameModifier )
                    {
                        if( pGameModifier->IsSkin() )
                        {
                            Modifier* pModifier = pGameModifier->GetMaxModifier();
                            if( pModifier )
                            {
                                if( pModifier->IsEnabled() )
                                {
                                    disabledSkinModifiers.push_back(pModifier);
                                    pModifier->DisableMod();
                                }
                            }
                        }
                    }
                }
            }

			// Get the original mesh from the IGameNode.  Not using IGame here
			// since MorphR3 doesn't allow for it.  Also we don't know if our vertices
			// are in object or world space, so we'll just calculate diffs directly from 
			// the Max meshes and modify the coordinate system manually.  
			// Obtained method of getting mesh from 3D Studio Max SDK Training session by
			// David Lanier.
 			bool DeleteObjectWhenDone;
			const ObjectState& objectState = m_pGameNode->GetMaxNode()->EvalWorldState(GetCOREInterface()->GetTime());
			Object *origMeshObj = objectState.obj;
			if (!origMeshObj->CanConvertToType(Class_ID(TRIOBJ_CLASS_ID, 0)))
			{
				FxOgreMaxExporterLog( "Could not access original mesh for morph target comparison.");
				return false;
			}

			// Calculate the DiffTM matrix.  This is the difference between the INode's world transform
			// which is used to calculate the morph verticies, and the IGameNode's world transform, which is used
			// to calculate the Ogre mesh's verticies.
			Matrix3 DiffTM = m_pGameNode->GetObjectTM(GetCOREInterface()->GetTime()).ExtractMatrix3();

			// The below code is not well tested as FaceFX needs content in the native coordinates.
			// I've seen the direction of the morph movement flipped on some content when in Y-up mode 
			// which sets the coordinate system to IGAME_OGL.
			// I can't get this to work on all the morph examples I have however.
			IGameConversionManager* pConversionManager = GetConversionManager();
			if(IGameConversionManager::IGAME_OGL == pConversionManager->GetCoordSystem())
			{			
				Matrix3 conv = Matrix3(Point3(1,0,0), Point3(0,0,1), Point3(0,-1,0), Point3(0,0,0));
				DiffTM = DiffTM * conv;
			}

			TriObject *origMeshTriObj = (TriObject *) origMeshObj->ConvertToType(GetCOREInterface()->GetTime(), Class_ID(TRIOBJ_CLASS_ID, 0));
			if (origMeshObj != origMeshTriObj) DeleteObjectWhenDone = true;
			Mesh& origMesh = origMeshTriObj->GetMesh();
			const int NumVerts = origMesh.getNumVerts();
 

			for( int i = 0; i < m_pMorphR3->chanBank.size() && i < MR3_NUM_CHANNELS; ++i )
			{
				if( m_pMorphR3->chanBank[i].mActive )
				{
					morphChannel* pMorphChannel = &m_pMorphR3->chanBank[i];	
					if( pMorphChannel )
					{
						pMorphChannel->rebuildChannel();

						std::string posename = string_tools::string_cast<ogre_string_type>(pMorphChannel->mName.data());
						int numMorphVertices = pMorphChannel->mNumPoints;
						
						if( numMorphVertices != origMesh.getNumVerts() )
						{
							MessageBox(GetCOREInterface()->GetMAXHWnd(), _T("Morph targets have failed to export becuase the morph vertex count did not match the base mesh.  Collapse the modifier stack prior to export, as smoothing is not supported with morph target export."), _T("Morph Target Export Failed."), MB_OK);
							return false;
						}
						else
						{
							FxOgreMaxExporterLog( "Exporting Morph target: %s with %d vertices.\n", posename.c_str(), numMorphVertices);
							FxOgreMaxExporterLog( "Mesh has %d vertices.\n", numVertices);
							FxOgreMaxExporterLog( "%d total vertices.\n", vertices.size());
							assert(offset+numVertices <= vertices.size());
							// create a new pose
							pose p;
							p.poseTarget = m_target;
							p.index = targetIndex;
							p.blendShapeIndex = i;
							p.name = posename;
							p.pMChannel = pMorphChannel;

							size_t numPoints = pMorphChannel->mPoints.size();
							std::vector<Point3> vmPoints;
							vmPoints.reserve(numPoints);
							for( size_t k = 0; k < numPoints; ++k )
							{
								vmPoints.push_back(pMorphChannel->mPoints[k]);
							}

							Box3 morphBoundingBox;
							// calculate vertex offsets
							for (int k=0; k<numVertices; k++)
							{
								vertexOffset vo;
								assert ((offset+k)<vertices.size());

								vertex v = vertices[offset+k];
								assert(v.index < numMorphVertices);
								assert(v.index < origMesh.getNumVerts());

								Point3 meshVert = origMesh.getVert(v.index);
								Point3 morphVert = vmPoints[v.index];

								Point3 diff = morphVert - meshVert;

								// Transform our morph vertex movements by whatever
								// scaling/rotation is being done by IGame..
								Point3 ogreSpacediff = DiffTM.VectorTransform(diff);


								// Add this point to the bounding box
								morphBoundingBox += morphVert;

								vo.x = ogreSpacediff.x * params.lum;
								vo.y = ogreSpacediff.y * params.lum;
								vo.z = ogreSpacediff.z * params.lum;	

								vo.index = offset+k;
								if (fabs(vo.x) < PRECISION)
									vo.x = 0;
								if (fabs(vo.y) < PRECISION)
									vo.y = 0;
								if (fabs(vo.z) < PRECISION)
									vo.z = 0;
								if ((vo.x!=0) || (vo.y!=0) || (vo.z!=0))
									p.offsets.push_back(vo);
							}
							// add pose to pose list
							if (p.offsets.size() > 0)
							{
								pg.poses.push_back(p);
							}
							if (params.bsBB)
							{
								// update bounding boxes of loaded submeshes
								for (int j=0; j<params.loadedSubmeshes.size(); j++)
								{
									Point3 min = morphBoundingBox.Min() * params.lum;
									Point3 max = morphBoundingBox.Max() * params.lum;
									// Update coordinate system here.
									Point3 newMin, newMax;
									newMin.x = min.x;
									newMin.y = min.z;
									newMin.z = min.y;
									Box3 newBox(newMin, newMax);
									if (params.exportWorldCoords)
										newBox = newBox * m_pGameNode->GetWorldTM(GetCOREInterface()->GetTime()).ExtractMatrix3();
									params.loadedSubmeshes[j]->m_boundingBox += newBox;
								}
							}
						}

					}
				}
			}
            // Re-enable skin modifiers.
            for( int i = 0; i < disabledSkinModifiers.size(); ++i )
            {
                disabledSkinModifiers[i]->EnableMod();
            }
			// According to David Lanier, this should be deleted, but I get crashes when exporting blendShapes
			// without shared geometry when I use the object for the second time.  Perhaps it
			// can only be used/deleted once.  Even without shared geometry, I'll get a strange crash
			// a few seconds after successful export with this here.
//			if (DeleteObjectWhenDone)
//				origMeshTriObj->DeleteMe();
		}
		return true;
	}
Пример #7
0
GLC_3DRep GLC_Factory::createBox(double lx, double ly, double lz) const
{

	GLC_3DRep newBox(new GLC_Box(lx, ly, lz));
	return newBox;
}
Пример #8
0
Box operator*(const glm::mat4& matrix, const Box& box) {
    // start with the constant component
    Box newBox(glm::vec3(matrix[3][0], matrix[3][1], matrix[3][2]), glm::vec3(matrix[3][0], matrix[3][1], matrix[3][2]));

    // for each element, we choose the minimum or maximum based on the matrix sign
    if (matrix[0][0] >= 0.0f) {
        newBox.minimum.x += matrix[0][0] * box.minimum.x;
        newBox.maximum.x += matrix[0][0] * box.maximum.x;
    } else {
        newBox.minimum.x += matrix[0][0] * box.maximum.x;
        newBox.maximum.x += matrix[0][0] * box.minimum.x;
    }
    if (matrix[1][0] >= 0.0f) {
        newBox.minimum.x += matrix[1][0] * box.minimum.y;
        newBox.maximum.x += matrix[1][0] * box.maximum.y;
    } else {
        newBox.minimum.x += matrix[1][0] * box.maximum.y;
        newBox.maximum.x += matrix[1][0] * box.minimum.y;
    }
    if (matrix[2][0] >= 0.0f) {
        newBox.minimum.x += matrix[2][0] * box.minimum.z;
        newBox.maximum.x += matrix[2][0] * box.maximum.z;
    } else {
        newBox.minimum.x += matrix[2][0] * box.maximum.z;
        newBox.maximum.x += matrix[2][0] * box.minimum.z;
    }
    
    if (matrix[0][1] >= 0.0f) {
        newBox.minimum.y += matrix[0][1] * box.minimum.x;
        newBox.maximum.y += matrix[0][1] * box.maximum.x;
    } else {
        newBox.minimum.y += matrix[0][1] * box.maximum.x;
        newBox.maximum.y += matrix[0][1] * box.minimum.x;
    }
    if (matrix[1][1] >= 0.0f) {
        newBox.minimum.y += matrix[1][1] * box.minimum.y;
        newBox.maximum.y += matrix[1][1] * box.maximum.y;
    } else {
        newBox.minimum.y += matrix[1][1] * box.maximum.y;
        newBox.maximum.y += matrix[1][1] * box.minimum.y;
    }
    if (matrix[2][1] >= 0.0f) {
        newBox.minimum.y += matrix[2][1] * box.minimum.z;
        newBox.maximum.y += matrix[2][1] * box.maximum.z;
    } else {
        newBox.minimum.y += matrix[2][1] * box.maximum.z;
        newBox.maximum.y += matrix[2][1] * box.minimum.z;
    }
    
    if (matrix[0][2] >= 0.0f) {
        newBox.minimum.z += matrix[0][2] * box.minimum.x;
        newBox.maximum.z += matrix[0][2] * box.maximum.x;
    } else {
        newBox.minimum.z += matrix[0][2] * box.maximum.x;
        newBox.maximum.z += matrix[0][2] * box.minimum.x;
    }
    if (matrix[1][2] >= 0.0f) {
        newBox.minimum.z += matrix[1][2] * box.minimum.y;
        newBox.maximum.z += matrix[1][2] * box.maximum.y;
    } else {
        newBox.minimum.z += matrix[1][2] * box.maximum.y;
        newBox.maximum.z += matrix[1][2] * box.minimum.y;
    }
    if (matrix[2][2] >= 0.0f) {
        newBox.minimum.z += matrix[2][2] * box.minimum.z;
        newBox.maximum.z += matrix[2][2] * box.maximum.z;
    } else {
        newBox.minimum.z += matrix[2][2] * box.maximum.z;
        newBox.maximum.z += matrix[2][2] * box.minimum.z;
    }

    return newBox;
}
Пример #9
0
void RoiAdapter::execute() {
	LOG(INFO) << "RoiAdapter: Adding a new ROI.";
	if (inputDataIds.size() < 1) {
		LOG(WARNING) << "RoiAdapter: Not enough input IDs. Skipping.";
		return;
	}

	double newX = 0;
	double newY = 0;
	double newZ = 0;
	double scaleFactor = 4;//3;//4;//2;//10;	/* make dimensions a bit more relax (4 is good) */
	double increment = 0.1;
	unsigned int existingRoiBoxId = inputDataIds[existingRoiBoxIdInputIndex];
	unsigned int tfBox1Id = 0;
	vector<brics_3d::rsg::Attribute> tmpAttributes;

	std::vector<unsigned int> parents;
	wm->scene.getNodeParents(existingRoiBoxId, parents);
	assert(parents.size() == 1);
	tfBox1Id = parents[0];

	if (inputDataIds.size() < 2) {
		LOG(INFO) << "Empty percievedObjectBoundingBox. Relaxing ROI.";

		for (unsigned int i = 0; i < inputDataIds.size(); ++i) {
			LOG(INFO) << "inputDataIds[" << i << "] = " << inputDataIds[i];
		}

		/* get box data for existing box  */
		Shape::ShapePtr resultShape;
		TimeStamp resultTime;
		wm->scene.getGeometry(existingRoiBoxId, resultShape, resultTime);
		brics_3d::rsg::Box::BoxPtr resultBox;
		resultBox = boost::dynamic_pointer_cast<brics_3d::rsg::Box>(resultShape);
		assert(resultBox != 0);

		if (resultBox->getSizeX() < maxX) {
			newX = resultBox->getSizeX() + increment;
		}
		if (resultBox->getSizeY() < maxY) {
			newY = resultBox->getSizeY() + increment;
		}
		if (resultBox->getSizeZ() < maxZ) {
			newZ = resultBox->getSizeZ() + increment;
		}

		/* (we do not update the center here) */

	} else {

		unsigned int percievedObjectBoundingBoxId = inputDataIds[percievedObjectBoundingBoxIdInputIndex];

		for (unsigned int i = 0; i < inputDataIds.size(); ++i) {
			LOG(INFO) << "inputDataIds[" << i << "] = " << inputDataIds[i];
		}

		/* get box data for percieved box  */
		Shape::ShapePtr resultShape;
		TimeStamp resultTime;
		wm->scene.getGeometry(percievedObjectBoundingBoxId, resultShape, resultTime);
		brics_3d::rsg::Box::BoxPtr resultBox;
		resultBox = boost::dynamic_pointer_cast<brics_3d::rsg::Box>(resultShape);
		assert(resultBox != 0);

		newX = resultBox->getSizeX() * scaleFactor;
		newY = resultBox->getSizeY() * scaleFactor;
		newZ = resultBox->getSizeZ() * scaleFactor;


		/* adjust center of existing box */
		IHomogeneousMatrix44::IHomogeneousMatrix44Ptr updatedRoiTransform;
		wm->scene.getTransformForNode(percievedObjectBoundingBoxId, wm->scene.getRootId(), brics_3d::rsg::TimeStamp(timer.getCurrentTime()), updatedRoiTransform); // percievedObjectBoundingBox expressed in: parent frame of existingRoiBoxId's parent tf (==root)
		LOG(INFO) << "updatedRoiTransform " << *updatedRoiTransform;
		wm->scene.setTransform(tfBox1Id, updatedRoiTransform, brics_3d::rsg::TimeStamp(timer.getCurrentTime()));

	}

	/* adjust dimensions of box */
	brics_3d::rsg::Box::BoxPtr newBox(new brics_3d::rsg::Box(newX, newY, newZ));
	wm->scene.getNodeAttributes(existingRoiBoxId, tmpAttributes);

	unsigned int newBoxId = 0;
	wm->scene.addGeometricNode(tfBox1Id, newBoxId, tmpAttributes, newBox, brics_3d::rsg::TimeStamp(timer.getCurrentTime()));
	LOG(DEBUG) << "Adjusted ROI Box added with ID " << newBoxId << " to parent with ID " << tfBox1Id;
	outputDataIds.clear();
	outputDataIds.push_back(newBoxId); // result id

	/* delete old box */
	wm->scene.deleteNode(existingRoiBoxId);

}