00001 00002 // MESH_MeshVerticesDrawer.h // 00004 00005 #ifndef MESH_VERTICESDRAWER_H 00006 #define MESH_VERTICESDRAWER_H 00007 00008 #include "MESH_MeshVerticesDrawerStateVariables.h" 00009 00010 #include "X3DOnePassProcessor.h" 00011 #include "MESH_SceneGraphTypes.h" 00012 00013 namespace X3DTK { 00014 namespace MESH { 00015 00016 // Processor drawing the mesh from the Mesh scene graph. 00017 00018 class MeshVerticesDrawer : public X3DOnePassProcessor 00019 { 00020 public: 00021 MeshVerticesDrawer(); 00022 virtual ~MeshVerticesDrawer(); 00023 00024 void draw(X3DNode *N, bool selection = false); 00025 00026 // Get ith Mesh of the scene. 00027 inline Mesh *getMesh(int i) const {return stateVariables->getMesh(i);}; 00028 // Gets stored transformation matrix associated with a given Mesh. 00029 inline const SFMatrix34f &getMatrix(int i) const {return stateVariables->getMatrix(i);}; 00030 00031 protected: 00032 MeshVerticesDrawerStateVariables* stateVariables; 00033 }; 00034 00035 } 00036 } 00037 00038 #endif 00039