00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SO_INDEXED_POINT_SET_
00025 #define _SO_INDEXED_POINT_SET_
00026
00027 #include <Inventor/nodes/SoIndexedShape.h>
00028
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00043
00044
00138 class SoIndexedPointSet : public SoIndexedShape {
00139
00140 SO_NODE_HEADER(SoIndexedPointSet);
00141
00142 public:
00143
00144
00148 SoIndexedPointSet();
00149
00150 private:
00152 virtual void GLRender(SoGLRenderAction *action);
00153
00158 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00159
00161 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
00162
00163
00164 virtual void computeBBox( SoAction *action, SbBox3f &box, SbVec3f ¢er );
00165
00166 private:
00167
00169 static void initClass();
00171 static void exitClass();
00172
00173 private:
00174
00175 virtual void generatePrimitives(SoAction *action);
00176 virtual void invokePointCallbacks_(SoAction *action, const SoPrimitiveVertex *v, const uint32_t index);
00177
00178
00179 virtual void doRendering(SoGLRenderAction *action, const SoShapeStyleElement* shapeStyle);
00180
00181 virtual void callSetupIndices(const SoShapeStyleElement* shapeStyle,uint32_t useTexCoordsAnyway);
00182
00183
00184 virtual int getNumPrim();
00185
00186
00187 virtual void shouldGenerateNormals(SoGLRenderAction *action,const SoShapeStyleElement *shapeStyle);
00188
00189
00190 virtual SbBool shouldGLRender(SoGLRenderAction *action, SbBool isPointsOrLines = FALSE);
00191
00192
00193 virtual SbBool isRenderingPointsOrLines(SoGLRenderAction *action);
00194
00195
00196 virtual SoDetail* createPointDetail(SoRayPickAction *action,
00197 const SoPrimitiveVertex *v,
00198 SoPickedPoint *pp);
00199
00201 virtual ~SoIndexedPointSet();
00202
00203 SoINTERNAL private:
00204
00205 #ifndef HIDDEN_FROM_DOC
00206
00207 void generatePrimitives_( SoAction *action );
00208 #endif // HIDDEN_FROM_DOC
00209
00210 private:
00211
00212 enum Binding {
00213 OVERALL,
00214 PER_VERTEX,
00215 PER_VERTEX_INDEXED
00216 };
00217
00218
00219 static Binding getMaterialBinding(SoAction* action);
00220 static Binding getNormalBinding(SoAction* action);
00221 SbBool areMaterialsPerPoint(SoAction *action) const;
00222 SbBool areNormalsPerPoint(SoAction *action) const;
00223
00224
00225
00226
00227 int numPoints;
00228
00229 };
00230
00231 inline SbBool
00232 SoIndexedPointSet::isRenderingPointsOrLines(SoGLRenderAction *)
00233 {
00234 return TRUE;
00235 }
00236
00237 #endif
00238
00239
00240