00001 #ifndef COIN_SOPICKEDPOINT_H
00002 #define COIN_SOPICKEDPOINT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include <Inventor/SbBasic.h>
00028 #include <Inventor/SbVec3f.h>
00029 #include <Inventor/SbVec4f.h>
00030 #include <Inventor/lists/SoDetailList.h>
00031 #include <Inventor/SbViewportRegion.h>
00032
00033 class SoPath;
00034 class SoDetail;
00035 class SoNode;
00036 class SoState;
00037 class SbMatrix;
00038
00039 class COIN_DLL_API SoPickedPoint {
00040 public:
00041 SoPickedPoint(const SoPickedPoint & pp);
00042 SoPickedPoint(const SoPath * const path, SoState * const state,
00043 const SbVec3f & objSpacePoint);
00044 ~SoPickedPoint();
00045 SoPickedPoint *copy() const;
00046 const SbVec3f &getPoint() const;
00047 const SbVec3f &getNormal() const;
00048 const SbVec4f &getTextureCoords() const;
00049 int getMaterialIndex() const;
00050 SoPath *getPath() const;
00051 SbBool isOnGeometry() const;
00052 const SoDetail *getDetail(const SoNode * const node = NULL) const;
00053 const SbMatrix &getObjectToWorld(const SoNode * const node = NULL) const;
00054 const SbMatrix &getWorldToObject(const SoNode * const node = NULL) const;
00055 const SbMatrix &getObjectToImage(const SoNode * const node = NULL) const;
00056 const SbMatrix &getImageToObject(const SoNode * const node = NULL) const;
00057 SbVec3f getObjectPoint(const SoNode * const node = NULL) const;
00058 SbVec3f getObjectNormal(const SoNode * const node = NULL) const;
00059 SbVec4f getObjectTextureCoords(const SoNode * const node = NULL) const;
00060
00061 void setObjectNormal(const SbVec3f &normal);
00062 void setObjectTextureCoords(const SbVec4f &texCoords);
00063 void setMaterialIndex(const int index);
00064 void setDetail(SoDetail * detail, SoNode * node);
00065
00066 private:
00067
00068 SbVec3f point, objPoint;
00069 SbVec3f normal, objNormal;
00070 SbVec4f texCoords, objTexCoords;
00071 int materialIndex;
00072 SoPath *path;
00073 SbBool onGeometry;
00074 SoDetailList detailList;
00075 SoState *state;
00076 SbViewportRegion viewport;
00077
00078 class SoGetMatrixAction *getMatrixAction() const;
00079 void applyMatrixAction(const SoNode * const node) const;
00080 };
00081
00082 #endif // !COIN_SOPICKEDPOINT_H