Exemplo n.º 1
0
Error GraphicsObject::ChangeOccurred( ISubject* pSubject, System::Changes::BitMask ChangeType )
{
    ASSERT( m_bInitialized );
#if 0
    if ( !m_pNode )
    {
        // StaticGeom and InstancedGeom objects are abstract groupings and
        // are not globally attached to any scene node
        return Errors::Success;
    }

    if ( ChangeType & (System::Changes::Geometry::Position |
                       System::Changes::Geometry::Orientation |
                       System::Changes::Geometry::Scale)
       )
    {
        IGeometryObject* pGeometryObject = dynamic_cast<IGeometryObject*>(pSubject);

        if ( NeedsLocking(m_pNode) )
        {
            SCOPED_SPIN_LOCK(OGREGraphicsScene::m_mutex);
            UpdateGeometry( m_pNode, ChangeType, pGeometryObject );
        }
        else
        {
            UpdateGeometry( m_pNode, ChangeType, pGeometryObject );
        }
    }
#endif
    return Errors::Success;
}
Exemplo n.º 2
0
Resource::Resource(const char* transport, const char* address, const char* connection) 
	: fTransport(transport)
	, fTransportAddress(address)
	, fConnection(connection)
	, fResourceAvailable(0)

{
	if (NeedsLocking()) {
		fResourceAvailable = create_sem(1, "resource");
	}
}