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
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
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