isboxcollidinggeometryproxyclasses.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //! Class that holds parameters to feed into CGame.IsBoxCollidingGeometryProxy
  2. class BoxCollidingParams
  3. {
  4. /**
  5. \brief Set the parameters
  6. \param center \p vector Center of box
  7. \param orientation \p vector Orientation of box
  8. \param edgeLength \p vector EdgeLength of box
  9. \param primaryType \p vector Primary geometry to check
  10. \param secondaryType \p vector Secondary geometry to check (if no backup is needed, fill in the same as for primaryType)
  11. \param fullComponentInfo \p vector When true gives information about every component and proxy in box, when false just the first component found
  12. */
  13. proto native void SetParams(vector center, vector orientation, vector edgeLength, ObjIntersect primaryType, ObjIntersect secondaryType, bool fullComponentInfo);
  14. }
  15. //! ComponentInfo for BoxCollidingResult
  16. class ComponentInfo
  17. {
  18. int component; //!< Component index
  19. vector componentMin; //!< Component min in world space
  20. vector componentMax; //!< Component max in world space
  21. vector componentCenter; //!< Component center in world space
  22. float componentRadius; //!< Radius of bounding box
  23. }
  24. //! Result for an object found in CGame.IsBoxCollidingGeometryProxy
  25. class BoxCollidingResult
  26. {
  27. Object obj; //!< Object inside of box
  28. Object parent; //!< Parent of proxy object
  29. int hierLevel; //!< How deep in the proxy hierarchy are we
  30. int geomLevel; //!< What geometry was the object found in (will either be primaryType or secondaryType)
  31. ref ComponentInfoArray componentInfo; //!< Either the first component found or all of them depending on "fullComponentInfo"
  32. ref ProxyInfoArray proxyInfo; //!< Either the first proxy found or all of them depending on "fullComponentInfo"
  33. }
  34. typedef array<ref ComponentInfo> ComponentInfoArray;
  35. typedef array<ref BoxCollidingResult> ProxyInfoArray;