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

#include <opennurbs_plus_particle.h>

Public Member Functions

 ON_Particle () ON_NOEXCEPT
 
 ON_Particle (const ON_Particle &src) ON_NOEXCEPT
 
double DistanceMoved () const
 
bool IsFixed () const
 
ON_Particleoperator= (const ON_Particle &src) ON_NOEXCEPT
 

Public Attributes

ON__UINT_PTR m_context
 each application can use m_context as it sees fit. More...
 
ON_ParticleState m_current_state
 current mass, position, and whatever else this system cares about More...
 
const unsigned int m_particle_id
 
ON_ParticleState m_previous_state
 previous mass, position, and whatever else this system cares about More...
 

Friends

class ON_ParticleSystem
 

Constructor & Destructor Documentation

◆ ON_Particle() [1/2]

ON_ParticleSystem::ON_Particle::ON_Particle ( )

The default constructor does not initialize the values of the m_mass, m_position m_velocity and m_force.
It sets m_particle_id = 0 and m_context = 0;

◆ ON_Particle() [2/2]

ON_ParticleSystem::ON_Particle::ON_Particle ( const ON_Particle src)

Remarks: The copy constructor copies the values of every field including m_context and m_particle_id.

Member Function Documentation

◆ DistanceMoved()

double ON_ParticleSystem::ON_Particle::DistanceMoved ( ) const

Returns: The distance from the previous position to the current position. If either the previous or current positions are unset, then ON_UNSET_VALUE is returned.

◆ IsFixed()

bool ON_ParticleSystem::ON_Particle::IsFixed ( ) const

◆ operator=()

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

Remarks: The operator= copies the values of every field except m_particle_id, which is left unchanged.

Friends And Related Function Documentation

◆ ON_ParticleSystem

friend class ON_ParticleSystem
friend

Member Data Documentation

◆ m_context

ON__UINT_PTR ON_ParticleSystem::ON_Particle::m_context

each application can use m_context as it sees fit.

◆ m_current_state

ON_ParticleState ON_ParticleSystem::ON_Particle::m_current_state

current mass, position, and whatever else this system cares about

◆ m_particle_id

const unsigned int ON_ParticleSystem::ON_Particle::m_particle_id

0 != (0x80000000 & m_particle_id) indicates the particle will not be moved by ON_ParticleSystem::IncrementTime().

◆ m_previous_state

ON_ParticleState ON_ParticleSystem::ON_Particle::m_previous_state

previous mass, position, and whatever else this system cares about