Momentum Scripting v1
Loading...
Searching...
No Matches
MOMENTUM_NAMESPACE::CustomBuffer Class Reference

#include <CustomBuffer.h>

Public Member Functions

double getCustomBufferValueReal (RigidBody rb)
 
std::string getCustomBufferValueString (RigidBody rb)
 
Vec3 getCustomBufferValueVec3 (RigidBody rb)
 
Vec4 getCustomBufferValueVec4 (RigidBody rb)
 
void setCustomBufferValueReal (RigidBody rb, double value)
 
void setCustomBufferValueString (RigidBody rb, std::string value)
 
void setCustomBufferValueVec3 (RigidBody rb, Vec3 value)
 
void setCustomBufferValueVec4 (RigidBody rb, Vec4 value)
 

Protected Attributes

agxSDK::CustomBufferRef m_customBuffer
 

Detailed Description

Custom Buffer class where values of different types can be stored for rigid bodies.

Member Function Documentation

◆ getCustomBufferValueReal()

double MOMENTUM_NAMESPACE::CustomBuffer::getCustomBufferValueReal ( RigidBody  rb)

Return the real value that is stored for the rigid body.

Parameters
rbthe rigid body
Returns
the real value that is stored in for the rigid body, or -1 if no value is stored or fail to retrieve the stored value.

◆ getCustomBufferValueString()

std::string MOMENTUM_NAMESPACE::CustomBuffer::getCustomBufferValueString ( RigidBody  rb)

Return the string value that is stored for the rigid body.

Parameters
rbthe rigid body
Returns
the string value that is stored in for the rigid body, or emptry string ("") if no value is stored or fail to retrieve the stored value.

◆ getCustomBufferValueVec3()

Vec3 MOMENTUM_NAMESPACE::CustomBuffer::getCustomBufferValueVec3 ( RigidBody  rb)

Return the vec3 value that is stored for the rigid body.

Parameters
rbthe rigid body
Returns
the vec3 value that is stored in for the rigid body, or (0,0,0) if no value is stored or fail to retrieve the stored value.

◆ getCustomBufferValueVec4()

Vec4 MOMENTUM_NAMESPACE::CustomBuffer::getCustomBufferValueVec4 ( RigidBody  rb)

Return the vec4 value that is stored for the rigid body.

Parameters
rbthe rigid body
Returns
the vec4 value that is stored in for the rigid body, or (0,0,0,0) if no value is stored or fail to retrieve the stored value.

◆ setCustomBufferValueReal()

void MOMENTUM_NAMESPACE::CustomBuffer::setCustomBufferValueReal ( RigidBody  rb,
double  value 
)

Set a value of type float for a rigid body.

Parameters
rbthe rigid body
valuethe real value to store for the rigid body

◆ setCustomBufferValueString()

void MOMENTUM_NAMESPACE::CustomBuffer::setCustomBufferValueString ( RigidBody  rb,
std::string  value 
)

Set a value of type string for a rigid body.

Parameters
rbthe rigid body
valuethe string value to store for the rigid body

◆ setCustomBufferValueVec3()

void MOMENTUM_NAMESPACE::CustomBuffer::setCustomBufferValueVec3 ( RigidBody  rb,
Vec3  value 
)

Set a value of type vec3 for a rigid body.

Parameters
rbthe rigid body
valuethe vec3 value to store for the rigid body

◆ setCustomBufferValueVec4()

void MOMENTUM_NAMESPACE::CustomBuffer::setCustomBufferValueVec4 ( RigidBody  rb,
Vec4  value 
)

Set a value of type vec4 for a rigid body.

Parameters
rbthe rigid body
valuethe vec4 value to store for the rigid body

Member Data Documentation

◆ m_customBuffer

agxSDK::CustomBufferRef MOMENTUM_NAMESPACE::CustomBuffer::m_customBuffer
protected