Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

transform.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002 
00003    this file is part of rcssserver3D
00004    Fri May 9 2003
00005    Copyright (C) 2002,2003 Koblenz University
00006    Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
00007    $Id: transform.h,v 1.8 2004/04/30 09:34:44 rollmark Exp $
00008 
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; version 2 of the License.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021 
00022    Transform
00023 
00024 
00025         NOTE:
00026 
00027         HISTORY:
00028                 05.11.02 - MK
00029                         - Initial version
00030 
00031         TODO:
00032 
00033         TOFIX:
00034 */
00035 #ifndef OXYGEN_TRANSFORM_H
00036 #define OXYGEN_TRANSFORM_H
00037 
00038 #include "basenode.h"
00039 
00040 namespace oxygen
00041 {
00042 
00044 class Transform : public BaseNode
00045 {
00046     //
00047     // Functions
00048     //
00049 public:
00050     Transform();
00051     virtual ~Transform();
00052 
00053     // transformation related
00054 
00056     const salt::Matrix&     GetOldLocalTransform()     const;
00057 
00059     virtual const salt::Matrix&     GetLocalTransform()     const;
00060 
00062     virtual const salt::Matrix&     GetWorldTransform()     const;
00063 
00065     virtual void SetLocalTransform(const salt::Matrix &transform);
00066 
00068     virtual void SetWorldTransform(const salt::Matrix &transform);
00069 
00071     void SetLocalPos(const salt::Vector3f &pos);
00072 
00074     void SetLocalRotation(const salt::Vector3f &rot);
00075 
00077     int GetChangedMark() const;
00078 
00079 protected:
00081     virtual void OnLink();
00082 
00083 private:
00085     virtual void UpdateHierarchyInternal();
00086 
00087 private:
00089     salt::Matrix    mLocalTransform;
00090 
00092     salt::Matrix    mWorldTransform;
00093 
00097     int mChangedMark;
00098 
00100     salt::Matrix   mOldLocalTransform;
00101 };
00102 
00103 DECLARE_CLASS(Transform);
00104 
00105 } //namespace oxygen
00106 #endif //OXYGEN_TRANSFORM_H

Generated on Thu Apr 6 15:25:40 2006 for rcssserver3d by  doxygen 1.4.4