21 #ifndef GENERATED_AGX_PHYSICS_SOLVEPARTICLE_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_SOLVEPARTICLE_H_PLUGIN
24 #define AGX_ENTITY_WRAPPER 1
28 # pragma warning(push)
30 # pragma warning( disable : 4505 )
32 # pragma warning( disable : 4251 )
34 # pragma warning( disable : 4355 )
36 # pragma warning( disable: 4714 )
57 class SolveParticleModel;
58 class SolveParticleData;
59 class SolveParticlePtr;
60 class SolveParticleInstance;
61 class SolveParticleSemantics;
86 virtual void shutdownCleanup()
override;
102 virtual void configure(agx::TiXmlElement* eEntity)
override;
103 virtual void initAttributeAccessors()
override;
110 #ifndef AGX_PHYSICS_SOLVEPARTICLE_DATA_SET_OVERRIDE
111 #define AGX_PHYSICS_SOLVEPARTICLE_DATA_SET
115 SolveParticleInstance operator[] (
size_t index);
141 virtual ~SolveParticleData() {}
142 virtual void setNumElements(
agx::Index numElements)
override;
145 SolveParticleData& operator= (
const SolveParticleData&) {
return *
this; }
169 void setPosition(
agx::Vec3 const& value);
170 void setVelocity(
agx::Vec3 const& value);
179 friend class SolveParticlePtr;
180 friend class SolveParticleInstance;
181 SolveParticleSemantics();
209 SolveParticleData* getData();
210 const SolveParticleData* getData()
const;
250 #ifdef AGX_GENERATED_TOLUA_WRAPPER
251 inline agx::Vec3 const& getPosition()
const {
return (*this)->getPosition(); }
252 inline agx::Vec3 const& getVelocity()
const {
return (*this)->getVelocity(); }
253 inline agx::Vec3 const& getForce()
const {
return (*this)->getForce(); }
254 inline agx::Real const& getDensity()
const {
return (*this)->getDensity(); }
255 inline agx::UInt32 const& getSourceIndex()
const {
return (*this)->getSourceIndex(); }
256 inline agx::UInt32 const& getSolveIndex()
const {
return (*this)->getSolveIndex(); }
260 inline void setPosition(
agx::Vec3 const& value) { (*this)->setPosition(value); }
261 inline void setVelocity(
agx::Vec3 const& value) { (*this)->setVelocity(value); }
262 inline void setForce(
agx::Vec3 const& value) { (*this)->setForce(value); }
263 inline void setDensity(
agx::Real const& value) { (*this)->setDensity(value); }
264 inline void setSourceIndex(
agx::UInt32 const& value) { (*this)->setSourceIndex(value); }
265 inline void setSolveIndex(
agx::UInt32 const& value) { (*this)->setSolveIndex(value); }
277 SolveParticleInstance();
278 SolveParticleInstance(SolveParticleData* data,
agx::Index index);
283 SolveParticleData* getData();
284 const SolveParticleData* getData()
const;
336 inline SolveParticleInstance
agx::Physics::SolveParticleData::operator[] (
size_t index) {
return SolveParticleInstance(
this, (
agx::Index)index); }
343 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
350 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
358 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
367 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
374 AGX_FORCE_INLINE SolveParticleSemantics* SolveParticlePtr::operator->() {
return (SolveParticleSemantics* )
this; }
375 AGX_FORCE_INLINE const SolveParticleSemantics* SolveParticlePtr::operator->()
const {
return (
const SolveParticleSemantics* )
this; }
379 AGX_FORCE_INLINE agx::Vec3& SolveParticlePtr::position() { verifyIndex();
return getData()->position[calculateIndex()]; }
380 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::position()
const { verifyIndex();
return getData()->position[calculateIndex()]; }
382 AGX_FORCE_INLINE agx::Vec3& SolveParticlePtr::velocity() { verifyIndex();
return getData()->velocity[calculateIndex()]; }
383 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::velocity()
const { verifyIndex();
return getData()->velocity[calculateIndex()]; }
386 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::force()
const { verifyIndex();
return getData()->force[calculateIndex()]; }
389 AGX_FORCE_INLINE agx::Real const& SolveParticlePtr::density()
const { verifyIndex();
return getData()->density[calculateIndex()]; }
392 AGX_FORCE_INLINE agx::UInt32 const& SolveParticlePtr::sourceIndex()
const { verifyIndex();
return getData()->sourceIndex[calculateIndex()]; }
395 AGX_FORCE_INLINE agx::UInt32 const& SolveParticlePtr::solveIndex()
const { verifyIndex();
return getData()->solveIndex[calculateIndex()]; }
407 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
414 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
423 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::position()
const { verifyIndex();
return getData()->position[getIndex()]; }
426 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
429 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::force()
const { verifyIndex();
return getData()->force[getIndex()]; }
432 AGX_FORCE_INLINE agx::Real const& SolveParticleInstance::density()
const { verifyIndex();
return getData()->density[getIndex()]; }
435 AGX_FORCE_INLINE agx::UInt32 const& SolveParticleInstance::sourceIndex()
const { verifyIndex();
return getData()->sourceIndex[getIndex()]; }
438 AGX_FORCE_INLINE agx::UInt32 const& SolveParticleInstance::solveIndex()
const { verifyIndex();
return getData()->solveIndex[getIndex()]; }
454 # pragma warning(pop)
457 #undef AGX_ENTITY_WRAPPER
458 #undef AGX_ENTITY_NAMESPACE