Merge branch 'trunk' of https://github.com/lrre-foss/rnr into trunk

This commit is contained in:
rjindael 2023-07-17 22:45:35 -07:00
commit fc12afa070
No known key found for this signature in database
GPG Key ID: D069369C906CCF31
3 changed files with 15 additions and 1 deletions

View File

@ -124,7 +124,8 @@ namespace RNR
ogreCamera->getParentSceneNode()->setOrientation(Ogre::Quaternion(cam->getCFrame().getRotation()));
}
ogreRoot->renderOneFrame(this->delta);
if(isVisible())
ogreRoot->renderOneFrame(this->delta);
}
Ogre::NameValuePairList OgreWidget::getRenderOptions()

View File

@ -13,6 +13,7 @@ namespace RNR
private:
CoordinateFrame m_cframe;
virtual void deserializeProperty(char* prop_name, pugi::xml_node prop);
virtual void addProperties(std::vector<ReflectionProperty>& properties);
public:
Camera();
~Camera();

View File

@ -20,4 +20,16 @@ namespace RNR
setCFrame(XML::getCFrame(node));
}
}
void Camera::addProperties(std::vector<ReflectionProperty>& properties)
{
ReflectionProperty _properties[] = {
{ this, std::string("CFrame"), std::string(""),
ACCESS_NONE, OPERATION_READWRITE, PROPERTY_CFRAME,
REFLECTION_GETTER(Camera* instance = (Camera*)object; return &instance->m_cframe; ),
REFLECTION_SETTER(Camera* instance = (Camera*)object; instance->setCFrame(*(CoordinateFrame*)value); ) },
};
properties.insert(properties.end(), _properties, _properties+(sizeof(_properties)/sizeof(ReflectionProperty)));
}
}