Info for coding with EON
Basics
Coordinate System
Eon uses a right-handed coordinate system with X pointing right and Y into the screen, so Z is up.
Eon uses hpr notation for rotations (heading, pitch, and roll), where heading is about the Z axis, pitch is about the X axis, and roll is about the Y axis. The order of rotations is r->p->h, so an object is transformed by a rotation about the Y axis, then a rotation about the X axis, then a rotation about the Z axis. The direction of rotation, however, is governed by the left-handed rule.
Scripting
General Javascript
Finding an object's properties
To see what properties (members) a Javascript object has, use for ... in loop as below:
for (var i in theOb)
{
var msg = "value of " + i + " is " + theOb[i];
// do something to print msg
}
Eon Specific
Bugs
- GetField? crashes EON if the ID is out of bounds (should just throw an exception)
Exceptions
When you catch an exception object in eon, it has the following properties (members):
- name - the type of exception
- message - a message about the exception
- number - the error code
- description - a description of the exception (often the same as message)
Importing Models
To get a Lightwave model with animations into Eon using DeepExploration 4.1.29 and EON CAD for DE 4.x:
- Copy all scene, object, and image files to the same directory
- Open the scene (.lws) file with DeepExploration?
- Save the file as a .3ds (3D Studio Max) file
- Open the .3ds file just created
- Export to EON (using the EON buttons)
--
SamPreston - 12 Apr 2007