basic/geometry/geo_rangesensor/MgcBox3.cpp

Go to the documentation of this file.
00001 // Magic Software, Inc.
00002 // http://www.magic-software.com
00003 // Copyright (c) 2000, All Rights Reserved
00004 //
00005 // Source code from Magic Software is supplied under the terms of a license
00006 // agreement and may not be copied or disclosed except in accordance with the
00007 // terms of that agreement.  The various license agreements may be found at
00008 // the Magic Software web site.  This file is subject to the license
00009 //
00010 // FREE SOURCE CODE
00011 // http://www.magic-software.com/License.html/free.pdf
00012 
00013 #include "MgcBox3.h"
00014 
00015 //----------------------------------------------------------------------------
00016 void MgcBox3::ComputeVertices (MgcVector3 akVertex[8]) const
00017 {
00018     MgcVector3 akEAxis[3] =
00019     {
00020         m_afExtent[0]*m_akAxis[0],
00021         m_afExtent[1]*m_akAxis[1],
00022         m_afExtent[2]*m_akAxis[2]
00023     };
00024 
00025     akVertex[0] = m_kCenter - akEAxis[0] - akEAxis[1] - akEAxis[2];
00026     akVertex[1] = m_kCenter + akEAxis[0] - akEAxis[1] - akEAxis[2];
00027     akVertex[2] = m_kCenter + akEAxis[0] + akEAxis[1] - akEAxis[2];
00028     akVertex[3] = m_kCenter - akEAxis[0] + akEAxis[1] - akEAxis[2];
00029     akVertex[4] = m_kCenter - akEAxis[0] - akEAxis[1] + akEAxis[2];
00030     akVertex[5] = m_kCenter + akEAxis[0] - akEAxis[1] + akEAxis[2];
00031     akVertex[6] = m_kCenter + akEAxis[0] + akEAxis[1] + akEAxis[2];
00032     akVertex[7] = m_kCenter - akEAxis[0] + akEAxis[1] + akEAxis[2];
00033 }
00034 //----------------------------------------------------------------------------

Generated on Sat Apr 1 21:30:30 2006 for Motion Planning Kernel by  doxygen 1.4.6-NO