149 SetRadiusEvent(
"Physics.Particle.SetRadius");
153 agx::Physics::ParticleData& particle = *
static_cast<agx::Physics::ParticleData *
>(m_particle->getData());
157 agxFn::Physics::Particle::SetRadius(particle, index, radius);
159 m_radiusBuffer->commit(m_index);
160 m_massBuffer->commit(m_index);
161 m_invMassBuffer->commit(m_index);
162 m_materialBuffer->commit(m_index);
168 m_particle = this->getParameter<agxData:EntityStorage>(
"particle");
169 m_index = this->getParameter<agxData::Value>(
"index");
170 m_radius = this->getParameter<agxData::Value>(
"radius");
177 m_radiusBuffer = m_particle->getBuffer(
"radius");
178 m_massBuffer = m_particle->getBuffer(
"mass");
179 m_invMassBuffer = m_particle->getBuffer(
"invMass");
180 m_materialBuffer = m_particle->getBuffer(
"material");
199 AGX_FORCE_INLINE const Object *Stream::FunctionEvent::getParameter(
const Name& name)
const
201 ParameterTable::const_iterator it = m_parameters.find(name);
202 return it != m_parameters.end() ? it->second :
nullptr;
#define AGX_DECLARE_POINTER_TYPES(type)
An abstract attribute description, part of an Entity.
Abstract representation of a data buffer.
Data storage for a collection of entity instances of a specified EntityModel.
Generalized callback, using std::function.
An event with no arguments.
Inheritance with partial specialization due to bug with ref_ptr containers.
A model is an abstract representation of the class of an agx::Object.
Representation of a name string.
agx::Object is a refcounted object with a name.
Base class providing referencing counted objects.
const Object * getParameter(const Name &name) const
TODO: Common baseclass, agxData::Value -> agx::Scalar, agx::Buffer (agx::Buffer -> agx::Array<T> ?...
FunctionEvent(const agxNet::StructuredMessage *message)
FunctionEvent(agx::Model *kernelModel)
agx::EventModelRef m_model
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
HashTable< String, UnresolvedParameterRef > ParameterTable