ODETrimeshShape.hh
00001 /*
00002  * Copyright 2011 Nate Koenig & Andrew Howard
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *
00016 */
00017 /* Desc: Trimesh geometry
00018  * Author: Nate Koenig
00019  * Date: 16 Oct 2009
00020  * SVN: $Id$
00021  */
00022 
00023 #ifndef ODETRIMESHSHAPE_HH
00024 #define ODETRIMESHSHAPE_HH
00025 
00026 #include "physics/TrimeshShape.hh"
00027 
00028 namespace gazebo
00029 {
00030     namespace physics
00031   {
00034     
00037 
00039     class ODETrimeshShape : public TrimeshShape
00040     {
00042       public: ODETrimeshShape(CollisionPtr parent);
00043   
00045       public: virtual ~ODETrimeshShape();
00046   
00048       public: void Update();
00049   
00051       protected: virtual void Load( sdf::ElementPtr &_sdf );
00052   
00053       protected: virtual void Init();
00054 
00055       private: dReal matrix_dblbuff[16*2];
00056       private: int last_matrix_index;
00057       private: float *vertices;
00058       private: unsigned int *indices;
00059       private: dTriMeshDataID odeData;
00060     };
00063   }
00064 }
00065 #endif