Browse Source

Changed default creaseAngle from ~30deg (VRML spec) to ~42deg for prettier smoothing

pull/12/head
Cirilo Bernardo 10 years ago
parent
commit
943c5d8ea8
  1. 1
      plugins/3d/vrml/v1/vrml1_shapehints.cpp
  2. 4
      plugins/3d/vrml/v2/vrml2_faceset.cpp
  3. 2
      plugins/3d/vrml/wrlfacet.h
  4. 4
      plugins/3d/vrml/x3d/x3d_ifaceset.cpp

1
plugins/3d/vrml/v1/vrml1_shapehints.cpp

@ -35,6 +35,7 @@ WRL1SHAPEHINTS::WRL1SHAPEHINTS( NAMEREGISTER* aDictionary ) : WRL1NODE( aDiction
m_order = ORD_UNKNOWN;
m_Type = WRL1_SHAPEHINTS;
m_crease = 0.5;
m_crease = 0.733; // approx 42 degrees; this is larger than VRML spec.
return;
}

4
plugins/3d/vrml/v2/vrml2_faceset.cpp

@ -79,8 +79,8 @@ void WRL2FACESET::setDefaults( void )
normalPerVertex = true;
solid = true;
creaseAngle = 0.5;
creaseLimit = 0.878; // approx cos( 0.5 )
creaseAngle = 0.733; // approx 42 degrees; this is larger than VRML spec.
creaseLimit = 0.74317; // cos( 0.733 )
}

2
plugins/3d/vrml/wrlfacet.h

@ -146,7 +146,7 @@ public:
FACET* NewFacet();
SGNODE* CalcShape( SGNODE* aParent, SGNODE* aColor, WRL1_ORDER aVertexOrder,
float aCreaseLimit = 0.878, bool isVRML2 = false );
float aCreaseLimit = 0.74317, bool isVRML2 = false );
};
#endif // WRLFACET_H

4
plugins/3d/vrml/x3d/x3d_ifaceset.cpp

@ -79,8 +79,8 @@ void X3DIFACESET::init()
coord = NULL;
ccw = true;
creaseAngle = 0.5;
creaseLimit = 0.878; // approx cos( 0.5 )
creaseAngle = 0.733; // approx 42 degrees; this is larger than VRML spec.
creaseLimit = 0.74317; // cos( 0.733 )
return;
}

Loading…
Cancel
Save