claraty::Bounding_Shape Class Reference
[Data Structure]
#include <bounding_shape.h>
Inheritance diagram for claraty::Bounding_Shape:


Public Member Functions | |
Observers | |
| std::string | get_name () |
| std::string | get_parent_name () |
| bool | get_containment () |
| bool | get_alignment () |
| bool | get_collision () |
| Transform & | get_transform () |
| N_3D_Object & | get_3d_object () |
Mutators | |
| void | set_name (std::string name) |
| void | set_parent_name (std::string parent_name) |
| void | set_containment (bool containment) |
| void | set_alignment (bool alignment) |
| void | set_collision (bool collision) |
| void | set_tolerance (double tolerance) |
| double & | get_tolerance () |
| void | set (Transform &transform) |
| void | set (N_3D_Object &N_3D_object) |
Private Attributes | |
| std::string | _name |
| std::string | _parent_name |
| bool | _is_container |
| bool | _is_aligned |
| bool | _ignore_collisions |
| double | _tol |
| Transform | _transform |
| N_3D_Object | _three_d_object |
Friends | |
| std::ostream & | operator<< (std::ostream &os, Bounding_Shape &bounding_shape) |
Detailed Description
Definition at line 41 of file bounding_shape.h.
Constructor & Destructor Documentation
| claraty::Bounding_Shape::Bounding_Shape | ( | ) |
Default constructor
Definition at line 38 of file bounding_shape.cc.
00039 : _name("root"), 00040 _parent_name(""), 00041 _is_container(false), 00042 _is_aligned(false), 00043 _ignore_collisions(false), 00044 _tol(0.0) 00045 { 00046 }
| claraty::Bounding_Shape::Bounding_Shape | ( | const Bounding_Shape & | bounding_shape | ) |
Copy constructor
- Parameters:
-
[in] bounding_shape Reference to the bounding shape to be copied.
Definition at line 57 of file bounding_shape.cc.
References _ignore_collisions, _is_aligned, _is_container, _name, _parent_name, _three_d_object, _tol, and _transform.
00058 { 00059 _name = bounding_shape._name; 00060 _parent_name = bounding_shape._parent_name; 00061 _is_container = bounding_shape._is_container; 00062 _is_aligned = bounding_shape._is_aligned; 00063 _ignore_collisions = bounding_shape._ignore_collisions; 00064 _tol = bounding_shape._tol; 00065 00066 _transform = bounding_shape._transform; 00067 _three_d_object = bounding_shape._three_d_object; 00068 }
| claraty::Bounding_Shape::~Bounding_Shape | ( | ) |
| claraty::Bounding_Shape::Bounding_Shape | ( | ) |
Default constructor
Definition at line 38 of file bounding_shape.cc.
00039 : _name("root"), 00040 _parent_name(""), 00041 _is_container(false), 00042 _is_aligned(false), 00043 _ignore_collisions(false), 00044 _tol(0.0) 00045 { 00046 }
| claraty::Bounding_Shape::Bounding_Shape | ( | const Bounding_Shape & | bounding_shape | ) |
Copy constructor
- Parameters:
-
[in] bounding_shape Reference to the bounding shape to be copied.
Definition at line 57 of file bounding_shape.cc.
References _ignore_collisions, _is_aligned, _is_container, _name, _parent_name, _three_d_object, _tol, and _transform.
00058 { 00059 _name = bounding_shape._name; 00060 _parent_name = bounding_shape._parent_name; 00061 _is_container = bounding_shape._is_container; 00062 _is_aligned = bounding_shape._is_aligned; 00063 _ignore_collisions = bounding_shape._ignore_collisions; 00064 _tol = bounding_shape._tol; 00065 00066 _transform = bounding_shape._transform; 00067 _three_d_object = bounding_shape._three_d_object; 00068 }
| claraty::Bounding_Shape::~Bounding_Shape | ( | ) |
Member Function Documentation
| std::string claraty::Bounding_Shape::get_name | ( | ) |
Get name parameter of the bouding shape.
- Returns:
- Bounding shape name
Definition at line 106 of file bounding_shape.cc.
References _name.
Referenced by claraty::operator<<().
00107 { 00108 return _name; 00109 }
| std::string claraty::Bounding_Shape::get_parent_name | ( | ) |
Get parent name parameter
- Returns:
- enum type
Definition at line 134 of file bounding_shape.cc.
References _parent_name.
Referenced by claraty::Composite_Bounding_Shape::insert(), and claraty::operator<<().
00135 { 00136 return _parent_name; 00137 }
| bool claraty::Bounding_Shape::get_containment | ( | ) |
Get containment parameter
- Returns:
- A boolean if _is_containiner returns true.
Definition at line 164 of file bounding_shape.cc.
References _is_container.
Referenced by claraty::operator<<().
00165 { 00166 return _is_container; 00167 }
| bool claraty::Bounding_Shape::get_alignment | ( | ) |
Get alignment parameter
- Returns:
- booliean indicating alignment.
Definition at line 192 of file bounding_shape.cc.
References _is_aligned.
Referenced by claraty::operator<<().
00193 { 00194 return _is_aligned; 00195 }
| bool claraty::Bounding_Shape::get_collision | ( | ) |
Get collision parameter
- Returns:
- Collision boolean.
Definition at line 220 of file bounding_shape.cc.
References _ignore_collisions.
Referenced by claraty::operator<<().
00221 { 00222 return _ignore_collisions; 00223 }
| Transform & claraty::Bounding_Shape::get_transform | ( | ) |
Get transform
- Returns:
- Transform.
Definition at line 276 of file bounding_shape.cc.
References _transform.
Referenced by claraty::Bounding_Shape_IO::extract_from_parse_tree(), and claraty::operator<<().
00277 { 00278 return _transform; 00279 }
| N_3D_Object & claraty::Bounding_Shape::get_3d_object | ( | ) |
Get shape object
- Returns:
- Shape
Reimplemented in claraty::Composite_Bounding_Shape.
Definition at line 303 of file bounding_shape.cc.
References _three_d_object.
Referenced by claraty::N_3D_Object_IO::extract_from_parse_tree(), claraty::Composite_Bounding_Shape::get_3d_object(), and claraty::operator<<().
00304 { 00305 return _three_d_object; 00306 }
| void claraty::Bounding_Shape::set_name | ( | std::string | name | ) |
Set name parameter
- Parameters:
-
[in] name The name of the bounding shape.
- Returns:
- void
Definition at line 91 of file bounding_shape.cc.
References _name.
Referenced by claraty::Bounding_Shape_IO::extract_from_parse_tree().
00092 { 00093 _name = name; 00094 }
| void claraty::Bounding_Shape::set_parent_name | ( | std::string | parent_name | ) |
Set parent name parameter
- Parameters:
-
[in] parent_name The name of the parent.
Definition at line 120 of file bounding_shape.cc.
References _parent_name.
Referenced by claraty::Bounding_Shape_IO::extract_from_parse_tree().
00121 { 00122 _parent_name = parent_name; 00123 }
| void claraty::Bounding_Shape::set_containment | ( | bool | containment | ) |
Set containment parameter
- Parameters:
-
[in] containment
- Returns:
- enum type
Definition at line 150 of file bounding_shape.cc.
References _is_container.
Referenced by claraty::Bounding_Shape_IO::extract_from_parse_tree().
00151 { 00152 _is_container = containment; 00153 }
| void claraty::Bounding_Shape::set_alignment | ( | bool | alignment | ) |
Set alignment parameter
- Parameters:
-
[in] alignment
Definition at line 178 of file bounding_shape.cc.
References _is_aligned.
Referenced by claraty::Bounding_Shape_IO::extract_from_parse_tree().
00179 { 00180 _is_aligned = alignment; 00181 }
| void claraty::Bounding_Shape::set_collision | ( | bool | collision | ) |
Set collision parameter
- Parameters:
-
[in] collision Set boolean value.
Definition at line 206 of file bounding_shape.cc.
References _ignore_collisions.
Referenced by claraty::Bounding_Shape_IO::extract_from_parse_tree().
00207 { 00208 _ignore_collisions = collision; 00209 }
| void claraty::Bounding_Shape::set_tolerance | ( | double | tolerance | ) |
Set tollerance parameter
- Parameters:
-
[in] tolerance
Definition at line 234 of file bounding_shape.cc.
References _tol.
Referenced by claraty::Bounding_Shape_IO::extract_from_parse_tree().
00235 { 00236 _tol = tolerance; 00237 }
| double & claraty::Bounding_Shape::get_tolerance | ( | ) |
Get tollerance parameter
- Returns:
- Tolerance.
Definition at line 248 of file bounding_shape.cc.
References _tol.
Referenced by claraty::operator<<().
00249 { 00250 return _tol; 00251 }
| void claraty::Bounding_Shape::set | ( | Transform & | transform | ) |
Set transform
- Parameters:
-
[in] transform
Definition at line 262 of file bounding_shape.cc.
References _transform.
00263 { 00264 _transform = transform; 00265 }
| void claraty::Bounding_Shape::set | ( | N_3D_Object & | three_d_object | ) |
Set shape object
- Parameters:
-
[in] three_d_object
Definition at line 290 of file bounding_shape.cc.
References _three_d_object.
00291 { 00292 _three_d_object = three_d_object; 00293 }
Friends And Related Function Documentation
| std::ostream& operator<< | ( | std::ostream & | os, | |
| Bounding_Shape & | bounding_shape | |||
| ) | [friend] |
Output to ostream
- Parameters:
-
[out] os ostream to put output on [in] bounding_shape Bounding_Shape object to be output
- Returns:
- ostream with output on it
Definition at line 318 of file bounding_shape.cc.
00319 { 00320 std::string spacing = ""; 00321 std::string child_spacing = ""; 00322 spacing.append(XML_Out::get_indentation_space(), ' '); 00323 child_spacing.append(XML_Out::get_indentation_space() 00324 + XML_Out::get_tab_space(), ' '); 00325 00326 os << spacing; 00327 os << "<Bounding_Shape "; 00328 os << "name = \"" << bounding_shape.get_name() << "\" "; 00329 os << "parent = \"" << bounding_shape.get_parent_name() << "\" "; 00330 os << "is_container = \"" 00331 << (bounding_shape.get_containment() ? "true" : "false") << "\" ";; 00332 os << "is_aligned = \"" 00333 << (bounding_shape.get_alignment() ? "true" : "false") << "\" ";; 00334 os << "ignore_collisions = \"" 00335 << (bounding_shape.get_collision() ? "true" : "false") << "\" ";; 00336 os << "tol = \"" << bounding_shape.get_tolerance() << "\" "; 00337 os << ">\n"; 00338 00339 #ifdef DEBUG 00340 cout << "In Bounding_Shape, about to output transform_io" << endl; 00341 #endif 00342 os << child_spacing; 00343 os << "<Transform>\n"; 00344 XML_Out::increment_indentation_level(); 00345 XML_Out::increment_indentation_level(); 00346 os << XML_Out::enable << bounding_shape.get_transform() << XML_Out::disable; 00347 XML_Out::decrement_indentation_level(); 00348 XML_Out::decrement_indentation_level(); 00349 os << child_spacing; 00350 os << "</Transform>\n"; 00351 00352 #ifdef DEBUG 00353 cout << "In Bounding_Shape, about to output bounding_shape_io" << endl; 00354 #endif 00355 XML_Out::increment_indentation_level(); 00356 os << bounding_shape.get_3d_object(); 00357 XML_Out::decrement_indentation_level(); 00358 00359 os << spacing; 00360 os << "</Bounding_Shape> \n"; 00361 00362 return os; 00363 00364 }
Member Data Documentation
std::string claraty::Bounding_Shape::_name [private] |
Name of shape object
Definition at line 80 of file bounding_shape.h.
Referenced by Bounding_Shape(), get_name(), and set_name().
std::string claraty::Bounding_Shape::_parent_name [private] |
Name of parent of shape object
Definition at line 81 of file bounding_shape.h.
Referenced by Bounding_Shape(), get_parent_name(), and set_parent_name().
bool claraty::Bounding_Shape::_is_container [private] |
Flag to indicate if shape is a container
Definition at line 82 of file bounding_shape.h.
Referenced by Bounding_Shape(), get_containment(), and set_containment().
bool claraty::Bounding_Shape::_is_aligned [private] |
Flag to indicate if is aligned
Definition at line 83 of file bounding_shape.h.
Referenced by Bounding_Shape(), get_alignment(), and set_alignment().
bool claraty::Bounding_Shape::_ignore_collisions [private] |
Flag to indicate if ignore collisions
Definition at line 84 of file bounding_shape.h.
Referenced by Bounding_Shape(), get_collision(), and set_collision().
double claraty::Bounding_Shape::_tol [private] |
Tolerance
Definition at line 85 of file bounding_shape.h.
Referenced by Bounding_Shape(), get_tolerance(), and set_tolerance().
Transform claraty::Bounding_Shape::_transform [private] |
Transform wrt body ref. frame
Definition at line 86 of file bounding_shape.h.
Referenced by Bounding_Shape(), get_transform(), and set().
Shape object data
Definition at line 87 of file bounding_shape.h.
Referenced by Bounding_Shape(), get_3d_object(), and set().
The documentation for this class was generated from the following files: