![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2010 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: 3dLineSegmentDescriptor.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 *********************************************************************/ 00008 #ifndef Dt3dLineSegmentDescriptor_H_ 00009 #define Dt3dLineSegmentDescriptor_H_ 00010 00011 class DtLineSegmentDescriptor; 00012 00013 #include <vlutil/vlNetTypes.h> 00014 00015 #include <vrfExtObjects/vrfExtObjectsDefines.h> 00016 00017 class DT_DLL_vrfExtObjects DtNetLineSegmentDescriptor 00018 { 00019 public: 00020 DtNetFloat32 myPercentage; 00021 DtNetU32 myLinePattern; 00022 DtNetU8 myColor[4]; 00023 DtNetU16 myLineWidth; 00024 DtNetU8 myLineStyle; 00025 DtNetU8 myArrowStyle; 00026 00027 DtLineSegmentDescriptor operator=(const DtLineSegmentDescriptor&); 00028 DtNetLineSegmentDescriptor& operator=(const DtNetLineSegmentDescriptor&); 00029 }; 00030 00031 class DT_DLL_vrfExtObjects DtLineSegmentDescriptor 00032 { 00033 public: 00035 DtLineSegmentDescriptor(); 00036 00038 DtLineSegmentDescriptor(float percent, int style, int width, int pattern, 00039 int arrow, int colorR, int colorG, int colorB, int colorA); 00040 00042 DtLineSegmentDescriptor(const DtLineSegmentDescriptor& orig); 00043 00045 DtLineSegmentDescriptor& operator=(const DtLineSegmentDescriptor& orig); 00046 00048 DtLineSegmentDescriptor(const DtNetLineSegmentDescriptor& netDesc); 00049 00051 operator DtNetLineSegmentDescriptor() const; 00052 00054 bool operator==(const DtLineSegmentDescriptor& other) const; 00055 bool operator!=(const DtLineSegmentDescriptor& other) const; 00056 00058 00059 virtual void setPercentage(float percent); 00060 virtual float percentage() const; 00061 00062 virtual void setLineStyle(int style); 00063 virtual int lineStyle() const; 00064 00065 virtual void setLineWidth(int width); 00066 virtual int lineWidth() const; 00067 00068 virtual void setLinePattern(int pattern); 00069 virtual int linePattern() const; 00070 00071 virtual void setArrowStyle(int style); 00072 virtual int arrowStyle() const; 00073 00074 virtual void setColor(int r, int g, int b, int a); 00075 virtual void getColor(int& r, int&g, int& b, int& a) const; 00077 00078 protected: 00079 float myPercentage; 00080 int myLineStyle; 00081 int myLineWidth; 00082 int myLinePattern; 00083 int myArrowStyle; 00084 int myColorR; 00085 int myColorG; 00086 int myColorB; 00087 int myColorA; 00088 }; 00089 00090 class DT_DLL_vrfExtObjects DtLineSegmentDescriptorList 00091 { 00092 public: 00094 DtLineSegmentDescriptorList(); 00095 00097 virtual ~DtLineSegmentDescriptorList(); 00098 00100 DtLineSegmentDescriptorList(const DtLineSegmentDescriptorList& orig); 00101 00103 DtLineSegmentDescriptorList& operator=( 00104 const DtLineSegmentDescriptorList& orig); 00105 00107 int operator==(const DtLineSegmentDescriptorList& other) const; 00108 int operator!=(const DtLineSegmentDescriptorList& other) const; 00109 00112 virtual void setNumDescriptors(int num); 00113 virtual int numDescriptors() const; 00114 00116 virtual bool setDescriptor(int index, 00117 const DtLineSegmentDescriptor& desc); 00118 00121 virtual const DtLineSegmentDescriptor& descriptor( 00122 int index, bool* valid = 0) const; 00123 00125 virtual void setFromNet(const void* netRep, int length); 00126 00130 virtual const void* netRep(int* size = 0) const; 00131 00133 virtual int netSize() const; 00134 00135 protected: 00136 int myNumberOfDescriptors; 00137 DtLineSegmentDescriptor* myDescriptors; 00138 DtLineSegmentDescriptor myEmptyDescriptor; 00139 void* myNetRep; 00140 }; 00141 00142 #endif