AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
RenderIterator.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agxWire/Node.h>
20
21namespace agxWire
22{
27 {
28 public:
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:
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
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
#define AGXPHYSICS_EXPORT
Class defining a node that is part of a wire.
Proxy class for wire iterators.
agxWire::RenderIterator prev() const
agxWire::RenderIterator next() const
agxWire::RenderIterator & dec()
Decrement this by one.
agxWire::RenderIterator & operator=(const agxWire::RenderIterator &other)
bool operator==(const agxWire::RenderIterator &other) const
bool operator!=(const agxWire::RenderIterator &other) const
agxWire::RenderIterator & operator--()
agxWire::NodeConstIterator getIterator() const
agxWire::RenderIterator & inc()
Increment this by one.
const agxWire::NodeRef * operator->() const
const agxWire::NodeRef & operator*() const
agxWire::RenderIterator & operator++()
bool equal(const agxWire::RenderIterator &other) const
same as ==, for SWIG
agxWire::Node * get() const
Smart pointer for handling referenced counted objects.
Definition ref_ptr.h:30
#define AGX_FORCE_INLINE
Definition macros.h:58
Implements a Wire model with adaptive resolution.
Definition MergedBody.h:40
NodeContainer::const_iterator NodeConstIterator