CCoordinateToolManager::AXIS CCoordinateToolManager::GetAxisByObjectName(IHashString* name)
{
	StdString wszName(name->GetString());

	// Assume that all axis postfixes has same length.
	if (wszName.length() < m_xAxisBoxPostfix.length())
	{
		return AXIS_NONE;
	}
	StdString axisName(wszName.substr(wszName.length() - m_xAxisBoxPostfix.length(), m_xAxisBoxPostfix.length()));

	if (axisName == m_xAxisBoxPostfix)
	{
		return AXIS_X;
	}
	else if (axisName == m_yAxisBoxPostfix)
	{
		return AXIS_Y;
	}
	else if (axisName == m_zAxisBoxPostfix)
	{
		 return AXIS_Z;
	}
	
	return AXIS_NONE;
}
Ejemplo n.º 2
0
Axis::Axis( const Name name, const uint8_t q, const Dir qdir ) : Field{ q, qdir }, _name{ name }, _inc{ false }
{
	setLabel( axisName() );
}
Ejemplo n.º 3
0
Axis::Axis( const Name name, const float value, const bool incremental ) : _name{ name }, _inc{ incremental }
{
	setLabel( axisName() );
	setValue( value );
}
Ejemplo n.º 4
0
Axis::Axis( const Name name, const float value ) : _name{ name }, _inc{ false }
{
	setLabel( axisName() );
	setValue( value );
}
Ejemplo n.º 5
0
Axis::Axis() : _name{ Name::X }, _inc{ false }
{
	setLabel( axisName() );
}