Skip to content

Commit 1936fe5

Browse files
committed
add ovphysx 0.3.7 docs
1 parent cfd4e09 commit 1936fe5

86 files changed

Lines changed: 29244 additions & 9 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ovphysx/0.3.7/SECURITY.html

Lines changed: 706 additions & 0 deletions
Large diffs are not rendered by default.

ovphysx/0.3.7/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.3.7

ovphysx/0.3.7/_downloads/27d649e8afcaadd358fbe2108bab57a9/ovphysx_types.h

Lines changed: 1095 additions & 0 deletions
Large diffs are not rendered by default.

ovphysx/0.3.7/_downloads/53623c05c8267ee3595bfc8a77edfedd/PhysX.hpp

Lines changed: 397 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
// SPDX-License-Identifier: BSD-3-Clause
3+
//
4+
5+
#ifndef OVPHYSX_EXPERIMENTAL_HELPERS_HPP
6+
#define OVPHYSX_EXPERIMENTAL_HELPERS_HPP
7+
8+
//
9+
// C++17 Helper utilities for ovphysx C API
10+
// Provides RAII wrappers and convenience functions for complex operations
11+
//
12+
13+
#include <string>
14+
#include <vector>
15+
#include <cstring>
16+
17+
#include "ovphysx/ovphysx.h"
18+
19+
namespace ovphysx {
20+
namespace physx {
21+
22+
/**
23+
* @brief RAII wrapper for ovphysx_op_wait_result_t
24+
*
25+
* Automatically calls ovphysx_destroy_wait_result when destroyed.
26+
* Use get() to pass to ovphysx_wait_op.
27+
*
28+
* Example:
29+
* WaitResult wait;
30+
* ovphysx_result_t r = ovphysx_wait_op(handle, op_index, timeout, wait.get());
31+
*
32+
* if (wait.hasErrors()) {
33+
* for (size_t i = 0; i < wait.errorCount(); ++i) {
34+
* ovphysx_string_t err = ovphysx_get_last_op_error(wait.errorOpIndexAt(i));
35+
* std::cerr << "Op " << wait.errorOpIndexAt(i) << " failed: "
36+
* << std::string(err.ptr, err.length) << std::endl;
37+
* }
38+
* }
39+
* // wait result freed automatically when wait goes out of scope
40+
*/
41+
class WaitResult {
42+
public:
43+
WaitResult() : m_result{} {}
44+
45+
~WaitResult() {
46+
release();
47+
}
48+
49+
WaitResult(WaitResult&& other) noexcept : m_result(other.m_result) {
50+
other.m_result = ovphysx_op_wait_result_t{};
51+
}
52+
53+
WaitResult& operator=(WaitResult&& other) noexcept {
54+
if (this != &other) {
55+
release();
56+
m_result = other.m_result;
57+
other.m_result = ovphysx_op_wait_result_t{};
58+
}
59+
return *this;
60+
}
61+
62+
// Non-copyable
63+
WaitResult(const WaitResult&) = delete;
64+
WaitResult& operator=(const WaitResult&) = delete;
65+
66+
/// Get pointer to underlying result (pass to ovphysx_wait_op)
67+
ovphysx_op_wait_result_t* get() { return &m_result; }
68+
const ovphysx_op_wait_result_t* get() const { return &m_result; }
69+
70+
/// Check if there were any errors
71+
bool hasErrors() const { return m_result.num_errors > 0; }
72+
73+
/// Number of errors
74+
size_t errorCount() const { return m_result.num_errors; }
75+
76+
/// Get lowest pending operation index (0 if all complete)
77+
ovphysx_op_index_t lowestPendingOpIndex() const { return m_result.lowest_pending_op_index; }
78+
79+
/// Get the failed operation index at position i
80+
ovphysx_op_index_t errorOpIndexAt(size_t i) const {
81+
if (m_result.error_op_indices && i < m_result.num_errors) {
82+
return m_result.error_op_indices[i];
83+
}
84+
return 0;
85+
}
86+
87+
private:
88+
void release() {
89+
ovphysx_destroy_wait_result(&m_result);
90+
m_result = ovphysx_op_wait_result_t{};
91+
}
92+
93+
ovphysx_op_wait_result_t m_result;
94+
};
95+
96+
} // namespace physx
97+
} // namespace ovphysx
98+
99+
#endif // OVPHYSX_EXPERIMENTAL_HELPERS_HPP

0 commit comments

Comments
 (0)