diff --git a/vcg/complex/algorithms/create/platonic.h b/vcg/complex/algorithms/create/platonic.h index 0929e995..dd6079aa 100644 --- a/vcg/complex/algorithms/create/platonic.h +++ b/vcg/complex/algorithms/create/platonic.h @@ -869,15 +869,18 @@ void Disk(MeshType & m, int slices) template void OrientedDisk(MeshType &m, int slices, typename MeshType::CoordType center, typename MeshType::CoordType norm, float radius) { - Disk(m,slices); - tri::UpdatePosition::Scale(m,radius); - MeshType::ScalarType angleRad = Angle(MeshType::CoordType(0,0,1),norm); - MeshType::CoordType axis = MeshType::CoordType(0,0,1)^norm; + typedef typename MeshType::ScalarType ScalarType; + typedef typename MeshType::CoordType CoordType; - Matrix44 rotM; - rotM.SetRotateRad(angleRad,axis); - tri::UpdatePosition::Matrix(m,rotM); - tri::UpdatePosition::Translate(m,center); + Disk(m,slices); + tri::UpdatePosition::Scale(m,radius); + ScalarType angleRad = Angle(CoordType(0,0,1),norm); + CoordType axis = CoordType(0,0,1)^norm; + + Matrix44 rotM; + rotM.SetRotateRad(angleRad,axis); + tri::UpdatePosition::Matrix(m,rotM); + tri::UpdatePosition::Translate(m,center); } template