2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of MayaDataModel.
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
10
#ifndef __MayaDM_POLYCONE_H__
11
#define __MayaDM_POLYCONE_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMPolyPrimitive.h"
17
class PolyCone : public PolyPrimitive
22
PolyCone():PolyPrimitive(){}
23
PolyCone(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:PolyPrimitive(file, name, parent, "polyCone", shared, create){}
27
void setRadius(double r)
30
fprintf(mFile,"\tsetAttr \".r\" %f;\n", r);
32
void setHeight(double h)
35
fprintf(mFile,"\tsetAttr \".h\" %f;\n", h);
37
void setSubdivisionsAxis(int sa)
40
fprintf(mFile,"\tsetAttr \".sa\" %i;\n", sa);
42
void setSubdivisionsHeight(int sh)
45
fprintf(mFile,"\tsetAttr \".sh\" %i;\n", sh);
47
void setSubdivisionsCap(int sc)
50
fprintf(mFile,"\tsetAttr \".sc\" %i;\n", sc);
52
void setTexture(bool tx)
54
if(tx == true) return;
55
fprintf(mFile,"\tsetAttr \".tx\" %i;\n", tx);
57
void setCreateUVs(unsigned int cuv)
60
fprintf(mFile,"\tsetAttr \".cuv\" %i;\n", cuv);
62
void setRoundCap(bool rcp)
64
if(rcp == false) return;
65
fprintf(mFile,"\tsetAttr \".rcp\" %i;\n", rcp);
69
fprintf(mFile,"\"%s.r\"",mName.c_str());
73
fprintf(mFile,"\"%s.h\"",mName.c_str());
75
void getSubdivisionsAxis()const
77
fprintf(mFile,"\"%s.sa\"",mName.c_str());
79
void getSubdivisionsHeight()const
81
fprintf(mFile,"\"%s.sh\"",mName.c_str());
83
void getSubdivisionsCap()const
85
fprintf(mFile,"\"%s.sc\"",mName.c_str());
87
void getTexture()const
89
fprintf(mFile,"\"%s.tx\"",mName.c_str());
91
void getCreateUVs()const
93
fprintf(mFile,"\"%s.cuv\"",mName.c_str());
95
void getRoundCap()const
97
fprintf(mFile,"\"%s.rcp\"",mName.c_str());
100
PolyCone(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
101
:PolyPrimitive(file, name, parent, nodeType, shared, create) {}
105
#endif//__MayaDM_POLYCONE_H__