示例#1
0
/**
    \fn do_rotate
*/
void do_rotate(ADMImage *source,ADMImage *target,uint32_t angle)
{
uint8_t *in,*out;
uint32_t width,height;
uint32_t srcPitch,dstPitch;

    for(int i=0;i<3;i++)
    {
         ADM_PLANE plane=(ADM_PLANE)i;
         width=source->_width;
         height=source->_height;
         if(i)
            {
                width>>=1;
                height>>=1;
            }
          in=source->GetReadPtr(plane);
          srcPitch=source->GetPitch(plane);
          dstPitch=target->GetPitch(plane);
          out=target->GetWritePtr(plane);
          rotatePlane(angle,in,  srcPitch, out,  dstPitch,  width,  height);
    }
}
示例#2
0
Vector3F TransformManipulator::hitPlaneNormal() const
{
	if(m_mode == ToolContext::MoveTransform)
		return translatePlane(m_rotateAxis);
	return rotatePlane(m_rotateAxis);
}