]> git.mxchange.org Git - simgear.git/blob - simgear/scene/model/placementtrans.hxx
- better error message when submodel loading failed
[simgear.git] / simgear / scene / model / placementtrans.hxx
1 // placementtrans.hxx -- class for carrying transforms for placing models in the world
2 //
3 // Written by Mathias Froehlich, started April 2005.
4 //
5 // Copyright (C) 2005 Mathias Froehlich
6 //
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.
11 //
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.
16 //
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.
20 //
21
22
23 #ifndef _SG_PLACEMENTTRANS_HXX
24 #define _SG_PLACEMENTTRANS_HXX
25
26 #ifndef __cplusplus
27 # error This library requires C++
28 #endif
29
30 #include <simgear/compiler.h>
31 #include <simgear/constants.h>
32
33 #include <plib/sg.h>
34 #include <plib/ssg.h>
35
36 class ssgPlacementTransform : public ssgTransform
37 {
38 public:
39   
40   ssgPlacementTransform(void);
41   virtual ~ssgPlacementTransform(void);
42
43 //   using ssgTransform::addKid(ssgEntity*);
44
45   virtual ssgBase *clone(int clone_flags);
46 protected:
47   void copy_from(ssgPlacementTransform *src, int clone_flags);
48
49 private:
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);
54 public:
55
56   void setTransform(sgdVec3 off);
57   void setTransform(sgdVec3 off, sgMat4 rot);
58   void setSceneryCenter(sgdVec3 xyz);
59
60 private:
61
62   //////////////////////////////////////////////////////////////////
63   // private data                                                 //
64   //////////////////////////////////////////////////////////////////
65   
66   sgdVec3 _placement_offset;
67   sgdVec3 _scenery_center;
68     
69 };
70
71 #endif // _SG_LOCATION_HXX