~ubuntu-branches/ubuntu/wily/opencollada/wily

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMPolyBoolOp.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of MayaDataModel.
 
5
 
 
6
    Licensed under the MIT Open Source License,
 
7
    for details please see LICENSE file or the website
 
8
    http://www.opensource.org/licenses/mit-license.php
 
9
*/
 
10
#ifndef __MayaDM_POLYBOOLOP_H__
 
11
#define __MayaDM_POLYBOOLOP_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMPolyUnite.h"
 
15
namespace MayaDM
 
16
{
 
17
class PolyBoolOp : public PolyUnite
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        PolyBoolOp():PolyUnite(){}
 
23
        PolyBoolOp(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :PolyUnite(file, name, parent, "polyBoolOp", shared, create){}
 
25
        virtual ~PolyBoolOp(){}
 
26
 
 
27
        void setOperation(unsigned int op)
 
28
        {
 
29
                if(op == 0) return;
 
30
                fprintf(mFile,"\tsetAttr \".op\" %i;\n", op);
 
31
        }
 
32
        void setUseThresholds(bool uth)
 
33
        {
 
34
                if(uth == false) return;
 
35
                fprintf(mFile,"\tsetAttr \".uth\" %i;\n", uth);
 
36
        }
 
37
        void setVertexDistanceThreshold(double vdt)
 
38
        {
 
39
                if(vdt == 0) return;
 
40
                fprintf(mFile,"\tsetAttr \".vdt\" %f;\n", vdt);
 
41
        }
 
42
        void setFaceAreaThreshold(double fat)
 
43
        {
 
44
                if(fat == 0) return;
 
45
                fprintf(mFile,"\tsetAttr \".fat\" %f;\n", fat);
 
46
        }
 
47
        void getOperation()const
 
48
        {
 
49
                fprintf(mFile,"\"%s.op\"",mName.c_str());
 
50
        }
 
51
        void getUseThresholds()const
 
52
        {
 
53
                fprintf(mFile,"\"%s.uth\"",mName.c_str());
 
54
        }
 
55
        void getVertexDistanceThreshold()const
 
56
        {
 
57
                fprintf(mFile,"\"%s.vdt\"",mName.c_str());
 
58
        }
 
59
        void getFaceAreaThreshold()const
 
60
        {
 
61
                fprintf(mFile,"\"%s.fat\"",mName.c_str());
 
62
        }
 
63
protected:
 
64
        PolyBoolOp(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
65
                :PolyUnite(file, name, parent, nodeType, shared, create) {}
 
66
 
 
67
};
 
68
}//namespace MayaDM
 
69
#endif//__MayaDM_POLYBOOLOP_H__