00001 00012 /*************************************************************************** 00013 * Copyright (C) 2007 by Jan Koci * 00014 * honza.koci@email.cz * 00015 * http://kengine.sourceforge.net/tutorial/ 00016 * * 00017 * This program is free software; you can redistribute it and/or modify * 00018 * it under the terms of the GNU General Public License as published by * 00019 * the Free Software Foundation; either version 2 of the License, or * 00020 * (at your option) any later version. * 00021 * * 00022 * This program is distributed in the hope that it will be useful, * 00023 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00024 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00025 * GNU General Public License for more details. * 00026 * * 00027 * You should have received a copy of the GNU General Public License * 00028 * along with this program; if not, write to the * 00029 * Free Software Foundation, Inc., * 00030 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00031 ***************************************************************************/ 00032 00033 #include "K3dPlaneMove.h" 00034 00035 K3dPlaneMove::K3dPlaneMove() 00036 { 00037 m_pRotation = NULL; 00038 m_pRelPosition = NULL; 00039 m_pRelNormal = NULL; 00040 m_pMatrix = NULL; 00041 m_pRotMatrix = NULL; 00042 } 00043 00044 K3dPlaneMove::~K3dPlaneMove() 00045 { 00046 } 00047 00048 K3dPlaneMove& K3dPlaneMove::operator= (K3dPlaneMove& _rkPlaneMove) 00049 { 00050 *this->GetPosition() = *_rkPlaneMove.GetPosition(); 00051 *this->GetNormal() = *_rkPlaneMove.GetNormal(); 00052 this->GetDistance() = _rkPlaneMove.GetDistance(); 00053 _rkPlaneMove.GetVertexArray() = GetVertexArray(); 00054 *this->GetColor() = *_rkPlaneMove.GetColor(); 00055 this->GetWidth() = _rkPlaneMove.GetWidth(); 00056 this->GetHeight() = _rkPlaneMove.GetHeight(); 00057 00058 *this->GetRotation() = *_rkPlaneMove.GetRotation(); 00059 *this->GetRelPosition() = *_rkPlaneMove.GetRelPosition(); 00060 *this->GetRelNormal() = *_rkPlaneMove.GetRelNormal(); 00061 *this->GetMatrix() = *_rkPlaneMove.GetMatrix(); 00062 *this->GetRotMatrix() = *_rkPlaneMove.GetRotMatrix(); 00063 return *this; 00064 } 00065 00067 void K3dPlaneMove::SetRenderMatrix() 00068 { 00069 *m_pMatrix = *m_pRotMatrix; 00070 // Set matrix translation from position 00071 m_pMatrix->Translation(*GetPosition()); 00072 } 00073 00074 00075