Download User Guide.book

Transcript
204
Distributing Your Simulation over the Internet
Note In the table above, BSTR is simply a standard
variable type representing a 32-bit character pointer.
BOOL is a Boolean variable type. The new type
definitions are simply provided for compatibility
when communicating across various environments.
Chapter 20 Publishing Your Application
The WUPOBJECT type is a special wrapper that
contains a WorldUp object. The following table lists
the interface to the WUPOBJECT class.
WUPOBJECT Class Interface
Properties
SzObjectName
Data Type
BSTR
Methods
Description
Name of the WorldUp object.
Returns
SetProperty(BSTR PropertyName,
VARIANT Value)
Boolean
Set the specified object property to the specified value.
GetProperty(BSTR PropertyName)
VARIANT
Get the property specified
Destroy()
Void
Delete the object
GetType()
BSTR
Get the type of the object (returns a string).
Duplicate
IDispatch*
Duplicate the object
IsDerivedFrom(BSTR szTypeName)
Boolean
True if the object is of the specified type.
Before leaving this section, let’s take a quick look at
a simple example of how this works. In the
following code sample, we use a Visual Basic
container from which to examine the position of an
object in our simulation at every frame:
sub WUP1_Callback( )
dim myobject as WUPOBJECT
set myobject = WUP1.GetObject(
"Avatar" )
dim position as Single
position = myobject.GetProperty(
"Translation")
end sub
Refer to a Visual Basic manual for more in-depth
coverage of container applications and how to
interface with ActiveX controls from Visual Basic.
Distributing Your Simulation
over the Internet
To distribute your simulation over the Internet in a
browser, you can use either the Internet Plug-in or
the ActiveX control. The Internet Plug-in works
with both Netscape Navigator and Internet Explorer.
However, it offers little flexibility for interfacing
between the browser and the simulation. In addition,
the user must first install the Internet Plug-in on their
machine before they can view WorldUp simulation
files.
A much more robust way of handling Internet
distribution and viewing is using the signed
WorldUp ActiveX Control CAB file. Using
ActiveX technology, a new user can encounter
WorldUp content on a web site and with one click