06.01.2015 Views

Introduction to EON SDK - Construction IT research at VTT

Introduction to EON SDK - Construction IT research at VTT

Introduction to EON SDK - Construction IT research at VTT

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Introduction</strong> <strong>to</strong> <strong>EON</strong> <strong>SDK</strong><br />

Jan 2002<br />

© Copyright <strong>EON</strong> Reality, Inc.2002 1


Table ofContents<br />

Table of Contents<br />

User Guide<br />

Table of Contents 2<br />

<strong>Introduction</strong> 3<br />

Install<strong>at</strong>ion 4<br />

<strong>EON</strong> <strong>SDK</strong> Basics 6<br />

Wizards 20<br />

Techniques 30<br />

<strong>Introduction</strong> 37<br />

Nodes 38<br />

Classes in <strong>EON</strong> <strong>SDK</strong> 39<br />

Modules 41<br />

Interfaces 42<br />

Macros 60<br />

Index 61<br />

2<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User’s Guide<br />

<strong>Introduction</strong><br />

<strong>Introduction</strong><br />

About this Guide<br />

This guide is your companion in exploring <strong>EON</strong> <strong>SDK</strong> and in implementing<br />

your own modules and nodes. Because <strong>EON</strong> <strong>SDK</strong> incorpor<strong>at</strong>es C++<br />

programming extensively, a working knowledge of the C++ language is<br />

required.<br />

This guide actually combines two guides in one−the User Guide and the<br />

Reference Guide. The User Guide describes basic fe<strong>at</strong>ures of <strong>EON</strong> <strong>SDK</strong>,<br />

as well as inform<strong>at</strong>ion on system requirements and install<strong>at</strong>ion.<br />

Furthermore, instructions are provided for the two <strong>EON</strong> <strong>SDK</strong> wizards.<br />

The Reference Guide describes the classes and functions used by <strong>EON</strong><br />

<strong>SDK</strong>.<br />

<strong>Introduction</strong> <strong>to</strong> <strong>EON</strong> <strong>SDK</strong><br />

<strong>EON</strong> <strong>SDK</strong> is a software development kit for constructing cus<strong>to</strong>m <strong>EON</strong><br />

nodes and modules. This is the same <strong>to</strong>ol used by <strong>EON</strong> Reality <strong>to</strong> cre<strong>at</strong>e<br />

standard nodes and modules. <strong>EON</strong> <strong>SDK</strong> is used from within Microsoft<br />

Visual C++.<br />

<strong>EON</strong> <strong>SDK</strong> adds two wizards <strong>to</strong> Visual C++, a few base classes th<strong>at</strong><br />

connect your code <strong>to</strong> the <strong>EON</strong> framework, and a number of libraries.<br />

Certain <strong>EON</strong> nodes are referred <strong>to</strong> as agents, indic<strong>at</strong>ing th<strong>at</strong> these<br />

nodes are rel<strong>at</strong>ed <strong>to</strong> actions. <strong>EON</strong> agents may initi<strong>at</strong>e oper<strong>at</strong>ions such<br />

as motion control and on/off functionality. (From a purely technical<br />

perspective, a node is considered an agent if it implements the IAgent<br />

interface.) However, with the present widespread use of event-passing,<br />

the distinction between agents and other nodes has become r<strong>at</strong>her<br />

insignificant. From now on we will use the general term node, if not<br />

agent is more precise.<br />

<strong>EON</strong> nodes can be grouped in modules. An <strong>EON</strong> module is an independent<br />

program component th<strong>at</strong> expands basic <strong>EON</strong> Studio functionality. A<br />

module may add new menu items, <strong>to</strong>olbars and views. It may also<br />

communic<strong>at</strong>e with the nodes th<strong>at</strong> make up an <strong>EON</strong> simul<strong>at</strong>ion or with<br />

other modules. The nodes of a cus<strong>to</strong>m module are handled by <strong>EON</strong> Studio<br />

in exactly the same way as <strong>EON</strong> Studio's basic nodes. Modules—and even<br />

individual nodes—can be license-protected with <strong>EON</strong> <strong>SDK</strong>, permitting<br />

third-party developers <strong>to</strong> cre<strong>at</strong>e specialized <strong>EON</strong> Studio plug-ins.<br />

2.5 3


User Guide<br />

Install<strong>at</strong>ion<br />

Install<strong>at</strong>ion<br />

Installing <strong>EON</strong> <strong>SDK</strong><br />

System Requirements<br />

This section describes install<strong>at</strong>ion of <strong>EON</strong> <strong>SDK</strong> from the CD-ROM.<br />

Processor Memory Disk space Oper<strong>at</strong>ing system<br />

Intel Pentium 75<br />

16 Mb<br />

7Mb(minimum)<br />

Windows 95/98<br />

(minimum)<br />

Or<br />

Pentium 166 MHz<br />

32 Mb<br />

10 Mb (with examples)<br />

Windows NT 4.0 with Service Pack 3 or<br />

(recommended)<br />

l<strong>at</strong>er<br />

The system requirements for <strong>EON</strong> <strong>SDK</strong> are the same as for <strong>EON</strong> Studio.<br />

Microsoft Visual C++ ® version 6.0 or l<strong>at</strong>er must be installed on your<br />

computer.<br />

Because new nodes are cre<strong>at</strong>ed with Visual C++ (using wizards), it is<br />

strongly recommended th<strong>at</strong> the user has programming experience in C++<br />

and is familiar with the Visual C++ integr<strong>at</strong>ed development<br />

environment.<br />

Program Install<strong>at</strong>ion<br />

1. Insert the <strong>EON</strong> <strong>SDK</strong> CD-ROM. If the install<strong>at</strong>ion program does not<br />

start au<strong>to</strong>m<strong>at</strong>ically, continue with Steps 2 through 4.<br />

Installing DirectX <strong>SDK</strong><br />

2. Choose Run… by clicking on the Start but<strong>to</strong>n of the Windows taskbar.<br />

3. Enter d:\setup in the dialog box (d: being your CD-ROM drive).<br />

4. Click the OK but<strong>to</strong>n.<br />

5. The install<strong>at</strong>ion program will now guide you through the<br />

install<strong>at</strong>ion process.<br />

To work with nodes th<strong>at</strong> employ graphics−such as 3D objects (meshes)−you<br />

will need Microsoft’s DirectX <strong>SDK</strong>. DirectX is an API th<strong>at</strong> gives the<br />

user access <strong>to</strong> system hardware. It consists of six different<br />

components: DirectPlay, DirectInput, Direct3DSound, DirectSound,<br />

Direct3D and DirectDraw. Each is capable of emul<strong>at</strong>ing low-level<br />

functions not supported by underlayer hardware.<br />

Note th<strong>at</strong> the DirectX runtime components included on the <strong>EON</strong> Studio<br />

2.5 CD are not intended for development purposes. If you want <strong>to</strong><br />

install the DirectX <strong>SDK</strong> on your development system, you will find the<br />

l<strong>at</strong>est version <strong>at</strong>:<br />

http://www.microsoft.com/directx/default.asp<br />

Setting up the Visual Studio Environment<br />

When you work with <strong>EON</strong> <strong>SDK</strong>, it is always from within Microsoft Visual<br />

Studio®. You use <strong>EON</strong> wizards <strong>to</strong> cre<strong>at</strong>e skele<strong>to</strong>n code for new nodes and<br />

4<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Install<strong>at</strong>ion<br />

modules. By changing and making additions <strong>to</strong> the gener<strong>at</strong>ed code, you<br />

can modify the behavior of the nodes and modules.<br />

Before you start building new nodes or modules, you must set up your<br />

development environment correctly. To do this, choose Options from<br />

Visual Studio’s Tool menu. Click the Direc<strong>to</strong>ries tab.<br />

Figure 1. The Direc<strong>to</strong>ries tab, Options dialog box<br />

This is where you add the p<strong>at</strong>h <strong>to</strong> the development direc<strong>to</strong>ry, loc<strong>at</strong>ed<br />

in your <strong>EON</strong> <strong>SDK</strong> folder, and its subfolders (one for each file type).<br />

NOTE: During the <strong>EON</strong> <strong>SDK</strong> install<strong>at</strong>ion you could choose <strong>to</strong> set the<br />

p<strong>at</strong>hs au<strong>to</strong>m<strong>at</strong>ically. If you did there should be a p<strong>at</strong>h <strong>to</strong> the <strong>EON</strong> <strong>SDK</strong><br />

for each file type. Then there is no need for you <strong>to</strong> perform the<br />

following steps. The added p<strong>at</strong>hs are not removed when uninstalling <strong>EON</strong><br />

<strong>SDK</strong>.<br />

Figure 2. The Choose Direc<strong>to</strong>ry dialog box<br />

Select Include files from the Show direc<strong>to</strong>ries for listbox and add the<br />

entry "Development Files\include" <strong>to</strong> the list of direc<strong>to</strong>ries. Then<br />

continue <strong>to</strong> add "Development Files\lib" <strong>to</strong> Library files, "Development<br />

Files\source" <strong>to</strong> Source files and "Development Files\executeable" <strong>to</strong><br />

Executable files. Furthermore, move each one of these direc<strong>to</strong>ries <strong>to</strong><br />

the <strong>to</strong>p of its list. You thereby force Visual Studio <strong>to</strong> always search<br />

those specific Development direc<strong>to</strong>ries before the others.<br />

Note th<strong>at</strong> all four-file types must be added.<br />

2.5 5


User Guide<br />

Techniques<br />

<strong>EON</strong> <strong>SDK</strong> Basics<br />

<strong>EON</strong><br />

<strong>EON</strong> is a VR development <strong>to</strong>ol th<strong>at</strong> is built on an architecture th<strong>at</strong> is<br />

highly modular, extensible and vers<strong>at</strong>ile. Using the <strong>EON</strong> Studio<br />

applic<strong>at</strong>ion you can cre<strong>at</strong>e fully interactive 3D worlds th<strong>at</strong> are<br />

executed and rendered in real-time by the run-time viewer <strong>EON</strong>/X. The<br />

viewer can be embedded in various host applic<strong>at</strong>ions such as Web<br />

browsers, RAD and multimedia authoring <strong>to</strong>ols.<br />

3rd Party<br />

<strong>EON</strong> Modules<br />

<strong>EON</strong> Studio View Modules<br />

(Scengraph, Butterfly, etc)<br />

<strong>EON</strong> Studio Applic<strong>at</strong>ion Object Model<br />

(IAutApp, IAutDoc, IAutSettings, etc)<br />

<strong>EON</strong> Studio<br />

(windowing, inter-module messaging, license management, etc)<br />

NodeBag API<br />

(INodeBag)<br />

Design Mode<br />

<strong>EON</strong> Simul<strong>at</strong>ion<br />

Simul<strong>at</strong>ion Node<br />

Scen Node<br />

Run-time Mode<br />

Frame Node<br />

Cus<strong>to</strong>m Node 1<br />

Mesh Node<br />

Cus<strong>to</strong>m Node 2<br />

...<br />

NodeBag API<br />

(INodeBag)<br />

<strong>EON</strong>/X<br />

(ActiveX control)<br />

<strong>EON</strong> Studio<br />

(Simul<strong>at</strong>ion<br />

Window)<br />

Cus<strong>to</strong>m<br />

Viewer<br />

(Currently not<br />

supported by the<br />

<strong>SDK</strong>)<br />

Legend:<br />

= <strong>SDK</strong> cre<strong>at</strong>able component<br />

= <strong>EON</strong> pre-defined component<br />

Embedded in...<br />

<strong>EON</strong> Viewer<br />

Other ActiveX control Container<br />

(Internet Explorer, MS Word, VisualBasic, etc)<br />

Figure 3. The <strong>EON</strong> architecture<br />

As you can see the <strong>EON</strong> system is split in<strong>to</strong> two distinct modes, and<br />

using the <strong>SDK</strong> you can extend both parts of the system.<br />

By cre<strong>at</strong>ing <strong>EON</strong> Modules, you can extend the design mode functionality,<br />

inside <strong>EON</strong> Studio. You can also cre<strong>at</strong>e cus<strong>to</strong>m nodes <strong>to</strong> supply or<br />

6<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

enhance functionality in run-time mode. To let the user configure<br />

these nodes in design mode, you have essentially three choices:<br />

provide cus<strong>to</strong>m properties dialog for each node (most common), cre<strong>at</strong>e a<br />

cus<strong>to</strong>m module or let <strong>EON</strong> Studio takes care of it (you will get a<br />

standard properties list similar <strong>to</strong> Visual Basic).<br />

<strong>EON</strong> uses Microsoft COM extensively <strong>to</strong> interface against both internal<br />

and <strong>SDK</strong>-cre<strong>at</strong>ed components. Therefore, most components in <strong>EON</strong> are COM<br />

objects, including nodes, modules, the run-time viewer (<strong>EON</strong>/X), etc.<br />

Inside <strong>EON</strong><br />

As a plug-in developer, you must understand the <strong>EON</strong> architecture in a<br />

deeper way and need <strong>to</strong> have working knowledge of C++. On the other<br />

hand, you will be able <strong>to</strong> utilize the power of <strong>EON</strong> in full strength<br />

since you will have access <strong>to</strong> the same interface and functionality<br />

th<strong>at</strong> are used by internal components as well.<br />

The kernel of an <strong>EON</strong> simul<strong>at</strong>ion is the Scenegraph. This is the place<br />

where all nodes are loc<strong>at</strong>ed. <strong>EON</strong> Studio can be seen as a <strong>to</strong>ol <strong>to</strong><br />

configure and insert nodes in<strong>to</strong> this graph (and <strong>to</strong> make connections<br />

between nodes so th<strong>at</strong> events can be transferred from node <strong>to</strong> node).<br />

To access this collection of nodes, the Nodebag component is used.<br />

This COM object exposes an interface named INodebag, <strong>to</strong> encapsul<strong>at</strong>e<br />

the inner structure of the collection and <strong>to</strong> let the rest of the<br />

system access it in a controlled way. In most cases, the plug-in<br />

developer would not need <strong>to</strong> deal with the Nodebag component directly,<br />

unless you would like <strong>to</strong> develop your own viewer or similar.<br />

The real-time 3D graphics is handled by the simul<strong>at</strong>ion node, which is<br />

the root node of the scenegraph. This is where the main execution loop<br />

lies, <strong>to</strong> traverse and activ<strong>at</strong>e the rest of the nodes in the scenegraph<br />

<strong>to</strong> form a complete simul<strong>at</strong>ion. This node also handles mouse and<br />

keyboard input, in addition <strong>to</strong> route management. A route is a<br />

connection between two nodes, which will permit a node <strong>to</strong> send an<br />

event <strong>to</strong> another one.<br />

Other additional input channels (trackers, etc) and visual elements<br />

(shapes, lights, sounds, videos, etc) are handled by specialized<br />

nodes, which are added when needed. This means the run-time system can<br />

be very lightweight and flexible but also powerful and vers<strong>at</strong>ile <strong>at</strong><br />

the same time.<br />

Using this <strong>SDK</strong> you can further enhance this system by cre<strong>at</strong>ing and<br />

adding your own nodes <strong>to</strong> the system. These nodes can provide <strong>to</strong>tally<br />

new functionality or just enhance or replace the standard ones. These<br />

nodes are deployed and used in the same way as the standard nodes th<strong>at</strong><br />

are shipped with <strong>EON</strong>. Hence, these plug-in components are truly<br />

integr<strong>at</strong>ed with the system.<br />

2.5 7


User Guide<br />

Techniques<br />

However, the power does not come without a price. Since each node is<br />

actually a COM object, there is a lot of housekeeping surrounding the<br />

component th<strong>at</strong> is required by the COM specific<strong>at</strong>ion. To minimize the<br />

inconvenience, the <strong>SDK</strong> provides wizards <strong>to</strong> gener<strong>at</strong>e the project files<br />

and a code skele<strong>to</strong>n/framework, from where you can further build up<br />

your node/module. The framework utilizes class sub-classing and macros<br />

<strong>to</strong> hide implement<strong>at</strong>ion details, in a way very similar <strong>to</strong> MFC (the<br />

framework works closely and is comp<strong>at</strong>ible with ATL and MFC). There is<br />

also a library of commonly used functions <strong>to</strong> speed up the <strong>SDK</strong><br />

development.<br />

If you are not worried about the additional work outlined above or you<br />

are using another C++ development <strong>to</strong>ol than Visual C++, you are left<br />

alone <strong>to</strong> implement them yourself. However, since COM is binary<br />

comp<strong>at</strong>ible across programming language/compiler, you should be able <strong>to</strong><br />

integr<strong>at</strong>e your cus<strong>to</strong>m nodes or modules with <strong>EON</strong> this way (although it<br />

is not recommended).<br />

Nodes<br />

Wh<strong>at</strong> is a node/agent<br />

A node is an <strong>EON</strong> Studio object with functions and d<strong>at</strong>a. Nodes are of<br />

different types and thereby contribute varying effects <strong>to</strong> a<br />

simul<strong>at</strong>ion. Certain <strong>EON</strong> nodes are referred <strong>to</strong> as agents, indic<strong>at</strong>ing<br />

th<strong>at</strong> these nodes are rel<strong>at</strong>ed <strong>to</strong> actions. <strong>EON</strong> agents may perform<br />

oper<strong>at</strong>ions such as motion control and on/off functionality. A Frame<br />

node, on the other hand, is an example of a non-agent node—its fields<br />

are only used <strong>to</strong> s<strong>to</strong>re values. Most nodes s<strong>to</strong>re d<strong>at</strong>a and manage most<br />

external communic<strong>at</strong>ion using so-called "fields". D<strong>at</strong>a is sent between<br />

nodes by connecting their respective fields with one another.<br />

Note th<strong>at</strong> the technical definition says th<strong>at</strong> an agent is a node th<strong>at</strong><br />

implements the IAgent COM interface. Nowadays a node can manipul<strong>at</strong>e<br />

other nodes not only through COM interfaces but also by sending events<br />

between fields. Hence, the exact meaning of the term "agent" has<br />

become slightly blurred. We therefore prefer <strong>to</strong> use the more general<br />

word "node", although we will continue <strong>to</strong> write "agent" where it is<br />

found appropri<strong>at</strong>e according <strong>to</strong> the definition mentioned above.<br />

Fields<br />

Fields used by <strong>EON</strong> nodes are of four different types:<br />

• eventIn fields for receiving d<strong>at</strong>a.<br />

• eventOut fields for sending d<strong>at</strong>a.<br />

• exposedField fields th<strong>at</strong> can both receive and send d<strong>at</strong>a.<br />

• field fields used <strong>to</strong> s<strong>to</strong>re the nodes’ internal d<strong>at</strong>a.<br />

A field of one of the four types listed above can contain either one<br />

or several values of a particular d<strong>at</strong>a type. There is a limited number<br />

of d<strong>at</strong>a types <strong>to</strong> choose from, and they are grouped in<strong>to</strong> single-valued<br />

8<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

or multiple-valued types. An example of a single-valued d<strong>at</strong>a type is<br />

the SFString, which contains a single string. Its multiple-valued<br />

counterpart, which is called MFString, holds an array with an<br />

arbitrary number of elements, all of which must be strings.<br />

Events<br />

The message sent between two fields is called an event. An event sent<br />

from a field is called an out-event and an event received by a field,<br />

an in-event.<br />

Nodes receive d<strong>at</strong>a:<br />

• When the user enters or changes d<strong>at</strong>a in a node’s properties window.<br />

• When d<strong>at</strong>a is sent from a connected node in the Route Window (for<br />

details about how <strong>to</strong> cre<strong>at</strong>e routes between nodes, see the <strong>EON</strong><br />

Studio 2.5 User Guide).<br />

• From parent nodes in the simul<strong>at</strong>ion tree.<br />

• From child nodes in the simul<strong>at</strong>ion tree.<br />

• From any connected I/O devices. (Those nodes are called sensors and<br />

must implement the ISensor COM interface.)<br />

Execution model<br />

The event model used in <strong>EON</strong> provides several benefits:<br />

• A node th<strong>at</strong> sends events need not be aware of the receiver’s<br />

identity.<br />

• Conversely, a node th<strong>at</strong> receives events need not be aware of the<br />

sender’s identity.<br />

• Fan-out (one sender, several receivers) and fan-in (several<br />

senders, one receiver) are supported au<strong>to</strong>m<strong>at</strong>ically−new nodes may be<br />

added as senders or receivers with no special code required <strong>to</strong><br />

implement the additional communic<strong>at</strong>ion connections.<br />

• Routes, which define how events are sent and received, are<br />

manipul<strong>at</strong>ed in the Route View and hence they are independent of<br />

nodes' positions in the simul<strong>at</strong>ion tree.<br />

• Events are passed quickly (though not as fast as function<br />

invoc<strong>at</strong>ion from within the receiving node).<br />

• Cre<strong>at</strong>ing a sensor node (a node th<strong>at</strong> can gener<strong>at</strong>e events <strong>at</strong> any<br />

time, independent of received events) is as easy as cre<strong>at</strong>ing a<br />

standard node.<br />

The execution cycle of an <strong>EON</strong> simul<strong>at</strong>ion’s real-time loop has several<br />

steps.<br />

First of all, the OnPreUpd<strong>at</strong>e() function in the<br />

ISimul<strong>at</strong>ionUpd<strong>at</strong>eEvents interface is invoked, followed by calls <strong>to</strong> all<br />

simul<strong>at</strong>ion nodes’ Upd<strong>at</strong>e() functions. The call chain is initi<strong>at</strong>ed <strong>at</strong><br />

2.5 9


User Guide<br />

Techniques<br />

root level, with the Simul<strong>at</strong>ion node calling its child nodes. All<br />

called nodes upd<strong>at</strong>e their children recursively.<br />

After th<strong>at</strong>, all pending events are processed. The Route Manager<br />

collects pending out-events from sensor nodes and queues them<br />

internally. It then disp<strong>at</strong>ches all queued events and cre<strong>at</strong>es the<br />

appropri<strong>at</strong>e in-events. New events (if any) are once again collected<br />

and disp<strong>at</strong>ched sequentially. This procedure continues until no events<br />

remain.<br />

If two or more nodes form a cyclic graph, they may enter an infinite<br />

loop of event-passing. Note th<strong>at</strong> such a loop will generally be<br />

regarded as being a mistake on the part of the user. The Route Manager<br />

allows loops, but will prevent more than one event from being sent<br />

along each route during the same collection round. If a route has<br />

already been "used" by an event, then the subsequent event will be<br />

queued until the collection round of the next simul<strong>at</strong>ion frame.<br />

Next, the OnPostUpd<strong>at</strong>e() function is invoked. Each node can implement<br />

EventsProcessed(), a function th<strong>at</strong> is called when all events have been<br />

processed. The function is called only if the node has received an<br />

event during the previous cycle. A final event collection is made<br />

before the simul<strong>at</strong>ed scene is rendered. All nodes are executed in a<br />

single process. Accordingly, they share memory with each other as well<br />

as with the rest of the <strong>EON</strong> system. This makes it possible <strong>to</strong> use<br />

standard function calls between nodes. <strong>EON</strong> calls functions in each<br />

simul<strong>at</strong>ion time frame. When a simul<strong>at</strong>ion starts, a node’s<br />

OnInitialize() is called. The code in the node’s Upd<strong>at</strong>e() function is<br />

executed in each time frame. When an event has been received, the<br />

FieldChanged() function is called. If any node fields have been<br />

changed, the FieldChanged() function takes appropri<strong>at</strong>e action. When<br />

the simul<strong>at</strong>ion s<strong>to</strong>ps, <strong>EON</strong> calls OnReset().<br />

Another method for communic<strong>at</strong>ion between nodes involves connection<br />

points. Communic<strong>at</strong>ion is faster but the procedure is more complex.<br />

Why use C++<br />

Standard <strong>EON</strong> nodes are written in C++, using Microsoft’s Visual C++<br />

(version 5.0 and 6.0). To obtain s<strong>at</strong>isfac<strong>to</strong>ry results, you should use<br />

this development environment <strong>to</strong>o. Because <strong>EON</strong> Studio already provides<br />

the capability <strong>to</strong> cre<strong>at</strong>e cus<strong>to</strong>mized nodes by writing scripts in the<br />

Script node, you may wonder why you should bother working with C++.<br />

While Script nodes have the advantage of being easy <strong>to</strong> use (you can<br />

cre<strong>at</strong>e and edit them within <strong>EON</strong> Studio's Script Edi<strong>to</strong>r), they tend <strong>to</strong><br />

be slow. This is due <strong>to</strong> the interpretive n<strong>at</strong>ure of the scripting<br />

language. Nodes cre<strong>at</strong>ed with <strong>EON</strong> <strong>SDK</strong> are written in C++ and<br />

subsequently compiled in<strong>to</strong> machine code. The additional effort<br />

involved in using C++ is rewarded with higher performance.<br />

<strong>EON</strong> <strong>SDK</strong> gives you access <strong>to</strong> the graphics API used by <strong>EON</strong> through<br />

Direct3D interfaces. Additionally, you can use other interfaces <strong>to</strong><br />

access hardware devices such as mice and keyboards. A node cre<strong>at</strong>ed in<br />

10<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

<strong>EON</strong> <strong>SDK</strong> can also call all standard oper<strong>at</strong>ing system functions, for<br />

example, functions th<strong>at</strong> cre<strong>at</strong>e dialog boxes, change fonts and make<br />

Internet connections.<br />

Modules<br />

Wh<strong>at</strong> is a module<br />

Seen from a purely technical point of view, any COM object th<strong>at</strong><br />

implements the dual interface IEonModule is an <strong>EON</strong> module.<br />

Why use modules<br />

In order <strong>to</strong> loc<strong>at</strong>e its modules, <strong>EON</strong> Studio investig<strong>at</strong>es the Windows<br />

registry d<strong>at</strong>abase. All <strong>EON</strong> modules must be able <strong>to</strong> identify themselves<br />

through the registry. This is au<strong>to</strong>m<strong>at</strong>ically taken care of in the code<br />

skele<strong>to</strong>n gener<strong>at</strong>ed by the Module Wizard.<br />

By cre<strong>at</strong>ing modules, it is possible <strong>to</strong> extend the user interface of<br />

<strong>EON</strong> Studio. An <strong>EON</strong> module can add the following functionality and GUI<br />

fe<strong>at</strong>ures <strong>to</strong> <strong>EON</strong> Studio:<br />

• command handling<br />

• menu items<br />

• <strong>to</strong>olbar but<strong>to</strong>ns<br />

• views (even so-called split views may be cre<strong>at</strong>ed)<br />

• nodes<br />

• license handling<br />

• cus<strong>to</strong>m message passing<br />

A registered module is loaded au<strong>to</strong>m<strong>at</strong>ically in<strong>to</strong> <strong>EON</strong> Studio when <strong>EON</strong><br />

Studio starts. In the process of loading a module, <strong>EON</strong> Studio calls a<br />

number of module interface functions. This allows the module <strong>to</strong> check<br />

and report the license st<strong>at</strong>us, and <strong>to</strong> inform <strong>EON</strong> Studio of the<br />

fe<strong>at</strong>ures it implements−fe<strong>at</strong>ures such as the above mentioned commands,<br />

menu items and <strong>to</strong>olbars.<br />

Module commands can be bound <strong>to</strong> menu items and <strong>to</strong>olbar but<strong>to</strong>ns. When<br />

the user selects the menu item or <strong>to</strong>olbar but<strong>to</strong>n registered by a<br />

module, <strong>EON</strong> Studio will call a function in the module so th<strong>at</strong> the<br />

module can handle the command. Some default commands, such as Copy and<br />

Paste, will be routed <strong>to</strong> the module au<strong>to</strong>m<strong>at</strong>ically by <strong>EON</strong> Studio<br />

provided th<strong>at</strong> the currently active view belongs <strong>to</strong> the module.<br />

A module can add an almost unlimited number of views <strong>to</strong> <strong>EON</strong> Studio.<br />

These views appear in the <strong>EON</strong> Studio user interface. Module views look<br />

and behave the same as standard <strong>EON</strong> Studio views. They remember their<br />

position between sessions, and they can be configured as docked or<br />

flo<strong>at</strong>ing. Modules are, however, responsible for the contents of its<br />

views. Modules accomplish this by subclassing a window handle,<br />

supplied by <strong>EON</strong> Studio, when a module registers a view. Furthermore,<br />

2.5 11


User Guide<br />

Techniques<br />

split views may be used intstead of the standard views. Split views<br />

incorpor<strong>at</strong>e splitter bars th<strong>at</strong> divide a view in<strong>to</strong> several panes. A<br />

split view can be configured <strong>to</strong> hold both multiple rows and columns of<br />

panes.<br />

A module can communic<strong>at</strong>e with the <strong>EON</strong> Studio simul<strong>at</strong>ion. It can also<br />

determine which node in the simul<strong>at</strong>ion tree th<strong>at</strong> is currently<br />

selected. Furthermore, it can fully exploit the interfaces provided by<br />

the nodes of the simul<strong>at</strong>ion.<br />

The modules will be notified when events th<strong>at</strong> could possibly affect<br />

their behavior occur in <strong>EON</strong> Studio. Examples of such events are those<br />

th<strong>at</strong> occur before a simul<strong>at</strong>ion is closed, after a simul<strong>at</strong>ion is<br />

opened, when the simul<strong>at</strong>ion tree has changed and when views need <strong>to</strong><br />

upd<strong>at</strong>e themselves. It is also possible for a module <strong>to</strong> change the<br />

content of the simul<strong>at</strong>ion tree, <strong>to</strong> add and delete nodes, <strong>to</strong> change<br />

node properties, etc.<br />

How <strong>to</strong> cre<strong>at</strong>e a module<br />

A module can also be used <strong>to</strong> group a number of nodes in<strong>to</strong> a licenseprotected<br />

package. The source code for license handling is provided by<br />

the Module Wizard when your new module is gener<strong>at</strong>ed (though the code<br />

may be enclosed by comments).<br />

Use the <strong>EON</strong> Module Wizard from within Visual C++ <strong>to</strong> cre<strong>at</strong>e new<br />

modules. The wizard provides you with ready-made code skele<strong>to</strong>ns. To<br />

add fe<strong>at</strong>ures <strong>to</strong> a new module, just add code <strong>to</strong> the skele<strong>to</strong>n or modify<br />

the code th<strong>at</strong> is already written.<br />

Loading and unloading modules<br />

Open the Options>Modules… configur<strong>at</strong>ion dialog and mark the modules<br />

you would like <strong>to</strong> load initially <strong>at</strong> the start of an <strong>EON</strong> Studio<br />

session.<br />

To start <strong>EON</strong> Studio without modules, either hold down one of the shift<br />

keys as <strong>EON</strong> Studio starts, or use the command line argument “-C” when<br />

starting <strong>EON</strong> Studio from a DOS command prompt or the Start>Run…<br />

dialog.<br />

<strong>EON</strong> licensing<br />

General<br />

<strong>EON</strong> 2.5 uses the FLEXlm license managing system produced by<br />

Globetrotter Software Inc. <strong>to</strong> manage licensing of fe<strong>at</strong>ures. A fe<strong>at</strong>ure<br />

is a single program or program object, subject <strong>to</strong> licensing. The<br />

licensing system in <strong>EON</strong> 2.5 is based on modules, where a module is the<br />

smallest unit th<strong>at</strong> may be protected by the license system. This means<br />

th<strong>at</strong> an <strong>EON</strong> module is a FLEXlm fe<strong>at</strong>ure.<br />

12<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

Although not fe<strong>at</strong>ures themselves, nodes may be license-protected by<br />

using the INodeLicense interface. This interface lets your nodes check<br />

if a certain module is properly checked-out. For example, <strong>EON</strong> Showroom<br />

nodes check <strong>to</strong> see if the <strong>EON</strong> Showroom module (fe<strong>at</strong>ure) is checkedout.<br />

If it is, you can make use of all <strong>EON</strong> Showroom nodes as you<br />

design your simul<strong>at</strong>ion in <strong>EON</strong> Studio. However, if there is any problem<br />

with the licensing, you may not fully exploit the Showroom nodes.<br />

Design-time licensing applies <strong>to</strong> <strong>EON</strong> Studio and the modules, i.e., <strong>to</strong><br />

the files named ModuleName.DLL, but not NodeLibrary.DLL and<br />

PPNodeLibrary.DLL. This means th<strong>at</strong> licenses will only be required<br />

during the <strong>EON</strong> Studio simul<strong>at</strong>ion design phase, and th<strong>at</strong> the final<br />

simul<strong>at</strong>ion may be run on any system th<strong>at</strong> has registered the modules<br />

used in the simul<strong>at</strong>ion.<br />

Run-time licensing using Microsoft’s COM licensing may be implemented<br />

in l<strong>at</strong>er <strong>EON</strong> versions. To make this possible, run-time and design-time<br />

licensing inform<strong>at</strong>ion is included in the license keys initially<br />

cre<strong>at</strong>ed.<br />

If one or more of its modules are loaded in so-called demo mode, <strong>EON</strong><br />

Studio will also run in demo mode. When <strong>EON</strong> Studio is in demo mode,<br />

the Save and Save As… commands are disabled. Although all installed<br />

modules are available, it is not possible <strong>to</strong> save the new simul<strong>at</strong>ions<br />

you cre<strong>at</strong>e.<br />

To prevent a checked-out license from being checked-out indefinitely,<br />

heartbe<strong>at</strong> messages will be exchanged between the module and the<br />

license server. Heartbe<strong>at</strong> messages also prevent tampering by<br />

restarting the license server. When a pre-defined time-out has been<br />

reached and the module still hasn't answered the license server calls,<br />

the license is au<strong>to</strong>m<strong>at</strong>ically checked-in.<br />

If for same reason, the license server is not accessible from your<br />

computer for a longer period, <strong>EON</strong> Studio will notify you of the<br />

problem and ask you if you wish <strong>to</strong> save your current work before <strong>EON</strong><br />

Studio makes a transition in<strong>to</strong> demo mode.<br />

For more inform<strong>at</strong>ion on different modules and <strong>EON</strong> license handling,<br />

see the <strong>EON</strong> Studio manual.<br />

Module licensing<br />

As long as a module implements the license-handling interface of<br />

IEonModule, it is up <strong>to</strong> the user <strong>to</strong> choose an appropri<strong>at</strong>e licensing<br />

system. Though n<strong>at</strong>urally, it is strongly recommended th<strong>at</strong> FLEXlm be<br />

used; this avoids the problem of having two separ<strong>at</strong>e licensing systems<br />

<strong>to</strong> support one applic<strong>at</strong>ion program. The FLEXlm <strong>SDK</strong> may be downloaded<br />

from:<br />

http://www.globetrotter.com/flexlm.htm<br />

2.5 13


User Guide<br />

Techniques<br />

FLEXlm licensing<br />

The FLEXlm fe<strong>at</strong>ure name must be the same as the module identifier in<br />

the registry; this is au<strong>to</strong>m<strong>at</strong>ically the case with an <strong>EON</strong> Module Wizard<br />

gener<strong>at</strong>ed module. A module (fe<strong>at</strong>ure) name must be unique,<br />

alphanumerical phrase. If you plan <strong>to</strong> use a licensing system other<br />

than FLEXlm, the same requirements apply.<br />

If FLEXlm is used, the IAutApp interface (see the reference guide) may<br />

be used <strong>to</strong> gain access <strong>to</strong> the license server through <strong>EON</strong> Studio by<br />

using the CheckOutFe<strong>at</strong>ure() function, for example.<br />

A license or fe<strong>at</strong>ure always has a version number. It is important <strong>to</strong><br />

know th<strong>at</strong> the license version number is not the same as the program<br />

version number. Changing the license version number will cause all<br />

older license keys <strong>to</strong> expire. The recommended procedure is <strong>to</strong> keep the<br />

same license version number between major <strong>EON</strong> upgrades. In other<br />

words, <strong>EON</strong> 2.1, 2.2 and 2.5 would all use the same license version<br />

number, but when <strong>EON</strong> 3.0 arrives, the license version number should be<br />

incremented.<br />

Note: the version number of any fe<strong>at</strong>ure may not exceed 10 digits<br />

(flo<strong>at</strong>ing point form<strong>at</strong>) due <strong>to</strong> restrictions in the current version of<br />

FLEXlm.<br />

<strong>EON</strong> Studio and modules<br />

In order for <strong>EON</strong> Studio <strong>to</strong> find a module and its nodes, unique<br />

module/node identifiers must be placed in the registry.<br />

<strong>EON</strong> modules are registered as follows (note th<strong>at</strong> the version key, 2.0,<br />

is correct, since it indic<strong>at</strong>es which major version <strong>EON</strong> has reached):<br />

HKEY_LOCAL_MACHINE \ SOFTWARE \ Prosolvia Clarus \ Clarus <strong>EON</strong> \<br />

2.0 \<br />

Modules \ <br />

The entry in the registry shall contain the following inform<strong>at</strong>ion:<br />

• The name of the module should be placed as the default value.<br />

• Whether the module is loaded or not. “0” means not loaded, “1”<br />

means loaded. The registry name is LOADED.<br />

• Whether the module is distributable or not. “0” means not<br />

distributable, “1” means distributable. Use the registry name<br />

DISTRIBUTABLE. To protect against tampering, this inform<strong>at</strong>ion is<br />

double-checked against the registry.<br />

Nodes th<strong>at</strong> are part of a module register themselves as follows:<br />

HKEY_LOCAL_MACHINE \ SOFTWARE \ Prosolvia Clarus \ Clarus <strong>EON</strong> \<br />

2.0 \<br />

Modules \ \ \ <br />

The entry for the node shall contain:<br />

• The CLSID for the node. Use the registry key name CLSID.<br />

14<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

• The name of the DLL containing the icon for the node. Use the<br />

registry key name IconDLL.<br />

• The resource ID of the Icon. Use the registry key name IconID.<br />

Module registr<strong>at</strong>ion functionality is already implemented in the code<br />

skele<strong>to</strong>n gener<strong>at</strong>ed by the <strong>EON</strong> Module Wizard, but if the module<br />

contains nodes, macros for their registr<strong>at</strong>ion must be added <strong>to</strong> the<br />

module skele<strong>to</strong>n: insert OBJECT_ENTRY(, )<br />

lines between the BEGIN_OBJECT_MAP() and END_OBJECT_MAP() macros in<br />

the .cpp file.<br />

The macro DECLARE_MODULE_CLSID() will use as its<br />

licensing unit and should be inserted in the public area of the node's<br />

class declar<strong>at</strong>ion.<br />

All modules must support the IEonModule interface for—among several<br />

other purposes—license protection. <strong>EON</strong> Studio needs <strong>to</strong> call the<br />

IEonModule functions CheckOutLicense(), OnConnect(), OnDisconnect()<br />

and CheckInLicense() during license handling.<br />

How <strong>to</strong> disable licensing on your module<br />

If you do not wish <strong>to</strong> use license protection on your module, always<br />

return LICENSE_OK from your CheckOutLicense() function and a non-zero<br />

value from your OnConnect() function.<br />

The rel<strong>at</strong>ion between <strong>EON</strong> Studio and its modules<br />

<strong>EON</strong> Studio consists of several components th<strong>at</strong> interact with one<br />

another <strong>to</strong> provide the user with a working applic<strong>at</strong>ion. These<br />

components are often implemented as separ<strong>at</strong>e modules th<strong>at</strong> are loaded<br />

au<strong>to</strong>m<strong>at</strong>ically—and unconditionally—when you start <strong>EON</strong> Studio (for<br />

example, some of those modules are the ones th<strong>at</strong> display the<br />

Butterfly, Scene graph and Component views).<br />

The <strong>EON</strong> Studio applic<strong>at</strong>ion follows Windows so called document–view<br />

object model th<strong>at</strong> splits the responsibilities between a number of<br />

components, namely:<br />

• the document, which is the object th<strong>at</strong> encapsul<strong>at</strong>es the actual d<strong>at</strong>a<br />

(the document corresponds <strong>to</strong> a complete <strong>EON</strong> simul<strong>at</strong>ion), and<br />

• a number of views th<strong>at</strong> present the d<strong>at</strong>a in different ways (for<br />

example the Routes window or the Simul<strong>at</strong>ion Tree window).<br />

When the user modifies the applic<strong>at</strong>ion's d<strong>at</strong>a, these modific<strong>at</strong>ions are<br />

directed <strong>to</strong>wards the document. If the d<strong>at</strong>a has changed, some of the<br />

views might need <strong>to</strong> be upd<strong>at</strong>ed. The views only display subsets of all<br />

the inform<strong>at</strong>ion contained in a document—the views would otherwise be<br />

completely cluttered with facts and figures, and thus they would be<br />

more or less worthless <strong>to</strong> the user. An applic<strong>at</strong>ion could host several<br />

documents—th<strong>at</strong> is, several sets of d<strong>at</strong>a—but <strong>EON</strong> Studio currently<br />

supports only one document (simul<strong>at</strong>ion) <strong>at</strong> a time. (However, this<br />

might change in l<strong>at</strong>er versions of <strong>EON</strong> Studio.)<br />

2.5 15


User Guide<br />

Techniques<br />

Communic<strong>at</strong>ion inside <strong>EON</strong><br />

The different parts of the <strong>EON</strong> Studio applic<strong>at</strong>ion must be able <strong>to</strong><br />

communic<strong>at</strong>e with each other. For example, you may want <strong>to</strong> pass<br />

important inform<strong>at</strong>ion between two or more modules, or perhaps a node<br />

needs <strong>to</strong> call certain functions of its parent node. This section is<br />

aimed <strong>to</strong> clarify the communic<strong>at</strong>ion issue, and <strong>to</strong> help you choose<br />

between different options when there are several possible ways <strong>to</strong><br />

perform a given communic<strong>at</strong>ion task.<br />

Communic<strong>at</strong>ion between nodes<br />

The preferred way <strong>to</strong> send inform<strong>at</strong>ion between two nodes, or <strong>to</strong> let one<br />

node control another one, is <strong>to</strong> use events as described under one of<br />

the previous sections, “Wh<strong>at</strong> is a node/agent”<br />

Some older nodes still use a more direct COM solution. Such a node<br />

first acquires an interface <strong>to</strong> the node it wishes <strong>to</strong> affect, and then<br />

it calls the appropri<strong>at</strong>e function of th<strong>at</strong> node. However, this method<br />

is more or less regarded as obsolete, and consequently you should try<br />

<strong>to</strong> avoid it. Instead, expose useful eventIn/-Out and exposedField<br />

fields and let the user implement a normal event-passing scheme in <strong>EON</strong><br />

Studio's Routes window.<br />

There is actually another way of changing the values of a node; you<br />

could write scripts in e.g. VBScript th<strong>at</strong> finds a node in the<br />

simul<strong>at</strong>ion and then reads or sets the node's field values. Refer <strong>to</strong><br />

the Script node in the <strong>EON</strong> Studio Reference Guide for a thorough<br />

description.<br />

Commands<br />

Used <strong>to</strong> invoke command handlers in modules when user has selected a<br />

menu item or a <strong>to</strong>olbar but<strong>to</strong>n bound <strong>to</strong> a particular command previously<br />

registered by a module. Standard commands (such as Cut, Copy, Paste<br />

and Delete) will be sent <strong>to</strong> the module in this way, plus Module<br />

Messages. However, this doubled inform<strong>at</strong>ion provision might become<br />

subject of change in future releases of <strong>EON</strong> Studio.<br />

Module Messages<br />

There is an obvious need for modules <strong>to</strong> communic<strong>at</strong>e with each other<br />

and with <strong>EON</strong> Studio. This is carried out using a concept called module<br />

messaging. It is based on a broadcast-subscribe str<strong>at</strong>egy, where an <strong>EON</strong><br />

Studio applic<strong>at</strong>ion object acts as the intermedia<strong>to</strong>r—modules th<strong>at</strong> wish<br />

<strong>to</strong> inform its peers about something, make IAutApp::SendMessage() calls<br />

<strong>to</strong> <strong>EON</strong> Studio. A module interested in messages of a specific type<br />

should subscribe <strong>to</strong> those messages through an IAutApp::ListenTo()<br />

call. <strong>EON</strong> Studio will then add the module <strong>to</strong> its list of listeners.<br />

After subscribing, <strong>EON</strong> Studio will forward each received message of<br />

the requested type <strong>to</strong> the subscribing modules. Hence, <strong>EON</strong> Studio is<br />

employing a kind of point-<strong>to</strong>-point multicast technique, with send-<br />

16<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

lists based on the message types registered by the subscribing<br />

modules.<br />

<strong>EON</strong> Module 1<br />

Logical messaging<br />

p<strong>at</strong>h<br />

Other <strong>EON</strong> Module(s)<br />

2. Subscribe <strong>to</strong> message (IAutApp::ListenTo )<br />

3. Send message (IAutApp::SendMessage )<br />

1.Register message (IAutApp::GetToken )<br />

<strong>EON</strong><br />

Studio<br />

4. Broadcast message <strong>to</strong><br />

subscribed module(s), using the<br />

Win32 API SendMessage<br />

Actual<br />

messaging procedure<br />

Figure 4. Schem<strong>at</strong>ic view of module messaging<br />

The following messages types are predefined and used by <strong>EON</strong> Studio:<br />

• AA_GUID_CUT*: Sent by <strong>EON</strong> Studio when the user has selected the Cut<br />

command on the menu or the <strong>to</strong>olbar.<br />

• AA_GUID_COPY*: As above, but corresponding <strong>to</strong> the Copy command.<br />

• AA_GUID_PASTE*: As above, but corresponding <strong>to</strong> the Paste command.<br />

• AA_GUID_DELETE*: As above, but corresponding <strong>to</strong> the Delete command.<br />

• AA_GUID_NODEBAGCHANGE: Sent when a nodebag has changed due <strong>to</strong> user<br />

activities.<br />

• AA_GUID_VIEWACTIVE: Sent whenever a new view has been activ<strong>at</strong>ed in<br />

<strong>EON</strong> Studio.<br />

• AA_GUID_ICONCHANGED: Sent when the icon of a pro<strong>to</strong>type (or node)<br />

has been changed.<br />

• AA_GUID_SETNODE: Sent by a module when a new node should receive<br />

the focus in one of the <strong>EON</strong> Studio-specific windows, such as the<br />

Routes window or the Butterfly window.<br />

• AA_GUID_NODEFOCUS: This message is sent by <strong>EON</strong> Studio when the user<br />

has activ<strong>at</strong>ed a new node.<br />

• AA_GUID_SHOWPROTO_PROP: Sent when the user requests the properties<br />

page of a specific pro<strong>to</strong>type instance (mainly intended for internal<br />

use).<br />

However, some message types are defined but not yet used by <strong>EON</strong><br />

Studio. They should be sent when the user selects the specific command<br />

either from one of the menus or on the <strong>to</strong>olbar :<br />

• AA_GUID_PRINT*<br />

• AA_GUID_PRINTPREVIEW*<br />

• AA_GUID_CLEAR*<br />

• AA_GUID_CLEARALL*<br />

• AA_GUID_UNDO*<br />

• AA_GUID_REDO*<br />

• AA_GUID_SELECTALL*<br />

Each message above is briefly commented on in the file Commands.H in<br />

the <strong>EON</strong> <strong>SDK</strong> Development Files folder.<br />

A module is only allowed <strong>to</strong> listen <strong>to</strong> the so-called menu command<br />

messages (denoted by asterisks in the lists above), but can both<br />

2.5 17


User Guide<br />

Techniques<br />

listen <strong>to</strong> and send messages of other types. A module may also freely<br />

define new message types th<strong>at</strong> it could use when communic<strong>at</strong>ing with<br />

other modules.<br />

Following is a brief description of how you should work with module<br />

messages.<br />

1. To begin with, you perform module initializ<strong>at</strong>ion. Call<br />

IAutApp::GetToken() once for each message type you want the module<br />

<strong>to</strong> recognize. S<strong>to</strong>re all <strong>to</strong>kens for future use—you will need them <strong>to</strong><br />

determine the type of module message when Windows messages finally<br />

start <strong>to</strong> arrive.<br />

2. Then call IAutApp::ListenTo() for all the message types you'd like<br />

<strong>EON</strong> Studio <strong>to</strong> forward <strong>to</strong> the module. As an argument, pass a handler<br />

<strong>to</strong> the window you want <strong>to</strong> be the target for the specific message<br />

type. The module (or r<strong>at</strong>her, one of the module's windows) is now<br />

ready <strong>to</strong> start receiving messages. It is important <strong>to</strong> note th<strong>at</strong> you<br />

should skip this step completely if you want <strong>to</strong> subscribe <strong>to</strong> menu<br />

command messages—those messages are received without calling<br />

IAutApp::ListenTo().<br />

3. A WindowProc() message handler placed in the target window should<br />

first decide whether the received Windows message is a module<br />

message. If so, the handler must decide which type the message has—<br />

you should compare the message <strong>to</strong>ken with the ones you have<br />

previously s<strong>to</strong>red (see Step 1).<br />

4. If the message belongs <strong>to</strong> the set of module messages you're<br />

interested in, then let the WindowProc() handler process it<br />

accordingly. Note th<strong>at</strong> you should never change the contents of the<br />

message structure. There might be other modules th<strong>at</strong> listen <strong>to</strong> the<br />

same message type. If you modify the inform<strong>at</strong>ion, those modules<br />

will receive corrupt messages.<br />

Note th<strong>at</strong> you should always work on copies of the original module<br />

messages if you wish <strong>to</strong> modify the contents of the messages.<br />

5. If necessary, make your handler call the parent message handler<br />

CWnd::WindowsProc() and return.<br />

No snippets of code are included in this section. However, it is<br />

advisable <strong>to</strong> inspect the source code of the Sample Module, or read<br />

through the ModuleView.CPP file cre<strong>at</strong>ed by the <strong>EON</strong> Module Wizard.<br />

View handling<br />

One of the most exciting fe<strong>at</strong>ures of cre<strong>at</strong>ing an <strong>EON</strong> module is the<br />

ability <strong>to</strong> seamlessly add cus<strong>to</strong>m views inside <strong>EON</strong> Studio. These views<br />

are tre<strong>at</strong>ed in the same way as any standard views. In fact, some of<br />

the complex views (Scenegraph, Butterfly, ScriptEdi<strong>to</strong>r, etc) in <strong>EON</strong><br />

18<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

Studio are actually implemented as <strong>EON</strong> modules and using the same<br />

interface as described in this <strong>SDK</strong>.<br />

Persistent views<br />

A view in <strong>EON</strong> Studio can be in docked, flo<strong>at</strong>ing or MDI st<strong>at</strong>e.<br />

Furthermore, the user can freely configure where <strong>to</strong> dock it or control<br />

its size and position. When the user exits <strong>EON</strong> Studio, he usually<br />

would like <strong>to</strong> retain the view configur<strong>at</strong>ion so th<strong>at</strong> next time he uses<br />

<strong>EON</strong> Studio, he would get back the same configur<strong>at</strong>ion. Therefore,<br />

before adding a cus<strong>to</strong>m view <strong>to</strong> <strong>EON</strong> Studio using the <strong>SDK</strong>, you should<br />

consider whether the view should be persistent or not. A persistent<br />

view requires slightly more job but will maintain its window<br />

inform<strong>at</strong>ion between sessions. In <strong>EON</strong> Studio, Scenegraph and Butterfly<br />

are persistent views while the ScriptEdi<strong>to</strong>r is not.<br />

Implementing persistent views is accomplished by providing appropri<strong>at</strong>e<br />

d<strong>at</strong>a <strong>at</strong> certain callbacks. The following figure shows the sequence of<br />

callbacks when <strong>EON</strong> Studio is started. It also shows wh<strong>at</strong> the module<br />

should do in each callback rel<strong>at</strong>ed <strong>to</strong> persistent views.<br />

2.5 19


User Guide<br />

Techniques<br />

Wizards<br />

The wizards delivered with <strong>EON</strong> <strong>SDK</strong> are accessed from the Projects tab of the File>New<br />

dialog box in Visual Studio.<br />

<strong>EON</strong> Node Wizard<br />

Figure 5. <strong>EON</strong> Node Wizard in New Project Dialog<br />

1. Select <strong>EON</strong> Node Wizard.<br />

2. Enter a project name. Note th<strong>at</strong> the project name must not include<br />

spaces or special characters.<br />

3. Select the physical loc<strong>at</strong>ion for the project.<br />

4. Select Cre<strong>at</strong>e new workspace <strong>to</strong> cre<strong>at</strong>e a new node package. Use Add<br />

<strong>to</strong> current workspace <strong>to</strong> add nodes <strong>to</strong> an existing node package. To<br />

do this enter a temporary project name (for example, Added), select<br />

the Add <strong>to</strong> current workspace option and click OK. If Visual Studio<br />

was properly configured, this project will be deleted au<strong>to</strong>m<strong>at</strong>ically<br />

from the workspace. If the project is not au<strong>to</strong>m<strong>at</strong>ically deleted,<br />

Visual Studio will ask you <strong>to</strong> loc<strong>at</strong>e the project file (called<br />

Added.dsp, if we use the above example) when you reopen your<br />

workspace. If this happens, select Cancel and delete the missing<br />

project from your workspace.<br />

6. Click OK.<br />

Figure 6. <strong>EON</strong> Node Wizard dialog box<br />

7. After opening a new node project, the <strong>EON</strong> Node Wizard dialog box<br />

will appear.<br />

8. Enter the new node name. E.g. “MyNode”.<br />

20<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

9. Select which node group the node should belong <strong>to</strong>. New node groups<br />

may be cre<strong>at</strong>ed.<br />

10. Enter your node’s property page name. If you leave this field empty<br />

the property page name will be the same name you gave the node with<br />

“PP” as a prefix. E.g. “PPMyNode”. This <strong>to</strong> avoid identical class<br />

names.<br />

11. Select the number of properties page tabs. If multiple tabs a<br />

number will be added <strong>to</strong> the class name. E.g. “PPMyNode”,<br />

“PPMyNode_2” and “PPMyNode_3”<br />

12. Selected or deselect methods depending on the fe<strong>at</strong>ures you want <strong>to</strong><br />

add <strong>to</strong> your node.<br />

Node methods<br />

Serialize<br />

If the node should be able <strong>to</strong> s<strong>to</strong>re d<strong>at</strong>a types other than those<br />

defined by the <strong>EON</strong> standard, the S<strong>to</strong>re non-field d<strong>at</strong>a option should be<br />

selected. The gener<strong>at</strong>ed C++ skele<strong>to</strong>n code will include a Serialize()<br />

function, where calls <strong>to</strong> the standard CArchive() functions (Read() /<br />

Write()) should be specified. See the MFC document<strong>at</strong>ion for more<br />

inform<strong>at</strong>ion.<br />

Upd<strong>at</strong>e<br />

If the node should perform tasks once per frame, select this option.<br />

The gener<strong>at</strong>ed C++ skele<strong>to</strong>n code will include an Upd<strong>at</strong>e() function th<strong>at</strong><br />

will be called before each frame is drawn. This is where upd<strong>at</strong>e code<br />

should be placed.<br />

NOTE: Use this option sparingly <strong>to</strong> avoid burdening your system. Most<br />

nodes need not be upd<strong>at</strong>ed <strong>at</strong> every frame. These can be set <strong>to</strong> respond<br />

only when they receive events.<br />

EventsProcessed<br />

If this option is selected, an EventsProcessed() function will be<br />

added <strong>to</strong> the node’s C++ skele<strong>to</strong>n code. This function will be called<br />

once per frame if an event has been received since the previous frame<br />

was drawn. This is useful if d<strong>at</strong>a arrives <strong>at</strong> a higher r<strong>at</strong>e than the<br />

frame r<strong>at</strong>e, but when just the computed results (based on the incoming<br />

d<strong>at</strong>a) of the complex calcul<strong>at</strong>ions are needed.<br />

IsSensor<br />

Override this function <strong>to</strong> prevent the baseclass implement<strong>at</strong>ion th<strong>at</strong><br />

returns FALSE. If your implement<strong>at</strong>ion returns TRUE your node is a<br />

sensor, i.e. it can gener<strong>at</strong>e out-events without first getting an inevent.<br />

13. Visual Studio will confirm your actions in the New Project<br />

Inform<strong>at</strong>ion window. Click OK <strong>to</strong> continue.<br />

14. Visual Studio will ask you <strong>to</strong> close and reopen your workspace.<br />

Click OK <strong>to</strong> continue, and go <strong>to</strong> the File menu <strong>to</strong> close and reopen<br />

2.5 21


User Guide<br />

Techniques<br />

the workspace. When the workspace is reopened, include the PP<br />

project in the cre<strong>at</strong>ed workspace. The PP project is in a node<br />

project sub-direc<strong>to</strong>ry.<br />

Wizard-gener<strong>at</strong>ed files<br />

As the wizard cre<strong>at</strong>es the new node’s code skele<strong>to</strong>n, it will gener<strong>at</strong>e<br />

several new files.<br />

<strong>EON</strong> Node Wizard gener<strong>at</strong>ed files:<br />

Direc<strong>to</strong>ry: ...\ProjectName<br />

• ProjectName.DSP<br />

Visual Studio project file. Contains project settings, e.g. linker<br />

directives.<br />

• STDAFX.H<br />

Include file for standard system include files and the project<br />

specific include files th<strong>at</strong> are used frequently but changed<br />

infrequently. This file is included by STDAFX.CPP.<br />

• STDAFX.CPP<br />

Source file used <strong>to</strong> cre<strong>at</strong>e the project's precompiled header file<br />

(.pch).<br />

• RESOURCE.H<br />

Header file containing resource symbol definitions, e.g., the<br />

default icon bitmap resource. This file is included by the resource<br />

script.<br />

• ProjectName.RC<br />

Project resource script containing version inform<strong>at</strong>ion, string<br />

table, dialogs, icons and bitmaps, compiled in<strong>to</strong> a binary resource<br />

th<strong>at</strong> is linked <strong>to</strong> the project output file. (ProjectName.DLL).<br />

• ProjectName.DEF<br />

Module-definition file is a text file th<strong>at</strong> contains st<strong>at</strong>ements for<br />

defining ProjectName.DLL and its exports.<br />

• ProjectName.IDL<br />

The interface specific<strong>at</strong>ion file consists of an interface header<br />

followed by an interface body. The interface header includes an<br />

<strong>at</strong>tribute list describing characteristics th<strong>at</strong> apply <strong>to</strong> the<br />

interface as a whole. The interface body contains the remote d<strong>at</strong>a<br />

types and function pro<strong>to</strong>types. This file is compiled by MIDL before<br />

the C++ compiler is activ<strong>at</strong>ed. The MIDL output is ProjectName.H,<br />

which is included in ProjectName.CPP.<br />

• ProjectName.CPP<br />

Implement<strong>at</strong>ion of ProjectName.DLL exports.<br />

• NodeName.H<br />

22<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

Node class definition. The inheritance and COM map specifies which<br />

interfaces the node supports. For example, if the IAgent interface<br />

is supported, the node should implement the Upd<strong>at</strong>e method.<br />

The header file is more or less the same for all nodes. The main<br />

differences are in the class names and in the FID_… enumer<strong>at</strong>ion<br />

th<strong>at</strong> supplies field identifiers.<br />

• NodeName.CPP<br />

Node implement<strong>at</strong>ion. <strong>Construction</strong>, destruction, initializ<strong>at</strong>ion and<br />

processing field d<strong>at</strong>a.<br />

Direc<strong>to</strong>ry: ...\ProjectName\Res<br />

• DEFAULTI.BMP<br />

Default icon linked <strong>to</strong> all cre<strong>at</strong>ed nodes.<br />

Direc<strong>to</strong>ry: ...\ProjectName\PPProjectName<br />

• PPProjectName.DSP<br />

See description in previous section.<br />

• STDAFX.H<br />

See description in previous section.<br />

• STDAFX.CPP<br />

See description in previous section.<br />

• RESOURCE.H<br />

Header file containing resource symbol definitions, e.g., dialog<br />

resources. This file is included by the resource script.<br />

• PPProjectName.RC<br />

Project resource script containing version inform<strong>at</strong>ion, string<br />

table, dialogs, icons and bitmaps, compiled in<strong>to</strong> a binary resource<br />

th<strong>at</strong> is linked <strong>to</strong> the project output file. (PPProjectName.DLL).<br />

• PPProjectName.DEF<br />

See description in previous section.<br />

• PPProjectName.CPP<br />

Implement<strong>at</strong>ion of PPProjectName.DLL exports.<br />

• <strong>EON</strong>PE.H<br />

Uses the DECLARE_PPCLASS macro on the first properties page of each<br />

node. This macro defines a class for each node th<strong>at</strong> contains all<br />

the properties pages used by the node.<br />

• <strong>EON</strong>PE.CPP<br />

Implements one class for each node th<strong>at</strong> has an array member<br />

containing all the properties page objects used by the node.<br />

• PPNodeName.H<br />

2.5 23


User Guide<br />

Techniques<br />

Definition of a class derived from MFC's CpropertyPage.<br />

• PPNodetName.CPP<br />

Implements the <strong>EON</strong> properties page and the D<strong>at</strong>aTransfer function.<br />

This function transfers d<strong>at</strong>a of those fields handled by the<br />

properties page <strong>to</strong> the appropri<strong>at</strong>e node.<br />

Node C++ source file<br />

The wizard cre<strong>at</strong>es one source file for each node and one for the<br />

project, i.e., the DLL.<br />

Project IDL file<br />

The IDL file contains interface definitions and CoClass definitions.<br />

There is only one IDL file per DLL. All interfaces and classes<br />

implemented in a specific DLL are defined in the IDL file.<br />

Writing nodes in C++<br />

Manipul<strong>at</strong>ing in- and out-fields by using logic oper<strong>at</strong>ions and<br />

algorithms requires a minimum of programming experience. Use standard<br />

C++ programming <strong>to</strong> implement the desired functionality in any of the<br />

following functions: FieldChanged(), OnPreUpd<strong>at</strong>e(), Upd<strong>at</strong>e() or<br />

OnPostUpd<strong>at</strong>e (), depending on when your code should execute. Remember<br />

th<strong>at</strong> the execution model traverses all the way through the simul<strong>at</strong>ion<br />

tree when calling these functions; a child node is always called after<br />

its parent.<br />

When designing a new node, one has <strong>to</strong> decide how it shall interact<br />

with its surroundings. E.g., the <strong>EON</strong> Rot<strong>at</strong>e node rot<strong>at</strong>es its parent,<br />

while the KeyboardSensor uses eventOut fields and routes.<br />

With standard Windows programming, it is possible <strong>to</strong> incorpor<strong>at</strong>e<br />

hardware such as mice, printers or mass s<strong>to</strong>rage devices. If you need<br />

access <strong>to</strong> the graphics core of <strong>EON</strong>, you must use DirectX.<br />

Defining fields<br />

Define fields in the InitClass() function. The base class construc<strong>to</strong>r calls this<br />

function the first time an instance of your node is cre<strong>at</strong>ed.<br />

Accessing field values<br />

Processing eventIn<br />

Gener<strong>at</strong>ing events<br />

Loading and Saving (Serializing)<br />

Using DirectX<br />

The DirectX component th<strong>at</strong> is useful when working with graphics is<br />

Direct3D. For example, you can get and set individual vertex positions<br />

by using the included mesh interface. This DirectX component also has<br />

several other interfaces for frames, viewports and textures.<br />

24<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

If you use Direct3D functions within your node, you must obtain a COM<br />

(Component Object Model) interface using either QueryInterface() or<br />

CComQIPtr().<br />

QueryInterface() requires you <strong>to</strong> release the interface when it is not<br />

needed. If you acquired an interface in the OnInitialize() function,<br />

release it in the OnReset() function.<br />

CComQIPtr() is used primarily when you will only use the interface<br />

temporarily, e.g., as in the OnInitialize() function below. An object<br />

of this class performs au<strong>to</strong>m<strong>at</strong>ic reference counting through calls <strong>to</strong><br />

AddRef and Release.<br />

Although all available DirectX functions are fully documented in the<br />

DirectX <strong>SDK</strong>, it might be worthwhile <strong>to</strong> obtain one of the many books on<br />

the <strong>to</strong>pic.<br />

Interfaces<br />

The recommended procedure for accessing other nodes in <strong>EON</strong> Studio is<br />

by modifying their fields. However, some older nodes are still<br />

accessible via the interfaces they implement. See the Reference Guide<br />

for more inform<strong>at</strong>ion on how <strong>to</strong> query for a COM interface and <strong>to</strong> see a<br />

list of useful interfaces. A more complete description of interfaces<br />

is beyond the scope of this guide.<br />

Connection points in <strong>EON</strong><br />

A connection point is a COM standard fe<strong>at</strong>ure for sending outgoing<br />

events. Each connection point is exposed by an outgoing interface. Any<br />

client object may connect <strong>to</strong> an object exposing one or more connection<br />

points <strong>to</strong> receive events from th<strong>at</strong> object. A client object implements<br />

the outgoing interface, a notify sink.<br />

• Implementing connection points improves simul<strong>at</strong>ion performance. In<br />

<strong>EON</strong>, a node implements a subset of all defined interfaces.<br />

If you use connection points with <strong>EON</strong>, use them with ATL and a help class<br />

CConnectionPointAdvisor; the procedure is otherwise quite complic<strong>at</strong>ed.<br />

Using the <strong>EON</strong> log<br />

<strong>EON</strong>’s log handling fe<strong>at</strong>ures provide the developer with improved<br />

functions for filtering out log messages th<strong>at</strong> are irrelevant <strong>to</strong> the<br />

development process. Log messages can be sent from nodes (in the C++<br />

code) and from Script nodes. Each log message has input arguments:<br />

LogType, Source, Description and Message.<br />

Adding an icon <strong>to</strong> a node<br />

You can easily add a specially designed icon <strong>to</strong> a new node cre<strong>at</strong>ed in<br />

Visual Studio. Choose Insert>Resource <strong>to</strong> add a new bitmap <strong>to</strong> your <strong>EON</strong><br />

node project. In the resource edi<strong>to</strong>r, resize the drawing area <strong>to</strong> a<br />

16x16 square. Visual Studio will give your bitmap a default name. If<br />

you want <strong>to</strong> rename it, click the icon name <strong>to</strong> view its properties.<br />

Open your node source file and replace ”IDB_DEFAULT_ICON” inside the<br />

GetIconID() function with a new bitmap name, for example, IDB_NODE.<br />

2.5 25


User Guide<br />

Techniques<br />

<strong>EON</strong> Module Wizard<br />

The <strong>EON</strong> Module Wizard is used <strong>to</strong> cre<strong>at</strong>e a code skele<strong>to</strong>n for a new<br />

module.<br />

Figure 7. <strong>EON</strong> Module Wizard<br />

1. Select <strong>EON</strong> <strong>SDK</strong> Module Wizard.<br />

2. Enter a project name. Note th<strong>at</strong> the project name must not include<br />

spaces or special characters.<br />

3. Select the physical loc<strong>at</strong>ion for the project.<br />

4. Decide whether the project should be cre<strong>at</strong>ed in a new workspace or<br />

added <strong>to</strong> the current workspace.<br />

5. When you click OK the following dialog box will appear.<br />

Figure 8. <strong>EON</strong> Module Wizard dialog<br />

6. In the Module Wizard's first step, you fill in the Module name,<br />

Version, Program ID (version-independent ProgID) and Description<br />

fields. Then click on the Next but<strong>to</strong>n.<br />

7. In the second step, decide whether your module should support<br />

views. If so, do you need a standard view or perhaps split views<br />

Enter the number of rows and columns if you choose split views.<br />

8. If you selected a view, you may specify standard and proprietary<br />

module messages <strong>to</strong> be handled by the module's view class.<br />

9. Furthermore, you could choose <strong>to</strong> make the new module include<br />

command handlers for default and cus<strong>to</strong>m commands. (Commands are<br />

exposed <strong>to</strong> the user as menu items or via <strong>to</strong>olbar but<strong>to</strong>ns.) Now<br />

click Next.<br />

10. As the third and last step, you can select whether <strong>to</strong> include<br />

logging of errors, and support for verbose logging. Here, you<br />

should also select the licensing option (providing th<strong>at</strong> you already<br />

have a functioning license fe<strong>at</strong>ure). Otherwise, keep it as it <strong>to</strong><br />

26<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

disable licensing (the licensing source code will just be commented<br />

out—not deleted).<br />

11. Always leave the EonBase2.h option as it (checked)—this selection<br />

is only intended for internal use, by the development team <strong>at</strong> <strong>EON</strong><br />

Reality.<br />

12. Click Finish. The New Project inform<strong>at</strong>ion window will appear. The<br />

files the wizard will cre<strong>at</strong>e are listed, along with other<br />

inform<strong>at</strong>ion.<br />

Figure 9. New Project Inform<strong>at</strong>ion window<br />

13. Click OK <strong>to</strong> continue. The wizard will now gener<strong>at</strong>e the code<br />

skele<strong>to</strong>n for the module. Note th<strong>at</strong> you must close the project and<br />

reopen it before compiling the project. This is due <strong>to</strong> limit<strong>at</strong>ions<br />

in Visual Studio.<br />

Wizard gener<strong>at</strong>ed files<br />

The <strong>EON</strong> <strong>SDK</strong> Module Wizard gener<strong>at</strong>es the following files:<br />

Direc<strong>to</strong>ry: ...\ProjectName<br />

• ProjectName.DSP<br />

This is the normal Visual Studio project file. It keeps track of<br />

which files are currently included in the project, s<strong>to</strong>res project<br />

settings, etc<br />

• STDAFX.H<br />

Include file for standard system include files and the projectspecific<br />

include files th<strong>at</strong> are used frequently but changed<br />

infrequently. This file is included by STDAFX.CPP.<br />

• STDAFX.CPP<br />

This C++ source file is used <strong>to</strong> cre<strong>at</strong>e the project's precompiled<br />

header file (.pch).<br />

• RESOURCE.H<br />

This header file contains resource symbol definitions, e.g., the<br />

default icon bitmap resource. Visual C++ reads and upd<strong>at</strong>es the<br />

Resource.H. It is included by the resource script, ProjectName.RC.<br />

• ProjectName.RC<br />

Project resource script containing, for example, version<br />

2.5 27


User Guide<br />

Techniques<br />

inform<strong>at</strong>ion, string tables and bitmaps. It is compiled in<strong>to</strong> a<br />

binary resource th<strong>at</strong> is linked <strong>to</strong> the project output file.<br />

• Toolbar.BMP<br />

This bitmap exists only if you choose the Add cus<strong>to</strong>m command <strong>to</strong><br />

<strong>to</strong>olbar option in the Module Wizard. The bitmap file contains just<br />

three <strong>to</strong>olbar but<strong>to</strong>ns, but you can easily extend it <strong>to</strong> include as<br />

many but<strong>to</strong>ns you'd like.<br />

• ProjectName.DEF<br />

Windows definition file. It contains the exposed entry points of<br />

the ProjectName.DLL.<br />

• ProjectName.IDL<br />

The IDL file of our project. You will add interface and method<br />

definitions here. Microsoft's MIDL compiler will process this file<br />

<strong>to</strong> produce the type library (.tlb) file, in addition <strong>to</strong><br />

ProjectName.h, which is included in ProjectName.CPP.<br />

• ProjectName.H<br />

This file contains interface declar<strong>at</strong>ions for the COM object, i.e.,<br />

<strong>EON</strong> module. The MIDL compiler produces the ProjectName.h file based<br />

on the project's IDL file.<br />

• ProjectName.CPP<br />

This is the main implement<strong>at</strong>ion file for the COM object housing. It<br />

contains source code for the DLL exports, and offers both ATL and<br />

MFC support. (Note the presence of the_Module and theApp global<br />

variables th<strong>at</strong> are there <strong>to</strong> support the use of ATL and MFC<br />

classes.)<br />

• <strong>EON</strong>MODULE.H<br />

This header file contains the class declar<strong>at</strong>ion of your <strong>EON</strong> Studio<br />

module's class CEonModule, which is the class you have <strong>to</strong> modify <strong>to</strong><br />

include module-specific functionality.<br />

• <strong>EON</strong>MODULE.CPP<br />

The CEonModule class is implemented in this file. It may provide<br />

functions for licensing, connecting new views <strong>to</strong> the <strong>EON</strong> Studio<br />

GUI, adding <strong>to</strong>olbars, etc.<br />

• MODULEVIEW.H<br />

This file holds the declar<strong>at</strong>ions of the sub-classed window used as<br />

the module's view.<br />

• MODULEVIEW.CPP<br />

This file contains the source code for the implement<strong>at</strong>ion of the<br />

sub-classed window th<strong>at</strong> your module uses as its view (or as split<br />

views). This is where all displaying of GUI objects for various<br />

d<strong>at</strong>a exposure should be placed. Here, you should also add code <strong>to</strong><br />

support different kinds of module messages (th<strong>at</strong> is, if you have<br />

decided <strong>to</strong> include module message handling in your module).<br />

• README.TXT<br />

This file contains some brief inform<strong>at</strong>ion about each file inserted<br />

in<strong>to</strong> the new project.<br />

28<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Wizards<br />

Writing modules in C++<br />

To add fe<strong>at</strong>ures, changes <strong>to</strong> the module are made in the following<br />

files:<br />

• EonModule.CPP<br />

• EonModule.H<br />

• ModuleView.H<br />

• ModuleView.CPP<br />

The resource file may also need <strong>to</strong> be changed if you want <strong>to</strong> add or<br />

modify <strong>to</strong>olbars, dialog boxes, etc.<br />

For code samples, see the Sample Module on the <strong>EON</strong> <strong>SDK</strong> CD.<br />

2.5 29


User Guide<br />

Techniques<br />

Techniques<br />

Smart pointers<br />

All COM objects encapsul<strong>at</strong>e an integer value th<strong>at</strong> keeps track of<br />

object usage. Each time a client cre<strong>at</strong>es a COM object the AddRef<br />

function of th<strong>at</strong> object is called. This increment the object’s<br />

reference counter by one and prevents the destruction of th<strong>at</strong> object<br />

when it goes out of scope. This way separ<strong>at</strong>e parts of the client or<br />

even different clients may use the same object th<strong>at</strong> will persist as<br />

long as its reference counter is larger than zero. When an object’s<br />

Release function is called its reference counter is decrement by one,<br />

if this result in a zero value the object deletes it self.<br />

Each time a new pointer is introduced AddRef should be called,<br />

otherwise the pointer may become invalid. And before the pointer goes<br />

out of scope the programmer has <strong>to</strong> call Release otherwise there will<br />

be a memory leak. Trouble occurs when a programmer has several<br />

pointers <strong>to</strong> several different COM objects, e.g.:<br />

#include <br />

#include "shlobj.h" // Shell COM components<br />

#include "objbase.h"<br />

int main(void)<br />

{<br />

HRESULT hr = CoInitialize(NULL);<br />

if (FAILED(hr))<br />

{<br />

CoUninitialize();<br />

return -1;<br />

}<br />

IUnknown* pUnk1;<br />

// CoCre<strong>at</strong>eInstance calls AddRef<br />

hr = CoCre<strong>at</strong>eInstance<br />

(<br />

CLSID_ShellLink,<br />

NULL,<br />

CLSCTX_INPROC_SERVER,<br />

IID_IUnknown,<br />

(void **) &pUnk1<br />

);<br />

if (FAILED(hr))<br />

{<br />

CoUninitialize();<br />

return -1;<br />

}<br />

IUnknown* pUnk2 = pUnk1;<br />

ULONG lRef = pUnk2->AddRef();<br />

printf("Reference counter = %d\n", lRef);<br />

lRef = pUnk2->Release();<br />

printf("Reference counter = %d\n", lRef);<br />

lRef = pUnk1->Release();<br />

printf("Reference counter = %d\n", lRef);<br />

}<br />

CoUninitialize();<br />

return 0;<br />

Obviously it is quite easy <strong>to</strong> forget ether AddRef and Release on pUnk2<br />

or Release on pUnk1 since CoCre<strong>at</strong>eInstance did AddRef for us. To avoid<br />

this behavior we could encapsul<strong>at</strong>e all COM pointers in a templ<strong>at</strong>e<br />

class th<strong>at</strong> calls AddRef when it is assigned <strong>to</strong> an object and Release<br />

30<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Techniques<br />

when it goes out of scope. Below you will see an example of such a<br />

garbage collecting class, this <strong>to</strong> make it easier <strong>to</strong> understand the ATL<br />

smart pointers l<strong>at</strong>er.<br />

// Unknown.h<br />

class CUnknown<br />

{<br />

int m_ReferenceCount;<br />

public:<br />

};<br />

CUnknown();<br />

~CUnknown();<br />

void AddReference(void);<br />

void ReleaseReference(void);<br />

/***********************************************************/<br />

// Unknown.cpp<br />

#include <br />

#include "Unknown.h"<br />

CUnknown::CUnknown()<br />

{<br />

m_ReferenceCount = 0;<br />

}<br />

CUnknown::~CUnknown()<br />

{<br />

printf("CUnknown object destroyed!\n");<br />

}<br />

void CUnknown::AddReference(void)<br />

{<br />

m_ReferenceCount = m_ReferenceCount + 1;<br />

printf("AddReference: ");<br />

printf("Reference count = %d\n", m_ReferenceCount);<br />

}<br />

void CUnknown::ReleaseReference(void)<br />

{<br />

m_ReferenceCount = m_ReferenceCount - 1;<br />

if (m_ReferenceCount == 0)<br />

{<br />

printf("ReleaseReference: ");<br />

printf("Reference count = 0\n");<br />

delete this;<br />

}<br />

else<br />

{<br />

printf("ReleaseReference: ");<br />

printf("Reference count = %d\n", m_ReferenceCount);<br />

}<br />

}<br />

/***********************************************************/<br />

// SmartPtr.h<br />

templ<strong>at</strong>e <br />

class CSmartPtr<br />

{<br />

T* p;<br />

public:<br />

CSmartPtr(T* p_)<br />

{<br />

p = p_;<br />

p->AddReference();<br />

}<br />

~CSmartPtr(void)<br />

{<br />

p->ReleaseReference();<br />

}<br />

// Type cast opera<strong>to</strong>r<br />

// from SmartPtr <strong>to</strong> T<br />

opera<strong>to</strong>r T*(void)<br />

{<br />

return p;<br />

}<br />

// Indirection opera<strong>to</strong>r<br />

// return a reference <strong>to</strong> a T object<br />

T& opera<strong>to</strong>r*(void)<br />

{<br />

return *p;<br />

2.5 31


User Guide<br />

Techniques<br />

};<br />

}<br />

// Member-selection opera<strong>to</strong>r<br />

// return a pointer <strong>to</strong> a T object<br />

T* opera<strong>to</strong>r->(void)<br />

{<br />

return p;<br />

}<br />

// Assignment opera<strong>to</strong>r<br />

// for CSmartPtr = CSmartPtr<br />

CSmartPtr& opera<strong>to</strong>r=(CSmartPtr &q_)<br />

{<br />

return opera<strong>to</strong>r=((T *) q_);<br />

}<br />

// Assignment opera<strong>to</strong>r<br />

// for CSmartPtr = T*<br />

CSmartPtr& opera<strong>to</strong>r=(T* p_)<br />

{<br />

p->ReleaseReference();<br />

p = p_;<br />

p->AddReference();<br />

return *this;<br />

}<br />

/***********************************************************/<br />

// main.cpp<br />

#include <br />

#include "Unknown.h"<br />

#include "SmartPtr.h"<br />

class CMyClass : public CUnknown<br />

{<br />

// This is my fake "COM-object".<br />

// It inherits AddReference and ReleaseReference<br />

// from CUnknown. The SmartPtr knows th<strong>at</strong> all fake<br />

// "COM-objects" has these methods.<br />

public:<br />

CMyClass() {};<br />

~CMyClass() {};<br />

int MyMethod(void) {return 42;}<br />

};<br />

int main(void)<br />

{<br />

int a, b;<br />

printf("Cre<strong>at</strong>ing pointers:\n");<br />

CSmartPtr pSmart1 = new CMyClass;<br />

CSmartPtr pSmart2 = new CMyClass;<br />

CMyClass* pSilly = new CMyClass;<br />

pSilly->AddReference();<br />

printf("\nTesting pointers:\n");<br />

a = pSilly->MyMethod();<br />

b = pSmart1->MyMethod();<br />

printf("Silly = %d, Smart1 = %d\n", a, b);<br />

printf("\nAssigning pointers:\n");<br />

pSmart2 = pSmart1;<br />

pSmart1 = pSilly;<br />

printf("\nRelease pSilly\n");<br />

pSilly->ReleaseReference();<br />

// Not delete<br />

printf("\nOut of scope!\n");<br />

}<br />

return 0;<br />

In this example the CUnknown class imit<strong>at</strong>es the behavior of the<br />

IUnknown interface th<strong>at</strong> all COM objects have, this is the interface<br />

th<strong>at</strong> allow reference counting. CMyClass is the fake “COM object” th<strong>at</strong><br />

inherits its reference counting abilities from CUnknown. We must call<br />

AddReference and ReleaseReference on the pSilly pointer exactly as<br />

with the real COM pointers (pUnk) in the previous example. To get<br />

around th<strong>at</strong> we use the SmartPtr templ<strong>at</strong>e class. This class<br />

encapsul<strong>at</strong>es any fake “COM object” and calls AddReference and<br />

ReleaseReference on th<strong>at</strong> object in situ<strong>at</strong>ions th<strong>at</strong> requires such a<br />

call, e.g. when the SmartPtr object goes out of scope. It overrides<br />

32<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Techniques<br />

the * and -> opera<strong>to</strong>rs <strong>to</strong> expose the contained object instead of the<br />

SmartPtr object it self. The program output should be something like<br />

this:<br />

00: Cre<strong>at</strong>ing pointers:<br />

01: AddReference: Reference count = 1<br />

02: AddReference: Reference count = 1<br />

03: AddReference: Reference count = 1<br />

04:<br />

05: Testing pointers:<br />

06: Silly = 42, Smart1 = 42<br />

07:<br />

08: Assigning pointers:<br />

09: ReleaseReference: Reference count = 0<br />

10: CUnknown object destroyed!<br />

11: AddReference: Reference count = 2<br />

12: ReleaseReference: Reference count = 1<br />

13: AddReference: Reference count = 2<br />

14:<br />

15: Release pSilly<br />

16: ReleaseReference: Reference count = 1<br />

17:<br />

18: Out of scope!<br />

19: ReleaseReference: Reference count = 0<br />

20: CUnknown object destroyed!<br />

21: ReleaseReference: Reference count = 0<br />

22: CUnknown object destroyed!<br />

Here line 1-2 shows th<strong>at</strong> the SmartPtr class calls the CMyClass<br />

AddReference function for us, while we have <strong>to</strong> make th<strong>at</strong> call our self<br />

on line 3 for the pSilly standard pointer. Next, we test th<strong>at</strong> it<br />

really is the CMyClass object th<strong>at</strong> we reach with the -> opera<strong>to</strong>r. When<br />

assigning pSmart1 <strong>to</strong> pSmart2 the original object th<strong>at</strong> pSmart2 points<br />

<strong>to</strong> is released and destroyed on line 10. Then the object th<strong>at</strong> pSmart1<br />

points <strong>to</strong> get one more reference on line 11 when pSmart2 also is<br />

assigned <strong>to</strong> point <strong>to</strong>wards it. Then in line 12 pSmart1 is set <strong>to</strong> point<br />

<strong>to</strong> the same object as pSilly. Th<strong>at</strong> is why the reference counter on the<br />

object previously pointed <strong>to</strong> by pSmart1 is decrement by one. On the<br />

next line the object pointed <strong>at</strong> by pSilly increments its reference<br />

counter when pSmart1 is assigned <strong>to</strong> it as well. On line 16 the pSilly<br />

pointer is released, but since pSmart1 also points <strong>to</strong> th<strong>at</strong> object the<br />

reference count will not become zero and therefor the object will not<br />

be deleted. Now both SmartPtr has one object each. Both object<br />

reference counts are one and therefor they will be deleted when<br />

pSmart1 and pSmart2 goes out of scope. Since the au<strong>to</strong>m<strong>at</strong>ic destruction<br />

of the SmartPtr templ<strong>at</strong>e class objects will decrement those reference<br />

counts <strong>to</strong> zero.<br />

CComPtr and CComQIPtr<br />

Active Templ<strong>at</strong>e Library (ATL) provides programmers with CComPtr and<br />

CComQIPtr smart pointer templ<strong>at</strong>e classes specialized for COM-objects.<br />

In comparison our SmartPtr class is not really th<strong>at</strong> smart. Similar <strong>to</strong><br />

our class they support au<strong>to</strong>m<strong>at</strong>ic reference counting through calls <strong>to</strong><br />

the COM-objects AddRef and Release functions. Unlike our templ<strong>at</strong>e<br />

class CComPtr and CComQIPtr overloads several more opera<strong>to</strong>rs, handling<br />

2.5 33


User Guide<br />

Techniques<br />

every pointer oper<strong>at</strong>ion in a safe manner. E.g. the address opera<strong>to</strong>r<br />

(&) will return the address of the encapsul<strong>at</strong>ed COM-object.<br />

Both ATL smart pointer classes support the following opera<strong>to</strong>rs:<br />

T* Type cast from CComPtr or CComQIPtr <strong>to</strong> T*<br />

* Accesses the encapsul<strong>at</strong>ed object<br />

& Address of the encapsul<strong>at</strong>ed object<br />

-> Member access through a pointer <strong>to</strong> the encapsul<strong>at</strong>ed object<br />

= Assignment between two smart pointers or one smart pointer and one<br />

T object<br />

! Check if valid pointer. Returns TRUE if there is not an<br />

encapsul<strong>at</strong>ed COM object, otherwise FALSE<br />

CComPtr and CComQIPtr both has a public member “p”, th<strong>at</strong> is the actual<br />

standard pointer <strong>to</strong> an object of the class T. They also implement a<br />

Release method so th<strong>at</strong> direct calls <strong>to</strong> p->Release() may be avoided.<br />

The difference between CComPtr and CComQIPtr is th<strong>at</strong> the l<strong>at</strong>ter can<br />

make QueryInterface calls for you as shown below.<br />

#include <br />

#include "shlobj.h"<br />

#include "objbase.h"<br />

#include "<strong>at</strong>lbase.h"<br />

int main(void)<br />

{<br />

HRESULT hr = CoInitialize(NULL);<br />

if (FAILED(hr))<br />

{<br />

CoUninitialize();<br />

return -1;<br />

}<br />

// Start code block<br />

{<br />

CComPtr pSLink;<br />

//IShellLink* pShellLink;<br />

// CoCre<strong>at</strong>eInstance calls AddRef<br />

hr = CoCre<strong>at</strong>eInstance<br />

(<br />

CLSID_ShellLink,<br />

NULL,<br />

CLSCTX_INPROC_SERVER,<br />

IID_IShellLink,<br />

(void **) &pSLink<br />

);<br />

if (FAILED(hr))<br />

{<br />

CoUninitialize();<br />

return -1;<br />

}<br />

CComPtr pPF1;<br />

hr = pSLink->QueryInterface<br />

(<br />

IID_IPersistFile,<br />

(void **) &pPF1<br />

34<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


User Guide<br />

Techniques<br />

);<br />

if (FAILED(hr))<br />

{<br />

printf("Query for IPersistFile failed!\n");<br />

CoUninitialize();<br />

return -1;<br />

}<br />

CComQIPtr pPF2(pSLink);<br />

if (!pPF2)<br />

{<br />

printf("Query for IPersistFile failed!\n");<br />

CoUninitialize();<br />

return -1;<br />

}<br />

printf("Out of scope.\n");<br />

printf("Smart pointers calls Release on ");<br />

printf("encapsul<strong>at</strong>ed objects before\n");<br />

printf("pSLink, pPF1 and ");<br />

printf("pPF2 are destroyed.\n");<br />

}<br />

// End code block<br />

CoUninitialize();<br />

}<br />

return 0;<br />

The code block in this example is used <strong>to</strong> make the variables <strong>to</strong> go out<br />

of scope before the CoUninitialize call, otherwise the DLL containing<br />

the ShellLink object will unload and our poiners become invalid.<br />

For more inform<strong>at</strong>ion on these two templ<strong>at</strong>e classes see there<br />

definition in ATLBASE.h or Microsoft Developers Network.<br />

2.5 35


User Guide<br />

Tu<strong>to</strong>rials<br />

Summary:<br />

• Use the Module Wizard <strong>to</strong> lay down the ground (skele<strong>to</strong>n code).<br />

• Remove stuff you don’t need.<br />

• Add or modify implement<strong>at</strong>ion <strong>to</strong> get the job done.<br />

• Most frequently, you will need <strong>to</strong> modify/add more command handlers<br />

and adapt the OnUpd<strong>at</strong>e handler.<br />

36<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

<strong>Introduction</strong><br />

<strong>Introduction</strong><br />

About the Reference Guide<br />

In this reference guide, you will find inform<strong>at</strong>ion on the functions<br />

used in <strong>EON</strong> <strong>SDK</strong>. The guide is divided in<strong>to</strong> two sections—one section<br />

covers functions th<strong>at</strong> are used when cre<strong>at</strong>ing nodes, the other contains<br />

inform<strong>at</strong>ion needed <strong>to</strong> build modules<br />

In the first section, the functions are listed alphabetically. The<br />

listings provide function descriptions and inform<strong>at</strong>ion on parameters<br />

and return values. There are also short examples illustr<strong>at</strong>ing how the<br />

functions are used.<br />

General<br />

D<strong>at</strong>a types<br />

The module section contains a list of COM interfaces used in <strong>EON</strong> <strong>SDK</strong>.<br />

The d<strong>at</strong>a types used in <strong>EON</strong> <strong>SDK</strong> are listed in the following table with<br />

inform<strong>at</strong>ion on the corresponding event types, a brief description for<br />

each d<strong>at</strong>a type, in addition <strong>to</strong> its valid range.<br />

You should be familiar with the standard d<strong>at</strong>a types used by <strong>EON</strong>.<br />

Single-value fields and events have names th<strong>at</strong> begin with SF (for<br />

Single Field). Multiple-valued fields and events have names th<strong>at</strong> begin<br />

with MF (Multiple Field).<br />

Type Event type name Description Range<br />

Integer SFInt32 An integer value [–2,147,483,648; 2,147,483,647]<br />

Flo<strong>at</strong> SFFlo<strong>at</strong> A flo<strong>at</strong>ing-point value [-3.4E-38; 3.4E 38]<br />

Double SFDouble A double precision flo<strong>at</strong> [-1.7E –308; 1.7E 308]<br />

String SFString A string N/A<br />

2D flo<strong>at</strong> vec<strong>to</strong>r SFVec2f A two-dimensional flo<strong>at</strong> vec<strong>to</strong>r Same as Flo<strong>at</strong> for both components<br />

3D flo<strong>at</strong> vec<strong>to</strong>r SFVec3f A three-dimensional flo<strong>at</strong> vec<strong>to</strong>r Same as Flo<strong>at</strong> for each component<br />

Boolean SFBool Boolean value TRUE/FALSE<br />

Node SFNode Reference <strong>to</strong> a node N/A<br />

Color SFColor Three flo<strong>at</strong>s, one for each of the Red,<br />

Green an Blue color components<br />

[0.0; 1.0] each<br />

Time SFTime A double precision flo<strong>at</strong> representing<br />

seconds<br />

Rot<strong>at</strong>ion SFRot<strong>at</strong>ion Four flo<strong>at</strong>s: rot<strong>at</strong>ion around an axis,<br />

measured in radians; the axis is<br />

defined in (x,y,z) coordin<strong>at</strong>es<br />

Image SFImage Placeholder for an arbitrary byte<br />

vec<strong>to</strong>r<br />

Same as Double<br />

Same as Flo<strong>at</strong> for each component<br />

N/A<br />

All SF d<strong>at</strong>a types have an array counterpart carrying the prefix MF.<br />

These MF d<strong>at</strong>a types can hold several SF d<strong>at</strong>a values. For example,<br />

several SFNode values can be s<strong>to</strong>red in a single MFNode field.<br />

2.5 37


Reference Guide<br />

Classes in <strong>EON</strong> <strong>SDK</strong><br />

Nodes<br />

Default node fields<br />

There is a well-defined set of fields th<strong>at</strong> every node always<br />

implements by default. One such field is the Children MFNode field,<br />

where all the children of a the node are listed. The TreeChildren<br />

field is the placeholder for the same nodes as listed in the Children<br />

field, but also s<strong>to</strong>res node references. These references are links <strong>to</strong><br />

children th<strong>at</strong> actually belong <strong>to</strong> other nodes. (See the Script node<br />

description in the <strong>EON</strong> Studio Reference Guide for more inform<strong>at</strong>ion on<br />

how <strong>to</strong> manipul<strong>at</strong>e MFNode fields using VBScript.)<br />

All nodes may be started or s<strong>to</strong>pped with events, and they send events<br />

<strong>to</strong> reflect changes in their running st<strong>at</strong>us. If a node is <strong>to</strong> be started<br />

or s<strong>to</strong>pped, the SetRun or SetRun_ in-events should be used. These inevents<br />

use Boolean d<strong>at</strong>a: a SetRun value of TRUE will start a node and<br />

value of FALSE will s<strong>to</strong>p it. SetRun_ is the inverse of SetRun (FALSE<br />

is used for start and TRUE for s<strong>to</strong>p).<br />

Some nodes do not need start/s<strong>to</strong>p capabilities. Implement<strong>at</strong>ion of<br />

these nodes requires neither the SetRun and SetRun_ in-events, nor the<br />

OnStart() and OnS<strong>to</strong>p() functions. Nevertheless, the SetRun and SetRun_<br />

fields will still be exposed.<br />

Name Field type D<strong>at</strong>a type Description Range<br />

TreeChildren field MFNode Holds both child nodes and node references N/A<br />

Children field MFNode Holds the node's child nodes. N/A<br />

SetRun eventIn SFBool Starts the node if it is s<strong>to</strong>pped TRUE/FALSE<br />

SetRun_ eventIn SFBool S<strong>to</strong>ps the node if it is running TRUE/FALSE<br />

OnRunFALSE eventOut SFBool Sent when the node is s<strong>to</strong>pped Always TRUE<br />

OnRunTRUE eventOut SFBool Sent when the node is started Always TRUE<br />

OnRunChanged eventOut SFBool Sent when the node changes st<strong>at</strong>e from running <strong>to</strong><br />

s<strong>to</strong>pped or vice versa<br />

TRUE/FALSE<br />

38<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Classes in <strong>EON</strong> <strong>SDK</strong><br />

Classes in <strong>EON</strong> <strong>SDK</strong><br />

CAgent<br />

CEonBase<br />

EventsProcessed<br />

FieldChanged<br />

Valid<strong>at</strong>eField<br />

EventGener<strong>at</strong>ed<br />

FinalConstruct<br />

FinalRelease<br />

InternalGetField<br />

GetPropertyEdi<strong>to</strong>rCLSID<br />

InitClass<br />

Serialize<br />

CEonObject<br />

OnInitialize<br />

OnReset<br />

OnStart<br />

OnS<strong>to</strong>p<br />

CExternalReference<br />

OnGetReference<br />

OnGetReferenceCount<br />

OnSetReference<br />

CNode<br />

MoveChild<br />

SwapChildren<br />

CConnectionPointAdvisor<br />

Advise<br />

Unadvise<br />

EonUtil<br />

EonFindNode<br />

2.5 39


Reference Guide<br />

Classes in <strong>EON</strong> <strong>SDK</strong><br />

EonFindNodeP<strong>at</strong>h<br />

EonFindNodeWithInterface<br />

EonGetName<br />

EonGetParentFrame<br />

EonGetParentRMFrame<br />

EonGetP<strong>at</strong>h<br />

EonGetRoot<br />

EonGetSimul<strong>at</strong>ionInstance<br />

EonHasInterface<br />

EonLoadFileToDisk<br />

EonReleaseSimul<strong>at</strong>ionInstance<br />

EonReportError<br />

GetCameraDistance<br />

GetCameraPosition<br />

GetCameraSQRDistance<br />

40<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Modules<br />

Modules<br />

Interfaces for <strong>EON</strong> Modules<br />

There are several COM interfaces th<strong>at</strong> will interact with the modular<br />

system.<br />

2.5 41


Reference Guide<br />

Interfaces<br />

Interfaces<br />

There are a large number of COM interfaces for the various software<br />

components in the <strong>EON</strong> environment. The following section is intended<br />

<strong>to</strong> provide you with a thorough overview of useful interfaces. You will<br />

most certainly need <strong>to</strong> access several of the interface functions when<br />

working as an <strong>EON</strong> <strong>SDK</strong> applic<strong>at</strong>ion developer. Note th<strong>at</strong> if you find an<br />

interface not included in the list below, you should try <strong>to</strong> avoid<br />

using it.<br />

42<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

IAgent<br />

Upd<strong>at</strong>e<br />

IAgentFrame<br />

RenderRef<br />

RenderRef_<br />

TransformToFrame<br />

TransformToWorld<br />

IAgentFrame2<br />

GetLocalTransform<br />

SetLocalTransform<br />

GetWorldTransform<br />

SetWorldTransform<br />

IAgentSimul<strong>at</strong>ion<br />

GetDescription<br />

SetDescription<br />

GetNoTreeNodes<br />

GetNoIniTreeNodes<br />

IncIniCounter<br />

GetSt<strong>at</strong>isticsOn<br />

SetSt<strong>at</strong>isticsOn<br />

LockRender<br />

UnlockRender<br />

IAgentViewport<br />

SetFront<br />

GetFront<br />

SetBack<br />

GetBack<br />

SetViewport<br />

GetViewport<br />

GetFieldOfView<br />

SetFieldOfView<br />

IsClicked<br />

IAutApp<br />

2.5 43


Reference Guide<br />

Interfaces<br />

Activ<strong>at</strong>eView<br />

AddCommandTarget<br />

AddMenuItem<br />

AddModuleWindow<br />

AddToolbarBut<strong>to</strong>n<br />

CheckInFe<strong>at</strong>ure<br />

CheckOutFe<strong>at</strong>ure<br />

ConnectSplitView<br />

ForceDemoMode<br />

GetConfig<br />

GetDocument<br />

GetHostID<br />

GetLicenseKey<br />

GetLicenseSt<strong>at</strong>us<br />

GetNextModule<br />

GetNodeInfo<br />

GetNodeInfoCount<br />

GetPositionFirstModule<br />

GetSettings<br />

GetToken<br />

GetUserList<br />

GetUserName<br />

GetViewPosition<br />

HideView<br />

IsDemoMode<br />

IsModuleLoaded<br />

ListenTo<br />

LogMessage<br />

RegisterCommand<br />

RegisterToolbar<br />

RegisterSplitView<br />

RegisterView<br />

RegisterView2<br />

RemoveView<br />

SendMessage<br />

44<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

SetDefaultWindowPosition<br />

SetViewName<br />

ShowView<br />

IAutDoc<br />

GetSelectedNode<br />

GetSimul<strong>at</strong>ion<br />

GetSimul<strong>at</strong>ionRoot<br />

SetDirty<br />

Upd<strong>at</strong>eAllViews<br />

IAutNodeInfo<br />

GetC<strong>at</strong>egory<br />

GetCLSID<br />

GetIconDLL<br />

GetIconID<br />

GetModuleCLSID<br />

GetNodeName<br />

IAutPro<strong>to</strong>type<br />

GetRootNode<br />

GetSubPro<strong>to</strong>types<br />

IAutPro<strong>to</strong>types<br />

GetCount<br />

GetPro<strong>to</strong>type<br />

IAutSettings<br />

Cre<strong>at</strong>eSubKey<br />

EnumKeys<br />

FindSubKey<br />

GetApplic<strong>at</strong>ion<br />

GetRegInt<br />

GetRegString<br />

GetStandardKey<br />

RemoveSubKey<br />

SetRegInt<br />

SetRegString<br />

2.5 45


Reference Guide<br />

Interfaces<br />

CurrentRegKey<br />

CurrentBaseKey<br />

IAutSimul<strong>at</strong>ion<br />

GetPro<strong>to</strong>types<br />

GetRootNode<br />

Run<br />

S<strong>to</strong>p<br />

ICEonConfig<br />

DoEditModal<br />

IChainSimul<strong>at</strong>ion<br />

SetNewSimul<strong>at</strong>ion<br />

GetNewSimul<strong>at</strong>ion<br />

IDegreeOfFreedom<br />

IDeviceKeyboard<br />

GetKey<br />

SetKey<br />

IEnumNodes<br />

Next<br />

Skip<br />

Reset<br />

Clone<br />

IEonDual<br />

GetField<br />

GetFieldByName<br />

GetFieldCount<br />

GetFieldInfo<br />

46<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

GetIdOfName<br />

GetParentNode<br />

IEonEvent<br />

GetField<br />

GetFieldByName<br />

GetFieldCount<br />

GetFieldInfo<br />

GetIdOfName<br />

IsSensor<br />

CollectEvent<br />

InternalEventsProcessed<br />

SetDirty<br />

DeliverEvent<br />

IEonField<br />

GetMFCount<br />

GetMFElement<br />

GetMFSpan<br />

GetSFBool<br />

GetSFColor<br />

GetSFFlo<strong>at</strong><br />

GetSFImage<br />

GetSFInt32<br />

GetSFNode<br />

GetSFRot<strong>at</strong>ion<br />

GetSFString<br />

GetSFTime<br />

GetSFVec2f<br />

GetSFVec3f<br />

SetMFElement<br />

SetMFSpan<br />

SetSFBool<br />

SetSFColor<br />

SetSFFlo<strong>at</strong><br />

SetSFImage<br />

2.5 47


Reference Guide<br />

Interfaces<br />

SetSFInt32<br />

SetSFNode<br />

SetSFRot<strong>at</strong>ion<br />

SetSFString<br />

SetSFTime<br />

SetSFVec2f<br />

SetSFVec3f<br />

SetValueFromField<br />

AddMFElement<br />

_RemoveMFElement<br />

_SetMFCount<br />

SetVariant<br />

GetVariant<br />

GetOwner<br />

GetStringValue<br />

SetStringValue<br />

TouchField<br />

Valid<strong>at</strong>eField<br />

GetFieldInfo<br />

IEonField2<br />

GetLastInput<br />

IEonField3<br />

Load<br />

Save<br />

GetFieldID<br />

IEonFieldDual<br />

SetValue<br />

GetValue<br />

SetMFElement<br />

AddMFElement<br />

RemoveMFElement<br />

GetMFElement<br />

GetMFCount<br />

SetMFCount<br />

48<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

SetStringValue<br />

GetStringValue<br />

GetFieldType<br />

GetFieldName<br />

IEonInsertable<br />

IEonModule<br />

CheckInLicenseSynopsis<br />

CheckOutLicense<br />

GetCLSID<br />

GetDistributionRight<br />

GetSplitPaneReinitInfo<br />

GetViewReinitInfo<br />

OnCommand<br />

OnConnect<br />

OnCre<strong>at</strong>eView<br />

OnDeleteContents<br />

OnDisconnect<br />

OnModuleListChanged<br />

OnNewDocument<br />

OnOpenDocument<br />

OnQueryDefWinPos<br />

OnSave<br />

OnSimul<strong>at</strong>ionRun<br />

OnSimul<strong>at</strong>ionS<strong>to</strong>p<br />

OnUpd<strong>at</strong>e<br />

OnUpd<strong>at</strong>eCommandUI<br />

IEonObject<br />

GetIcon<br />

OnNewParent<br />

OnNewChild<br />

OnEdit<br />

Initialize<br />

Reset<br />

Clone<br />

2.5 49


Reference Guide<br />

Interfaces<br />

Start<br />

S<strong>to</strong>p<br />

IsRunning<br />

IsInitialized<br />

IEonObject2<br />

SetSimul<strong>at</strong>ion<br />

GetCLSID<br />

Save<br />

Load<br />

IsDirty<br />

LoadLegacy<br />

OnRemoveChild<br />

OnAddChild<br />

OnSetParent<br />

Valid<strong>at</strong>eNewChild<br />

SetDirty<br />

LoadIcon<br />

IEonPropertyEdi<strong>to</strong>r<br />

DoModal<br />

IEonPro<strong>to</strong>type<br />

Cre<strong>at</strong>ePro<strong>to</strong>typeFromSubtree<br />

HasNonExportableExternalLinks<br />

SetPro<strong>to</strong>typeName<br />

GetPro<strong>to</strong>typeName<br />

SetIcon<br />

GetIcons<br />

GetIconsDib<br />

Cre<strong>at</strong>eSubBagItera<strong>to</strong>r<br />

GetSubBag<br />

RemoveSubBag<br />

AddSubBag<br />

GetParentBag<br />

GetGUID<br />

FindSubBag<br />

50<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

GetInstanceCount<br />

SetShortDescription<br />

GetShortDescription<br />

SetLongDescription<br />

GetLongDescription<br />

GetExportedFieldCount<br />

AddExportedField<br />

GetExportedField<br />

GetExportedFieldIDByName<br />

SetExportedField<br />

RemoveExportedField<br />

Cre<strong>at</strong>ePro<strong>to</strong>typeInstance<br />

SetUserD<strong>at</strong>a<br />

GetUserD<strong>at</strong>a<br />

ExpandAllPro<strong>to</strong>ypes<br />

UnexpandAllPro<strong>to</strong>ypes<br />

GetBagID<br />

IEonSingle<strong>to</strong>n<br />

SetSimul<strong>at</strong>ion<br />

IEonSingle<strong>to</strong>nFac<strong>to</strong>ry<br />

GetSimul<strong>at</strong>ionInstance<br />

ReleaseSimul<strong>at</strong>ionInstance<br />

IExternalEvents<br />

SendEvent<br />

AddEventInField<br />

AddEventOutField<br />

DeleteEvent<br />

DeleteAllEvents<br />

SendOutEvent<br />

IExternalEventsNotifySink<br />

OnEvent<br />

IExternalReference<br />

GetReference<br />

2.5 51


Reference Guide<br />

Interfaces<br />

SetReference<br />

GetReferenceCount<br />

IFileLoader<br />

SetSimFile<br />

GetSIMDIR<br />

SetP<strong>at</strong>h<br />

GetP<strong>at</strong>h<br />

GetAbsP<strong>at</strong>h<br />

MergeP<strong>at</strong>h<br />

LoadFile<br />

LoadFileToDisk<br />

IFileLoader2<br />

GetSimFileName<br />

GetSimFileNameLenght<br />

IFileLoader3<br />

SetSimFile<br />

GetSIMDIR<br />

SetP<strong>at</strong>h<br />

GetP<strong>at</strong>h<br />

GetAbsP<strong>at</strong>h<br />

MergeP<strong>at</strong>h<br />

LoadFile<br />

LoadFileToDisk<br />

GetSimFileName<br />

SimFileNameLength<br />

Close<br />

IGUIMotionModel<br />

MotionNotify<br />

RequestMotionModelImages<br />

IJoystick<br />

GetNoJoysticks<br />

GetJoystickCapabilities<br />

GetJoystickD<strong>at</strong>a<br />

52<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

GetJoystickProperties<br />

SetJoystickProperties<br />

IJoystickSt<strong>at</strong>e<br />

OnJoystickChange<br />

OnJoystickBut<strong>to</strong>nChange<br />

OnJoystickPositionChange<br />

IKeyboard<br />

GetVKey<br />

GetVKeyPresses<br />

SetVKey<br />

SetVKeyPresses<br />

IKeyboardSt<strong>at</strong>e<br />

OnKeyboardChange<br />

ILinkItera<strong>to</strong>r<br />

Reset<br />

Next<br />

IsValid<br />

Current<br />

IMakePersistant<br />

SaveAll<br />

IMouse<br />

GetMouse<br />

SetMouse<br />

IMouseSt<strong>at</strong>e<br />

OnMouseBut<strong>to</strong>nChange<br />

OnMouseChange<br />

OnMousePositionChange<br />

INode<br />

SetParent<br />

GetParent<br />

AddChild<br />

2.5 53


Reference Guide<br />

Interfaces<br />

RemoveChild<br />

GetChild<br />

GetChildren<br />

GetChildrenCount<br />

SetName<br />

GetName<br />

SetBag<br />

GetBag<br />

SetID<br />

GetID<br />

INodeBag<br />

DeleteContents<br />

Cre<strong>at</strong>eNode<br />

AttachNode<br />

Save<br />

Load<br />

CopyNode<br />

CopyLink<br />

MoveSubtree<br />

MoveLink<br />

Paste<br />

CanPaste<br />

GetParentID<br />

GetParentPtr<br />

GetINode<br />

GetRefCount<br />

GetRefTarget<br />

InsertRef<br />

CanInsertRef<br />

DeleteRef<br />

AddRoute<br />

GetLink<br />

DeleteLink<br />

DeleteSubtree<br />

SeverLink<br />

54<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

GetReference<br />

GetNodeCount<br />

Cre<strong>at</strong>eNodeItera<strong>to</strong>r<br />

Cre<strong>at</strong>eLinkItera<strong>to</strong>r<br />

AddField<br />

DeleteField<br />

SwapChildren<br />

MoveChild<br />

GetA<strong>to</strong>mFromString<br />

GetStringFromA<strong>to</strong>m<br />

IsPersistentSave<br />

Dump<br />

INodeBagAge<br />

GetRoutesAge<br />

INodeBagFiles<br />

GetFileLoader<br />

INodeBagItera<strong>to</strong>r<br />

Reset<br />

Next<br />

IsValid<br />

Current<br />

INodeBagItera<strong>to</strong>rFac<strong>to</strong>ry<br />

Cre<strong>at</strong>eNodeItera<strong>to</strong>r<br />

Cre<strong>at</strong>eLinkItera<strong>to</strong>r<br />

Cre<strong>at</strong>eSubBagItera<strong>to</strong>r<br />

INodeItera<strong>to</strong>r<br />

Reset<br />

Next<br />

IsValid<br />

Current<br />

INodeLicense<br />

GetLicenseOptions<br />

2.5 55


Reference Guide<br />

Interfaces<br />

GetModuleCLSID<br />

IPCLogQueue<br />

Log<br />

GetLogEvent<br />

56<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

UseLogType<br />

IsLogTypeUsed<br />

IPro<strong>to</strong>typeDefinitionHolder<br />

GetPro<strong>to</strong>typeDefinition<br />

GetSearchP<strong>at</strong>h<br />

IReference<br />

GetLink<br />

SetLink<br />

Upd<strong>at</strong>eLink<br />

IRouteManager<br />

AddRoute<br />

RemoveRoute<br />

EnableNode<br />

DisableNode<br />

AddNode<br />

DeleteNode<br />

PendingEvent<br />

EventDelivered<br />

IRouteManager2<br />

SetEventProcessing<br />

GetEventProcessing<br />

RegisterCallback<br />

UnRegisterCallback<br />

IRunControl<br />

SetBreakFlag<br />

GetBreakFlag<br />

ISettingsServer<br />

Edit<br />

SetSubKey<br />

IsRestartNeeded<br />

ISettingsServer2<br />

UseCurrentSubKey<br />

2.5 57


Reference Guide<br />

Interfaces<br />

ISimul<strong>at</strong>ion<br />

GetHwnd<br />

SetHwnd<br />

Upd<strong>at</strong>e<br />

HandleActiv<strong>at</strong>e<br />

HandlePaint<br />

HandleResize<br />

HandleMove<br />

ISimul<strong>at</strong>ion2<br />

GetSimul<strong>at</strong>ionSt<strong>at</strong>e<br />

GetActiveCamera<br />

GetActiveCameraPos<br />

ConvertLegacySimul<strong>at</strong>ion<br />

ISimul<strong>at</strong>ion3<br />

IncrementVisualAgeCounter<br />

ISimul<strong>at</strong>ion<strong>EON</strong>XEvent<br />

OnSetMotionModelImages<br />

ISimul<strong>at</strong>ionExternalEvents<br />

GetExternalEventsNode<br />

ISimul<strong>at</strong>ionMotionModel<br />

MotionNotify<br />

SetMotionModelImages<br />

Inactiv<strong>at</strong>eGUIMotionModel<br />

Activ<strong>at</strong>eGUIMotionModel<br />

ISimul<strong>at</strong>ionRenderEvents<br />

OnPreRenderViewport<br />

OnPostRenderViewport<br />

ISimul<strong>at</strong>ionRenderEvents2<br />

OnRenderSync<br />

OnRender<br />

OnFlip<br />

58<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

ISimul<strong>at</strong>ionRenderEvents3<br />

OnRenderTransparent<br />

ISimul<strong>at</strong>ionSt<strong>at</strong>eEvents<br />

OnSt<strong>at</strong>eChange<br />

ISimul<strong>at</strong>ionUpd<strong>at</strong>eEvents<br />

OnPreUpd<strong>at</strong>e<br />

OnPostUpd<strong>at</strong>e<br />

ISimul<strong>at</strong>ionWindowEvents<br />

OnWindowSizeChanged<br />

<strong>IT</strong>raversal<br />

GetSt<strong>at</strong>e<br />

IVersionInfo<br />

GetDependencies<br />

2.5 59


Macros<br />

Add field macros<br />

Version inform<strong>at</strong>ion macros<br />

60<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

Index<br />

Accessing field values, 25<br />

Activ<strong>at</strong>eGUIMotionModel, 60<br />

Activ<strong>at</strong>eView, 45<br />

Add field macros, 62<br />

AddChild, 56<br />

AddCommandTarget, 45<br />

AddEventInField, 54<br />

AddEventOutField, 54<br />

AddExportedField, 53<br />

AddField, 57<br />

AddMenuItem, 45<br />

AddMFElement, 50<br />

AddModuleWindow, 45<br />

AddNode, 59<br />

AddRoute, 57, 59<br />

AddSubBag, 53<br />

AddToolbarBut<strong>to</strong>n, 45<br />

Advise, 40<br />

Agent Wizard gener<strong>at</strong>ed<br />

files, 23<br />

Agents, 9, 39<br />

AttachNode, 56<br />

CAgent, 40<br />

CanInsertRef, 57<br />

CanPaste, 57<br />

CConnectionPointAdvisor, 40<br />

CEonBase, 40<br />

CEonObject, 40<br />

CExternalReference, 40<br />

CheckInFe<strong>at</strong>ure, 45<br />

CheckInLicenseSynopsis, 51<br />

CheckOutFe<strong>at</strong>ure, 45<br />

CheckOutLicense, 51<br />

Classes in <strong>EON</strong> <strong>SDK</strong>, 40<br />

Clone, 47, 52<br />

Close, 55<br />

CNode, 40<br />

CollectEvent, 49<br />

Connection points, 26<br />

ConnectSplitView, 45<br />

ConvertLegacySimul<strong>at</strong>ion, 60<br />

CopyLink, 56<br />

CopyNode, 56<br />

Cre<strong>at</strong>eLinkItera<strong>to</strong>r, 57, 58<br />

Cre<strong>at</strong>eNode, 56<br />

Cre<strong>at</strong>eNodeItera<strong>to</strong>r, 57, 58<br />

Cre<strong>at</strong>ePro<strong>to</strong>typeFromSubtree,<br />

52<br />

Cre<strong>at</strong>ePro<strong>to</strong>typeInstance, 53<br />

Cre<strong>at</strong>eSubBagItera<strong>to</strong>r, 53,<br />

58<br />

Cre<strong>at</strong>eSubKey, 46<br />

Current, 55, 58<br />

CurrentBaseKey, 47<br />

CurrentRegKey, 47<br />

D<strong>at</strong>a types, 38<br />

Default node fields, 39<br />

Defining fields, 25<br />

DeleteAllEvents, 54<br />

DeleteContents, 56<br />

DeleteEvent, 54<br />

DeleteField, 57<br />

DeleteLink, 57<br />

DeleteNode, 59<br />

DeleteRef, 57<br />

DeleteSubtree, 57<br />

DeliverEvent, 49<br />

DisableNode, 59<br />

DoEditModal, 47<br />

DoModal, 52<br />

Dump, 57<br />

Edit, 59<br />

EnableNode, 59<br />

EnumKeys, 46<br />

<strong>EON</strong> Agent Wizard, 21<br />

<strong>EON</strong> licensing, 13<br />

<strong>EON</strong> log, 26<br />

EonFindNode, 41<br />

EonFindNodeP<strong>at</strong>h, 41<br />

EonFindNodeWithInterface,<br />

41<br />

EonGetName, 41<br />

EonGetParentFrame, 41<br />

EonGetParentRMFrame, 41<br />

EonGetP<strong>at</strong>h, 41<br />

EonGetRoot, 41<br />

EonGetSimul<strong>at</strong>ionInstance,<br />

41<br />

EonHasInterface, 41<br />

EonLoadFileToDisk, 41<br />

EonReleaseSimul<strong>at</strong>ionInstanc<br />

e, 41<br />

EonReportError, 41<br />

EonUtil, 41<br />

EventDelivered, 59<br />

EventGener<strong>at</strong>ed, 40<br />

Events, 10<br />

EventsProcessed, 40<br />

Execution model, 10<br />

ExpandAllPro<strong>to</strong>ypes, 53<br />

Field Changed, 40<br />

Fields, 9<br />

FinalConstruct, 40<br />

FinalRelease, 40<br />

FindSubBag, 53<br />

FindSubKey, 46<br />

FLEXlm licensing, 15<br />

ForceDemoMode, 45<br />

Gener<strong>at</strong>ing eventOut, 25<br />

GetAbsP<strong>at</strong>h, 54<br />

GetActiveCamera, 60<br />

GetActiveCameraPos, 60<br />

GetApplic<strong>at</strong>ion, 46<br />

GetA<strong>to</strong>mFromString, 57<br />

GetBack, 44<br />

GetBag, 56<br />

GetBagID, 53<br />

GetBreakFlag, 59<br />

GetCameraDistance, 41<br />

GetCameraPosition, 41<br />

GetCameraSQRDistance, 41<br />

GetC<strong>at</strong>egory, 46<br />

GetChild, 56<br />

GetChildren, 56<br />

GetChildrenCount, 56<br />

GetCLSID, 46, 51, 52<br />

GetConfig, 45<br />

GetCount, 46<br />

GetDescription, 44<br />

GetDistributionRight, 51<br />

GetDocument, 45<br />

GetEventProcessing, 59<br />

GetExportedField, 53<br />

GetExportedFieldCount, 53<br />

GetExportedFieldIDByName,<br />

53<br />

GetExternalEventsNode, 60<br />

GetField, 47, 49<br />

GetFieldByName, 47, 49<br />

GetFieldCount, 48, 49<br />

GetFieldID, 50<br />

GetFieldInfo, 48, 49, 50<br />

GetFieldName, 51<br />

GetFieldOfView, 44<br />

GetFieldType, 51<br />

GetFileLoader, 57<br />

GetFront, 44<br />

GetGUID, 53<br />

GetHostID, 45<br />

GetHwnd, 60<br />

GetIcon, 51<br />

GetIconDLL, 46<br />

GetIconID, 46<br />

GetIcons, 52<br />

GetIconsDib, 53<br />

GetID, 56<br />

GetIdOfName, 49<br />

GetINode, 57<br />

GetInstanceCount, 53<br />

GetJoystickCapabilities, 55<br />

GetJoystickD<strong>at</strong>a, 55<br />

GetJoystickProperties, 55<br />

GetKey, 47<br />

GetLastInput, 50<br />

GetLicenseKey, 45<br />

GetLicenseOptions, 58<br />

GetLicenseSt<strong>at</strong>us, 45<br />

GetLink, 57, 59<br />

GetLocalTransform, 44<br />

GetLogEvent, 58<br />

GetLongDescription, 53<br />

GetMFCount, 49, 51<br />

GetMFElement, 49, 51<br />

GetMFSpan, 49<br />

GetModuleCLSID, 46, 58<br />

GetMouse, 56<br />

GetName, 56<br />

2.5 61


GetNewSimul<strong>at</strong>ion, 47<br />

GetNextModule, 45<br />

GetNodeCount, 57<br />

GetNodeInfo, 45<br />

GetNodeInfoCount, 45<br />

GetNodeName, 46<br />

GetNoIniTreeNodes, 44<br />

GetNoJoysticks, 55<br />

GetNoTreeNodes, 44<br />

GetOwner, 50<br />

GetParent, 56<br />

GetParentBag, 53<br />

GetParentID, 57<br />

GetParentNode, 49<br />

GetParentPtr, 57<br />

GetP<strong>at</strong>h, 54<br />

GetPositionFirstModule, 45<br />

GetPropertyEdi<strong>to</strong>rCLSID, 40<br />

GetPro<strong>to</strong>type, 46<br />

GetPro<strong>to</strong>typeDefinition, 59<br />

GetPro<strong>to</strong>typeName, 52<br />

GetPro<strong>to</strong>types, 47<br />

GetRefCount, 57<br />

GetReference, 54, 57<br />

GetReferenceCount, 54<br />

GetRefTarget, 57<br />

GetRegInt, 47<br />

GetRegString, 47<br />

GetRootNode, 46, 47<br />

GetRoutesAge, 57<br />

GetSearchP<strong>at</strong>h, 59<br />

GetSelectedNode, 46<br />

GetSettings, 45<br />

GetSFBool, 49<br />

GetSFColor, 49<br />

GetSFFlo<strong>at</strong>, 49<br />

GetSFImage, 49<br />

GetSFInt32, 49<br />

GetSFNode, 49<br />

GetSFRot<strong>at</strong>ion, 49<br />

GetSFString, 49<br />

GetSFTime, 49<br />

GetSFVec2f, 49<br />

GetSFVec3f, 49<br />

GetShortDescription, 53<br />

GetSIMDIR, 54<br />

GetSimFileName, 54, 55<br />

GetSimFileNameLenght, 54<br />

GetSimul<strong>at</strong>ion, 46<br />

GetSimul<strong>at</strong>ionInstance, 53<br />

GetSimul<strong>at</strong>ionRoot, 46<br />

GetSimul<strong>at</strong>ionSt<strong>at</strong>e, 60<br />

GetSplitPaneReinitInfo, 51<br />

GetStandardKey, 47<br />

GetSt<strong>at</strong>e, 61<br />

GetSt<strong>at</strong>isticsOn, 44<br />

GetStringFromA<strong>to</strong>m, 57<br />

GetStringValue, 50, 51<br />

GetSubBag, 53<br />

GetSubPro<strong>to</strong>types, 46<br />

GetToken, 45<br />

GetUserD<strong>at</strong>a, 53<br />

GetUserList, 45<br />

GetUserName, 45<br />

GetValue, 50<br />

GetVariant, 50<br />

GetViewport, 44<br />

GetViewPosition, 45<br />

GetViewReinitInfo, 51<br />

GetVKey, 55<br />

GetVKeyPresses, 55<br />

GetWorldTransform, 44<br />

HandleActiv<strong>at</strong>e, 60<br />

HandleMove, 60<br />

HandlePaint, 60<br />

HandleResize, 60<br />

HasNonExportableExternalLin<br />

ks, 52<br />

HideView, 45<br />

IAgent, 44<br />

IAgentFrame, 44<br />

IAgentFrame2, 44<br />

IAgentSimul<strong>at</strong>ion, 44<br />

IAgentViewport, 44<br />

IAutApp, 45<br />

IAutDoc, 46<br />

IAutNodeInfo, 46<br />

IAutPro<strong>to</strong>type, 46<br />

IAutPro<strong>to</strong>types, 46<br />

IAutSettings, 46<br />

IAutSimul<strong>at</strong>ion, 47<br />

ICEonConfig, 47<br />

IChainSimul<strong>at</strong>ion, 47<br />

icon, 26<br />

IDegreeOfFreedom, 47<br />

IDeviceKeyboard, 47<br />

IEnumNodes, 47<br />

IEonDual, 47<br />

IEonEvent, 49<br />

IEonField, 49<br />

IEonField2, 50<br />

IEonField3, 50<br />

IEonFieldDual, 50<br />

IEonInsertable, 51<br />

IEonModule, 51<br />

IEonObject, 51<br />

IEonObject2, 52<br />

IEonPropertyEdi<strong>to</strong>r, 52<br />

IEonPro<strong>to</strong>type, 52<br />

IEonSingle<strong>to</strong>n, 53<br />

IEonSingle<strong>to</strong>nFac<strong>to</strong>ry, 53<br />

IExternalEvents, 53<br />

IExternalEventsNotifySink,<br />

54<br />

IExternalReference, 54<br />

IFileLoader, 54<br />

IFileLoader2, 54<br />

IFileLoader3, 54<br />

IGUIMotionModel, 55<br />

IJoystick, 55<br />

IJoystickSt<strong>at</strong>e, 55<br />

IKeyboard, 55<br />

IKeyboardSt<strong>at</strong>e, 55<br />

ILinkItera<strong>to</strong>r, 55<br />

IMakePersistant, 55<br />

IMouse, 56<br />

IMouseSt<strong>at</strong>e, 56<br />

Inactiv<strong>at</strong>eGUIMotionModel,<br />

60<br />

IncIniCounter, 44<br />

IncrementVisualAgeCounter,<br />

60<br />

InitClass, 40<br />

Initialize, 52<br />

INode, 56<br />

INodeBag, 56<br />

INodeBagAge, 57<br />

INodeBagFiles, 57<br />

INodeBagItera<strong>to</strong>r, 58<br />

INodeBagItera<strong>to</strong>rFac<strong>to</strong>ry, 58<br />

INodeItera<strong>to</strong>r, 58<br />

INodeLicense, 58<br />

InsertRef, 57<br />

Install<strong>at</strong>ion, 4<br />

Interfaces, 26<br />

InternalEventsProcessed, 49<br />

InternalGetField, 40<br />

IPCLogQueue, 58<br />

IPro<strong>to</strong>typeDefinitionHolder,<br />

59<br />

IReference, 59<br />

IRouteManager, 59<br />

IRouteManager2, 59<br />

IRunControl, 59<br />

IsClicked, 45<br />

IsDemoMode, 45<br />

IsDirty, 52<br />

ISettingsServer, 59<br />

ISettingsServer2, 60<br />

ISimul<strong>at</strong>ion, 60<br />

ISimul<strong>at</strong>ion2, 60<br />

ISimul<strong>at</strong>ion3, 60<br />

ISimul<strong>at</strong>ion<strong>EON</strong>XEvent, 60<br />

ISimul<strong>at</strong>ionExternalEvents,<br />

60<br />

ISimul<strong>at</strong>ionMotionModel, 60<br />

ISimul<strong>at</strong>ionRenderEvents, 60<br />

ISimul<strong>at</strong>ionRenderEvents2,<br />

61<br />

ISimul<strong>at</strong>ionRenderEvents3,<br />

61<br />

ISimul<strong>at</strong>ionSt<strong>at</strong>eEvents, 61<br />

ISimul<strong>at</strong>ionUpd<strong>at</strong>eEvents, 61<br />

ISimul<strong>at</strong>ionWindowEvents, 61<br />

IsInitialized, 52<br />

IsLogTypeUsed, 59<br />

IsModuleLoaded, 45<br />

IsPersistentSave, 57<br />

IsRestartNeeded, 59<br />

IsRunning, 52<br />

IsSensor, 49<br />

IsValid, 55, 58<br />

<strong>IT</strong>raversal, 61<br />

IVersionInfo, 61<br />

ListenTo, 45<br />

Load, 50, 52, 56<br />

LoadFile, 54<br />

LoadFileToDisk, 54, 55<br />

LoadIcon, 52<br />

Loading and Saving, 25<br />

LoadLegacy, 52<br />

62<br />

<strong>EON</strong> <strong>SDK</strong> 2.53.0


Reference Guide<br />

Interfaces<br />

LockRender, 44<br />

Log, 58<br />

LogMessage, 45<br />

Macros, 62<br />

MergeP<strong>at</strong>h, 54<br />

Module licensing, 14<br />

Module Wizard, 27<br />

Module Wizard gener<strong>at</strong>ed<br />

files, 28<br />

Modules, 12<br />

MotionNotify, 55, 60<br />

MoveChild, 40, 57<br />

MoveLink, 57<br />

MoveSubtree, 56<br />

Next, 47, 55, 58<br />

OnAddChild, 52<br />

OnCommand, 51<br />

OnConnect, 51<br />

OnCre<strong>at</strong>eView, 51<br />

OnDeleteContents, 51<br />

OnDisconnect, 51<br />

OnEdit, 52<br />

OnEvent, 54<br />

OnFlip, 61<br />

OnGetReference, 40<br />

OnGetReferenceCount, 40<br />

OnInitialize, 40<br />

OnJoystickBut<strong>to</strong>nChange, 55<br />

OnJoystickChange, 55<br />

OnJoystickPositionChange,<br />

55<br />

OnKeyboardChange, 55<br />

OnModuleListChanged, 51<br />

OnMouseBut<strong>to</strong>nChange, 56<br />

OnMouseChange, 56<br />

OnMousePositionChange, 56<br />

OnNewChild, 52<br />

OnNewDocument, 51<br />

OnNewParent, 52<br />

OnOpenDocument, 51<br />

OnPostRenderViewport, 60<br />

OnPostUpd<strong>at</strong>e, 61<br />

OnPreRenderViewport, 60<br />

OnPreUpd<strong>at</strong>e, 61<br />

OnQueryDefWinPos, 51<br />

OnRemoveChild, 52<br />

OnRender, 61<br />

OnRenderSync, 61<br />

OnRenderTransparent, 61<br />

OnReset, 40<br />

OnSave, 51<br />

OnSetMotionModelImages, 60<br />

OnSetParent, 52<br />

OnSetReference, 40<br />

OnSimul<strong>at</strong>ionRun, 51<br />

OnSimul<strong>at</strong>ionS<strong>to</strong>p, 51<br />

OnStart, 40<br />

OnSt<strong>at</strong>eChange, 61<br />

OnS<strong>to</strong>p, 40<br />

OnUpd<strong>at</strong>e, 51<br />

OnUpd<strong>at</strong>eCommandUI, 51<br />

OnWindowSizeChanged, 61<br />

Paste, 57<br />

PendingEvent, 59<br />

Processing eventIn, 25<br />

Project IDL file, 25<br />

RegisterCallback, 59<br />

RegisterCommand, 45<br />

RegisterSplitView, 45<br />

RegisterToolbar, 45<br />

RegisterView, 46<br />

RegisterView2, 46<br />

ReleaseSimul<strong>at</strong>ionInstance,<br />

53<br />

RemoveChild, 56<br />

RemoveExportedField, 53<br />

RemoveMFElement, 50, 51<br />

RemoveRoute, 59<br />

RemoveSubBag, 53<br />

RemoveSubKey, 47<br />

RemoveView, 46<br />

RenderRef, 44<br />

RequestMotionModelImages,<br />

55<br />

Reset, 47, 52, 55, 58<br />

Run, 47<br />

Save, 50, 52, 56<br />

SaveAll, 56<br />

SendEvent, 53<br />

SendMessage, 46<br />

SendOutEvent, 54<br />

Serialize, 40<br />

Serializing, 25<br />

SetBack, 44<br />

SetBag, 56<br />

SetBreakFlag, 59<br />

SetDefaultWindowPosition,<br />

46<br />

SetDescription, 44<br />

SetDirty, 46, 49, 52<br />

SetEventProcessing, 59<br />

SetExportedField, 53<br />

SetFieldOfView, 44<br />

SetFront, 44<br />

SetHwnd, 60<br />

SetIcon, 52<br />

SetID, 56<br />

SetJoystickProperties, 55<br />

SetKey, 47<br />

SetLink, 59<br />

SetLocalTransform, 44<br />

SetLongDescription, 53<br />

SetMFCount, 50, 51<br />

SetMFElement, 49, 50<br />

SetMFSpan, 49<br />

SetMotionModelImages, 60<br />

SetMouse, 56<br />

SetName, 56<br />

SetNewSimul<strong>at</strong>ion, 47<br />

SetParent, 56<br />

SetP<strong>at</strong>h, 54<br />

SetPro<strong>to</strong>typeName, 52<br />

SetReference, 54<br />

SetRegInt, 47<br />

SetRegString, 47<br />

SetSFBool, 49<br />

SetSFColor, 49<br />

SetSFFlo<strong>at</strong>, 50<br />

SetSFImage, 50<br />

SetSFInt32, 50<br />

SetSFNode, 50<br />

SetSFRot<strong>at</strong>ion, 50<br />

SetSFString, 50<br />

SetSFTime, 50<br />

SetSFVec2f, 50<br />

SetSFVec3f, 50<br />

SetShortDescription, 53<br />

SetSimFile, 54<br />

SetSimul<strong>at</strong>ion, 52, 53<br />

SetSt<strong>at</strong>isticsOn, 44<br />

SetStringValue, 50, 51<br />

SetSubKey, 59<br />

SetUserD<strong>at</strong>a, 53<br />

SetValue, 50<br />

SetValueFromField, 50<br />

SetVariant, 50<br />

SetViewName, 46<br />

SetViewport, 44<br />

SetVKey, 55<br />

SetVKeyPresses, 55<br />

SetWorldTransform, 44<br />

SeverLink, 57<br />

ShowView, 46<br />

SimFileNameLength, 55<br />

Skip, 47<br />

Start, 52<br />

S<strong>to</strong>p, 47, 52<br />

SwapChildren, 40, 57<br />

TouchField, 50<br />

TransformToFrame, 44<br />

TransformToWorld, 44<br />

Unadvise, 40<br />

UnexpandAllPro<strong>to</strong>ypes, 53<br />

UnlockRender, 44<br />

UnRegisterCallback, 59<br />

Upd<strong>at</strong>e, 44, 60<br />

Upd<strong>at</strong>eAllViews, 46<br />

Upd<strong>at</strong>eLink, 59<br />

UseCurrentSubKey, 60<br />

UseLogType, 59<br />

Using DirectX, 25<br />

Valid<strong>at</strong>eField, 40, 50<br />

Valid<strong>at</strong>eNewChild, 52<br />

Version inform<strong>at</strong>ion macro,<br />

62<br />

Visual Studio, 5<br />

Wizard gener<strong>at</strong>ed files, 28<br />

Wizard-gener<strong>at</strong>ed files, 23<br />

Wizards, 21<br />

2.5 63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!