OpenMask reference application

See the main page for more details of the all packages.


Introduction

The minimal application to run OpenMASK simulations.

This application loads the configuration file, loads the plugins, creates a controller and starts it to run the simulation. With the help of the plugin feature, this application is enough for most of the simulations.

How to use the reference application

The reference application needs as argument the configuration file name to use.

Example

> OMKReferenceApplication myConfigurationFile.cfg

Configuration

The configuration file includes all informations needed to create the simulated objects, the extensions, the visual objects and the animators.

Every defined items use standard and specific configuration parameters.

The commentaries are the same than the c (// or /* and */)

Example

#OpenMASK3

root // the root <=> the controller
{
  Class Controller
  UserParams
  {
    TraceAll off //(1)
    TraceIds [ "Kernel:Event" "Kernel:Attribute" "Kernel:Object" ] //(1)
    TraceFile "trace.txt" //(1)
    Plugins [ ["${OMK_HOME}/lib" "OMKInputs"] ["${OMK_HOME}/lib" "OMKAddOn"] ]  //(2)
  }
  Sons // the objects
  {
    moon // the object name
    {
      Class Trajectory // the object class
      Scheduling       // the object scheduling parameters
      {
        Frequency 60
      }
      Extensions       // the object extensions
      {  
        offset
        {
          Class PostOffset
          Attribute Position
          OffsetConnect [earth Position]
        }
      }
      UserParams       // the object configuration parameters
      {
        Step 0.02
        Targets [ [[160 0 0]] [[80 0 -140]] [[-80 0 -140]] [[-160 0 0]] [[-80 0 140]] [[80 0 140]] ]
        BSpline on
        Position [[0 0 0][0 0 0][0.05]]
      }
    }
    earth
    {
      Class Trajectory
      Scheduling
      {
        Frequency 60
      }
      UserParams
      {
        Targets [ [[1600 0 0]] [[800 0 -1400]] [[-800 0 -1400]] [[-1600 0 0]] [[-800 0 1400]] [[800 0 1400]] ]
        BSpline on
        Position [[0 0 0][0 0 0][0.1]]
      }
    }
    visuOgre
    {
      Class OgreVis
      Scheduling
      {
        Frequency 60
      }
      Extensions
      {
        input
        {
          Class InputExtension
          camera
          {
            Class CameraListener
          }
          ExitOnEsc ON
        }
      }
      UserParams
      {
        OgreHome "${OGRE_HOME}"
        ResourcesFile "resources.cfg"
        VisualObject
        {
          moon
          {
            Class OgreObject
            ResourceGroup "General"
            GeometryFile "../Data/models/sphere.scene"
            Animator
            {
              animator1
              {
                Class TransformAnimator
                NodeName SphereNODE
                ConnectTo [moon Position]
              }
            }
          }
          earth
          {
            Class OgreObject
            ResourceGroup "General"
            GeometryFile "../Data/models/sphere.scene"
            Animator
            {
              animator1
              {
                Class TransformAnimator
                NodeName SphereNODE
                ConnectTo [earth Position]
              }
            }
          }
          sun
          {
            Class OgreObject
            ResourceGroup "General"
            GeometryFile "../Data/models/sphere.scene"
            Animator
            {
              animator1
              {
                Class TransformAnimator
                NodeName SphereNODE
              }
            }
          }
        }
      }
    }
  }
}

logo OpenMask

Documentation generated on Mon Jun 9 11:45:59 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007