VR-Forces 4.0.4 Class Documentation
include/osgdb_PathData/pathDataOsgObjects.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2011 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00006 #pragma once
00007 
00008 #include "osgdb_PathData/osgdb_PathDataPluginDefines.h"
00009 #include "kyruntime.h"
00010 #include "matrix/vlVector.h"
00011 #include <osg/Geode>
00012 #include <osg/Geometry>
00013 #include <deque>
00014 #include "osg/LOD"
00015 #include <string>
00016 
00020 
00021 namespace BHAVE
00022 {
00023    enum DtBhavePdgDrawMode 
00024    {
00025       DtDrawTriangles,
00026       DtDrawTransparentTriangles
00027    };
00028 
00032    class DT_DLL_osgdb_PathData DtBhaveOsgGeometry
00033    {
00034    public:
00035       DtBhaveOsgGeometry(bool transparent = false);
00036       virtual ~DtBhaveOsgGeometry();
00037 
00039       virtual bool pushTriangle(const DtVector&, const DtVector&, const DtVector&, const Kaim::VisualColor&);
00040 
00042       virtual osg::Geometry* geometry() const;
00043 
00045       virtual bool pushLine(const DtVector&, const DtVector&, const Kaim::VisualColor&);
00046    protected:
00049       virtual void setTransparency(const Kaim::VisualColor&);
00050 
00051       osg::Geometry* myGeometry;
00052       osg::Vec3Array* myVertexArray;
00053       osg::Vec4Array* myColorArray;
00054       unsigned int myArrayIndex;   
00055       bool myDrawTransparent;
00056    };
00057 
00060    class DT_DLL_osgdb_PathData DtBhaveOsgGeode
00061    {
00062    public:
00063       DtBhaveOsgGeode(DtBhavePdgDrawMode = DtDrawTriangles);
00064       virtual ~DtBhaveOsgGeode();
00065 
00067       virtual osg::Geode* geode();
00068 
00070       virtual void addTriangle(const DtVector&, const DtVector&, const DtVector&, const Kaim::VisualColor&);
00071 
00073       virtual void addLine(const DtVector&, const DtVector&, const Kaim::VisualColor&);
00074    protected:
00075       osg::Geode* myGeode;
00076       std::deque<Kaim::VisualColor> myColorIndeces;
00077       std::deque<DtBhaveOsgGeometry*> myGeometries;
00078       DtBhavePdgDrawMode myDrawMode;
00079    };
00080 
00082    class DT_DLL_osgdb_PathData DtBhaveOsgLOD
00083    {
00084    public:
00085       DtBhaveOsgLOD();
00086       virtual ~DtBhaveOsgLOD();
00087 
00089       virtual osg::LOD* lod();
00090 
00092       virtual void addGeode(DtBhaveOsgGeode* geode);
00093 
00095       virtual DtBhaveOsgGeode* lastAddedGeode();
00096 
00098       virtual void setVisibleRange(float min, float max);
00099 
00101       virtual void setName(const std::string& name);
00102 
00103    protected:
00104       osg::LOD* myLOD;
00105       std::deque<DtBhaveOsgGeode*> myGeodes;
00106       float myMinVisible;
00107       float myMaxVisible;
00108    };
00109 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)