INTERFACEAnimServer ; IMPORT AnimHandle, GO, RootGO, Wr; PROCEDURE RegisterRootGO (root : RootGO.T);
Adds a root to the set of RootGO
s managed by the animation server.
PROCEDURE PauseAnimHandle (ah : AnimHandle.T);
Pauses an animation handle until its endtime has arrived.
PROCEDURE SetErrorWr (wr : Wr.T);
Set the writer to which animation server error messages will be written to bewr
. By default, error messages are written toStdio.stderr
.
PROCEDURE ReportError (msg : TEXT);
Write an error message to the error message writer. The default error message write isStdio.stderr
; it can be changed withSetErrorWr
.
VAR internalLock : MUTEX; externalLock : MUTEX;Locking Order:
externalLock
must be acquired before internalLock
.
PROCEDURE IsServer(): BOOLEAN;
Debugging procedure. Access to the X display connection must be single-threaded. One way to ensure that is through a locking scheme (Trestle does it that way); another way is by designating a single thread to be the only one allowed to access the X connection. We chose the second approach. The animation server thread is the only thread allowed to call X and PEX proceures. We can ensure proper calling patterns by inserting <* ASSERT AnimServer.IsServer() *> pragmas before every X/PEX call.
PROCEDURE NewDisplayList (go: GO.T): INTEGER;
Returns a new display list identifier (a unique number > 0)
EXCEPTION SolverError (TEXT); VAR SolverHook: PROCEDURE (time: LONGREAL): BOOLEAN RAISES {SolverError} := NIL;
IfSolverHook
is non-NIL, it will be called by the animation server after events have been processed and before property values are adjusted. The newest version of Obliq-3D usesSolverHook
to interface with the Juno-2 constraint solver.
END AnimServer.