Commit baa0cb37 authored by Kenneth Vanhoey's avatar Kenneth Vanhoey

frame rendering update

parent 49e7e333
...@@ -71,7 +71,7 @@ void renderNormalVertices(typename PFP::MAP& the_map, ...@@ -71,7 +71,7 @@ void renderNormalVertices(typename PFP::MAP& the_map,
template <typename PFP> template <typename PFP>
void renderFrameVertices(typename PFP::MAP& the_map, void renderFrameVertices(typename PFP::MAP& the_map,
const typename PFP::TVEC3& position, const typename PFP::TMAT33& frames, float scale, const FunctorSelect& good = SelectorTrue()); const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], float scale, const FunctorSelect& good = SelectorTrue());
} // namespace Direct } // namespace Direct
......
...@@ -183,7 +183,7 @@ void renderNormalVertices(typename PFP::MAP& the_map, const typename PFP::TVEC3& ...@@ -183,7 +183,7 @@ void renderNormalVertices(typename PFP::MAP& the_map, const typename PFP::TVEC3&
} }
template <typename PFP> template <typename PFP>
void renderFrameVertices(typename PFP::MAP& the_map, const typename PFP::TVEC3& position, const typename PFP::TMAT33& frame, float scale, const FunctorSelect& good) void renderFrameVertices(typename PFP::MAP& the_map, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], float scale, const FunctorSelect& good)
{ {
FunctorGLFrame<PFP> fgl_frame(the_map, good, position, frame, scale) ; FunctorGLFrame<PFP> fgl_frame(the_map, good, position, frame, scale) ;
......
...@@ -255,7 +255,7 @@ protected: ...@@ -255,7 +255,7 @@ protected:
/** /**
* frame of vertices * frame of vertices
*/ */
const typename PFP::TMAT33& m_frames; const typename PFP::TVEC3 *m_frames;
/** /**
* Dart selector to restrict the rendering * Dart selector to restrict the rendering
...@@ -269,7 +269,7 @@ public: ...@@ -269,7 +269,7 @@ public:
* @param good dart selector * @param good dart selector
*/ */
FunctorGLFrame (MAP& map, const FunctorSelect& good, const typename PFP::TVEC3& posi, const typename PFP::TMAT33& frames, float scale); FunctorGLFrame (MAP& map, const FunctorSelect& good, const typename PFP::TVEC3& posi, const typename PFP::TVEC3 frames[3], float scale);
bool operator() (Dart d); bool operator() (Dart d);
}; };
......
...@@ -362,7 +362,7 @@ bool FunctorGLNormal<PFP>::operator() (Dart d) ...@@ -362,7 +362,7 @@ bool FunctorGLNormal<PFP>::operator() (Dart d)
} }
template<typename PFP> template<typename PFP>
FunctorGLFrame<PFP>::FunctorGLFrame(MAP& map, const FunctorSelect& good, const typename PFP::TVEC3& posi, const typename PFP::TMAT33& frames, float scale): FunctorGLFrame<PFP>::FunctorGLFrame(MAP& map, const FunctorSelect& good, const typename PFP::TVEC3& posi, const typename PFP::TVEC3 frames[3], float scale):
FunctorMap<MAP>(map), FunctorMap<MAP>(map),
m_positions(posi), m_positions(posi),
m_frames(frames), m_frames(frames),
...@@ -379,10 +379,9 @@ bool FunctorGLFrame<PFP>::operator() (Dart d) ...@@ -379,10 +379,9 @@ bool FunctorGLFrame<PFP>::operator() (Dart d)
typename PFP::VEC3 p = m_positions[d] ; typename PFP::VEC3 p = m_positions[d] ;
for (unsigned int i = 0 ; i < 3 ; ++i) { for (unsigned int i = 0 ; i < 3 ; ++i) {
glVertex3fv(p.data()); glVertex3fv(p.data());
typename PFP::VEC3 q,vec ; typename PFP::VEC3 q ;
m_frames[d].getSubVectorH(i,0,vec) ;
q = p ; q = p ;
q += m_scale * vec ; q += m_scale * m_frames[i][d] ;
glVertex3fv(q.data()); glVertex3fv(q.data());
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment