mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-22 19:50:08 +00:00
Changed lefthanded flag to isLeftHanded.
This commit is contained in:
parent
4752bcdd69
commit
df3c856b51
@ -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)
|
||||
|
@ -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 ) );
|
||||
|
@ -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++];
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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++];
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user