00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc. 00002 // 00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., 00004 // and considered a trade secret as defined under civil and criminal statutes. 00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of 00006 // unauthorized use or misappropriation of its trade secrets. Use of this information 00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under 00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use. 00009 00010 #include "SmartSegment.h" 00011 00012 #include <slapi/unicodestring.h> 00013 #include <slapi/color.h> 00014 #include <slapi/model/material.h> 00015 00016 #include <HUtility.h> 00017 00018 #include <string> 00019 #include <vector> 00020 00021 bool CreateStdStringFromSUString(const SUStringRef& suString, std::string& stdString); 00022 bool CreateStdWStringFromSUString(const SUStringRef& suString, std::wstring& stdWString); 00023 void ConvertSuColorTo3dgsColor(SUColor& suColor, HIC_RGB& color, float& alpha); 00024 void CreateSegment(SmartSegment& smartSegment, HC_KEY parentKey = HC_ERROR_KEY); 00025 bool GetFaceMaterials(SUFaceRef& face, SUMaterialRef& frontMaterial, SUMaterialRef& backMaterial); 00026 00027 template<typename T> 00028 void append(std::vector<T> const & from, std::vector<T> & to) 00029 { 00030 to.insert(to.end(), from.begin(), from.end()); 00031 }