2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
6 // $Header: r:/t2repos/thief2/src/actreact/stimul8r.h,v 1.5 2000/01/29 12:44:50 adurant Exp $
17 ////////////////////////////////////////////////////////////
18 // OBJECT STIMULATION API
20 // This interface is presented by the Act/React Object System layer for use by the
21 // Act/React Propagation system. It is the path by which stimulus sensors
22 // are notified of stimulus events that hit them.
25 typedef void* tStimFilterData
;
26 typedef eReactionResult (* tStimFilterFunc
)(sStimEvent
* event
, tStimFilterData data
);
27 typedef ulong tStimFilterID
;
29 F_DECLARE_INTERFACE(IStimulator
);
32 #define INTERFACE IStimulator
33 DECLARE_INTERFACE_(IStimulator
,IUnknown
)
35 DECLARE_UNKNOWN_PURE();
38 // Send a stimulus event to a sensor
40 STDMETHOD(StimulateSensor
)(THIS_ StimSensorID sensor
, const sStimEvent
* event
) PURE
;
43 // Describe the sensitive intensity range of an object
44 // returns S_FALSE if the object is not sensitive to that stimulus
46 STDMETHOD(GetSensitivity
)(THIS_ StimSensorID id
, sStimSensitivity
* sensitivity
) PURE
;
49 // Look up the position of a sensor
51 STDMETHOD_(const sStimPosition
*, GetSensorPosition
)(THIS_ StimSensorID id
) PURE
;
56 STDMETHOD(UpdateFrame
)(THIS_ tStimTimeStamp time
, tStimDuration dt
) PURE
;
59 // Add a "filter" callback for stimulus events. The filter is called before
60 // the event is applied to the sensor. The filter may mutate the event.
62 STDMETHOD_(tStimFilterID
,AddFilter
)(THIS_ tStimFilterFunc func
, tStimFilterData data
) PURE
;
63 STDMETHOD(RemoveFilter
)(THIS_ tStimFilterID id
) PURE
;
69 EXTERN
void StimulatorCreate(void);
71 #endif // __STIMUL8R_H