VR-Vantage 1.4.1 API Class Documentation
DtProp.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtProp.h,v $ $Revision: 1.35 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #ifndef DtProp_H_
00014 #define DtProp_H_
00015 
00016 #include <vrvCore/vrvCore.h>
00017 
00018 #include <vrvCore/DtSelectionManager.h>
00019 #include <vrvCore/DtUniqueID.h>
00020 
00021 #include <makArchives/DtPropRecord.h>
00022 #include <string>
00023 
00024 class DtVector;
00025 
00026 namespace makVrv
00027 {
00028    class DtDe;
00029    class DtModelAgent;
00030    class DtSceneObjectAgent;
00031    class DtScribeBoxModelAgent;
00032    class DtAgentManagerInterface;
00033 
00036    class DT_DLL_VRVCORE DtProp
00037    {
00038    public:
00039 
00041       DtProp(DtDe& de, DtAgentManagerInterface& agentManagerInterface,
00042          const std::string& propType, const std::string& name);
00043 
00044    private:
00045       
00047       DtProp(const DtProp& copy);
00048 
00050       DtProp& operator=(const DtProp& copy);   
00051 
00052    public:
00053 
00055       ~DtProp();
00056 
00058       void destroy();
00059 
00061       bool operator==(const DtProp& prop) const;
00062 
00064       bool getRecord(makArchives::DtPropRecord& recOut) const;
00065 
00067       void setFromRecord(const makArchives::DtPropRecord& rec);
00068 
00070       void setColorFilter(float r, float g, float b, float a);
00071 
00073       void setVisible(bool isVisible);
00074       
00076       void setScribed(bool isSelected);
00077 
00079       bool scribed() const;
00080 
00082 
00084       DtUniqueID uniqueID() const;
00085 
00087       void getPosition(double& x, double& y, double& z) const;      
00088 
00090       void setPosition(double x, double y, double z);
00091 
00093       void getOrientation(double& x, double& y, double& z, double& w) const;
00094 
00096       void setOrientation(double x, double y, double z, double w);
00097 
00099       const std::string& propType() const;
00100 
00102       void setPropType(const std::string& proptype);
00103 
00105       const std::string& modelDefinition() const;
00106 
00108       void setModelDefinition(const std::string& modelDefinition);
00109 
00111       void setExternalNodeLocation(const std::string& searchExpression, unsigned int index);
00112 
00114       const std::string& searchExp() const;
00115 
00117       unsigned int searchIndex() const;
00118      
00120 
00121       float red() const;
00122       float green() const;
00123       float blue() const;
00124       float alpha() const;
00126 
00128       const std::string& name() const;
00129 
00131       void setName(const std::string& name);
00132 
00133       bool isVisible() const;
00134 
00136 
00137       const DtSceneObjectAgent* sceneObject() const;
00139 
00141 
00142       DtSceneObjectAgent* sceneObject();
00144 
00146       const DtModelAgent* model() const;
00147 
00149       DtModelAgent* model();
00150 
00152       bool operator!=(const DtProp& prop) const;      
00153      
00154    protected:
00155       
00156       virtual void selectionChanged( const DtSelectionManager::IdSet& selected, 
00157          const DtSelectionManager::IdSet& deselected );
00158       
00159    protected:
00160    
00161       DtDe& myDe;
00162 
00163       std::string myPropType;
00164       DtSceneObjectAgent* mySceneObject;
00165       DtModelAgent* myObjectModel;      
00166       DtScribeBoxModelAgent* myScribeBoxModel;
00167 
00169       std::string myModelDefinition;
00170 
00172       std::string mySearchExp;
00173       unsigned int mySearchIndex;
00174 
00176       std::string myName;
00177 
00179       bool myIsVisible;
00180 
00182       float myAlpha;
00183       float myR;
00184       float myG;
00185       float myB;
00186    
00191       double myPosX;
00192       double myPosY;
00193       double myPosZ;
00194 
00195       //The Loaded orientation quaternion (x,y,z,w).
00196       double myOrientationX;
00197       double myOrientationY;
00198       double myOrientationZ;
00199       double myOrientationW;
00200 
00201       //Runtime state.
00202       bool myIsTreeFlag;
00203 
00204       DtAgentManagerInterface& myAgentManagerInterface;
00205    };
00206 
00207 }
00208 
00209 #endif
00210 


Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)