++itr) {
osg::ref_ptr<osg::PositionAttitudeTransform> pat = itr->second;
+
+ if (pat == 0) {
+ continue;
+ }
+
osg::Vec3f currpos = field_transform->getPosition() + fta * pat->getPosition();
// Determine the vector from the new position to the cloud in cloud-space.
bool SGCloudField::deleteCloud(int identifier) {
osg::ref_ptr<osg::PositionAttitudeTransform> transform = cloud_hash[identifier];
- if (transform == NULL) return false;
+ if (transform == 0) return false;
removeCloudFromTree(transform);
cloud_hash.erase(identifier);
}
bool SGCloudField::isDefined3D(void) {
- return (cloud_hash.size() > 0);
+ return (! cloud_hash.empty());
}
SGCloudField::CloudFog::CloudFog() {