40 #ifndef _DDD_RSOAsset_h_
41 #define _DDD_RSOAsset_h_
53 #include "rso_interface_1.h"
54 #include "component_base.h"
55 #include "display_frame.h"
56 #include "gls_eyepoint.h"
62 #define RSO_ASSET_CLASS "DDD_RSOAsset"
63 #define RSO_PARAM_DLL_PATH "dllPath"
64 #define RSO_PARAM_CLASS_NAME "className"
65 #define RSO_PARAM_EYEPOINT "eyepoint"
66 #define RSO_PARAM_LOC_X "locX"
67 #define RSO_PARAM_LOC_Y "locY"
68 #define RSO_PARAM_LOC_Z "locZ"
69 #define RSO_PARAM_SCALE_X "scaleX"
70 #define RSO_PARAM_SCALE_Y "scaleY"
71 #define RSO_PARAM_SCALE_Z "scaleZ"
72 #define RSO_INJECTED_EVENT_HANDLER "InjectedEventHandler"
73 #define RSO_EVENT_SUBSCRIBER "EventSubscriber"
83 public RSOInterface1::EmittedEventHandler,
97 disti::ComponentBase* GetLoadedComponent(
const std::string &rsoLibName,
const std::string &className);
102 void ReadDataFromDictionary();
119 virtual const char *
Description(){
return "Wrapper Asset class for RSO Components."; }
124 virtual bool Live() {
return (_component != NULL); }
129 virtual void PopulateAttributeList();
139 virtual void SetInstanceName(
const char *name);
144 virtual void Start();
149 virtual void Calculate(
double time);
152 virtual void Resume();
159 virtual void GenerateInstanceName(
const DDD_AssetList& assetList);
170 disti::ComponentBase* GetComponent();
175 void SetTopLevelDisplayFrame(disti::DisplayFrame *frame);
180 void SetComponent(disti::ComponentBase *component);
185 void SetWidth(
float width) { _width = width; }
190 float GetWidth() {
return _width; }
195 void SetHeight(
float height) { _height = height; }
200 float GetHeight() {
return _height; }
205 float GetUnscaledWidth() {
return _unscaledWidth; }
210 float GetUnscaledHeight() {
return _unscaledHeight; }
215 void GetScale(disti::Vector& scale);
222 void Scale(
float scaleX,
float scaleY,
float scaleZ);
227 void ComputeScaleMatrix();
232 disti::Vector GetOrigin();
237 void SetOrigin(disti::Vector origin);
242 void NormalizeComponentSize();
247 std::string GetEyepointName() {
return _eyepointName; }
252 GlsMultiView* GetMultiView() {
return _multiView; }
257 bool UsesEyepoint() {
return _usesEyepoint; }
265 void SetMultiViewPos(
float bottom,
float left,
float top,
float right);
270 virtual int HandleEvent(RSOInterface1::Event *ev);
278 int HandleComponentEvent(ComponentBase *
self,DisplayEvent *ev);
285 virtual void PostEvent(DDD_ObjectEvent *newEvent);
299 _DDD_ControlsClock = val;
312 void SetUnscaledWidth(
float width) { _unscaledWidth = width; }
318 void SetUnscaledHeight(
float height) { _unscaledHeight = height; }
323 void UpdateScaleAndLocation();
329 bool LoadLiveComponent();
334 void ParseMetadata();
341 bool IsAttributeInList(
const std::string& attribName);
350 bool GetEyepointFromRSO(disti::ComponentBase *component, disti::GlsEyePoint *eyepoint);
355 void GetResourcesFromRSO(DDD_AttributeList &resourceList);
359 void AddExposedParamsAsAttributes();
363 disti::DisplayFrame *_topLevelDisplayFrame;
365 disti::ComponentBase *_component;
366 disti::ComponentBase *_rso;
369 disti::CallbackMethodCallerBase *_oldCallback;
375 float _unscaledWidth;
376 float _unscaledHeight;
378 float _unscaledOffsetX;
379 float _unscaledOffsetY;
384 std::string _eyepointName;
389 GlsMultiView *_multiView;
391 int _supportsAttEvents;
394 DDD_AttributeString *_rsoLibFilename;
395 DDD_AttributeString *_rsoClassName;
396 DDD_AttributeString *_rsoEyepoint;
397 DDD_AttributeDouble *_locX;
398 DDD_AttributeDouble *_locY;
399 DDD_AttributeDouble *_locZ;
400 DDD_AttributeDouble *_scaleX;
401 DDD_AttributeDouble *_scaleY;
402 DDD_AttributeDouble *_scaleZ;
403 DDD_AttributeBool *_eventSubscriber;
405 DDD_AttributeDouble *_AttLocX;
406 DDD_AttributeDouble *_AttLocY;
407 DDD_AttributeDouble *_AttLocZ;
408 DDD_AttributeDouble *_AttScaleX;
409 DDD_AttributeDouble *_AttScaleY;
410 DDD_AttributeDouble *_AttScaleZ;
A templated array of object pointers. The array dynamically resizes as needed.
Definition: dynamic_ptr_array.h:55
A virtual interface class for subscribers to object events.
Definition: DDD_ObjectEventSubscriber.h:52
A virtual interface class for all DataDirector attribute types.
Definition: DDD_AttributeBase.h:87
virtual bool Live()
Definition: DDD_RSOAsset.h:124
A virtual interface class for all DataDirector assets.
Definition: DDD_AssetBase.h:115
static const char *const DDD_RSO_ASSET_CLASSNAME
Definition: DDD_RSOAsset.h:89
The DDD_AssetList class. Maintains a list of Data Director assets.
Definition: DDD_AssetList.h:51
The DDD_AttributeBool class. Boolean attribute.
A virtual interface class for observers of attributes. AttributeObserver-derived objects are able to ...
Definition: DDD_AttributeBase.h:66
virtual const char * ClassName()
Definition: DDD_RSOAsset.h:134
static RSOAssetList _rsoAssetList
Definition: DDD_RSOAsset.h:92
The DDD_RSOAsset class. DataDirector asset class that controls GL Studio RSOs.
Definition: DDD_RSOAsset.h:81
The DDD_AssetBase class. Base class for Data Director assets.
The DDD_AttributeInt class. Integer attribute.
A virtual interface class for containers of assets. Allows assets to find each other, exchange events and update attributes of each other.
Definition: DDD_AssetBase.h:80
#define RSO_ASSET_CLASS
Definition: DDD_RSOAsset.h:62
virtual const char * Description()
Definition: DDD_RSOAsset.h:119
void SetDDDControlsClock(bool val)
Definition: DDD_RSOAsset.h:297
The DDD_AttributeDouble class. Double precision floating point attribute.
DynamicPtrArray< DDD_ObjectEvent * > DDD_ObjectEventList
The DDD_ObjectEventList class. Maintains a list of DDD_ObjectEvents.
Definition: DDD_ObjectEvent.h:70
The DDD_AttributeString class. String attribute.
Definition: AttributeChangedEmitter.h:46
bool _DDD_ControlsClock
Definition: DDD_RSOAsset.h:291