VisualPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef _VISUAL_PRIVATE_HH_
19 #define _VISUAL_PRIVATE_HH_
20 
21 #include <string>
22 #include <utility>
23 #include <list>
24 #include <vector>
25 
26 #include <sdf/sdf.hh>
27 
28 #include "gazebo/msgs/msgs.hh"
29 #include "gazebo/common/Event.hh"
30 #include "gazebo/math/Box.hh"
31 #include "gazebo/math/Pose.hh"
33 #include "gazebo/math/Vector3.hh"
34 #include "gazebo/math/Vector2d.hh"
35 
38 
39 namespace Ogre
40 {
41  class MovableObject;
42  class SceneNode;
43  class StaticGeometry;
44  class RibbonTrail;
45  class AnimationState;
46  class SkeletonInstance;
47 }
48 
49 namespace gazebo
50 {
51  namespace rendering
52  {
53  class WireBox;
54 
57  {
59  public: ScenePtr scene;
60 
62  public: Ogre::SceneNode *sceneNode;
63 
65  public: VisualPtr parent;
66 
68  public: sdf::ElementPtr sdf;
69 
71  public: std::string myMaterialName;
72 
74  public: std::string origMaterialName;
75 
77  public: float transparency;
78 
81  public: bool isStatic;
82 
84  public: Ogre::StaticGeometry *staticGeom;
85 
87  public: bool visible;
88 
90  public: Ogre::RibbonTrail *ribbonTrail;
91 
93  public: Ogre::SkeletonInstance *skeleton;
94 
97 
99  public: std::list<DynamicLines*> lines;
100 
102  public: std::list< std::pair<DynamicLines*, unsigned int> > lineVertices;
103 
105  public: std::string name;
106 
108  public: std::vector<VisualPtr> children;
109 
111  public: Ogre::AnimationState *animState;
112 
115 
117  public: boost::function<void()> onAnimationComplete;
118 
120  public: bool useRTShader;
121 
123  public: bool initialized;
124 
127 
129  public: uint32_t id;
130 
132  public: static uint32_t visualIdCount;
133 
136 
138  public: bool lighting;
139 
141  public: std::vector<VisualPluginPtr> plugins;
142  };
144  }
145 }
146 #endif
bool visible
True if rendered.
Definition: VisualPrivate.hh:87
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:144
Ogre::StaticGeometry * staticGeom
Pointer to the static geometry.
Definition: VisualPrivate.hh:84
ScenePtr scene
Pointer to the visual's scene.
Definition: VisualPrivate.hh:59
Private data for the Visual class.
Definition: VisualPrivate.hh:56
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
Ogre::SkeletonInstance * skeleton
The visual's skeleton, used only for person simulation.
Definition: VisualPrivate.hh:93
bool lighting
True if lighting will be applied to this visual.
Definition: VisualPrivate.hh:138
std::vector< VisualPtr > children
Children visuals.
Definition: VisualPrivate.hh:108
std::string name
Name of the visual.
Definition: VisualPrivate.hh:105
math::Vector3 scale
Scale of visual.
Definition: VisualPrivate.hh:135
Ogre::AnimationState * animState
Used to animate the visual.
Definition: VisualPrivate.hh:111
std::vector< VisualPluginPtr > plugins
A list of visual plugins.
Definition: VisualPrivate.hh:141
Ogre::RibbonTrail * ribbonTrail
The ribbon train created by the visual.
Definition: VisualPrivate.hh:90
float transparency
Transparency value.
Definition: VisualPrivate.hh:77
static uint32_t visualIdCount
Counter used to create unique ids.
Definition: VisualPrivate.hh:132
event::ConnectionPtr preRenderConnection
Connection for the pre render event.
Definition: VisualPrivate.hh:96
VisualPtr parent
Parent visual.
Definition: VisualPrivate.hh:65
std::list< DynamicLines * > lines
List of all the lines created.
Definition: VisualPrivate.hh:99
std::string myMaterialName
The unique name for the visual's material.
Definition: VisualPrivate.hh:71
std::string origMaterialName
The original name for the visual's material.
Definition: VisualPrivate.hh:74
WireBox * boundingBox
A wire frame bounding box.
Definition: VisualPrivate.hh:126
bool useRTShader
True to use RT shader system.
Definition: VisualPrivate.hh:120
sdf::ElementPtr sdf
The SDF element for the visual.
Definition: VisualPrivate.hh:68
boost::function< void()> onAnimationComplete
Callback for the animation complete event.
Definition: VisualPrivate.hh:117
Ogre::SceneNode * sceneNode
Pointer to the visual's scene node in Ogre.
Definition: VisualPrivate.hh:62
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:74
boost::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:102
bool isStatic
True if the visual is static, which allows Ogre to improve performance.
Definition: VisualPrivate.hh:81
Draws a wireframe box.
Definition: WireBox.hh:36
common::Time prevAnimTime
Time of the previous animation step.
Definition: VisualPrivate.hh:114
std::list< std::pair< DynamicLines *, unsigned int > > lineVertices
Lines and their vertices connected to this visual.
Definition: VisualPrivate.hh:102
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:43
bool initialized
True if initialized.
Definition: VisualPrivate.hh:123
uint32_t id
Unique id of this visual.
Definition: VisualPrivate.hh:129