esp::geo namespace

Classes

class CoordinateFrame
class OBB
struct Ray

Enums

enum class ColorSpace { RGBA, sRGBA, HSV, XYZ }
This enum describes the various colorspaces that colors in Habitat can occupy. This is currently governed by the supported color space conversions built into the Magnum Color types. This is provided for easy user access to these conversion mechansims.

Functions

void initGeoBindings(pybind11::module& m)
Specify bindings for esp::geo::OBB and esp::geo::Ray.
auto espLoggingSubsystem() -> logging::Subsystem
auto operator==(const CoordinateFrame& a, const CoordinateFrame& b) -> bool
auto operator!=(const CoordinateFrame& a, const CoordinateFrame& b) -> bool
auto operator<<(std::ostream& os, const CoordinateFrame& c) -> std::ostream&
auto convexHull2D(const std::vector<vec2f>& points) -> std::vector<vec2f>
auto getTransformedBB(const Magnum::Range3D& range, const Magnum::Matrix4& xform) -> Magnum::Range3D
Compute the axis-aligned bounding box which results from applying a transform to an existing bounding box.
auto getPointDistsAlongTrajectory(const std::vector<Mn::Vector3>& pts) -> std::vector<float>
Return a vector of L2/Euclidean distances of points along a trajectory. First point will always be 0, and last point will give length of trajectory.
auto interp2Points(const Mn::Vector3& a, float ta, const Mn::Vector3& b, float tb, float t) -> Mn::Vector3
Interpolate between two points to find a third at a specified t between them.
auto calcWeightedDistance(const Mn::Vector3& a, const Mn::Vector3& b, float alpha = .5f) -> float
Determine the weighted distance of point b from point a. Used to derive relative knot value for point b as a function of distance from point a for Catmull-Rom spline derivation.
auto buildCatmullRomTrajOfPoints(const std::vector<Mn::Vector3>& pts, int numInterp, float alpha = .5f) -> std::vector<Mn::Vector3>
Build a smooth trajectory of interpolated points from key points along a path using Catmull-Rom Spline of type determined by chosen alpha.
auto buildTrajectoryTubeSolid(const std::vector<Mn::Vector3>& pts, const std::vector<Mn::Color3>& interpColors, int numSegments, float radius, bool smooth, int numInterp, ColorSpace clrSpace = ColorSpace::HSV) -> Mn::Trade::MeshData
Build a mesh representing a tube of given radius around the trajectory given by the passed points. Will either build cylinders between each pair of points in pts, or between sequential points in a smoothed trajectory derived using centripetal Catmull-Rom spline between points in pts.
auto getColorAsString(const Magnum::Color3ub& color) -> std::string
Returns a nicely formatted hex string representation of color.
template<class T>
auto getValueAsUInt(T color) -> uint32_t
Return an unsigned int encoding of passed color value.
auto getValueAsUInt(const Mn::Color3ub& color) -> uint32_t
Return an unsigned int encoding of passed color for type Mn::Color3ub.
auto getValueAsUInt(const Mn::Color4ub& color) -> uint32_t
Return an unsigned int encoding of passed color for type Mn::Color4ub.
auto getValueAsUInt(int color) -> uint32_t
Return an unsigned int encoding of passed color for type int - provided to support vector of per-vertex IDs .
auto buildAdjList(int numVerts, const std::vector<uint32_t>& indexBuffer) -> std::vector<std::set<uint32_t>>
Build an adjacency list using the passed index buffer. Assumes each sequence of 3 indices describesd a poly.
template<class T>
void conditionalDFS(const std::vector<std::set<uint32_t>>& adjList, const std::vector<T>& clrVec, uint32_t vIDX, std::vector<bool>& visited, const T& clr, std::set<uint32_t>& setOfVerts)
Build a connected component recursively on an unconnected graph (i.e. mesh vertices), building from passed vIDX from adjecent verts that match the passed clr value, which can be any per-vertex identifier or tag.
template<class T>
auto findCCsByGivenColor(const std::vector<std::set<uint32_t>>& adjList, const std::vector<T>& clrVec) -> std::unordered_map<uint32_t, std::vector<std::set<uint32_t>>>
Find and return all connected components in a graph (represented by the adjList ), that match some specified per-vertex tag/"color".
template<typename T>
auto clamp(const T& n, const T& low, const T& high) -> T
auto operator<<(std::ostream& os, const OBB& obb) -> std::ostream&
auto computeGravityAlignedMOBB(const vec3f& gravity, const std::vector<vec3f>& points) -> OBB

Variables

static const vec3f ESP_UP
global/world up direction
static const vec3f ESP_GRAVITY
global/world gravity (down) direction
static const vec3f ESP_FRONT
global/world front direction
static const vec3f ESP_BACK
global/world back direction