VertexRenderObject.hpp

00001 #ifndef __VERTEXRENDEROBJECT_HPP
00002 #define __VERTEXRENDEROBJECT_HPP
00003 
00004 #include <bone/FishSlice.hpp>
00005 #include <bone/FishGrid.hpp>
00006 #include <bone/FishSkeleton.hpp>
00007 #include <bone/FishField.hpp>
00008 
00009 #include <ocean/GLvish/BoundingBox.hpp>
00010 #include <ocean/GLvish/ArrayTypes.hpp>
00011 #include <ocean/GLvish/Shader.hpp>
00012 #include <ocean/GLvish/VGLRenderObject.hpp>
00013 
00014 #include <ocean/shrimp/VEnum.hpp>
00015 
00016 #include <GL/fieldGL.hpp>
00017 #include <GL/FieldBuffer.hpp>
00018 
00019 #include <bone/FishSkeleton.hpp>
00020 #include <bone/FishFragmentCluster.hpp>
00021 
00022 #include "VertexField.hpp"
00023 #include "FragmentPainter.hpp"
00024 
00025 
00026 namespace Wizt
00027 {
00028 using namespace Fiber;
00029 using namespace Eagle;
00030 
00107 class    fisheye_API VertexRenderObject : public virtual VGLRenderObject,
00108                                           public virtual Fish<Fiber::Slice>,
00109                                           public virtual Fish<Fiber::Skeleton>,
00110                                           public virtual Fish<Fiber::FragmentCluster>,
00111                                           public virtual FragmentPainter
00112 {
00113 public:
00114         typedef ClusterState VertexRenderState; 
00115 
00116         typedef ClusterState State;
00117 
00118 
00119         // superfluous function?
00120         override RefPtr<VObject::State> newState() const
00121         {
00122                 return Fish<Fiber::FragmentCluster>::newState();
00123         } 
00124 
00126         bool update(VRequest&Context, double precision); 
00127 
00129         VertexRenderObject(const string&name, int p, const RefPtr<VCreationPreferences>&VP); 
00130 
00132         ~VertexRenderObject(); 
00133 
00138         int     iterate(const RefPtr<ValuePool>&VP, FragmentCluster::Iterator&RFI) const; 
00139 
00140         RefPtr<ValueSet> CacheableVariables(const RefPtr<ValuePool>&Context) const; 
00141 
00145         override void   render(VGLRenderContext&Context) const;
00146 };
00147 
00148 } // namespace
00149 
00150 #endif  // __VERTEXRENDEROBJECT_HPP