AGX Dynamics  2.37.3.2
RenderIterator.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 #include <agxWire/Node.h>
20 
21 namespace agxWire
22 {
27  {
28  public:
31  ~RenderIterator();
32 
33  agxWire::RenderIterator& operator= ( const agxWire::RenderIterator& other );
34  const agxWire::NodeRef& operator* () const;
35  const agxWire::NodeRef* operator-> () const;
36 
37  bool operator== ( const agxWire::RenderIterator& other ) const;
38  bool operator!= ( const agxWire::RenderIterator& other ) const;
39  agxWire::RenderIterator& operator++ ();
40  agxWire::RenderIterator& operator-- ();
41  agxWire::RenderIterator operator++ (int);
42  agxWire::RenderIterator operator-- (int);
43 
45  bool equal ( const agxWire::RenderIterator& other ) const;
46 
52 
58 
62  agxWire::RenderIterator next() const;
63 
67  agxWire::RenderIterator prev() const;
68 
72  agxWire::NodeConstIterator getIterator() const;
73 
77  agxWire::Node* get() const;
78 
79  private:
80  RenderIterator() {} // Not defined.
81 
82  private:
83  NodeConstIterator m_it;
84  };
85 
86  AGX_FORCE_INLINE RenderIterator::RenderIterator( agxWire::NodeConstIterator it )
87  : m_it( it )
88  {
89  }
90 
91  AGX_FORCE_INLINE RenderIterator::RenderIterator( const RenderIterator& other )
92  : m_it( other.m_it )
93  {
94  }
95 
97  {
98  }
99 
101  {
102  m_it = other.m_it;
103  return *this;
104  }
105 
107  {
108  return *m_it;
109  }
110 
112  {
113  return &(*m_it);
114  }
115 
117  {
118  return m_it == other.m_it;
119  }
120 
122  {
123  return m_it == other.m_it;
124  }
125 
127  {
128  return !(*this == other);
129  }
130 
132  {
133  return inc();
134  }
135 
137  {
138  return dec();
139  }
140 
142  {
143  return RenderIterator( m_it++ );
144  }
145 
147  {
148  return RenderIterator( m_it-- );
149  }
150 
152  {
153  ++m_it;
154  return *this;
155  }
156 
158  {
159  --m_it;
160  return *this;
161  }
162 
164  {
165  NodeConstIterator it = m_it;
166  return RenderIterator( ++it );
167  }
168 
170  {
171  NodeConstIterator it = m_it;
172  return RenderIterator( --it );
173  }
174 
176  {
177  return m_it;
178  }
179 
181  {
182  return *m_it;
183  }
184 }
185 
bool equal(const agxWire::RenderIterator &other) const
same as ==, for SWIG
const agxWire::NodeRef * operator->() const
bool operator!=(const agxWire::RenderIterator &other) const
Proxy class for wire iterators.
agxWire::Node * get() const
agxWire::RenderIterator & dec()
Decrement this by one.
bool operator==(T val, InvalidIndexStruct)
Definition: agx.h:194
agxWire::RenderIterator & operator++()
#define AGXPHYSICS_EXPORT
#define AGX_FORCE_INLINE
Definition: Object.h:59
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:39
bool operator==(const agxWire::RenderIterator &other) const
agxWire::RenderIterator & inc()
Increment this by one.
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
agxWire::RenderIterator & operator=(const agxWire::RenderIterator &other)
agxWire::NodeConstIterator getIterator() const
const agxWire::NodeRef & operator*() const
agxWire::RenderIterator next() const
agxWire::RenderIterator & operator--()
bool operator!=(T val, InvalidIndexStruct)
Definition: agx.h:200
Class defining a node that is part of a wire.
Definition: agxWire/Node.h:511
agxWire::RenderIterator prev() const
Vec3T< T > operator*(const Vec3T< T > &v, const AffineMatrix4x4T< T > &m)