box

C++
struct box : public primitive {
  enum entype {
    type = 0
  };
  Matrix33 Basis;
  int bOriented;
  Vec3 center;
  Vec3 size;
  struct triangle : public primitive {
    enum entype {
      type = 1
    };
    Vec3 pt[3];
    Vec3 n;
    struct indexed_triangle : public triangle {
      int idx;
      struct grid : public primitive {
        Matrix33 Basis;
        int bOriented;
        Vec3 origin;
        vector2df step, stepr;
        vector2di size;
        vector2di stride;
        int bCyclic;
        struct heightfield : public grid {
          enum entype {
            type = 2
          };
          float heightscale;
          unsigned short typemask, heightmask;
          int typehole;
          int typepower;
          getHeightCallback fpGetHeightCallback;
          getSurfTypeCallback fpGetSurfTypeCallback;
        };
        struct ray : public primitive {
          enum entype {
            type = 3
          };
          Vec3 origin;
          Vec3 dir;
          struct sphere : public primitive {
            enum entype {
              type = 4
            };
            Vec3 center;
            float r;
            struct cylinder : public primitive {
              enum entype {
                type = 5
              };
              Vec3 center;
              Vec3 axis;
              float r, hh;
              struct capsule : public cylinder {
                enum entype {
                  type = 6
                };
                struct grid3d : public primitive {
                  Matrix33 Basis;
                  int bOriented;
                  Vec3 origin;
                  Vec3 step, stepr;
                  Vec3i size;
                  Vec3i stride;
                };
                struct voxelgrid : public grid3d {
                  enum entype {
                    type = 7
                  };
                  Matrix33 R;
                  Vec3 offset;
                  float scale, rscale;
                  strided_pointer pVtx;
                  SPU_DOMAIN_LOCAL index_t * pIndices;
                  SPU_DOMAIN_LOCAL Vec3 * pNormals;
                  SPU_DOMAIN_LOCAL char * pIds;
                  SPU_DOMAIN_LOCAL int * pCellTris;
                  SPU_DOMAIN_LOCAL int * pTriBuf;
                };
                struct plane : public primitive {
                  enum entype {
                    type = 8
                  };
                  Vec3 n;
                  Vec3 origin;
                  struct coord_plane : public plane {
                    Vec3 axes[2];
                  } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
                  struct contact {
                    real t, taux;
                    Vec3 pt;
                    Vec3 n;
                    unsigned int iFeature[2];
                  };
                  const int NPRIMS = 8;
                  struct geom_contact_area {
                    enum entype {
                      polygon,
                      polyline
                    };
                    int type;
                    int npt;
                    int nmaxpt;
                    float minedge;
                    SPU_DOMAIN_LOCAL int * piPrim[2];
                    SPU_DOMAIN_LOCAL int * piFeature[2];
                    Vec3 * pt;
                    Vec3 n1;
                  };
                  const int IFEAT_LOG2 = 23;
                  const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
                    real t;
                    Vec3 pt;
                    Vec3 n;
                    Vec3 dir;
                    int iUnprojMode;
                    float vel;
                    int id[2];
                    int iPrim[2];
                    int iFeature[2];
                    int iNode[2];
                    SPU_DOMAIN_LOCAL Vec3 * ptborder;
                    (intidxborder2] )();
                    int nborderpt;
                    int bClosed;
                    Vec3 center;
                    bool bBorderConsecutive;
                    SPU_DOMAIN_LOCAL geom_contact_area * parea;
                  };
                };
              };
            };
          };
        };
      };
    };
  };
};
File

primitives.h

box::entype Enumeration
C++
enum entype {
  type = 0
};
File

primitives.h

box::triangle Structure
C++
struct triangle : public primitive {
  enum entype {
    type = 1
  };
  Vec3 pt[3];
  Vec3 n;
  struct indexed_triangle : public triangle {
    int idx;
    struct grid : public primitive {
      Matrix33 Basis;
      int bOriented;
      Vec3 origin;
      vector2df step, stepr;
      vector2di size;
      vector2di stride;
      int bCyclic;
      struct heightfield : public grid {
        enum entype {
          type = 2
        };
        float heightscale;
        unsigned short typemask, heightmask;
        int typehole;
        int typepower;
        getHeightCallback fpGetHeightCallback;
        getSurfTypeCallback fpGetSurfTypeCallback;
      };
      struct ray : public primitive {
        enum entype {
          type = 3
        };
        Vec3 origin;
        Vec3 dir;
        struct sphere : public primitive {
          enum entype {
            type = 4
          };
          Vec3 center;
          float r;
          struct cylinder : public primitive {
            enum entype {
              type = 5
            };
            Vec3 center;
            Vec3 axis;
            float r, hh;
            struct capsule : public cylinder {
              enum entype {
                type = 6
              };
              struct grid3d : public primitive {
                Matrix33 Basis;
                int bOriented;
                Vec3 origin;
                Vec3 step, stepr;
                Vec3i size;
                Vec3i stride;
              };
              struct voxelgrid : public grid3d {
                enum entype {
                  type = 7
                };
                Matrix33 R;
                Vec3 offset;
                float scale, rscale;
                strided_pointer pVtx;
                SPU_DOMAIN_LOCAL index_t * pIndices;
                SPU_DOMAIN_LOCAL Vec3 * pNormals;
                SPU_DOMAIN_LOCAL char * pIds;
                SPU_DOMAIN_LOCAL int * pCellTris;
                SPU_DOMAIN_LOCAL int * pTriBuf;
              };
              struct plane : public primitive {
                enum entype {
                  type = 8
                };
                Vec3 n;
                Vec3 origin;
                struct coord_plane : public plane {
                  Vec3 axes[2];
                } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
                struct contact {
                  real t, taux;
                  Vec3 pt;
                  Vec3 n;
                  unsigned int iFeature[2];
                };
                const int NPRIMS = 8;
                struct geom_contact_area {
                  enum entype {
                    polygon,
                    polyline
                  };
                  int type;
                  int npt;
                  int nmaxpt;
                  float minedge;
                  SPU_DOMAIN_LOCAL int * piPrim[2];
                  SPU_DOMAIN_LOCAL int * piFeature[2];
                  Vec3 * pt;
                  Vec3 n1;
                };
                const int IFEAT_LOG2 = 23;
                const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
                  real t;
                  Vec3 pt;
                  Vec3 n;
                  Vec3 dir;
                  int iUnprojMode;
                  float vel;
                  int id[2];
                  int iPrim[2];
                  int iFeature[2];
                  int iNode[2];
                  SPU_DOMAIN_LOCAL Vec3 * ptborder;
                  (intidxborder2] )();
                  int nborderpt;
                  int bClosed;
                  Vec3 center;
                  bool bBorderConsecutive;
                  SPU_DOMAIN_LOCAL geom_contact_area * parea;
                };
              };
            };
          };
        };
      };
    };
  };
};
File

primitives.h

box::triangle::entype Enumeration
C++
enum entype {
  type = 1
};
File

primitives.h

box::triangle::indexed_triangle Structure
C++
struct indexed_triangle : public triangle {
  int idx;
  struct grid : public primitive {
    Matrix33 Basis;
    int bOriented;
    Vec3 origin;
    vector2df step, stepr;
    vector2di size;
    vector2di stride;
    int bCyclic;
    struct heightfield : public grid {
      enum entype {
        type = 2
      };
      float heightscale;
      unsigned short typemask, heightmask;
      int typehole;
      int typepower;
      getHeightCallback fpGetHeightCallback;
      getSurfTypeCallback fpGetSurfTypeCallback;
    };
    struct ray : public primitive {
      enum entype {
        type = 3
      };
      Vec3 origin;
      Vec3 dir;
      struct sphere : public primitive {
        enum entype {
          type = 4
        };
        Vec3 center;
        float r;
        struct cylinder : public primitive {
          enum entype {
            type = 5
          };
          Vec3 center;
          Vec3 axis;
          float r, hh;
          struct capsule : public cylinder {
            enum entype {
              type = 6
            };
            struct grid3d : public primitive {
              Matrix33 Basis;
              int bOriented;
              Vec3 origin;
              Vec3 step, stepr;
              Vec3i size;
              Vec3i stride;
            };
            struct voxelgrid : public grid3d {
              enum entype {
                type = 7
              };
              Matrix33 R;
              Vec3 offset;
              float scale, rscale;
              strided_pointer pVtx;
              SPU_DOMAIN_LOCAL index_t * pIndices;
              SPU_DOMAIN_LOCAL Vec3 * pNormals;
              SPU_DOMAIN_LOCAL char * pIds;
              SPU_DOMAIN_LOCAL int * pCellTris;
              SPU_DOMAIN_LOCAL int * pTriBuf;
            };
            struct plane : public primitive {
              enum entype {
                type = 8
              };
              Vec3 n;
              Vec3 origin;
              struct coord_plane : public plane {
                Vec3 axes[2];
              } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
              struct contact {
                real t, taux;
                Vec3 pt;
                Vec3 n;
                unsigned int iFeature[2];
              };
              const int NPRIMS = 8;
              struct geom_contact_area {
                enum entype {
                  polygon,
                  polyline
                };
                int type;
                int npt;
                int nmaxpt;
                float minedge;
                SPU_DOMAIN_LOCAL int * piPrim[2];
                SPU_DOMAIN_LOCAL int * piFeature[2];
                Vec3 * pt;
                Vec3 n1;
              };
              const int IFEAT_LOG2 = 23;
              const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
                real t;
                Vec3 pt;
                Vec3 n;
                Vec3 dir;
                int iUnprojMode;
                float vel;
                int id[2];
                int iPrim[2];
                int iFeature[2];
                int iNode[2];
                SPU_DOMAIN_LOCAL Vec3 * ptborder;
                (intidxborder2] )();
                int nborderpt;
                int bClosed;
                Vec3 center;
                bool bBorderConsecutive;
                SPU_DOMAIN_LOCAL geom_contact_area * parea;
              };
            };
          };
        };
      };
    };
  };
};
File

primitives.h

box::triangle::indexed_triangle::grid Structure
C++
struct grid : public primitive {
  Matrix33 Basis;
  int bOriented;
  Vec3 origin;
  vector2df step, stepr;
  vector2di size;
  vector2di stride;
  int bCyclic;
  struct heightfield : public grid {
    enum entype {
      type = 2
    };
    float heightscale;
    unsigned short typemask, heightmask;
    int typehole;
    int typepower;
    getHeightCallback fpGetHeightCallback;
    getSurfTypeCallback fpGetSurfTypeCallback;
  };
  struct ray : public primitive {
    enum entype {
      type = 3
    };
    Vec3 origin;
    Vec3 dir;
    struct sphere : public primitive {
      enum entype {
        type = 4
      };
      Vec3 center;
      float r;
      struct cylinder : public primitive {
        enum entype {
          type = 5
        };
        Vec3 center;
        Vec3 axis;
        float r, hh;
        struct capsule : public cylinder {
          enum entype {
            type = 6
          };
          struct grid3d : public primitive {
            Matrix33 Basis;
            int bOriented;
            Vec3 origin;
            Vec3 step, stepr;
            Vec3i size;
            Vec3i stride;
          };
          struct voxelgrid : public grid3d {
            enum entype {
              type = 7
            };
            Matrix33 R;
            Vec3 offset;
            float scale, rscale;
            strided_pointer pVtx;
            SPU_DOMAIN_LOCAL index_t * pIndices;
            SPU_DOMAIN_LOCAL Vec3 * pNormals;
            SPU_DOMAIN_LOCAL char * pIds;
            SPU_DOMAIN_LOCAL int * pCellTris;
            SPU_DOMAIN_LOCAL int * pTriBuf;
          };
          struct plane : public primitive {
            enum entype {
              type = 8
            };
            Vec3 n;
            Vec3 origin;
            struct coord_plane : public plane {
              Vec3 axes[2];
            } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
            struct contact {
              real t, taux;
              Vec3 pt;
              Vec3 n;
              unsigned int iFeature[2];
            };
            const int NPRIMS = 8;
            struct geom_contact_area {
              enum entype {
                polygon,
                polyline
              };
              int type;
              int npt;
              int nmaxpt;
              float minedge;
              SPU_DOMAIN_LOCAL int * piPrim[2];
              SPU_DOMAIN_LOCAL int * piFeature[2];
              Vec3 * pt;
              Vec3 n1;
            };
            const int IFEAT_LOG2 = 23;
            const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
              real t;
              Vec3 pt;
              Vec3 n;
              Vec3 dir;
              int iUnprojMode;
              float vel;
              int id[2];
              int iPrim[2];
              int iFeature[2];
              int iNode[2];
              SPU_DOMAIN_LOCAL Vec3 * ptborder;
              (intidxborder2] )();
              int nborderpt;
              int bClosed;
              Vec3 center;
              bool bBorderConsecutive;
              SPU_DOMAIN_LOCAL geom_contact_area * parea;
            };
          };
        };
      };
    };
  };
};
File

primitives.h

box::triangle::indexed_triangle::grid::heightfield Structure
C++
struct heightfield : public grid {
  enum entype {
    type = 2
  };
  float heightscale;
  unsigned short typemask, heightmask;
  int typehole;
  int typepower;
  getHeightCallback fpGetHeightCallback;
  getSurfTypeCallback fpGetSurfTypeCallback;
};
File

primitives.h

box::triangle::indexed_triangle::grid::heightfield::entype Enumeration
C++
enum entype {
  type = 2
};
File

primitives.h

box::triangle::indexed_triangle::grid::heightfield::fpGetHeightCallback Data Member
C++
getHeightCallback fpGetHeightCallback;
box::triangle::indexed_triangle::grid::heightfield::fpGetSurfTypeCallback Data Member
C++
getSurfTypeCallback fpGetSurfTypeCallback;
box::triangle::indexed_triangle::grid::heightfield::heightmask Data Member
C++
unsigned short heightmask;
box::triangle::indexed_triangle::grid::heightfield::heightscale Data Member
C++
float heightscale;
box::triangle::indexed_triangle::grid::heightfield::typehole Data Member
C++
int typehole;
box::triangle::indexed_triangle::grid::heightfield::typemask Data Member
C++
unsigned short typemask;
box::triangle::indexed_triangle::grid::heightfield::typepower Data Member
C++
int typepower;
box::triangle::indexed_triangle::grid::heightfield::= Operator
C++
heightfield& operator =(const heightfield & src);
box::triangle::indexed_triangle::grid::heightfield::getheight Method
C++
float getheight(int ix, int iy) const;
box::triangle::indexed_triangle::grid::heightfield::gettype Method
C++
int gettype(int ix, int iy) const;
box::triangle::indexed_triangle::grid::ray Structure
C++
struct ray : public primitive {
  enum entype {
    type = 3
  };
  Vec3 origin;
  Vec3 dir;
  struct sphere : public primitive {
    enum entype {
      type = 4
    };
    Vec3 center;
    float r;
    struct cylinder : public primitive {
      enum entype {
        type = 5
      };
      Vec3 center;
      Vec3 axis;
      float r, hh;
      struct capsule : public cylinder {
        enum entype {
          type = 6
        };
        struct grid3d : public primitive {
          Matrix33 Basis;
          int bOriented;
          Vec3 origin;
          Vec3 step, stepr;
          Vec3i size;
          Vec3i stride;
        };
        struct voxelgrid : public grid3d {
          enum entype {
            type = 7
          };
          Matrix33 R;
          Vec3 offset;
          float scale, rscale;
          strided_pointer pVtx;
          SPU_DOMAIN_LOCAL index_t * pIndices;
          SPU_DOMAIN_LOCAL Vec3 * pNormals;
          SPU_DOMAIN_LOCAL char * pIds;
          SPU_DOMAIN_LOCAL int * pCellTris;
          SPU_DOMAIN_LOCAL int * pTriBuf;
        };
        struct plane : public primitive {
          enum entype {
            type = 8
          };
          Vec3 n;
          Vec3 origin;
          struct coord_plane : public plane {
            Vec3 axes[2];
          } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
          struct contact {
            real t, taux;
            Vec3 pt;
            Vec3 n;
            unsigned int iFeature[2];
          };
          const int NPRIMS = 8;
          struct geom_contact_area {
            enum entype {
              polygon,
              polyline
            };
            int type;
            int npt;
            int nmaxpt;
            float minedge;
            SPU_DOMAIN_LOCAL int * piPrim[2];
            SPU_DOMAIN_LOCAL int * piFeature[2];
            Vec3 * pt;
            Vec3 n1;
          };
          const int IFEAT_LOG2 = 23;
          const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
            real t;
            Vec3 pt;
            Vec3 n;
            Vec3 dir;
            int iUnprojMode;
            float vel;
            int id[2];
            int iPrim[2];
            int iFeature[2];
            int iNode[2];
            SPU_DOMAIN_LOCAL Vec3 * ptborder;
            (intidxborder2] )();
            int nborderpt;
            int bClosed;
            Vec3 center;
            bool bBorderConsecutive;
            SPU_DOMAIN_LOCAL geom_contact_area * parea;
          };
        };
      };
    };
  };
};
File

primitives.h

Members
Members
Description
const int NPRIMS = 8;
since plane is currently not supported in collision checks
Vec3 n1;
normal of other object surface (or edge)
Vec3 dir;
unprojection direction
float vel;
original velocity along this direction, <0 if least squares normal was used
int id[2];
external ids for colliding geometry parts
int iNode[2];
BV-tree nodes of contacting primitives
SPU_DOMAIN_LOCAL Vec3 * ptborder;
intersection border
(intidxborder2] )();
primitive index | primitive's feature's id << IFEAT_LOG2
box::triangle::indexed_triangle::grid::ray::entype Enumeration
C++
enum entype {
  type = 3
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere Structure
C++
struct sphere : public primitive {
  enum entype {
    type = 4
  };
  Vec3 center;
  float r;
  struct cylinder : public primitive {
    enum entype {
      type = 5
    };
    Vec3 center;
    Vec3 axis;
    float r, hh;
    struct capsule : public cylinder {
      enum entype {
        type = 6
      };
      struct grid3d : public primitive {
        Matrix33 Basis;
        int bOriented;
        Vec3 origin;
        Vec3 step, stepr;
        Vec3i size;
        Vec3i stride;
      };
      struct voxelgrid : public grid3d {
        enum entype {
          type = 7
        };
        Matrix33 R;
        Vec3 offset;
        float scale, rscale;
        strided_pointer pVtx;
        SPU_DOMAIN_LOCAL index_t * pIndices;
        SPU_DOMAIN_LOCAL Vec3 * pNormals;
        SPU_DOMAIN_LOCAL char * pIds;
        SPU_DOMAIN_LOCAL int * pCellTris;
        SPU_DOMAIN_LOCAL int * pTriBuf;
      };
      struct plane : public primitive {
        enum entype {
          type = 8
        };
        Vec3 n;
        Vec3 origin;
        struct coord_plane : public plane {
          Vec3 axes[2];
        } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
        struct contact {
          real t, taux;
          Vec3 pt;
          Vec3 n;
          unsigned int iFeature[2];
        };
        const int NPRIMS = 8;
        struct geom_contact_area {
          enum entype {
            polygon,
            polyline
          };
          int type;
          int npt;
          int nmaxpt;
          float minedge;
          SPU_DOMAIN_LOCAL int * piPrim[2];
          SPU_DOMAIN_LOCAL int * piFeature[2];
          Vec3 * pt;
          Vec3 n1;
        };
        const int IFEAT_LOG2 = 23;
        const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
          real t;
          Vec3 pt;
          Vec3 n;
          Vec3 dir;
          int iUnprojMode;
          float vel;
          int id[2];
          int iPrim[2];
          int iFeature[2];
          int iNode[2];
          SPU_DOMAIN_LOCAL Vec3 * ptborder;
          (intidxborder2] )();
          int nborderpt;
          int bClosed;
          Vec3 center;
          bool bBorderConsecutive;
          SPU_DOMAIN_LOCAL geom_contact_area * parea;
        };
      };
    };
  };
};
File

primitives.h

Members
Members
Description
const int NPRIMS = 8;
since plane is currently not supported in collision checks
Vec3 n1;
normal of other object surface (or edge)
Vec3 dir;
unprojection direction
float vel;
original velocity along this direction, <0 if least squares normal was used
int id[2];
external ids for colliding geometry parts
int iNode[2];
BV-tree nodes of contacting primitives
SPU_DOMAIN_LOCAL Vec3 * ptborder;
intersection border
(intidxborder2] )();
primitive index | primitive's feature's id << IFEAT_LOG2
box::triangle::indexed_triangle::grid::ray::sphere::cylinder Structure
C++
struct cylinder : public primitive {
  enum entype {
    type = 5
  };
  Vec3 center;
  Vec3 axis;
  float r, hh;
  struct capsule : public cylinder {
    enum entype {
      type = 6
    };
    struct grid3d : public primitive {
      Matrix33 Basis;
      int bOriented;
      Vec3 origin;
      Vec3 step, stepr;
      Vec3i size;
      Vec3i stride;
    };
    struct voxelgrid : public grid3d {
      enum entype {
        type = 7
      };
      Matrix33 R;
      Vec3 offset;
      float scale, rscale;
      strided_pointer pVtx;
      SPU_DOMAIN_LOCAL index_t * pIndices;
      SPU_DOMAIN_LOCAL Vec3 * pNormals;
      SPU_DOMAIN_LOCAL char * pIds;
      SPU_DOMAIN_LOCAL int * pCellTris;
      SPU_DOMAIN_LOCAL int * pTriBuf;
    };
    struct plane : public primitive {
      enum entype {
        type = 8
      };
      Vec3 n;
      Vec3 origin;
      struct coord_plane : public plane {
        Vec3 axes[2];
      } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
      struct contact {
        real t, taux;
        Vec3 pt;
        Vec3 n;
        unsigned int iFeature[2];
      };
      const int NPRIMS = 8;
      struct geom_contact_area {
        enum entype {
          polygon,
          polyline
        };
        int type;
        int npt;
        int nmaxpt;
        float minedge;
        SPU_DOMAIN_LOCAL int * piPrim[2];
        SPU_DOMAIN_LOCAL int * piFeature[2];
        Vec3 * pt;
        Vec3 n1;
      };
      const int IFEAT_LOG2 = 23;
      const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
        real t;
        Vec3 pt;
        Vec3 n;
        Vec3 dir;
        int iUnprojMode;
        float vel;
        int id[2];
        int iPrim[2];
        int iFeature[2];
        int iNode[2];
        SPU_DOMAIN_LOCAL Vec3 * ptborder;
        (intidxborder2] )();
        int nborderpt;
        int bClosed;
        Vec3 center;
        bool bBorderConsecutive;
        SPU_DOMAIN_LOCAL geom_contact_area * parea;
      };
    };
  };
};
File

primitives.h

Members
Members
Description
const int NPRIMS = 8;
since plane is currently not supported in collision checks
Vec3 n1;
normal of other object surface (or edge)
Vec3 dir;
unprojection direction
float vel;
original velocity along this direction, <0 if least squares normal was used
int id[2];
external ids for colliding geometry parts
int iNode[2];
BV-tree nodes of contacting primitives
SPU_DOMAIN_LOCAL Vec3 * ptborder;
intersection border
(intidxborder2] )();
primitive index | primitive's feature's id << IFEAT_LOG2
box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule Structure
C++
struct capsule : public cylinder {
  enum entype {
    type = 6
  };
  struct grid3d : public primitive {
    Matrix33 Basis;
    int bOriented;
    Vec3 origin;
    Vec3 step, stepr;
    Vec3i size;
    Vec3i stride;
  };
  struct voxelgrid : public grid3d {
    enum entype {
      type = 7
    };
    Matrix33 R;
    Vec3 offset;
    float scale, rscale;
    strided_pointer pVtx;
    SPU_DOMAIN_LOCAL index_t * pIndices;
    SPU_DOMAIN_LOCAL Vec3 * pNormals;
    SPU_DOMAIN_LOCAL char * pIds;
    SPU_DOMAIN_LOCAL int * pCellTris;
    SPU_DOMAIN_LOCAL int * pTriBuf;
  };
  struct plane : public primitive {
    enum entype {
      type = 8
    };
    Vec3 n;
    Vec3 origin;
    struct coord_plane : public plane {
      Vec3 axes[2];
    } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
    struct contact {
      real t, taux;
      Vec3 pt;
      Vec3 n;
      unsigned int iFeature[2];
    };
    const int NPRIMS = 8;
    struct geom_contact_area {
      enum entype {
        polygon,
        polyline
      };
      int type;
      int npt;
      int nmaxpt;
      float minedge;
      SPU_DOMAIN_LOCAL int * piPrim[2];
      SPU_DOMAIN_LOCAL int * piFeature[2];
      Vec3 * pt;
      Vec3 n1;
    };
    const int IFEAT_LOG2 = 23;
    const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
      real t;
      Vec3 pt;
      Vec3 n;
      Vec3 dir;
      int iUnprojMode;
      float vel;
      int id[2];
      int iPrim[2];
      int iFeature[2];
      int iNode[2];
      SPU_DOMAIN_LOCAL Vec3 * ptborder;
      (intidxborder2] )();
      int nborderpt;
      int bClosed;
      Vec3 center;
      bool bBorderConsecutive;
      SPU_DOMAIN_LOCAL geom_contact_area * parea;
    };
  };
};
File

primitives.h

Members
Members
Description
const int NPRIMS = 8;
since plane is currently not supported in collision checks
Vec3 n1;
normal of other object surface (or edge)
Vec3 dir;
unprojection direction
float vel;
original velocity along this direction, <0 if least squares normal was used
int id[2];
external ids for colliding geometry parts
int iNode[2];
BV-tree nodes of contacting primitives
SPU_DOMAIN_LOCAL Vec3 * ptborder;
intersection border
(intidxborder2] )();
primitive index | primitive's feature's id << IFEAT_LOG2
box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::entype Enumeration
C++
enum entype {
  type = 6
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::grid3d Structure
C++
struct grid3d : public primitive {
  Matrix33 Basis;
  int bOriented;
  Vec3 origin;
  Vec3 step, stepr;
  Vec3i size;
  Vec3i stride;
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::plane Structure
C++
struct plane : public primitive {
  enum entype {
    type = 8
  };
  Vec3 n;
  Vec3 origin;
  struct coord_plane : public plane {
    Vec3 axes[2];
  } AUTO_TYPE_INFO(primitives::getHeightCallback) AUTO_TYPE_INFO(primitives::getSurfTypeCallback) struct prim_inters { prim_inters() { minPtDist2=0.0f; ptbest.zero(); } Vec3 pt[2]; Vec3 n; unsigned char iFeature[2][2]; float minPtDist2; short id[2]; int iNode[2]; SPU_DOMAIN_LOCAL Vec3 *ptborder; int nborderpt, nbordersz; Vec3 ptbest; int nBestPtVal; };
  struct contact {
    real t, taux;
    Vec3 pt;
    Vec3 n;
    unsigned int iFeature[2];
  };
  const int NPRIMS = 8;
  struct geom_contact_area {
    enum entype {
      polygon,
      polyline
    };
    int type;
    int npt;
    int nmaxpt;
    float minedge;
    SPU_DOMAIN_LOCAL int * piPrim[2];
    SPU_DOMAIN_LOCAL int * piFeature[2];
    Vec3 * pt;
    Vec3 n1;
  };
  const int IFEAT_LOG2 = 23;
  const int IDXMASK = ~(0xFF<const int TRIEND = 0x80<struct geom_contact {
    real t;
    Vec3 pt;
    Vec3 n;
    Vec3 dir;
    int iUnprojMode;
    float vel;
    int id[2];
    int iPrim[2];
    int iFeature[2];
    int iNode[2];
    SPU_DOMAIN_LOCAL Vec3 * ptborder;
    (intidxborder2] )();
    int nborderpt;
    int bClosed;
    Vec3 center;
    bool bBorderConsecutive;
    SPU_DOMAIN_LOCAL geom_contact_area * parea;
  };
};
File

primitives.h

Members
Members
Description
const int NPRIMS = 8;
since plane is currently not supported in collision checks
Vec3 n1;
normal of other object surface (or edge)
Vec3 dir;
unprojection direction
float vel;
original velocity along this direction, <0 if least squares normal was used
int id[2];
external ids for colliding geometry parts
int iNode[2];
BV-tree nodes of contacting primitives
SPU_DOMAIN_LOCAL Vec3 * ptborder;
intersection border
(intidxborder2] )();
primitive index | primitive's feature's id << IFEAT_LOG2
box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::plane::contact Structure
C++
struct contact {
  real t, taux;
  Vec3 pt;
  Vec3 n;
  unsigned int iFeature[2];
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::plane::coord_plane Structure
C++
struct coord_plane : public plane {
  Vec3 axes[2];
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::plane::entype Enumeration
C++
enum entype {
  type = 8
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::plane::geom_contact Structure
C++
struct geom_contact {
  real t;
  Vec3 pt;
  Vec3 n;
  Vec3 dir;
  int iUnprojMode;
  float vel;
  int id[2];
  int iPrim[2];
  int iFeature[2];
  int iNode[2];
  SPU_DOMAIN_LOCAL Vec3 * ptborder;
  (intidxborder2] )();
  int nborderpt;
  int bClosed;
  Vec3 center;
  bool bBorderConsecutive;
  SPU_DOMAIN_LOCAL geom_contact_area * parea;
};
File

primitives.h

Members
Members
Description
Vec3 dir;
unprojection direction
float vel;
original velocity along this direction, <0 if least squares normal was used
int id[2];
external ids for colliding geometry parts
int iNode[2];
BV-tree nodes of contacting primitives
SPU_DOMAIN_LOCAL Vec3 * ptborder;
intersection border
(intidxborder2] )();
primitive index | primitive's feature's id << IFEAT_LOG2
box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::plane::geom_contact_area Structure
C++
struct geom_contact_area {
  enum entype {
    polygon,
    polyline
  };
  int type;
  int npt;
  int nmaxpt;
  float minedge;
  SPU_DOMAIN_LOCAL int * piPrim[2];
  SPU_DOMAIN_LOCAL int * piFeature[2];
  Vec3 * pt;
  Vec3 n1;
};
File

primitives.h

Members
Members
Description
Vec3 n1;
normal of other object surface (or edge)
Description

geometry contact structures

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::plane::geom_contact_area::entype Enumeration
C++
enum entype {
  polygon,
  polyline
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::voxelgrid Structure
C++
struct voxelgrid : public grid3d {
  enum entype {
    type = 7
  };
  Matrix33 R;
  Vec3 offset;
  float scale, rscale;
  strided_pointer pVtx;
  SPU_DOMAIN_LOCAL index_t * pIndices;
  SPU_DOMAIN_LOCAL Vec3 * pNormals;
  SPU_DOMAIN_LOCAL char * pIds;
  SPU_DOMAIN_LOCAL int * pCellTris;
  SPU_DOMAIN_LOCAL int * pTriBuf;
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::capsule::voxelgrid::entype Enumeration
C++
enum entype {
  type = 7
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::cylinder::entype Enumeration
C++
enum entype {
  type = 5
};
File

primitives.h

box::triangle::indexed_triangle::grid::ray::sphere::entype Enumeration
C++
enum entype {
  type = 4
};
File

primitives.h

box::triangle::indexed_triangle::grid::Basis Data Member
C++
Matrix33 Basis;
box::triangle::indexed_triangle::grid::bCyclic Data Member
C++
int bCyclic;
box::triangle::indexed_triangle::grid::bOriented Data Member
C++
int bOriented;
box::triangle::indexed_triangle::grid::origin Data Member
C++
Vec3 origin;
box::triangle::indexed_triangle::grid::size Data Member
C++
vector2di size;
box::triangle::indexed_triangle::grid::step Data Member
C++
vector2df step;
box::triangle::indexed_triangle::grid::stepr Data Member
C++
vector2df stepr;
box::triangle::indexed_triangle::grid::stride Data Member
C++
vector2di stride;
box::triangle::indexed_triangle::grid::crop Method
C++
int crop(int i, int icoord, int bAllowBorder = 1);
box::triangle::indexed_triangle::grid::cropxy Method
C++
vector2di cropxy(const vector2di & ic, int bAllowBorder = 1);
box::triangle::indexed_triangle::grid::getcell_safe Method
C++
int getcell_safe(int ix, int iy);
box::triangle::indexed_triangle::grid::grid Constructor
C++
grid();
box::triangle::indexed_triangle::grid::inrange Method
C++
int inrange(int ix, int iy);
box::triangle::indexed_triangle::grid::iscyclic Method
C++
int iscyclic();
box::triangle::indexed_triangle::idx Data Member
C++
int idx;
box::triangle::indexed_triangle::getHeightCallback Nested Type
C++
typedef float (* getHeightCallback)(int ix,int iy);
box::triangle::indexed_triangle::getSurfTypeCallback Nested Type
C++
typedef unsigned char (* getSurfTypeCallback)(int ix,int iy);
box::triangle::n Data Member
C++
Vec3 n;
box::triangle::pt Data Member
C++
Vec3 pt[3];
box::Basis Data Member
C++
Matrix33 Basis;
Description

v_box = Basis*v_world; Basis = Rotation.T()

box::bOriented Data Member
C++
int bOriented;
box::center Data Member
C++
Vec3 center;
box::size Data Member
C++
Vec3 size;