
Static Public Member Functions | |
| static void | init (Particles *part, DrawActionBase *, dataType &data) |
| static bool | particle (dataType &data, UInt32 particle) |
| static Vec3f & | normal (dataType &data) |
| static void | normal (dataType &data, UInt32) |
Classes | |
| struct | dataType |
Definition at line 1114 of file OSGParticles.cpp.
| static void NormalTraitGeneric3f::init | ( | Particles * | part, | |
| DrawActionBase * | , | |||
| dataType & | data | |||
| ) | [inline, static] |
Definition at line 1125 of file OSGParticles.cpp.
References NormalTraitGeneric3f::dataType::const_n, osg::FCPtr< BasePtrTypeT, FieldContainerTypeT >::dcast(), osg::ParticlesBase::getNormals(), osg::ParticlesBase::getPositions(), NormalTraitGeneric3f::dataType::n, NormalTraitGeneric3f::dataType::norms, osg::NullFC, NormalTraitGeneric3f::dataType::perParticle, and osg::MField< FieldTypeT, fieldNameSpace >::size().
01126 { 01127 GeoNormals3fPtr norms3f = GeoNormals3fPtr::dcast(part->getNormals()); 01128 01129 data.norms = norms3f->getFieldPtr(); 01130 01131 data.perParticle = false; 01132 01133 if(norms3f != NullFC) 01134 { 01135 if(norms3f->getSize() == 1) 01136 { 01137 data.n = &(*(data.norms))[0]; 01138 } 01139 else if(data.norms->size() == part->getPositions()->size()) 01140 { 01141 data.perParticle = true; 01142 } 01143 else 01144 { 01145 data.const_n.setValues(0,1,0); 01146 data.n = &data.const_n; 01147 } 01148 } 01149 else 01150 { 01151 data.const_n.setValues(0,1,0); 01152 data.n = &data.const_n; 01153 } 01154 }
| static bool NormalTraitGeneric3f::particle | ( | dataType & | data, | |
| UInt32 | particle | |||
| ) | [inline, static] |
Definition at line 1156 of file OSGParticles.cpp.
References NormalTraitGeneric3f::dataType::n, NormalTraitGeneric3f::dataType::norms, and NormalTraitGeneric3f::dataType::perParticle.
01157 { 01158 if(data.perParticle) 01159 data.n = &(*(data.norms))[particle]; 01160 01161 return false; 01162 }
| static void NormalTraitGeneric3f::normal | ( | dataType & | data, | |
| UInt32 | ||||
| ) | [inline, static] |
Definition at line 1169 of file OSGParticles.cpp.
References osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues(), and NormalTraitGeneric3f::dataType::n.
1.5.5