Beispiel #1
0
void IAvatar::mousePress(int button, int state, int x, int y) {
	if (button == ArcBallCamera::mbRight) {
		LogInfo("Right clicked cleared cut context!");
		clearCutContext();
		return;
	}

	if (button != ArcBallCamera::mbLeft)
		return;

	//Down = Start
	if (state == 0) {
		if (m_lpTissue) {
			m_isToolActive = true;
			TheSceneGraph::Instance().headers()->updateHeaderLine("scalpel",
					"scalpel: start cutting");
		}
	} else {
		//Up = Stop
		if (m_lpTissue) {
			m_isToolActive = false;

			//count disjoint parts
			vector<vector<U32> > parts;
			U32 ctParts = m_lpTissue->get_disjoint_parts(parts);
			AnsiStr strMsg = printToAStr("scalpel: finished cut %u. disjoint parts#%u",
										 (U32)m_lpTissue->countCompletedCuts(),
										 ctParts);

			TheSceneGraph::Instance().headers()->updateHeaderLine("scalpel", strMsg);
		}
	}
}
Beispiel #2
0
void IAvatar::onReset() {
    clearCutContext();
}
Beispiel #3
0
IAvatar::~IAvatar() {
	// TODO Auto-generated destructor stub
    //SGMesh::clearAllBuffers();
	clearCutContext();
}
Beispiel #4
0
IAvatar::~IAvatar() {
	// TODO Auto-generated destructor stub
	SGMesh::cleanup();
	clearCutContext();
}