コード例 #1
0
av::tools::TriggerSelector::TriggerSelector():
  mLastTrigger(false)
{
  AV_FC_ADD_FIELD(Targets, MFTargetHolder::ContainerType());
  AV_FC_ADD_FIELD(Trigger, false);
  AV_FC_ADD_FIELD(TransitionOnly, false);
}
コード例 #2
0
av::tools::FieldSelector::FieldSelector()
{
  AV_FC_ADD_FIELD(Targets, MFTargetHolder::ContainerType());
  AV_FC_ADD_FIELD(SelectableFieldName, "");
  AV_FC_ADD_FIELD(EqualNameOnly, true);
  AV_FC_ADD_FIELD(TreatAsRegularExpression, false);
}
コード例 #3
0
ファイル: ScriptTool.cpp プロジェクト: 4og/avango
av::tools::ScriptTool::ScriptTool()
{
  AV_FC_ADD_FIELD(TargetCallback, av::script::SFObject::ValueType());
  AV_FC_ADD_FIELD(AddedTargetCallback, av::script::SFObject::ValueType());
  AV_FC_ADD_FIELD(KeptTargetCallback, av::script::SFObject::ValueType());
  AV_FC_ADD_FIELD(RemovedTargetCallback, av::script::SFObject::ValueType());
}
コード例 #4
0
ファイル: NetTransform.cpp プロジェクト: DreadNoize/avango
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));

}
コード例 #5
0
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&) {}
    );
}
コード例 #6
0
ファイル: Bool2Or.cpp プロジェクト: vrsys/avango
av::utils::Bool2Or::Bool2Or()
{
    AV_FC_ADD_FIELD(Input1, false);
    AV_FC_ADD_FIELD(Input2, false);
    AV_FC_ADD_FIELD(Output, false);

    Name.setValue("Bool2Or");
}
コード例 #7
0
ファイル: TypeSelector.cpp プロジェクト: AnimationInVR/avango
av::tools::TypeSelector::TypeSelector():
  mTypesDirty(true)
{
  AV_FC_ADD_FIELD(Targets, MFTargetHolder::ContainerType());
  AV_FC_ADD_FIELD(SelectableTypes, MFContainer::ContainerType());
  AV_FC_ADD_FIELD(SelectableTargetTypes, MFTargetHolder::ContainerType());
  AV_FC_ADD_FIELD(EqualTypeOnly, false);
}
コード例 #8
0
ファイル: NameSelector.cpp プロジェクト: AnimationInVR/avango
av::tools::NameSelector::NameSelector():
  mNamesDirty(true)
{
  AV_FC_ADD_FIELD(Targets, MFTargetHolder::ContainerType());
  AV_FC_ADD_FIELD(SelectableNames, MFString::ContainerType());
  AV_FC_ADD_FIELD(SelectableTargetNames, MFTargetHolder::ContainerType());
  AV_FC_ADD_FIELD(EqualNameOnly, true);
  AV_FC_ADD_FIELD(TreatAsRegularExpression, false);
}
コード例 #9
0
ファイル: ProximitySelector.cpp プロジェクト: vrsys/avango
av::tools::ProximitySelector::ProximitySelector()
{
    AV_FC_ADD_FIELD(TargetObjects, MFContainer::ContainerType());
    AV_FC_ADD_FIELD(Targets, MFTargetHolder::ContainerType());
    AV_FC_ADD_FIELD(Position, ::gua::math::vec3(0.0, 0.0, 0.0));
    AV_FC_ADD_FIELD(PositionTransform, ::gua::math::mat4::identity());
    AV_FC_ADD_FIELD(ProximityRadius, 1.0);
    AV_FC_ADD_FIELD(DistanceRadius, 2.0);
    AV_FC_ADD_FIELD(Time, 0.0);
    AV_FC_ADD_FIELD(ProximityLag, 0.0);
    AV_FC_ADD_FIELD(MaxNumberOfTargets, 0u);
}
コード例 #10
0
ファイル: StateGroup.cpp プロジェクト: 4og/avango
av::shade::StateGroup::StateGroup()
{
  AV_FC_ADD_FIELD(State, 0);

  UpdateCallback* uc = new UpdateCallback();
  getOsgNode()->setUpdateCallback(uc);
}
コード例 #11
0
av::tools::IntersectionTargetHolder::IntersectionTargetHolder()
{
  AV_FC_ADD_FIELD(Intersection, 0);

  if (!Keep.getValue())
    Keep.setValue(true);
}
コード例 #12
0
av::osg::Sphere::Sphere() : MatrixTransform(), mHints(new ::osg::TessellationHints), mGeode(new ::osg::Geode), mRadiusChanged(false), mDetailRatioChanged(false)
{
    AV_FC_ADD_FIELD(Radius, 1.0f);
    AV_FC_ADD_FIELD(DetailRatio, 0.5f);
    AV_FC_ADD_FIELD(Color, ::osg::Vec4(1, 1, 1, 1));

    mSphere = new ::osg::Sphere(::osg::Vec3(), Radius.getValue());

    mHints->setDetailRatio(DetailRatio.getValue());

    mShapeDrawable = new ::osg::ShapeDrawable(mSphere.get(), mHints.get());
    mShapeDrawable.get()->setColor(Color.getValue());

    mGeode.get()->addDrawable(mShapeDrawable.get());

    getOsgMatrixTransform()->addChild(mGeode.get());
}
コード例 #13
0
ファイル: State.cpp プロジェクト: 4og/avango
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));
}
コード例 #14
0
av::display::mt::MultitouchFinger::MultitouchFinger(int _id, ::osg::Vec2 _position, float _creationTime, float _angle, float _width, float _height, float _area, int _user_id)
{
    AV_FC_ADD_FIELD(Identifier, _id);
    AV_FC_ADD_FIELD(Position, _position);
    AV_FC_ADD_FIELD(CreationTime, _creationTime);
    AV_FC_ADD_FIELD(Angle, _angle);
    AV_FC_ADD_FIELD(Width, _width);
    AV_FC_ADD_FIELD(Height, _height);
    AV_FC_ADD_FIELD(Area, _area);
    AV_FC_ADD_FIELD(UserID, _user_id);
}
コード例 #15
0
ファイル: CompositeViewer.cpp プロジェクト: 4og/avango
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));
}
コード例 #16
0
av::osg::TriangleContainer::TriangleContainer() : mVecFieldHasChanged(false), mColorFieldHasChanged(false), mModeFieldHasChanged(false), mNormalFieldHasChanged(false)
{
    AV_FC_ADD_FIELD(Vertices, MFVec3::ContainerType());
    AV_FC_ADD_FIELD(Colors, MFVec4::ContainerType());
    AV_FC_ADD_FIELD(Normals, MFVec3::ContainerType());
    AV_FC_ADD_FIELD(Mode, GL_TRIANGLES);
    AV_FC_ADD_FIELD(ModeToggle, false);
    AV_FC_ADD_FIELD(PointSize, 1.0);
}
コード例 #17
0
av::utils::ProximitySensor::ProximitySensor()
{
    AV_FC_ADD_FIELD(MinDistance,       0.);
    AV_FC_ADD_FIELD(MaxDistance,       1.);
    AV_FC_ADD_FIELD(ReferencePosition, ::gua::math::mat4());
    AV_FC_ADD_FIELD(CurrentPosition,   ::gua::math::mat4());
    AV_FC_ADD_FIELD(Proximity,         0.);
    AV_FC_ADD_FIELD(Switch,            0);

    Name.setValue("ProximitySensor");
}
コード例 #18
0
ファイル: GuiResourceNode.cpp プロジェクト: flair2005/avango
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));

}
コード例 #19
0
ファイル: OculusWindow.cpp プロジェクト: flair2005/avango
av::oculus::OculusWindow::OculusWindow(
  std::shared_ptr< ::gua::OculusWindow> const& guaOculusWindow
) : av::gua::GlfwWindow(guaOculusWindow),
    m_guaOculusWindow(guaOculusWindow)
{
  // store hmd params in according fields
  AV_FC_ADD_FIELD(SensorOrientation, ::gua::math::mat4());
  AV_FC_ADD_FIELD(Resolution,m_guaOculusWindow->get_window_resolution());
  AV_FC_ADD_FIELD(EyeResolution,m_guaOculusWindow->get_window_resolution());
  AV_FC_ADD_FIELD(LeftScreenSize, m_guaOculusWindow->get_left_screen_size());
  AV_FC_ADD_FIELD(RightScreenSize, m_guaOculusWindow->get_right_screen_size());
  AV_FC_ADD_FIELD(LeftScreenTranslation, m_guaOculusWindow->get_left_screen_translation());
  AV_FC_ADD_FIELD(RightScreenTranslation, m_guaOculusWindow->get_right_screen_translation());
  AV_FC_ADD_FIELD(EyeDistance, m_guaOculusWindow->get_IPD());



  // needs to evaluate every frame to update sensor orientation
  alwaysEvaluate(true);
}
コード例 #20
0
ファイル: PickResult.cpp プロジェクト: AnimationInVR/avango
av::gua::PickResult::PickResult(::gua::PickResult const& result)
{

    av::Link<av::gua::Node> node(nullptr);
    if (result.object && result.object->get_user_data(0)) {
      node = static_cast<av::gua::Node*>(result.object->get_user_data(0));
    }

    AV_FC_ADD_FIELD(Distance, result.distance);
    AV_FC_ADD_FIELD(Object, node);
    AV_FC_ADD_FIELD(Position, result.position);
    AV_FC_ADD_FIELD(WorldPosition, result.world_position);
    AV_FC_ADD_FIELD(Normal, result.normal);
    AV_FC_ADD_FIELD(WorldNormal, result.world_normal);
    AV_FC_ADD_FIELD(TextureCoords, result.texture_coords);

}
コード例 #21
0
ファイル: Constraint.cpp プロジェクト: DreadNoize/avango
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);
}
コード例 #22
0
ファイル: LoadImageStream.cpp プロジェクト: 4og/avango
av::osg::LoadImageStream::LoadImageStream() 
{
  AV_FC_ADD_FIELD(Filename, "");
  AV_FC_ADD_FIELD(ImageStream, 0);
}
コード例 #23
0
ファイル: EventFields.cpp プロジェクト: 4og/avango
av::osg::viewer::EventFields::EventFields() :
  mView(0)
{
  AV_FC_ADD_FIELD(View, 0);
  AV_FC_ADD_FIELD(DragEvent, ::osg::Vec2(0.0, 0.0));
  AV_FC_ADD_FIELD(MoveEvent, ::osg::Vec2(0.0, 0.0));
  AV_FC_ADD_FIELD(MouseButtonLeft, false);
  AV_FC_ADD_FIELD(MouseButtonMiddle, false);
  AV_FC_ADD_FIELD(MouseButtonRight, false);
  AV_FC_ADD_FIELD(MouseButtons_OnlyLeft, false);
  AV_FC_ADD_FIELD(MouseButtons_OnlyMiddle, false);
  AV_FC_ADD_FIELD(MouseButtons_OnlyRight, false);
  AV_FC_ADD_FIELD(MouseButtons_LeftAndMiddle, false);
  AV_FC_ADD_FIELD(MouseButtons_LeftAndRight, false);
  AV_FC_ADD_FIELD(MouseButtons_MiddleAndRight, false);
  AV_FC_ADD_FIELD(MouseButtons_LeftAndMiddleAndRight, false);
  AV_FC_ADD_FIELD(MouseButtonLeftDoubleClick, false);
  AV_FC_ADD_FIELD(MouseButtonMiddleDoubleClick, false);
  AV_FC_ADD_FIELD(MouseButtonRightDoubleClick, false);
  AV_FC_ADD_FIELD(MouseScrollUp, false);
  AV_FC_ADD_FIELD(MouseScrollDown, false);

  AV_FC_ADD_FIELD(KeysPressed, MFInt::ContainerType());
  AV_FC_ADD_FIELD(KeyShift, false);
  AV_FC_ADD_FIELD(KeyCtrl, false);
  AV_FC_ADD_FIELD(KeyAlt, false);
  AV_FC_ADD_FIELD(KeyInsert, false);
  AV_FC_ADD_FIELD(KeyDelete, false);
  AV_FC_ADD_FIELD(KeyHome, false);
  AV_FC_ADD_FIELD(KeyEnd, false);
  AV_FC_ADD_FIELD(KeyPageUp, false);
  AV_FC_ADD_FIELD(KeyPageDown, false);
  AV_FC_ADD_FIELD(KeyLeft, false);
  AV_FC_ADD_FIELD(KeyRight, false);
  AV_FC_ADD_FIELD(KeyUp, false);
  AV_FC_ADD_FIELD(KeyDown, false);
  AV_FC_ADD_FIELD(KeyEsc, false);
  AV_FC_ADD_FIELD(KeySpace, false);
  AV_FC_ADD_FIELD(KeyEnter, false);
  AV_FC_ADD_FIELD(KeyAltReturn, false);
  AV_FC_ADD_FIELD(KeyF1, false);
  AV_FC_ADD_FIELD(KeyF2, false);
  AV_FC_ADD_FIELD(KeyF3, false);
  AV_FC_ADD_FIELD(KeyF4, false);
  AV_FC_ADD_FIELD(KeyF5, false);
  AV_FC_ADD_FIELD(KeyF6, false);
  AV_FC_ADD_FIELD(KeyF7, false);
  AV_FC_ADD_FIELD(KeyF8, false);
  AV_FC_ADD_FIELD(KeyF9, false);
  AV_FC_ADD_FIELD(KeyF10, false);
  AV_FC_ADD_FIELD(KeyF11, false);
  AV_FC_ADD_FIELD(KeyF12, false);
}
コード例 #24
0
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);
}
コード例 #25
0
ファイル: Trackball.cpp プロジェクト: 4og/avango
av::utils::Trackball::Trackball():
  mTimeLastMovement(0.0),
  mLastDirection(0.0, 0.0),
  mLastProjected(0.0, 0.0, 0.0),
  mDragging(false),
  mSpinning(false),
  mReset(false)
{
  av::Link< ::av::osg::BoundingSphere > b = new ::av::osg::BoundingSphere();

  AV_FC_ADD_FIELD(Matrix, ::osg::Matrix::identity());
  AV_FC_ADD_FIELD(TimeIn, 0.0);
  AV_FC_ADD_FIELD(Direction, ::osg::Vec2(0.0, 0.0));
  AV_FC_ADD_FIELD(RotateTrigger, false);
  AV_FC_ADD_FIELD(ZoomTrigger, false);
  AV_FC_ADD_FIELD(PanTrigger, false);
  AV_FC_ADD_FIELD(ResetTrigger, false);
  AV_FC_ADD_FIELD(Enable, true);
  AV_FC_ADD_FIELD(AutoAdjustCenterTransform, true);
  AV_FC_ADD_FIELD(EnableSpinning,true);
  AV_FC_ADD_FIELD(SpinningTimeThreshold, 0.3);
  AV_FC_ADD_FIELD(SpinningWeightingCoefficient,0.97);
  AV_FC_ADD_FIELD(CenterTransform, ::osg::Matrix::translate(0.0, 0.0, -0.6));
  AV_FC_ADD_FIELD(CenterToBoundingSphere, false);
  AV_FC_ADD_FIELD(BoundingSphere, b);
  AV_FC_ADD_FIELD(CenterTransformOffset, ::osg::Vec3(0,-1.7,0));
  AV_FC_ADD_FIELD(CenterTransformOffsetZCoefficient, 17.0);
  AV_FC_ADD_FIELD(ZoomPanFactor,2.0);


  mRotation = ::osg::Matrix::identity();
  mCenterTransInv = ::osg::Matrix::inverse(CenterTransform.getValue());

  Name.setValue("Trackball");
}
コード例 #26
0
DummyShaderWrapper::DummyShaderWrapper(av::Type type, boost::shared_ptr<::shade::Shader> shader) : Shader(type, shader) { AV_FC_ADD_FIELD(AStringField, "Dummy"); }
コード例 #27
0
ファイル: DeviceActuator.cpp プロジェクト: 4og/avango
av::daemon::DeviceActuator::DeviceActuator()
{
  AV_FC_ADD_FIELD(DeviceService, 0);
  AV_FC_ADD_FIELD(Station,       ::std::string());
}
コード例 #28
0
ファイル: SingleSelector.cpp プロジェクト: 4og/avango
av::tools::SingleSelector::SingleSelector()
{
  AV_FC_ADD_FIELD(Targets, MFTargetHolder::ContainerType());
  AV_FC_ADD_FIELD(LastTarget, false);
}
コード例 #29
0
ファイル: PickSelector.cpp プロジェクト: 4og/avango
av::tools::PickSelector::PickSelector():
  mLastPickTrigger(false)
{
  AV_FC_ADD_FIELD(PickTrigger, false);
  AV_FC_ADD_FIELD(TransitionOnly, true);
  AV_FC_ADD_FIELD(SetCreator, true);
  AV_FC_ADD_FIELD(EveryFrame, false);
  AV_FC_ADD_FIELD(PickRayTransform, ::osg::Matrix::identity());
  AV_FC_ADD_FIELD(PickRayDirection, ::osg::Vec3(0.0, 0.0, -1.0));
  AV_FC_ADD_FIELD(PickRayLength, 1000.0);
  AV_FC_ADD_FIELD(RootNode, 0);
  AV_FC_ADD_FIELD(FirstHitOnly, true);
  AV_FC_ADD_FIELD(NodePickMask, ~0u);
  AV_FC_ADD_FIELD(SubtreePickMask, ~0u);
  AV_FC_ADD_FIELD(PickNodesWithoutPickMask, true);
  AV_FC_ADD_FIELD(CreateNodePaths, false);
  AV_FC_ADD_FIELD(CreateIntersections, false);

  mIntersector =
    new ::osgUtil::LineSegmentIntersector(::osg::Vec3(0.0, 0.0, 0.0), ::osg::Vec3(0.0, 0.0, -1.0));
  mVisitor = new ::osgUtil::IntersectionVisitor(mIntersector.get());
}
コード例 #30
0
ファイル: UnionSelector.cpp プロジェクト: 4og/avango
av::tools::UnionSelector::UnionSelector()
{
  AV_FC_ADD_FIELD(TargetSet1, MFTargetHolder::ContainerType());
  AV_FC_ADD_FIELD(TargetSet2, MFTargetHolder::ContainerType());
}