SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
SGraphicsChaiMuscleSet.hpp
1 /* This file is part of scl, a control and simulation library
2 for robots and biomechanical models.
3 
4 scl is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 3 of the License, or (at your option) any later version.
8 
9 Alternatively, you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of
12 the License, or (at your option) any later version.
13 
14 scl is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU Lesser General Public
20 License and a copy of the GNU General Public License along with
21 scl. If not, see <http://www.gnu.org/licenses/>.
22  */
23 /* \file SGraphicsChaiMuscleSet.hpp
24  *
25  * Created on: Oct 28, 2013
26  *
27  * Copyright (C) 2013
28  *
29  * Author: Samir Menon <smenon@stanford.edu>
30  */
31 #ifndef SGRAPHICSCHAIMUSCLESET_HPP_
32 #define SGRAPHICSCHAIMUSCLESET_HPP_
33 
34 #include <scl/DataTypes.hpp>
35 #include <scl/data_structs/SObject.hpp>
36 #include <scl/graphics/chai/data_structs/SGraphicsChai.hpp>
37 #include <scl/actuation/muscles/data_structs/SActuatorSetMuscle.hpp>
38 
43 namespace chai3d
44 {
45  class cGenericObject;
46  struct cVector3d;
47 }
48 
49 namespace scl
50 {
53  {
56 
58  std::vector<SGraphicsChaiMuscle> muscle_graphics_set_;
59 
62 
63 // const SGraphicsChai *robot_render_ds_;
64 
66  SGraphicsChaiMuscleSet() : SObject("SGraphicsMsys"),
67  muscle_set_parsed_(NULL)
69  {}
70  };
71 
74  {
77 
79  std::vector<SGraphicsChaiMusclePoint> muscle_graphics_pt_;
80 
83  }; // End of : SGraphicsMuscle
84 
87  {//Chai's GPL license might now allow us to directly link. Hence have to separate stuff.
88  //Hence use forward decls and pointers. Should have used static members instead
89  chai3d::cVector3d* pos_;
90  SGraphicsChaiRigidBody* graphics_parent_;//Access the chai and scl objects
91 
92  chai3d::cVector3d* pos_next_;
93  SGraphicsChaiRigidBody* graphics_parent_next_;//Access the chai and scl objects
94 
95  chai3d::cGenericObject* graphics_via_point_;
96  chai3d::cGenericObject* graphics_via_line_;
97 
99  {
100  pos_ = S_NULL; pos_next_ = S_NULL;
101  graphics_parent_ = S_NULL; graphics_parent_next_ = S_NULL;
102  graphics_via_point_ = S_NULL; graphics_via_line_ = S_NULL;
103  }
105  {//NOTE TODO : Possible memory leak.
106  // if(S_NULL!=pos_) { delete pos_; }
107  }
108  }; //End of SGraphicsMusclePoint
109 }
110 
111 #endif /* SGRAPHICSCHAIMUSCLESET_HPP_ */
Definition: SGraphicsChaiMuscleSet.hpp:52
SGraphicsChaiMuscleSet()
Definition: SGraphicsChaiMuscleSet.hpp:66
std::vector< SGraphicsChaiMusclePoint > muscle_graphics_pt_
Definition: SGraphicsChaiMuscleSet.hpp:76
Definition: SActuatorSetMuscleParsed.hpp:124
std::vector< SGraphicsChaiMuscle > muscle_graphics_set_
Definition: SGraphicsChaiMuscleSet.hpp:55
Definition: SActuatorSetMuscleParsed.hpp:76
const SActuatorSetMuscleParsed * muscle_set_parsed_
Definition: SGraphicsChaiMuscleSet.hpp:61
Definition: SGraphicsChaiMuscleSet.hpp:73
const SMuscleParsed * muscle_parsed_
Definition: SGraphicsChaiMuscleSet.hpp:82
Definition: SGraphicsChaiRigidBody.hpp:53
Definition: SObject.hpp:43