Sirikata
libmesh/include/sirikata/mesh/Billboard.hpp
Go to the documentation of this file.
00001 // Copyright (c) 2011 Sirikata Authors. All rights reserved.
00002 // Use of this source code is governed by a BSD-style license that can
00003 // be found in the LICENSE file.
00004 
00005 #ifndef _SIRIKATA_MESH_BILLBOARD_HPP_
00006 #define _SIRIKATA_MESH_BILLBOARD_HPP_
00007 
00008 #include <sirikata/mesh/Platform.hpp>
00009 #include <sirikata/mesh/Visual.hpp>
00010 
00011 namespace Sirikata {
00012 namespace Mesh {
00013 
00014 struct SIRIKATA_MESH_EXPORT Billboard : public Visual {
00015   private:
00016     static String sType;
00017 
00018   public:
00019     Billboard();
00020     Billboard(const String& img);
00021     virtual ~Billboard();
00022 
00023     virtual const String& type() const;
00024 
00025     String image;
00026     float32 aspectRatio; // Width / height
00027     enum BillboardFacing {
00028         FACING_CAMERA,
00029         FACING_FIXED
00030     };
00031     BillboardFacing facing;
00032 };
00033 
00034 typedef std::tr1::shared_ptr<Billboard> BillboardPtr;
00035 typedef std::tr1::weak_ptr<Billboard> BillboardWPtr;
00036 
00037 
00038 } // namespace Mesh
00039 } // namespace Sirikata
00040 
00041 #endif //_SIRIKATA_MESH_BILLBOARD_HPP_