av::gua::Viewer::Viewer() : m_renderer(nullptr), m_loop(), m_ticker(m_loop, 1.f/60.f) { AV_FC_ADD_FIELD(SceneGraphs, MFSceneGraph::ContainerType()); AV_FC_ADD_FIELD(Windows, MFWindowBase::ContainerType()); #if defined(AVANGO_PHYSICS_SUPPORT) AV_FC_ADD_FIELD(Physics, nullptr); #endif AV_FC_ADD_ADAPTOR_FIELD(DesiredFPS, [this](av::SFFloat::GetValueEvent const& e) { *(e.getValuePtr()) = 1.f/m_ticker.get_tick_time(); }, [this](av::SFFloat::SetValueEvent const& e) { m_ticker.set_tick_time(1.f/e.getValue()); } ); AV_FC_ADD_ADAPTOR_FIELD(ApplicationFPS, [this](av::SFFloat::GetValueEvent const& e) { if (m_renderer) { *(e.getValuePtr()) = m_renderer->getGuaRenderer()->get_application_fps(); } }, [](av::SFFloat::SetValueEvent const&) {} ); }
av::sound::SampleBuffer::SampleBuffer(boost::shared_array<SampleType> buffer, unsigned int numberOfSamples, bool stereo) : mBuffer(buffer), mNumSamples(numberOfSamples), mStereo(stereo), mSampleRate(0) { AV_FC_ADD_ADAPTOR_FIELD(NumSamples, std::bind(&av::sound::SampleBuffer::getNumSamplesCB, this, std::placeholders::_1), std::bind(&av::sound::SampleBuffer::setNumSamplesCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(IsStereo, std::bind(&av::sound::SampleBuffer::getIsStereoCB, this, std::placeholders::_1), std::bind(&av::sound::SampleBuffer::setIsStereoCB, this, std::placeholders::_1)); }
av::gua::SceneGraph::SceneGraph(::gua::SceneGraph* guaSceneGraph) : m_guaSceneGraph(guaSceneGraph), m_root(new av::gua::TransformNode(std::dynamic_pointer_cast< ::gua::node::TransformNode>((*m_guaSceneGraph)["/"]))) { AV_FC_ADD_ADAPTOR_FIELD(Root, boost::bind(&SceneGraph::getRootCB, this, _1), boost::bind(&SceneGraph::setRootCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(Name, boost::bind(&SceneGraph::getNameCB, this, _1), boost::bind(&SceneGraph::setNameCB, this, _1)); }
av::gua::PlaneShape::PlaneShape(::gua::physics::PlaneShape* guashape) : CollisionShape(guashape), m_guaShape(reinterpret_cast< ::gua::physics::PlaneShape*>(CollisionShape::getGuaShape())) { AV_FC_ADD_ADAPTOR_FIELD(Normal, boost::bind(&PlaneShape::getNormalCB, this, _1), boost::bind(&PlaneShape::setNormalCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(PlaneConstant, boost::bind(&PlaneShape::getPlaneConstantCB, this, _1), boost::bind(&PlaneShape::setPlaneConstantCB, this, _1)); }
av::gua::Ray::Ray(std::shared_ptr< ::gua::Ray> guaRay) : m_guaRay(guaRay) { AV_FC_ADD_ADAPTOR_FIELD(Origin, std::bind(&Ray::getOriginCB, this, std::placeholders::_1), std::bind(&Ray::setOriginCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(Direction, std::bind(&Ray::getDirectionCB, this, std::placeholders::_1), std::bind(&Ray::setDirectionCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(TMax, std::bind(&Ray::getTMaxCB, this, std::placeholders::_1), std::bind(&Ray::setTMaxCB, this, std::placeholders::_1)); }
av::gua::Ray::Ray(std::shared_ptr< ::gua::Ray> guaRay) : m_guaRay(guaRay) { AV_FC_ADD_ADAPTOR_FIELD(Origin, boost::bind(&Ray::getOriginCB, this, _1), boost::bind(&Ray::setOriginCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(Direction, boost::bind(&Ray::getDirectionCB, this, _1), boost::bind(&Ray::setDirectionCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(TMax, boost::bind(&Ray::getTMaxCB, this, _1), boost::bind(&Ray::setTMaxCB, this, _1)); }
av::osg::TexturedQuad::TexturedQuad() : Geometry(), mGeometryChanged(true), mColorChanged(true), mFilenameChanged(false), mTextureChanged1D(false), mTextureChanged2D(false), mTexCoordsChanged(false), mVertexArray(new ::osg::Vec3Array(4)), mNormals(new ::osg::Vec3Array(1)), mColors(new ::osg::Vec4Array(1)), mTexCoords(new ::osg::Vec2Array(4)) { av::osg::Texture1D* texture1D = new av::osg::Texture1D(); av::osg::Texture2D* texture2D = new av::osg::Texture2D(); AV_FC_ADD_FIELD(Width, 1.0f); AV_FC_ADD_FIELD(Height, 1.0f); AV_FC_ADD_FIELD(Color, ::osg::Vec4(1, 1, 1, 1)); AV_FC_ADD_FIELD(Position, ::osg::Vec3(0, 0, 0)); AV_FC_ADD_FIELD(UseFilename, true); AV_FC_ADD_FIELD(Filename, ""); AV_FC_ADD_FIELD(Texture1D, texture1D); AV_FC_ADD_FIELD(Texture2D, texture2D); AV_FC_ADD_FIELD(TexCoord01, ::osg::Vec2(0.0f, 1.0f)); AV_FC_ADD_FIELD(TexCoord00, ::osg::Vec2(0.0f, 0.0f)); AV_FC_ADD_FIELD(TexCoord10, ::osg::Vec2(1.0f, 0.0f)); AV_FC_ADD_FIELD(TexCoord11, ::osg::Vec2(1.0f, 1.0f)); SFVec3 TexCoord01; SFVec3 TexCoord00; SFVec3 TexCoord10; SFVec3 TexCoord11; AV_FC_ADD_ADAPTOR_FIELD(MinFilter, boost::bind(&TexturedQuad::getMinFilterCB, this, _1), boost::bind(&TexturedQuad::setMinFilterCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(MagFilter, boost::bind(&TexturedQuad::getMagFilterCB, this, _1), boost::bind(&TexturedQuad::setMagFilterCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(InternalFormatMode, boost::bind(&TexturedQuad::getInternalFormatModeCB, this, _1), boost::bind(&TexturedQuad::setInternalFormatModeCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(MaxAnisotropy, boost::bind(&TexturedQuad::getMaxAnisotropyCB, this, _1), boost::bind(&TexturedQuad::setMaxAnisotropyCB, this, _1)); // set up geometry getOsgGeometry()->setVertexArray(mVertexArray.get()); (*mNormals)[0].set(0.0f, 0.0f, 1.0f); getOsgGeometry()->setNormalArray(mNormals.get()); getOsgGeometry()->setNormalBinding(::osg::Geometry::BIND_OVERALL); getOsgGeometry()->addPrimitiveSet(new ::osg::DrawArrays(GL_QUADS, 0, 4)); getOsgGeometry()->setColorArray(mColors.get()); getOsgGeometry()->setColorBinding(::osg::Geometry::BIND_OVERALL); (*mTexCoords)[0].set(0.0f, 1.0f); (*mTexCoords)[1].set(0.0f, 0.0f); (*mTexCoords)[2].set(1.0f, 0.0f); (*mTexCoords)[3].set(1.0f, 1.0f); getOsgGeometry()->setTexCoordArray(0, mTexCoords.get()); // set up texture Texture2D.getValue()->getOsgTexture2D()->setWrap(::osg::Texture::WRAP_S, ::osg::Texture::CLAMP_TO_EDGE); Texture2D.getValue()->getOsgTexture2D()->setWrap(::osg::Texture::WRAP_T, ::osg::Texture::CLAMP_TO_EDGE); }
av::osg::Uniform::Uniform(::osg::Uniform* osguniform) : Object(osguniform), mOsgUniform(osguniform) { AV_FC_ADD_ADAPTOR_FIELD(Values, boost::bind(&Uniform::getValuesCB, this, _1), boost::bind(&Uniform::setValuesCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(Type, boost::bind(&Uniform::getTypeCB, this, _1), boost::bind(&Uniform::setTypeCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(UniformName, boost::bind(&Uniform::getUniformNameCB, this, _1), boost::bind(&Uniform::setUniformNameCB, this, _1)); }
av::gua::LightVisibilityPassDescription::LightVisibilityPassDescription( std::shared_ptr< ::gua::LightVisibilityPassDescription> const& guaLightVisibilityPassDescription) : PipelinePassDescription(guaLightVisibilityPassDescription) , m_guaLightVisibilityPassDescription(guaLightVisibilityPassDescription) { AV_FC_ADD_ADAPTOR_FIELD(RasterizationMode, boost::bind(&LightVisibilityPassDescription::getRasterizationModeCB, this, _1), boost::bind(&LightVisibilityPassDescription::setRasterizationModeCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(TilePower, boost::bind(&LightVisibilityPassDescription::getTilePowerCB, this, _1), boost::bind(&LightVisibilityPassDescription::setTilePowerCB, this, _1)); }
av::gua::CollisionShape::CollisionShape(::gua::physics::CollisionShape* guashape) : m_guaShape(guashape) { AV_FC_ADD_ADAPTOR_FIELD(IsDynamicShape, boost::bind(&CollisionShape::getIsDynamicShapeCB, this, _1), boost::bind(&CollisionShape::setIsDynamicShapeCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(IsStaticShape, boost::bind(&CollisionShape::getIsStaticShapeCB, this, _1), boost::bind(&CollisionShape::setIsStaticShapeCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(HasIdenticalShapeConstructor, boost::bind(&CollisionShape::getHasIdenticalShapeConstructorCB, this, _1), boost::bind(&CollisionShape::setHasIdenticalShapeConstructorCB, this, _1)); }
av::gua::NetTransform::NetTransform() : TransformNode(), NetNode() { // the name of the network goup to join AV_FC_ADD_FIELD(Groupname, ""); // the list of current group members. AV_FC_ADD_FIELD(Members, std::vector<std::string>()); AV_FC_ADD_FIELD(NewMembers, std::vector<std::string>()); AV_FC_ADD_FIELD(DepartedMembers, std::vector<std::string>()); AV_FC_ADD_FIELD(NetId, std::string()); AV_FC_ADD_ADAPTOR_FIELD(SharedContainers, std::bind(&NetTransform::getSharedContainersCB, this,std::placeholders::_1), std::bind(&NetTransform::setSharedContainersCB, this,std::placeholders::_1)); Groupname.dontDistribute(true); Members.dontDistribute(true); NewMembers.dontDistribute(true); DepartedMembers.dontDistribute(true); NetId.dontDistribute(true); mPreEvalHandle = ApplicationInstance::get().addPreEvaluationContainerCallback(std::bind(&NetTransform::handleNetworkReceives, this)); mPostEvalHandle = ApplicationInstance::get().addPostEvaluationContainerCallback(std::bind(&NetTransform::handleNetworkSends, this)); }
av::gua::nurbs::NURBSNode::NURBSNode(std::shared_ptr< ::gua::node::NURBSNode> guanode) : GeometryNode(guanode) , m_guaNURBSNode(guanode) { AV_FC_ADD_ADAPTOR_FIELD(Geometry, std::bind(&NURBSNode::getGeometryCB, this,std::placeholders::_1), std::bind(&NURBSNode::setGeometryCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(Material, std::bind(&NURBSNode::getMaterialCB, this,std::placeholders::_1), std::bind(&NURBSNode::setMaterialCB, this,std::placeholders::_1)); if (guanode->get_material()) { m_Material = av::Link<av::gua::Material>(new av::gua::Material(guanode->get_material())); } }
av::gua::PipelineDescription::PipelineDescription( std::shared_ptr< ::gua::PipelineDescription> const& guaPipelineDescription) : m_guaPipelineDescription(guaPipelineDescription) { auto avGuaPasses(new av::MultiField<av::Link<av::gua::PipelinePassDescription>>::ContainerType()); guaPipelineDescription->set_user_data(avGuaPasses); AV_FC_ADD_ADAPTOR_FIELD(EnableABuffer, boost::bind(&PipelineDescription::getEnableABufferCB, this, _1), boost::bind(&PipelineDescription::setEnableABufferCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(ABufferSize, boost::bind(&PipelineDescription::getABufferSizeCB, this, _1), boost::bind(&PipelineDescription::setABufferSizeCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(Passes, boost::bind(&PipelineDescription::getPassesCB, this, _1), boost::bind(&PipelineDescription::setPassesCB, this, _1)); }
av::vrpn::Wiimote::Wiimote() : Device() { mRumbling = false; AV_FC_ADD_FIELD(Button0, false); AV_FC_ADD_FIELD(Button1, false); AV_FC_ADD_FIELD(Button2, false); AV_FC_ADD_FIELD(Button3, false); AV_FC_ADD_FIELD(Button4, false); AV_FC_ADD_FIELD(Button5, false); AV_FC_ADD_FIELD(Button6, false); AV_FC_ADD_FIELD(Button7, false); AV_FC_ADD_FIELD(Button8, false); AV_FC_ADD_FIELD(Button9, false); AV_FC_ADD_FIELD(Button10, false); AV_FC_ADD_FIELD(Button11, false); AV_FC_ADD_FIELD(Button12, false); AV_FC_ADD_FIELD(Button13, false); AV_FC_ADD_FIELD(Button14, false); AV_FC_ADD_FIELD(Button15, false); AV_FC_ADD_FIELD(Channel0, false); AV_FC_ADD_FIELD(Channel1, false); AV_FC_ADD_FIELD(Channel2, false); AV_FC_ADD_FIELD(Channel3, false); AV_FC_ADD_FIELD(Channel4, false); AV_FC_ADD_FIELD(Channel5, false); AV_FC_ADD_FIELD(Channel6, false); AV_FC_ADD_FIELD(Channel7, false); AV_FC_ADD_FIELD(Channel8, false); AV_FC_ADD_FIELD(Channel9, false); AV_FC_ADD_FIELD(Channel10, false); AV_FC_ADD_FIELD(Channel11, false); AV_FC_ADD_FIELD(Channel12, false); AV_FC_ADD_FIELD(Channel13, false); AV_FC_ADD_FIELD(Channel14, false); AV_FC_ADD_FIELD(Channel15, false); AV_FC_ADD_ADAPTOR_FIELD(Rumble, boost::bind(&av::vrpn::Wiimote::getRumbleCB, this, _1), boost::bind(&av::vrpn::Wiimote::setRumbleCB, this, _1)); AV_FC_ADD_FIELD(LED0, false); AV_FC_ADD_FIELD(LED1, false); AV_FC_ADD_FIELD(LED2, false); // AV_FC_ADD_FIELD(LED3, false); AV_FC_ADD_ADAPTOR_FIELD(LED3, boost::bind(&av::vrpn::Wiimote::getLED3CB, this, _1), boost::bind(&av::vrpn::Wiimote::setLED3CB, this, _1)); }
av::osg::Group::Group(::osg::Group* osggroup) : Node(osggroup), mOsgGroup(osggroup) { AV_FC_ADD_ADAPTOR_FIELD(Children, boost::bind(&av::osg::Group::getChildrenCB, this, _1), boost::bind(&av::osg::Group::setChildrenCB, this, _1)); }
av::osg::Geode::Geode(::osg::Geode* osggeode) : Node(osggeode), mOsgGeode(osggeode) { AV_FC_ADD_ADAPTOR_FIELD(Drawables, boost::bind(&Geode::getDrawablesCB, this, _1), boost::bind(&Geode::setDrawablesCB, this, _1)); }
av::gua::TexturedQuadNode::TexturedQuadNode(std::shared_ptr< ::gua::node::TexturedQuadNode> guanode) : Node(guanode), m_guaNode(guanode) { AV_FC_ADD_ADAPTOR_FIELD(Texture, std::bind(&TexturedQuadNode::getTextureCB, this,std::placeholders::_1), std::bind(&TexturedQuadNode::setTextureCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(Width, std::bind(&TexturedQuadNode::getWidthCB, this,std::placeholders::_1), std::bind(&TexturedQuadNode::setWidthCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(Height, std::bind(&TexturedQuadNode::getHeightCB, this,std::placeholders::_1), std::bind(&TexturedQuadNode::setHeightCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(FlipX, std::bind(&TexturedQuadNode::getFlipXCB, this,std::placeholders::_1), std::bind(&TexturedQuadNode::setFlipXCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(FlipY, std::bind(&TexturedQuadNode::getFlipYCB, this,std::placeholders::_1), std::bind(&TexturedQuadNode::setFlipYCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(ScaledTransform, std::bind(&TexturedQuadNode::getScaledTransformCB, this,std::placeholders::_1), std::bind(&TexturedQuadNode::setScaledTransformCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(ScaledWorldTransform, std::bind(&TexturedQuadNode::getScaledWorldTransformCB, this,std::placeholders::_1), std::bind(&TexturedQuadNode::setScaledWorldTransformCB, this,std::placeholders::_1)); }
av::gua::BoxShape::BoxShape(::gua::physics::BoxShape* guashape) : CollisionShape(guashape), m_guaShape(reinterpret_cast< ::gua::physics::BoxShape*>(CollisionShape::getGuaShape())) { AV_FC_ADD_ADAPTOR_FIELD(HalfExtents, boost::bind(&BoxShape::getHalfExtentsCB, this, _1), boost::bind(&BoxShape::setHalfExtentsCB, this, _1)); }
av::gua::TriangleMeshShape::TriangleMeshShape(::gua::physics::TriangleMeshShape* guashape) : CollisionShape(guashape), m_guaShape(reinterpret_cast< ::gua::physics::TriangleMeshShape*>(CollisionShape::getGuaShape())) { AV_FC_ADD_ADAPTOR_FIELD(Scaling, boost::bind(&TriangleMeshShape::getScalingCB, this, _1), boost::bind(&TriangleMeshShape::setScalingCB, this, _1)); }
av::gua::SSAAPassDescription::SSAAPassDescription( std::shared_ptr< ::gua::SSAAPassDescription> const& guaSSAAPassDescription) : PipelinePassDescription(guaSSAAPassDescription) , m_guaSSAAPassDescription(guaSSAAPassDescription) { AV_FC_ADD_ADAPTOR_FIELD(Mode, boost::bind(&SSAAPassDescription::getModeCB, this, _1), boost::bind(&SSAAPassDescription::setModeCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(FxaaQualitySubpix, boost::bind(&SSAAPassDescription::getFxaaQualitySubpixCB, this, _1), boost::bind(&SSAAPassDescription::setFxaaQualitySubpixCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(FxaaEdgeThreshold, boost::bind(&SSAAPassDescription::getFxaaEdgeThresholdCB, this, _1), boost::bind(&SSAAPassDescription::setFxaaEdgeThresholdCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(FxaaThresholdMin, boost::bind(&SSAAPassDescription::getFxaaThresholdMinCB, this, _1), boost::bind(&SSAAPassDescription::setFxaaThresholdMinCB, this, _1)); }
av::shade::State::State() : mOsgStateSet(new ::osg::StateSet), mState(new ::shade::osg::Wrapper(mOsgStateSet.get())) { AV_FC_ADD_FIELD(Shader, 0); AV_FC_ADD_ADAPTOR_FIELD(DataVariance, boost::bind(&State::getDataVarianceCB, this, _1), boost::bind(&State::setDataVarianceCB, this, _1)); }
av::gua::lod::PLodPassDescription::PLodPassDescription( std::shared_ptr< ::gua::PLodPassDescription> const& guaPLodPassDescription) : PipelinePassDescription(guaPLodPassDescription) , m_guaPLodPassDescription(guaPLodPassDescription) { AV_FC_ADD_ADAPTOR_FIELD(SurfelRenderMode, std::bind(&PLodPassDescription::getSurfelRenderModeCB, this,std::placeholders::_1), std::bind(&PLodPassDescription::setSurfelRenderModeCB, this,std::placeholders::_1)); }
av::gua::SSAOPassDescription::SSAOPassDescription( std::shared_ptr< ::gua::SSAOPassDescription> const& guaSSAOPassDescription) : PipelinePassDescription(guaSSAOPassDescription) , m_guaSSAOPassDescription(guaSSAOPassDescription) { AV_FC_ADD_ADAPTOR_FIELD(Radius, boost::bind(&SSAOPassDescription::getRadiusCB, this, _1), boost::bind(&SSAOPassDescription::setRadiusCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(Intensity, boost::bind(&SSAOPassDescription::getIntensityCB, this, _1), boost::bind(&SSAOPassDescription::setIntensityCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(Falloff, boost::bind(&SSAOPassDescription::getFalloffCB, this, _1), boost::bind(&SSAOPassDescription::setFalloffCB, this, _1)); }
av::gua::MaterialShaderDescription::MaterialShaderDescription(std::shared_ptr<::gua::MaterialShaderDescription> const& guaMaterialShaderDescription) : m_guaMaterialShaderDescription(guaMaterialShaderDescription) { AV_FC_ADD_ADAPTOR_FIELD( VertexMethods, std::bind(&MaterialShaderDescription::getVertexMethodsCB, this, std::placeholders::_1), std::bind(&MaterialShaderDescription::setVertexMethodsCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(FragmentMethods, std::bind(&MaterialShaderDescription::getFragmentMethodsCB, this, std::placeholders::_1), std::bind(&MaterialShaderDescription::setFragmentMethodsCB, this, std::placeholders::_1)); for(auto& method : guaMaterialShaderDescription->get_vertex_methods()) { m_vertexMethods.push_back(new av::gua::MaterialShaderMethod(method)); } for(auto& method : guaMaterialShaderDescription->get_fragment_methods()) { m_fragmentMethods.push_back(new av::gua::MaterialShaderMethod(method)); } }
av::gua::FixedConstraint::FixedConstraint(::gua::physics::FixedConstraint* guaconstraint) : Constraint(guaconstraint), m_guaConstraint(reinterpret_cast< ::gua::physics::FixedConstraint*>(Constraint::getGuaConstraint())) { AV_FC_ADD_ADAPTOR_FIELD(FrameA, std::bind(&FixedConstraint::getFrameACB, this,std::placeholders::_1), std::bind(&FixedConstraint::setFrameACB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(FrameB, std::bind(&FixedConstraint::getFrameBCB, this,std::placeholders::_1), std::bind(&FixedConstraint::setFrameBCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(LockRotation, std::bind(&FixedConstraint::getLockRotationCB, this,std::placeholders::_1), std::bind(&FixedConstraint::setLockRotationCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(LockTranslation, std::bind(&FixedConstraint::getLockTranslationCB, this,std::placeholders::_1), std::bind(&FixedConstraint::setLockTranslationCB, this,std::placeholders::_1)); }
av::gua::Constraint::Constraint(::gua::physics::Constraint* guaconstraint) : m_guaConstraint(guaconstraint) { AV_FC_ADD_ADAPTOR_FIELD(BodyA, std::bind(&Constraint::getBodyACB, this,std::placeholders::_1), std::bind(&Constraint::setBodyACB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(BodyB, std::bind(&Constraint::getBodyBCB, this,std::placeholders::_1), std::bind(&Constraint::setBodyBCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(Enabled, std::bind(&Constraint::getEnabledCB, this,std::placeholders::_1), std::bind(&Constraint::setEnabledCB, this,std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(BreakingImpulseThreshold, std::bind(&Constraint::getBreakingImpulseThresholdCB, this,std::placeholders::_1), std::bind(&Constraint::setBreakingImpulseThresholdCB, this,std::placeholders::_1)); AV_FC_ADD_FIELD (DisableCollisionBetweenLinkedBodies, false); }
av::osg::viewer::CompositeViewer::CompositeViewer() : Object(new ::osgViewer::CompositeViewer), mOsgCompositeViewer(dynamic_cast< ::osgViewer::CompositeViewer*>(getOsgObject())) { AV_FC_ADD_FIELD(Views, MFView::ContainerType()); AV_FC_ADD_ADAPTOR_FIELD(ThreadingModel, boost::bind(&av::osg::viewer::CompositeViewer::getThreadingModelCB, this, _1), boost::bind(&av::osg::viewer::CompositeViewer::setThreadingModelCB, this, _1)); mRenderCallbackHandle = av::ApplicationInstance::get(). addRenderCallback(boost::bind(&av::osg::viewer::CompositeViewer::renderCB, this)); }
av::gua::gui::GuiResourceNode::GuiResourceNode(std::shared_ptr< ::gua::GuiResource> guaGuiResource) : av::gua::TransformNode(std::make_shared<::gua::node::TransformNode>()), m_guaGuiResource(guaGuiResource), m_initialized(false), m_distributed(false), m_textureName(""), m_size(::gua::math::vec2(-1.f)), m_clearCallbackHandle() { AV_FC_ADD_ADAPTOR_FIELD(TextureName, boost::bind(&GuiResourceNode::getTextureNameCB, this, _1), boost::bind(&GuiResourceNode::setTextureNameCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(URL, boost::bind(&GuiResourceNode::getURLCB, this, _1), boost::bind(&GuiResourceNode::setURLCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(Size, boost::bind(&GuiResourceNode::getSizeCB, this, _1), boost::bind(&GuiResourceNode::setSizeCB, this, _1)); AV_FC_ADD_ADAPTOR_FIELD(Interactive, boost::bind(&GuiResourceNode::getInteractiveCB, this, _1), boost::bind(&GuiResourceNode::setInteractiveCB, this, _1)); AV_FC_ADD_FIELD(m_networkMousePositions, MFVec2::ContainerType()); AV_FC_ADD_FIELD(m_networkMousePositionsRelative, MFVec2::ContainerType()); AV_FC_ADD_FIELD(m_networkKeyboardEvent, MFVec4i::ContainerType()); AV_FC_ADD_FIELD(m_networkCharEvent, MFUInt::ContainerType()); AV_FC_ADD_FIELD(m_networkMouseButtons, MFVec3i::ContainerType()); AV_FC_ADD_FIELD(m_networkMouseWheelDirections, MFVec2::ContainerType()); AV_FC_ADD_FIELD(m_networkJavascriptCalls, MFString::ContainerType()); AV_FC_ADD_FIELD(m_networkActionEvent, MFInt::ContainerType()); AV_FC_ADD_FIELD(m_networkHistoryEvent, MFInt::ContainerType()); m_clearCallbackHandle = ApplicationInstance::get().addRenderCallback(boost::bind(&GuiResourceNode::clearCallback, this)); }
av::gua::Frustum::Frustum(::gua::Frustum* guaFrustum) : m_guaFrustum(guaFrustum) { AV_FC_ADD_ADAPTOR_FIELD(ClipNear, std::bind(&Frustum::getClipNearCB, this, std::placeholders::_1), std::bind(&Frustum::setClipNearCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(ClipFar, std::bind(&Frustum::getClipFarCB, this, std::placeholders::_1), std::bind(&Frustum::setClipFarCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(CameraTransform, std::bind(&Frustum::getCameraTransformCB, this, std::placeholders::_1), std::bind(&Frustum::setCameraTransformCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(ScreenTransform, std::bind(&Frustum::getScreenTransformCB, this, std::placeholders::_1), std::bind(&Frustum::setScreenTransformCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(ViewMatrix, std::bind(&Frustum::getViewMatrixCB, this, std::placeholders::_1), std::bind(&Frustum::setViewMatrixCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(ProjectionMatrix, std::bind(&Frustum::getProjectionMatrixCB, this, std::placeholders::_1), std::bind(&Frustum::setProjectionMatrixCB, this, std::placeholders::_1)); AV_FC_ADD_ADAPTOR_FIELD(Corners, std::bind(&Frustum::getCornersCB, this, std::placeholders::_1), std::bind(&Frustum::setCornersCB, this, std::placeholders::_1)); }
av::FieldContainer::FieldContainer() : mEvaluateId(0u) { mFlags.mNeedsEvaluation = false; mFlags.mIsInEvaluationList = false; mFlags.mFieldsCalculated = false; mFlags.mAlwaysEvaluate = false; mFlags.mIsEvaluating = false; mFlags.mAllowScheduling = true; // Register with pool and set ID to the one, generated by the pool // as response to registration. mId = av::ContainerPool::registerInstance(this); av::ContainerPool::notifyCreation(this); AV_FC_ADD_ADAPTOR_FIELD(Name, std::bind(&av::FieldContainer::getNameCB, this, std::placeholders::_1), std::bind(&av::FieldContainer::setNameCB, this, std::placeholders::_1)); }