| | 41 | //! access the type of the class |
|---|
| | 42 | inline OSG::FieldContainerType & |
|---|
| | 43 | Node::getClassType(void) |
|---|
| | 44 | { |
|---|
| | 45 | return _type; |
|---|
| | 46 | } |
|---|
| | 47 | |
|---|
| | 48 | //! access the numerical type of the class |
|---|
| | 49 | inline OSG::UInt32 |
|---|
| | 50 | Node::getClassTypeId(void) |
|---|
| | 51 | { |
|---|
| | 52 | return _type.getId(); |
|---|
| | 53 | } |
|---|
| | 54 | |
|---|
| | 55 | inline OSG::UInt16 |
|---|
| | 56 | Node::getClassGroupId(void) |
|---|
| | 57 | { |
|---|
| | 58 | return _type.getGroupId(); |
|---|
| | 59 | } |
|---|
| | 60 | |
|---|
| | 61 | /*-------------------------------------------------------------------------*/ |
|---|
| | 62 | /* Field SFVolume */ |
|---|
| | 63 | |
|---|
| | 64 | inline SFDynamicVolume * |
|---|
| | 65 | Node::editSFVolume(bool update) |
|---|
| | 66 | { |
|---|
| | 67 | if(update == true) |
|---|
| | 68 | { |
|---|
| | 69 | updateVolume(); |
|---|
| | 70 | } |
|---|
| | 71 | else |
|---|
| | 72 | { |
|---|
| | 73 | editSField(VolumeFieldMask); |
|---|
| | 74 | } |
|---|
| | 75 | |
|---|
| | 76 | return &_sfVolume; |
|---|
| | 77 | } |
|---|
| | 78 | |
|---|
| | 79 | inline SFDynamicVolume const * |
|---|
| | 80 | Node::getSFVolume(bool update) |
|---|
| | 81 | { |
|---|
| | 82 | if(update == true) |
|---|
| | 83 | { |
|---|
| | 84 | updateVolume(); |
|---|
| | 85 | } |
|---|
| | 86 | |
|---|
| | 87 | return &_sfVolume; |
|---|
| | 88 | } |
|---|
| | 89 | |
|---|
| | 90 | #ifdef OSG_1_GET_COMPAT |
|---|
| | 91 | inline SFDynamicVolume * |
|---|
| | 92 | Node::getSFVolume(bool update) |
|---|
| | 93 | { |
|---|
| | 94 | return this->editSFVolume(); |
|---|
| | 95 | } |
|---|
| | 96 | #endif |
|---|
| | 97 | |
|---|
| | 98 | inline DynamicVolume & |
|---|
| | 99 | Node::editVolume(bool update) |
|---|
| | 100 | { |
|---|
| | 101 | if(update == true) |
|---|
| | 102 | { |
|---|
| | 103 | updateVolume(); |
|---|
| | 104 | } |
|---|
| | 105 | else |
|---|
| | 106 | { |
|---|
| | 107 | editSField(VolumeFieldMask); |
|---|
| | 108 | } |
|---|
| | 109 | |
|---|
| | 110 | return _sfVolume.getValue(); |
|---|
| | 111 | } |
|---|
| | 112 | |
|---|
| | 113 | inline DynamicVolume const & |
|---|
| | 114 | Node::getVolume(bool update) |
|---|
| | 115 | { |
|---|
| | 116 | if(update == true) |
|---|
| | 117 | { |
|---|
| | 118 | updateVolume(); |
|---|
| | 119 | } |
|---|
| | 120 | |
|---|
| | 121 | return _sfVolume.getValue(); |
|---|
| | 122 | } |
|---|
| | 123 | #ifdef OSG_1_GET_COMPAT |
|---|
| | 124 | inline DynamicVolume & |
|---|
| | 125 | Node::getVolume(bool update) |
|---|
| | 126 | { |
|---|
| | 127 | return this->editVolume(update); |
|---|
| | 128 | } |
|---|
| | 129 | #endif |
|---|
| | 130 | |
|---|
| | 131 | inline void |
|---|
| | 132 | Node::setVolume( |
|---|
| | 133 | SFDynamicVolume::ArgumentType value) |
|---|
| | 134 | { |
|---|
| | 135 | editSField(VolumeFieldMask); |
|---|
| | 136 | |
|---|
| | 137 | _sfVolume.setValue(value); |
|---|
| | 138 | } |
|---|
| | 139 | |
|---|
| | 140 | /*-------------------------------------------------------------------------*/ |
|---|
| | 141 | /* Field SFTravMask */ |
|---|
| | 142 | |
|---|
| | 143 | inline SFUInt32 * |
|---|
| | 144 | Node::editSFTravMask(void) |
|---|
| | 145 | { |
|---|
| | 146 | editSField(TravMaskFieldMask); |
|---|
| | 147 | |
|---|
| | 148 | return &_sfTravMask; |
|---|
| | 149 | } |
|---|
| | 150 | |
|---|
| | 151 | inline SFUInt32 const * |
|---|
| | 152 | Node::getSFTravMask (void) const |
|---|
| | 153 | { |
|---|
| | 154 | return &_sfTravMask; |
|---|
| | 155 | } |
|---|
| | 156 | |
|---|
| | 157 | #ifdef OSG_1_GET_COMPAT |
|---|
| | 158 | inline SFUInt32 * |
|---|
| | 159 | Node::getSFTravMask (void) |
|---|
| | 160 | { |
|---|
| | 161 | return this->editSFTravMask(); |
|---|
| | 162 | } |
|---|
| | 163 | #endif |
|---|
| | 164 | |
|---|
| | 165 | inline UInt32 & |
|---|
| | 166 | Node::editTravMask(void) |
|---|
| | 167 | { |
|---|
| | 168 | editSField(TravMaskFieldMask); |
|---|
| | 169 | |
|---|
| | 170 | return _sfTravMask.getValue(); |
|---|
| | 171 | } |
|---|
| | 172 | |
|---|
| | 173 | inline UInt32 const & |
|---|
| | 174 | Node::getTravMask (void) const |
|---|
| | 175 | { |
|---|
| | 176 | return _sfTravMask.getValue(); |
|---|
| | 177 | } |
|---|
| | 178 | #ifdef OSG_1_GET_COMPAT |
|---|
| | 179 | inline UInt32 & |
|---|
| | 180 | Node::getTravMask (void) |
|---|
| | 181 | { |
|---|
| | 182 | return this->editTravMask(); |
|---|
| | 183 | } |
|---|
| | 184 | #endif |
|---|
| | 185 | |
|---|
| | 186 | inline void |
|---|
| | 187 | Node::setTravMask( |
|---|
| | 188 | SFUInt32::ArgumentType value) |
|---|
| | 189 | { |
|---|
| | 190 | editSField(TravMaskFieldMask); |
|---|
| | 191 | |
|---|
| | 192 | _sfTravMask.setValue(value); |
|---|
| | 193 | } |
|---|
| | 194 | |
|---|
| | 195 | #ifdef OSG_1_COMPAT |
|---|
| | 196 | inline bool |
|---|
| | 197 | Node::getActive(void) const |
|---|
| | 198 | { |
|---|
| | 199 | return getTravMask() == TypeTraits<UInt32>::getMax(); |
|---|
| | 200 | } |
|---|
| | 201 | |
|---|
| | 202 | inline void |
|---|
| | 203 | Node::setActive(bool val) |
|---|
| | 204 | { |
|---|
| | 205 | editSField(TravMaskFieldMask); |
|---|
| | 206 | |
|---|
| | 207 | _sfTravMask.setValue(val ? TypeTraits<UInt32>::getMax() : |
|---|
| | 208 | TypeTraits<UInt32>::getZeroElement() ); |
|---|
| | 209 | } |
|---|
| | 210 | |
|---|
| | 211 | inline void |
|---|
| | 212 | Node::setOcclusionMask(UInt8 val) |
|---|
| | 213 | { |
|---|
| | 214 | _occlusionMask = val; |
|---|
| | 215 | } |
|---|
| | 216 | |
|---|
| | 217 | inline UInt8 |
|---|
| | 218 | Node::getOcclusionMask(void) const |
|---|
| | 219 | { |
|---|
| | 220 | return _occlusionMask; |
|---|
| | 221 | } |
|---|
| | 222 | #endif |
|---|
| | 223 | |
|---|
| | 224 | /*-------------------------------------------------------------------------*/ |
|---|
| | 225 | /* Field SFParent */ |
|---|
| | 226 | |
|---|
| | 227 | inline SFNodeParentPtr const * |
|---|
| | 228 | Node::getSFParent(void) const |
|---|
| | 229 | { |
|---|
| | 230 | return &_sfParent; |
|---|
| | 231 | } |
|---|
| | 232 | |
|---|
| | 233 | inline SFNodeParentPtr::const_reference |
|---|
| | 234 | Node::getParent(void) const |
|---|
| | 235 | { |
|---|
| | 236 | return _sfParent.getValue(); |
|---|
| | 237 | } |
|---|
| | 238 | |
|---|
| | 239 | /*-------------------------------------------------------------------------*/ |
|---|
| | 240 | /* Field SFCore */ |
|---|
| | 241 | |
|---|
| | 242 | inline SFNodeCoreChildPtr * |
|---|
| | 243 | Node::editSFCore(void) |
|---|
| | 244 | { |
|---|
| | 245 | editSField(CoreFieldMask); |
|---|
| | 246 | |
|---|
| | 247 | return &_sfCore; |
|---|
| | 248 | } |
|---|
| | 249 | |
|---|
| | 250 | inline SFNodeCoreChildPtr const * |
|---|
| | 251 | Node::getSFCore(void) const |
|---|
| | 252 | { |
|---|
| | 253 | return &_sfCore; |
|---|
| | 254 | } |
|---|
| | 255 | |
|---|
| | 256 | inline SFNodeCoreChildPtr::reference |
|---|
| | 257 | Node::editCore(void) |
|---|
| | 258 | { |
|---|
| | 259 | editSField(CoreFieldMask); |
|---|
| | 260 | |
|---|
| | 261 | return _sfCore.editValue(); |
|---|
| | 262 | } |
|---|
| | 263 | |
|---|
| | 264 | inline SFNodeCoreChildPtr::const_reference |
|---|
| | 265 | Node::getCore(void) const |
|---|
| | 266 | { |
|---|
| | 267 | return _sfCore.getValue(); |
|---|
| | 268 | } |
|---|
| | 269 | |
|---|
| | 270 | inline void |
|---|
| | 271 | Node::setCore(SFNodeCoreChildPtr::ArgumentType value) |
|---|
| | 272 | { |
|---|
| | 273 | editSField(CoreFieldMask); |
|---|
| | 274 | |
|---|
| | 275 | _sfCore.setValue(value); |
|---|
| | 276 | } |
|---|
| | 277 | |
|---|
| | 278 | |
|---|
| | 279 | /*-------------------------------------------------------------------------*/ |
|---|
| | 280 | /* Field MFChildren (Pointer field) */ |
|---|
| | 281 | |
|---|
| | 282 | inline MFNodeChildPtr * |
|---|
| | 283 | Node::editMFChildren(void) |
|---|
| | 284 | { |
|---|
| | 285 | editMField(ChildrenFieldMask, _mfChildren); |
|---|
| | 286 | |
|---|
| | 287 | return &_mfChildren; |
|---|
| | 288 | } |
|---|
| | 289 | |
|---|
| | 290 | inline MFNodeChildPtr const * |
|---|
| | 291 | Node::getMFChildren(void) const |
|---|
| | 292 | { |
|---|
| | 293 | return &_mfChildren; |
|---|
| | 294 | } |
|---|
| | 295 | |
|---|
| | 296 | inline MFNodeChildPtr & |
|---|
| | 297 | Node::editChildren(void) |
|---|
| | 298 | { |
|---|
| | 299 | editMField(ChildrenFieldMask, _mfChildren); |
|---|
| | 300 | |
|---|
| | 301 | return _mfChildren; |
|---|
| | 302 | } |
|---|
| | 303 | |
|---|
| | 304 | inline MFNodeChildPtr const & |
|---|
| | 305 | Node::getChildren(void) const |
|---|
| | 306 | { |
|---|
| | 307 | return _mfChildren; |
|---|
| | 308 | } |
|---|
| | 309 | |
|---|
| | 310 | inline MFNodeChildPtr::reference |
|---|
| | 311 | Node::editChildren(UInt32 const index) |
|---|
| | 312 | { |
|---|
| | 313 | editMField(ChildrenFieldMask, _mfChildren); |
|---|
| | 314 | |
|---|
| | 315 | return _mfChildren[index]; |
|---|
| | 316 | } |
|---|
| | 317 | |
|---|
| | 318 | inline MFNodeChildPtr::const_reference |
|---|
| | 319 | Node::getChildren(UInt32 const index) const |
|---|
| | 320 | { |
|---|
| | 321 | return _mfChildren[index]; |
|---|
| | 322 | } |
|---|
| | 323 | |
|---|
| | 324 | |
|---|
| | 325 | #ifdef OSG_MT_CPTR_ASPECT |
|---|
| | 326 | inline |
|---|
| | 327 | void Node::execSync (Node *pFrom, |
|---|
| | 328 | ConstFieldMaskArg whichField, |
|---|
| | 329 | AspectOffsetStore &oOffsets, |
|---|
| | 330 | ConstFieldMaskArg syncMode, |
|---|
| | 331 | UInt32 const uiSyncInfo) |
|---|
| | 332 | { |
|---|
| | 333 | Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo); |
|---|
| | 334 | |
|---|
| | 335 | if(FieldBits::NoField != (VolumeFieldMask & whichField)) |
|---|
| | 336 | _sfVolume.syncWith(pFrom->_sfVolume); |
|---|
| | 337 | |
|---|
| | 338 | if(FieldBits::NoField != (TravMaskFieldMask & whichField)) |
|---|
| | 339 | _sfTravMask.syncWith(pFrom->_sfTravMask); |
|---|
| | 340 | |
|---|
| | 341 | if(FieldBits::NoField != (ParentFieldMask & whichField)) |
|---|
| | 342 | _sfParent.syncWith(pFrom->_sfParent); |
|---|
| | 343 | |
|---|
| | 344 | if(FieldBits::NoField != (ChildrenFieldMask & whichField)) |
|---|
| | 345 | _mfChildren.syncWith(pFrom->_mfChildren, |
|---|
| | 346 | syncMode, |
|---|
| | 347 | uiSyncInfo, |
|---|
| | 348 | oOffsets); |
|---|
| | 349 | |
|---|
| | 350 | if(FieldBits::NoField != (CoreFieldMask & whichField)) |
|---|
| | 351 | _sfCore.syncWith(pFrom->_sfCore); |
|---|
| | 352 | } |
|---|
| | 353 | #endif |
|---|
| | 354 | |
|---|
| | 355 | |
|---|
| | 356 | inline Char8 const * |
|---|
| | 357 | Node::getClassname(void) |
|---|
| | 358 | { |
|---|
| | 359 | return "Node"; |
|---|
| | 360 | } |
|---|
| | 361 | |
|---|
| | 362 | |
|---|
| | 363 | |
|---|
| | 364 | |
|---|
| | 365 | |
|---|
| | 366 | |
|---|
| | 367 | |
|---|
| | 368 | |
|---|
| | 369 | |
|---|
| | 370 | |
|---|
| | 371 | |
|---|
| | 372 | |
|---|
| | 373 | |
|---|
| | 374 | |
|---|
| | 375 | #if 0 |
|---|
| | 376 | |
|---|
| | 377 | |
|---|