00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc 00008 * 123 Front Street West, Suite 1401 00009 * Toronto, Ontario 00010 * Canada M5J 2M2 00011 * 416-504-9876 00012 * 00013 * NAME: GU_Wire.h ( VRAY Library, C++) 00014 * 00015 * COMMENTS: Utility methods for blending wires 00016 */ 00017 00018 #ifndef __GU_Wire__ 00019 #define __GU_Wire__ 00020 00021 #include "GU_API.h" 00022 #include <GEO/GEO_Primitive.h> 00023 #include <UT/UT_RefArray.h> 00024 #include <UT/UT_Quaternion.h> 00025 00026 struct GU_API guWireSegmentParms 00027 { 00028 guWireSegmentParms() {} 00029 guWireSegmentParms(fpreal len, const UT_Vector3 &r) : myLength(len), myRotation(r) {} 00030 fpreal myLength; 00031 UT_Vector3 myRotation; // log map of rotation 00032 }; 00033 00034 class GU_API GU_Wire 00035 { 00036 public: 00037 // creates a description of how to reconstruct the curve using a sequence 00038 // of bends and segment lengths 00039 static void extractWireSpecs(const GEO_Primitive *prim, 00040 UT_Quaternion startorient, 00041 UT_RefArray<guWireSegmentParms> &segs); 00042 00043 // construct a curve from a sequence of bends and segment lengths 00044 static void buildWireFromSpecs(UT_Vector3Array &out, UT_Vector3 startpos, 00045 UT_Quaternion startorient, 00046 const UT_RefArray<guWireSegmentParms> &segs); 00047 }; 00048 00049 #endif
1.5.9