parent
8cebfaf679
commit
b5bfb0e438
|
@ -871,10 +871,10 @@ void OrientedDisk(MeshType &m, int slices, typename MeshType::CoordType center,
|
|||
{
|
||||
Disk(m,slices);
|
||||
tri::UpdatePosition<MeshType>::Scale(m,radius);
|
||||
float angleRad = Angle(Point3f(0,0,1),norm);
|
||||
Point3f axis = Point3f(0,0,1)^norm;
|
||||
MeshType::ScalarType angleRad = Angle(MeshType::CoordType(0,0,1),norm);
|
||||
MeshType::CoordType axis = MeshType::CoordType(0,0,1)^norm;
|
||||
|
||||
Matrix44f rotM;
|
||||
Matrix44<MeshType::ScalarType> rotM;
|
||||
rotM.SetRotateRad(angleRad,axis);
|
||||
tri::UpdatePosition<MeshType>::Matrix(m,rotM);
|
||||
tri::UpdatePosition<MeshType>::Translate(m,center);
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <vcg/simplex/face/topology.h>
|
||||
#include <vcg/complex/algorithms/update/topology.h>
|
||||
#include <vcg/complex/algorithms/update/flag.h>
|
||||
#include <vcg/space/texcoord2.h>
|
||||
#include <vcg/space/triangle3.h>
|
||||
|
||||
namespace vcg{
|
||||
|
|
|
@ -330,7 +330,8 @@ static size_t FaceFromVertexLoose(MeshType &m)
|
|||
{
|
||||
bool selVert=false;
|
||||
for(int i = 0; i < (*fi).VN(); ++i)
|
||||
if((*fi).V(i)->IsS()) selVert=true;
|
||||
if((*fi).V(i)->IsS())
|
||||
selVert=true;
|
||||
|
||||
if(selVert) {
|
||||
(*fi).SetS();
|
||||
|
|
|
@ -247,7 +247,7 @@ static void Mesh(MeshLeft& ml, ConstMeshRight& mr, const bool selected = false,
|
|||
for(EdgeIteratorRight ei=mr.edge.begin(); ei!=mr.edge.end(); ++ei)
|
||||
if(!(*ei).IsD() && (!selected || (*ei).IsS())){
|
||||
size_t ind=Index(mr,*ei);
|
||||
remap.edge[ind]=Index(ml,*ep);
|
||||
remap.edge[ind]=int(Index(ml,*ep));
|
||||
++ep;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ static void Mesh(MeshLeft& ml, ConstMeshRight& mr, const bool selected = false,
|
|||
for(FaceIteratorRight fi=mr.face.begin(); fi!=mr.face.end(); ++fi)
|
||||
if(!(*fi).IsD() && (!selected || (*fi).IsS())){
|
||||
size_t ind=Index(mr,*fi);
|
||||
remap.face[ind]=Index(ml,*fp);
|
||||
remap.face[ind]=int(Index(ml,*fp));
|
||||
++fp;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
int n_attr; // unique ID of the attribute
|
||||
|
||||
void Resize(const int & sz){((SimpleTempDataBase *)_handle)->Resize(sz);}
|
||||
void Resize(size_t sz){((SimpleTempDataBase *)_handle)->Resize(sz);}
|
||||
void Reorder(std::vector<size_t> & newVertIndex){((SimpleTempDataBase *)_handle)->Reorder(newVertIndex);}
|
||||
bool operator<(const PointerToAttribute b) const { return(_name.empty()&&b._name.empty())?(_handle < b._handle):( _name < b._name);}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue