Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
/** \file itasc/FixedObject.cpp
* \ingroup itasc
*/
/*
* FixedObject.cpp
*
* Created on: Feb 10, 2009
* Author: benoitbolsee
#include "FixedObject.hpp"
namespace iTaSC{
FixedObject::FixedObject():UncontrolledObject(),
m_finalized(false), m_nframe(0)
{
}
FixedObject::~FixedObject()
m_frameArray.clear();
int FixedObject::addFrame(const std::string& name, const Frame& frame)
if (m_finalized)
return -1;
FrameList::iterator it;
unsigned int i;
for (i=0, it=m_frameArray.begin(); i<m_nframe; i++, it++) {
if (it->first == name) {
// this frame will replace the old frame
it->second = frame;
return i;
m_frameArray.push_back(FrameList::value_type(name,frame));
return m_nframe++;
int FixedObject::addEndEffector(const std::string& name)
// verify that this frame name exist
void FixedObject::finalize()
return;
initialize(0, m_nframe);
m_finalized = true;
const Frame& FixedObject::getPose(const unsigned int frameIndex)
if (frameIndex < m_nframe) {
return m_frameArray[frameIndex].second;
} else {
return F_identity;