Improved float/double consistency removing some wrong Point3f and substitued with MeshType::CoordType
This commit is contained in:
parent
4198a3bd7c
commit
c30978903d
|
@ -60,6 +60,7 @@ public:
|
||||||
typedef typename MeshType::FacePointer FacePointer;
|
typedef typename MeshType::FacePointer FacePointer;
|
||||||
typedef typename MeshType::FaceIterator FaceIterator;
|
typedef typename MeshType::FaceIterator FaceIterator;
|
||||||
typedef typename MeshType::ScalarType ScalarType;
|
typedef typename MeshType::ScalarType ScalarType;
|
||||||
|
typedef typename MeshType::CoordType CoordType;
|
||||||
|
|
||||||
class ColorAvgInfo
|
class ColorAvgInfo
|
||||||
{
|
{
|
||||||
|
@ -329,10 +330,10 @@ Note: The faux bit is used to color polygonal faces uniformly
|
||||||
Period is expressed in absolute terms.
|
Period is expressed in absolute terms.
|
||||||
So as period it is meaningful could be to use something in the range of 1/10 of the bbox diag.
|
So as period it is meaningful could be to use something in the range of 1/10 of the bbox diag.
|
||||||
*/
|
*/
|
||||||
static void PerVertexPerlinNoise(MeshType& m, Point3f period, Point3f offset=Point3f(0,0,0))
|
static void PerVertexPerlinNoise(MeshType& m, CoordType period, CoordType offset=CoordType(0,0,0))
|
||||||
{
|
{
|
||||||
if(!HasPerVertexColor(m)) throw MissingComponentException("PerVertexColor");
|
if(!HasPerVertexColor(m)) throw MissingComponentException("PerVertexColor");
|
||||||
Point3<ScalarType> p[3];
|
CoordType p[3];
|
||||||
for(VertexIterator vi = m.vert.begin(); vi!=m.vert.end(); ++vi)
|
for(VertexIterator vi = m.vert.begin(); vi!=m.vert.end(); ++vi)
|
||||||
{
|
{
|
||||||
if(!(*vi).IsD()){
|
if(!(*vi).IsD()){
|
||||||
|
|
Loading…
Reference in New Issue