UVWMapper.h

Go to the documentation of this file.
00001 //**************************************************************************/
00002 // Copyright (c) 1998-2006 Autodesk, Inc.
00003 // All rights reserved.
00004 // 
00005 // These coded instructions, statements, and computer programs contain
00006 // unpublished proprietary information written by Autodesk, Inc., and are
00007 // protected by Federal copyright law. They may not be disclosed to third
00008 // parties or copied or duplicated in any form, in whole or in part, without
00009 // the prior written consent of Autodesk, Inc.
00010 //**************************************************************************/
00011 
00012 #pragma once
00013 
00014 #include "export.h"
00015 #include "maxheap.h"
00016 #include "UVWMapTypes.h"
00017 #include "matrix3.h"
00018 
00019 // Translates map type into 3d location -> uvw coord mapper:
00059 class UVWMapper: public MaxHeapOperators {
00060 public:
00061     int     type, cap;
00062     float   utile, vtile, wtile;
00063     int     uflip, vflip, wflip;
00064     Matrix3 tm;
00065 
00076     DllExport UVWMapper();
00079     DllExport UVWMapper(int type, const Matrix3 &tm, int cap=FALSE,
00080         float utile=1.0f, float vtile=1.0f, float wtile=1.0f,
00081         int uflip=FALSE, int vflip=FALSE, int wflip=FALSE);
00084     DllExport UVWMapper(UVWMapper& m);
00085 
00103     DllExport UVVert MapPoint(Point3 p, const Point3 & norm, int *nan=NULL);
00110     DllExport UVVert TileFlip (UVVert uvw);
00123     DllExport int MainAxis (const Point3 & n);
00128     bool NormalMatters () { return ((type==MAP_BOX || type==MAP_ACAD_BOX)||((type==MAP_CYLINDRICAL || type==MAP_ACAD_CYLINDRICAL )&&cap)) ? TRUE:FALSE; }
00129 };
00130