Momentum Scripting v1
Loading...
Searching...
No Matches
CustomBuffer.h
1#pragma once
2/*
3Copyright 2007-2025. Algoryx Simulation AB.
4
5All AGX source code, intellectual property, documentation, sample code,
6tutorials, scene files and technical white papers, are copyrighted, proprietary
7and confidential material of Algoryx Simulation AB. You may not download, read,
8store, distribute, publish, copy or otherwise disseminate, use or expose this
9material without having a written signed agreement with Algoryx Simulation AB.
10
11Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
12from using this software, unless otherwise stated in written agreements with
13Algoryx Simulation AB.
14*/
15
16
17#ifndef MOMENTUM_CUSTOMBUFFER_H
18#define MOMENTUM_CUSTOMBUFFER_H
19
20#include "momentum_export.h"
21#include "momentum_namespace.h"
22
23#include <map>
24#include <string>
25#include "RigidBody.h"
26#include <agxSDK/CustomBuffer.h>
27
28namespace MOMENTUM_NAMESPACE
29{
33 class MOMENTUM_EXPORT CustomBuffer
34 {
35 public:
36#ifndef SWIG
38
43
45 explicit CustomBuffer(agxSDK::CustomBuffer* cb);
47#endif
48
49#ifndef AGX_MOMENTUM_ANALYSIS_API
55 void setCustomBufferValueReal(RigidBody rb, double value);
56
62 void setCustomBufferValueString(RigidBody rb, std::string value);
63
70
77#endif
84
91
98
105
106 protected:
107 agxSDK::CustomBufferRef m_customBuffer;
108 };
109
110 V1_DECLARE_CONTAINER_TYPE(CustomBuffer);
111
112} // namespace momentum
113
114#endif
Custom Buffer class where values of different types can be stored for rigid bodies.
Definition: CustomBuffer.h:34
void setCustomBufferValueReal(RigidBody rb, double value)
Set a value of type float for a rigid body.
Vec3 getCustomBufferValueVec3(RigidBody rb)
Return the vec3 value that is stored for the rigid body.
void setCustomBufferValueString(RigidBody rb, std::string value)
Set a value of type string for a rigid body.
std::string getCustomBufferValueString(RigidBody rb)
Return the string value that is stored for the rigid body.
void setCustomBufferValueVec3(RigidBody rb, Vec3 value)
Set a value of type vec3 for a rigid body.
agxSDK::CustomBufferRef m_customBuffer
Definition: CustomBuffer.h:107
double getCustomBufferValueReal(RigidBody rb)
Return the real value that is stored for the rigid body.
Vec4 getCustomBufferValueVec4(RigidBody rb)
Return the vec4 value that is stored for the rigid body.
void setCustomBufferValueVec4(RigidBody rb, Vec4 value)
Set a value of type vec4 for a rigid body.
A rigid body is a moving (translation/rotation) object with a mass and a inertia.
Definition: RigidBody.h:52
A 3 dimensional vector which can be used to define a point or a vector and contains basic arithmetic.
Definition: Vec3.h:40
A 4 dimensional vector and contains basic arithmetic.
Definition: Vec4.h:33
Namespace for Momentum Scripting API.
Definition: AffineMatrix4x4.h:29