void
GeometryObject::GetProperties(
    Properties::Array& Properties
    )
{
    //
    // Get the index of our first item.
    //
    i32 iProperty = static_cast<i32>(Properties.size());

    //
    // Add all the properties.
    //
    Properties.reserve( Properties.size() + Property_Count );

    for ( i32 i=0; i < Property_Count; i++ )
    {
        Properties.push_back( sm_kaDefaultProperties[ i ] );
    }

    //
    // Modify the default values.
    //
    Properties[ iProperty+Property_Position ].SetValue( m_Position );
    Properties[ iProperty+Property_Orientation ].SetValue( m_Orientation );
    Properties[ iProperty+Property_Scale ].SetValue( m_Scale );
}
void
InputObject::GetProperties(
    Properties::Array& Properties
    )
{
	//
    // Get the index of our first item.
    //
    i32 iProperty = static_cast<i32>(Properties.size());

    //
    // Add all the properties.
    //
    Properties.reserve( Properties.size() + Property_Count );

    for ( i32 i=0; i < Property_Count; i++ )
    {
        Properties.push_back( sm_kaDefaultProperties[ i ] );
    }

    //
    // Modify the default values.
    //
	Properties[iProperty + Property_FKey].SetValue(0, m_nFunctionKey);
}
Example #3
0
void
OGREGraphicsObjectCamera::GetProperties(
    Properties::Array& Properties
    )
{
    //
    // Get the index of our first item.
    //
    i32 iProperty = static_cast<i32>(Properties.size());

    //
    // Add all the properties.
    //
    Properties.reserve( Properties.size() + Property_Count );

    for (auto & property : sm_kaDefaultProperties)
    {
        Properties.push_back( property );
    }

    //
    // Set the enum options string array.
    //
    Properties[ iProperty+Property_PolygonMode ].SetEnumOptions( sm_kapszPolygonModeEnumOptions );

    //
    // Modify the default values.
    //
    if ( m_pCamera != nullptr )
    {
        Properties[ iProperty+Property_FOVy ].SetValue( 0, m_pCamera->getFOVy().valueRadians() );

        Properties[ iProperty+Property_ClipDistances ].SetValue(
            0, m_pCamera->getNearClipDistance()
            );
        Properties[ iProperty+Property_ClipDistances ].SetValue(
            1, m_pCamera->getFarClipDistance()
            );

        Ogre::Vector3 Position = m_pCamera->getPosition();
        Properties[ iProperty+Property_Position ].SetValue( 0, Position.x );
        Properties[ iProperty+Property_Position ].SetValue( 1, Position.y );
        Properties[ iProperty+Property_Position ].SetValue( 2, Position.z );

        Properties[ iProperty+Property_PolygonMode ].SetValue( 0, m_PolygonMode );
    }
}
void GraphicsSystem::GetProperties( Properties::Array& Properties )
{
	//
	// Get the index of our first item.
	//
	i32 iProperty = static_cast<i32>(Properties.size());

	//
	// Add all the properties.
	//
	Properties.reserve( Properties.size() + Property_Count );

	for ( i32 i=0; i < Property_Count; i++ )
	{
		Properties.push_back( sm_kaDefaultProperties[ i ] );
	}
	
}