From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)."
This commit is contained in:
@@ -322,8 +322,8 @@ How to cope with pivot points in 3ds (short version)
|
||||
Objects with pivot points have a position relative to their PP, so they have to undergo this transform:
|
||||
|
||||
invert the mesh matrix, apply this matrix to the object. This puts the object back at the origin
|
||||
Transform the object by the nodes (nnegative) pivot point coords, this puts the PP at the origin
|
||||
Tranform the node by the node matrix, which does the orientation about the pivot point, (and currently) transforms the object back by a translation to the PP.
|
||||
Transform the object by the nodes (negative) pivot point coords, this puts the PP at the origin
|
||||
Transform the node by the node matrix, which does the orientation about the pivot point, (and currently) transforms the object back by a translation to the PP.
|
||||
|
||||
*/
|
||||
osg::Node* ReaderWriter3DS::ReaderObject::processNode(StateSetMap drawStateMap,Lib3dsFile *f,Lib3dsNode *node) {
|
||||
@@ -786,13 +786,13 @@ osg::StateSet* ReaderWriter3DS::ReaderObject::createStateSet(Lib3dsMaterial *mat
|
||||
// so we'll override material back to white.
|
||||
// and no longer require the decal hack below...
|
||||
#if 0
|
||||
// Eric orignal fallback
|
||||
// Eric original fallback
|
||||
osg::Vec4 white(1.0f,1.0f,1.0f,alpha);
|
||||
material->setAmbient(osg::Material::FRONT_AND_BACK,white);
|
||||
material->setDiffuse(osg::Material::FRONT_AND_BACK,white);
|
||||
material->setSpecular(osg::Material::FRONT_AND_BACK,white);
|
||||
#else
|
||||
// try alternative to avoid staturating with white
|
||||
// try alternative to avoid saturating with white
|
||||
// setting white as per OpenGL defaults.
|
||||
material->setAmbient(osg::Material::FRONT_AND_BACK,osg::Vec4(0.2f,0.2f,0.2f,alpha));
|
||||
material->setDiffuse(osg::Material::FRONT_AND_BACK,osg::Vec4(0.8f,0.8f,0.8f,alpha));
|
||||
|
||||
@@ -52,7 +52,7 @@ void DrawArrayLengths::read(DataInputStream* in){
|
||||
((ive::PrimitiveSet*)(prim))->read(in);
|
||||
}
|
||||
else
|
||||
throw Exception("DrawArrayLengths::read(): Could not cast this osg::DrawArrayLengths to an osg::PrimtiveSet.");
|
||||
throw Exception("DrawArrayLengths::read(): Could not cast this osg::DrawArrayLengths to an osg::PrimitiveSet.");
|
||||
|
||||
// Read properties
|
||||
setFirst(in->readInt());
|
||||
|
||||
@@ -48,7 +48,7 @@ void DrawElementsUByte::read(DataInputStream* in){
|
||||
((ive::PrimitiveSet*)(prim))->read(in);
|
||||
}
|
||||
else
|
||||
throw Exception("DrawElementsUByte::read(): Could not cast this osg::DrawElementsUByte to an osg::PrimtiveSet.");
|
||||
throw Exception("DrawElementsUByte::read(): Could not cast this osg::DrawElementsUByte to an osg::PrimitiveSet.");
|
||||
|
||||
// Read array length and its elements.
|
||||
int size = in->readInt();
|
||||
|
||||
@@ -50,7 +50,7 @@ void DrawElementsUInt::read(DataInputStream* in)
|
||||
((ive::PrimitiveSet*)(prim))->read(in);
|
||||
}
|
||||
else
|
||||
throw Exception("DrawElementsUInt::read(): Could not cast this osg::DrawElementsUInt to an osg::PrimtiveSet.");
|
||||
throw Exception("DrawElementsUInt::read(): Could not cast this osg::DrawElementsUInt to an osg::PrimitiveSet.");
|
||||
|
||||
// Read array length and its elements.
|
||||
int size = in->readInt();
|
||||
|
||||
@@ -49,7 +49,7 @@ void DrawElementsUShort::read(DataInputStream* in){
|
||||
((ive::PrimitiveSet*)(prim))->read(in);
|
||||
}
|
||||
else
|
||||
throw Exception("DrawElementsUShort::read(): Could not cast this osg::DrawElementsUShort to an osg::PrimtiveSet.");
|
||||
throw Exception("DrawElementsUShort::read(): Could not cast this osg::DrawElementsUShort to an osg::PrimitiveSet.");
|
||||
|
||||
// Read array length and its elements.
|
||||
int size = in->readInt();
|
||||
|
||||
@@ -83,7 +83,7 @@ void Normals::MakeNormalsVisitor::apply( Geode &geode )
|
||||
_local_coords->push_back( v );
|
||||
_local_coords->push_back( (v + n));
|
||||
}
|
||||
else // BIND_PER_PRIMTIVE_SET, BIND_PER_PRIMTITIV, BIND_PER_VERTEX
|
||||
else // BIND_PER_PRIMITIVE_SET, BIND_PER_PRIMITIVE, BIND_PER_VERTEX
|
||||
{
|
||||
Geometry::PrimitiveSetList& primitiveSets = geom->getPrimitiveSetList();
|
||||
Geometry::PrimitiveSetList::iterator itr;
|
||||
|
||||
@@ -126,7 +126,7 @@ bool View_readLocalData(osg::Object &obj, osgDB::Input &fr)
|
||||
if (!local_itrAdvanced) ++fr;
|
||||
}
|
||||
|
||||
// skip trainling '}'
|
||||
// skip trailing '}'
|
||||
++fr;
|
||||
|
||||
iteratorAdvanced = true;
|
||||
@@ -197,7 +197,7 @@ bool View_readLocalData(osg::Object &obj, osgDB::Input &fr)
|
||||
else ++fr;
|
||||
}
|
||||
|
||||
// skip trainling '}'
|
||||
// skip trailing '}'
|
||||
++fr;
|
||||
|
||||
iteratorAdvanced = true;
|
||||
|
||||
Reference in New Issue
Block a user