00001 /* $NoKeywords: $ */ 00002 /* 00003 // 00004 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved. 00005 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert 00006 // McNeel & Associates. 00007 // 00008 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. 00009 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF 00010 // MERCHANTABILITY ARE HEREBY DISCLAIMED. 00011 // 00012 // For complete openNURBS copyright information see <http://www.opennurbs.org>. 00013 // 00015 */ 00016 00017 #if !defined(OPENNURBS_LINESTYLE_INC_) 00018 #define OPENNURBS_LINESTYLE_INC_ 00019 00020 00022 // 00023 // Class ON_DisplayMaterialRef 00024 // 00025 00026 /* 00027 Description: 00028 Objects can have per viewport display properties 00029 that override a viewport's default display 00030 properties. These overrides are stored on 00031 ON_3dmObjectAttributes as a list of 00032 ON_DisplayMaterialRefs. 00033 00034 Example: 00035 For example, by default a viewport 00036 might display objects using a wireframe, but 00037 one special object may need to be shaded. 00038 In this case the special object would have 00039 a display material ref with the "wireframe" 00040 viewport's id and the id of a display material 00041 that specified shading. 00042 */ 00043 class ON_CLASS ON_DisplayMaterialRef 00044 { 00045 public: 00046 /* 00047 Description: 00048 Default constructor sets both ids to nil. 00049 */ 00050 ON_DisplayMaterialRef(); 00051 int Compare(const ON_DisplayMaterialRef& other) const; 00052 bool operator==(const ON_DisplayMaterialRef& other) const; 00053 bool operator!=(const ON_DisplayMaterialRef& other) const; 00054 bool operator<(const ON_DisplayMaterialRef& other) const; 00055 bool operator<=(const ON_DisplayMaterialRef& other) const; 00056 bool operator>(const ON_DisplayMaterialRef& other) const; 00057 bool operator>=(const ON_DisplayMaterialRef& other) const; 00058 00059 // C++ default destructor, copy constructor and operator= 00060 // work fine. 00061 00062 ON_UUID m_viewport_id; // identifies the ON_Viewport 00063 // If nil, then the display material 00064 // will be used in all viewports 00065 // that are not explictly referenced 00066 // in other ON_DisplayMaterialRefs. 00067 00068 ON_UUID m_display_material_id; // id used to find display attributes 00069 00070 // For Rhino V4 the per detail visibility attribute is implemented 00071 // through a display material reference on an object. This is ONLY 00072 // for for detail viewports and only for V4. Keep this uuid around 00073 // so the per detail attributes in future versions of Rhino can be 00074 // implemented a different way. 00075 // {1403A7E4-E7AD-4a01-A2AA-41DAE6BE7ECB} 00076 static const ON_UUID m_invisible_in_detail_id; 00077 }; 00078 00079 00081 // class ON_LinetypeSegment 00082 00083 class ON_CLASS ON_LinetypeSegment 00084 { 00085 public: 00086 ON_LinetypeSegment(); 00087 00088 bool operator==( const ON_LinetypeSegment& src) const; 00089 bool operator!=( const ON_LinetypeSegment& src) const; 00090 00091 // For a curve to be drawn starting at the start point 00092 // and ending at the endpoint, the first segment 00093 // in the pattern must be a stLine type 00094 enum eSegType 00095 { 00096 stLine, 00097 stSpace, 00098 }; 00099 00100 void Dump( class ON_TextLog& ) const; 00101 00102 // do not add read/write functions to this class 00103 00104 double m_length; // length in millimeters on printed output 00105 eSegType m_seg_type; 00106 }; 00107 00108 #endif