Changed lefthanded flag to isLeftHanded.

This commit is contained in:
asluk 2015-04-15 14:32:48 -07:00
parent 4752bcdd69
commit df3c856b51
8 changed files with 15 additions and 15 deletions

View File

@ -486,7 +486,7 @@ createOsdMesh(ShapeDesc const & shapeDesc, int level, int kernel, Scheme scheme=
if (doAnim) {
shape = g_objAnim->GetShape();
} else {
shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme, shapeDesc.lefthanded);
shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme, shapeDesc.isLeftHanded);
}
// create Vtr mesh (topology)

View File

@ -27,13 +27,13 @@
struct ShapeDesc {
ShapeDesc(char const * iname, std::string const & idata, Scheme ischeme,
bool ilefthanded=false) :
name(iname), data(idata), scheme(ischeme), lefthanded(ilefthanded) { }
bool iIsLeftHanded=false) :
name(iname), data(idata), scheme(ischeme), isLeftHanded(iIsLeftHanded) { }
std::string name,
data;
Scheme scheme;
bool lefthanded;
bool isLeftHanded;
};
static std::vector<ShapeDesc> g_defaultShapes;
@ -143,7 +143,7 @@ static void initShapes() {
g_defaultShapes.push_back( ShapeDesc("catmark_hole_test2", catmark_hole_test2, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_hole_test3", catmark_hole_test3, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_hole_test4", catmark_hole_test4, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_lefthanded", catmark_lefthanded, kCatmark, true ) );
g_defaultShapes.push_back( ShapeDesc("catmark_lefthanded", catmark_lefthanded, kCatmark, true /*isLeftHanded*/ ) );
g_defaultShapes.push_back( ShapeDesc("catmark_righthanded", catmark_righthanded, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_pyramid_creases0", catmark_pyramid_creases0, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_pyramid_creases1", catmark_pyramid_creases1, kCatmark ) );

View File

@ -296,7 +296,7 @@ TopologyRefinerFactory<TopologyRefinerFactoryBase::TopologyDescriptor>::assignCo
IndexArray dstFaceVerts = refiner.setBaseFaceVertices(face);
if (desc.leftHanded) {
if (desc.isLeftHanded) {
for (int vert=dstFaceVerts.size()-1; vert >=0; --vert) {
dstFaceVerts[vert] = desc.vertIndicesPerFace[idx++];
@ -380,7 +380,7 @@ TopologyRefinerFactory<TopologyRefinerFactoryBase::TopologyDescriptor>::assignFa
IndexArray dstFaceValues = refiner.setBaseFVarFaceValues(face, channel);
if (desc.leftHanded) {
if (desc.isLeftHanded) {
for (int vert=dstFaceValues.size(); vert >= 0; --vert) {
dstFaceValues[vert] = channelIndices[idx++];

View File

@ -74,7 +74,7 @@ public:
int numHoles;
Index const * holeIndices;
bool leftHanded;
bool isLeftHanded;
// Face-varying data channel -- value indices correspond to vertex indices,
// i.e. one for every vertex of every face:

View File

@ -62,12 +62,12 @@ Shape::~Shape() {
//------------------------------------------------------------------------------
Shape * Shape::parseObj(char const * shapestr, Scheme shapescheme,
bool lefthanded, int axis, bool parsemtl) {
bool isLeftHanded, int axis, bool parsemtl) {
Shape * s = new Shape;
s->scheme = shapescheme;
s->lefthanded = lefthanded;
s->isLeftHanded = isLeftHanded;
char * str=const_cast<char *>(shapestr), line[256], buf[256], usemtl=-1;
bool done = false;

View File

@ -71,7 +71,7 @@ struct Shape {
};
static Shape * parseObj(char const * Shapestr, Scheme schme,
bool lefthanded=false, int axis=1, bool parsemtl=false);
bool isLeftHanded=false, int axis=1, bool parsemtl=false);
void parseMtllib(char const * stream);
@ -100,7 +100,7 @@ struct Shape {
std::vector<int> facenormals;
std::vector<tag *> tags;
Scheme scheme;
bool lefthanded;
bool isLeftHanded;
char FindMaterial(char const * name) {
for (int i=0; i<(int)mtls.size(); ++i) {

View File

@ -211,7 +211,7 @@ TopologyRefinerFactory<Shape>::assignComponentTopology(
Far::IndexArray dstFaceVerts = refiner.setBaseFaceVertices(i);
//IndexArray dstFaceEdges = refiner.setBaseFaceEdges(i);
if (shape.lefthanded) {
if (shape.isLeftHanded) {
for (int j=dstFaceVerts.size()-1; j>=0; --j) {
dstFaceVerts[j] = shape.faceverts[ofs++];
}
@ -242,7 +242,7 @@ TopologyRefinerFactory<Shape>::assignFaceVaryingTopology(
Far::IndexArray dstFaceUVs =
refiner.setBaseFVarFaceValues(i, channel);
if (shape.lefthanded) {
if (shape.isLeftHanded) {
for (int j=dstFaceUVs.size()-1; j >= 0; --j) {
dstFaceUVs[j] = shape.faceuvs[ofs++];
}

View File

@ -129,7 +129,7 @@ static Shape * readShape( char const * fname, Scheme scheme ) {
shapeStr[size]='\0';
return Shape::parseObj( shapeStr, scheme, false, 1 );
return Shape::parseObj( shapeStr, scheme, false /*isLeftHanded*/, 1 );
}
#define STR(x) x