1 / 17

UofC Large Display Framework

UofC Large Display Framework. Version 1.1. Fabrício Anastácio December, 2007. Outline. Framework Overview Touch Indicators LargeDisplayEvent VisComponentStrategy Animation Configurable Application Final Remarks. Framework Overview. Application. Toolkit. iLab Toolkit.

badu
Download Presentation

UofC Large Display Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UofC Large Display Framework Version 1.1 Fabrício Anastácio December, 2007

  2. Outline • Framework Overview • Touch Indicators • LargeDisplayEvent • VisComponentStrategy • Animation • Configurable Application • Final Remarks

  3. Framework Overview Application Toolkit iLab Toolkit Large Display Framework I-Buffer

  4. Framework Overview FrameTimer LargeDisplayManager VisComponentStrategy LargeDisplayEvent CompositeNode VisComponent VisComponentState Point3f IBufferProxy VectorTemplate IBuffer

  5. Touch Indicators • Special case of a visual component • Touch indicators list (touchIndicators vector) in the LargeDisplayManager class • Initialized in the initTouchIndicators() method in a subclass of the LargeDisplayManager class • TouchIndicatorStrategy (Toolkit): updates the position of the associated component

  6. Touch Indicators Example: adding a touch indicator VisComponentGL* touchIndicator = new VisComponentGL(); touchIndicator->setPosition(500, 500); touchIndicator->setScaleFactor(10); GradientCircleStrategy* gradientCircle = new GradientCircleStrategy(127, 0, 127); touchIndicator->pushStrategy(gradientCircle); TouchIndicatorStrategy* indicatorStrategy = new TouchIndicatorStrategy(); touchIndicator->pushStrategy(indicatorStrategy); touchIndicator->setLeaf(true); touchIndicators.push_back(touchIndicator);

  7. LargeDisplayEvent • Base class for generic use of events (input and signals) • Attributes: • type identifier • user ID • sender component • 3D coordinates • ConstantProvider (Toolkit): dynamic definition of identifiers (event types, buffer types, button buffer values) • KeyEvent (iLab Toolkit): extends the LargeDisplayEvent class to hold keyboard input, used by the TextStrategy class

  8. VisComponentStrategy • New interface: void initProperties();void process();void draw(const std::vector<unsigned long>& selectedIds);void drawForPicking();void onEvent(LargeDisplayEvent* evt);void resize(unsigned int width, unsigned int height);bool drop(bool parentChanged);void readPassiveBuffers(const std::vector<unsigned int>& types);void readAllPassiveBuffers();void readAllPickingPassiveBuffers(); • process(): called before drawing a frame • onEvent(LargeDisplayEvent* evt): called when the associated component receives an event

  9. Animation • Framework-provided animation: • Linear interpolation between two instances of the VisComponentState* class • Originally intended for “dropping” animations • Sends events when the animation starts and stops using reserved event types (LargeDisplayManager::ANIMATION_STARTED and LargeDisplayManager::ANIMATION_OVER) * Augmented with a RGBA color attribute

  10. Animation Example:ThickeningBorderStrategy (iLab Toolkit) void ThickeningBorderStrategy::onEvent(LargeDisplayEvent* evt) { if (evt) { unsigned int evtType = evt->getType(); if (evtType == LargeDisplayManager::ANIMATION_STARTED) { borderWidth += dBorderWidth; selectedBorderWidth += dBorderWidth; } else if (evtType == LargeDisplayManager::ANIMATION_OVER) { borderWidth -= dBorderWidth; selectedBorderWidth -= dBorderWidth; } } }

  11. Animation • Strategy-based animation: • Uses the process() and onEvent() methods • AnimationStrategy (Toolkit): • Base class for generic animation behaviors • Starts the animation on a START_ANIMATION event • The animation duration can be defined in seconds virtual void animate() = 0; virtual void onAnimationEnd() {}; virtual void onAnimationStart(LargeDisplayEvent *evt) {};

  12. Animation • Example:DestructionStrategy (Toolkit) provides an animation for the destruction of a component • Saves the sender of the triggering event when the animation startsvoid DestructionStrategy::onAnimationStart(LargeDisplayEvent *evt){ destroyer = evt->getSender();} • Notifies the sender when the animation is overvoid DestructionStrategy::onAnimationEnd(){ ConstantProvider* constants = ConstantProvider::getInstance(); LargeDisplayEvent* reply = new LargeDisplayEvent( constants->getEventTypeIdentifier("READY_TO_DIE"), 0, component->getPosition().x, component->getPosition().y, component->getPosition().z, component); if (destroyer) destroyer->onEvent(reply);} • Extended by the VortexDestructionStrategy & FadeDestructionStrategy (iLab Toolkit): by implementing the animate() method • Deprecates framework animation?

  13. Configurable Application • Purpose: define an application from a configuration XML file • XMLParser library: DOM-like tree structure • XML config file structure: <LargeDisplayApplication> |__ <TouchIndicator>* |__ <Strategy>* |__ <RootComponent> |__ <Strategy>* |__ <Component>* |__ <Strategy>* |__ <Component>* |__ <Components>* |__ <Components>* |__ <Strategy>* |__ <Component>* |__ <Components>* |__ <Textures>

  14. Configurable Application • Example of a config.xml file: <LargeDisplayApplication fullscreen="false"> <RootComponent posX="400" posY="300" posZ="0" width="800" height="600"> <Strategy name="GradientBorder" width="-10" color-red="0.3" color-green="0.5" color-blue="1.0" color-alpha="1.0"/> <Strategy name="FrictionSurface" border-width="50" border-height="50"/> <Component posX="450" posY="350" width="800" height="600" leaf="false"> <Strategy name="CurrentBeltContainer" belt-width="100" number-control-points="8" subdivision-levels="4"rounded="false"/> <Strategy name="Translation"/> </Component> </RootComponent> </LargeDisplayApplication>

  15. Configurable Application • ConfigApplicationManager: parses the config file in the initComponents() method • StrategyParser: subclasses encapsulate the parsing logic for a specific strategy (Command Design Pattern: requests as objects [Gamma et al.]) virtual void parse(const XMLNode& node, VisComponent* component) = 0; • Parser registration: • add an entry in the parsers map of the ConfigApplicationManager class • Example: in the registerStrategyParsers() method: strategyParsers["Foo"] = new FooStrategyParser();

  16. Final Remarks • Release versions: ‘LargeDisplayFramework’ innernet directory • LDFApplications CVS module: ConfigurableApplication, HelloTabletop, etc. • Innovis wiki tutorials: framework overview, “hello tabletop”, and “hello strategies” • Source code for the framework to be placed in the innernet • Next mantainer? • Testers needed!  • Feedback

  17. Thanks!

More Related