AGX Dynamics 2.42.2.1
Loading...
Searching...
No Matches
RaytraceEntityId.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16#pragma once
17#include <agxSensor/export.h>
18
19#include <agx/HashFunction.h>
20
21namespace agxSensor
22{
30 enum class RtEntityId : int32_t {};
31
35 using RtEntityIdIndex = std::underlying_type_t<RtEntityId>;
36
42
47 constexpr RtEntityId MaxRtEntityId{ (RtEntityId)( ( 1 << 28 ) - 1 ) };
48
53
59 {
60 return (RtEntityIdIndex)entityId;
61 }
62}
63
64namespace agx
65{
66 template<>
67 struct HashFn<agxSensor::RtEntityId>
68 {
70 {
71 return hash( agxSensor::indexOf( id ) );
72 }
73 };
74}
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
constexpr RtEntityId NullRtEntityId
Null entity id.
RtEntityId
Entity id > 0 to access user data given raytrace results including ENTITY_ID_I32.
constexpr RtEntityId MaxRtEntityId
The maximum entity id.
RtEntityIdIndex indexOf(RtEntityId entityId)
constexpr RtEntityIdIndex MaxRtEntityIdIndex
Index of the maximum entity id.
std::underlying_type_t< RtEntityId > RtEntityIdIndex
Index type of entity ids.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
UInt32 hash(const T &key)
Definition: HashFunction.h:165
agxSensor::RtEntityIdIndex operator()(agxSensor::RtEntityId id) const