Rhino C++ API  7.22
Public Member Functions | Public Attributes | Friends | List of all members
ON_ParticleSystem::ON_Force Class Reference

#include <opennurbs_plus_particle.h>

Public Member Functions

 ON_Force () ON_NOEXCEPT
 
 ON_Force (const ON_Force &src) ON_NOEXCEPT
 
 ~ON_Force () ON_NOEXCEPT
 
ON_Forceoperator= (const ON_Force &src) ON_NOEXCEPT
 

Public Attributes

struct {
   ON__UINT_PTR   m_ptr
 first parameter value for force_func() More...
 
   double   m_x [4]
 buffer for values to minimize need for heap managment More...
 
m_context
 
union {
   ON__UINT_PTR   m_func
 
   bool(*   m_nary_force_func )(ON__UINT_PTR, class
      ON_ParticleSystem::ON_Particle **)
 
   bool(*   m_unary_force_func )(ON__UINT_PTR, class
      ON_ParticleSystem::ON_Particle *)
 
m_force_func
 
const unsigned int m_force_id
 
unsigned int m_particle_capacity
 
unsigned int m_particle_count
 
class ON_ParticleSystem::ON_Particle ** m_particles
 

Friends

class ON_ParticleSystem
 

Constructor & Destructor Documentation

◆ ON_Force() [1/2]

ON_ParticleSystem::ON_Force::ON_Force ( )

◆ ~ON_Force()

ON_ParticleSystem::ON_Force::~ON_Force ( )

◆ ON_Force() [2/2]

ON_ParticleSystem::ON_Force::ON_Force ( const ON_Force src)

Remarks: The copy constructor copies the values of the m_mass, m_position m_velocity, m_force and m_context fields and sets m_force_id = 0.

Member Function Documentation

◆ operator=()

ON_Force& ON_ParticleSystem::ON_Force::operator= ( const ON_Force src)

Remarks: The operator= copies the values of the m_mass, m_position m_velocity m_force and m_context fields and leaves the value of the m_force_id unchanged.

Friends And Related Function Documentation

◆ ON_ParticleSystem

friend class ON_ParticleSystem
friend

Member Data Documentation

◆ m_context

struct { ... } ON_ParticleSystem::ON_Force::m_context

◆ m_force_func

union { ... } ON_ParticleSystem::ON_Force::m_force_func

◆ m_force_id

const unsigned int ON_ParticleSystem::ON_Force::m_force_id

◆ m_func

ON__UINT_PTR ON_ParticleSystem::ON_Force::m_func

◆ m_nary_force_func

bool(* ON_ParticleSystem::ON_Force::m_nary_force_func) (ON__UINT_PTR, class ON_ParticleSystem::ON_Particle **)

◆ m_particle_capacity

unsigned int ON_ParticleSystem::ON_Force::m_particle_capacity

◆ m_particle_count

unsigned int ON_ParticleSystem::ON_Force::m_particle_count

If m_particle_count is zero, then m_particles is null and
m_unary_force_func() points to a unary force evaluation function that acts on every particle in the system. If m_particle_count greater than zero, then m_particles[] is an array of pointers to n particles and m_nary_force_func() points to a N-ary force evaulation function that acts on those particles.

◆ m_particles

class ON_ParticleSystem::ON_Particle** ON_ParticleSystem::ON_Force::m_particles

◆ m_ptr

ON__UINT_PTR ON_ParticleSystem::ON_Force::m_ptr

first parameter value for force_func()

◆ m_unary_force_func

bool(* ON_ParticleSystem::ON_Force::m_unary_force_func) (ON__UINT_PTR, class ON_ParticleSystem::ON_Particle *)

◆ m_x

double ON_ParticleSystem::ON_Force::m_x[4]

buffer for values to minimize need for heap managment