1 // placementtrans.hxx -- class for carrying transforms for placing models in the world
3 // Written by Mathias Froehlich, started April 2005.
5 // Copyright (C) 2005 Mathias Froehlich
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef _SG_PLACEMENTTRANS_HXX
24 #define _SG_PLACEMENTTRANS_HXX
27 # error This library requires C++
30 #include <simgear/compiler.h>
31 #include <simgear/constants.h>
36 class ssgPlacementTransform : public ssgTransform
40 ssgPlacementTransform(void);
41 virtual ~ssgPlacementTransform(void);
43 // using ssgTransform::addKid(ssgEntity*);
45 virtual ssgBase *clone(int clone_flags);
47 void copy_from(ssgPlacementTransform *src, int clone_flags);
50 // virtual void setTransform(sgVec3 xyz);
51 // virtual void setTransform(sgCoord *xform);
52 // virtual void setTransform(sgCoord *xform, float sx, float sy, float sz);
53 // virtual void setTransform(sgMat4 xform);
56 void setTransform(sgdVec3 off);
57 void setTransform(sgdVec3 off, sgMat4 rot);
58 void setSceneryCenter(sgdVec3 xyz);
62 //////////////////////////////////////////////////////////////////
64 //////////////////////////////////////////////////////////////////
66 sgdVec3 _placement_offset;
67 sgdVec3 _scenery_center;
71 #endif // _SG_LOCATION_HXX