{ m_PhysicsParmsVolatile.m_ElectricalRepulsion =
r; }
90{
returnm_PhysicsParmsVolatile.m_ElectricalRepulsion; }
93 void SetStep(
floats) { m_PhysicsParmsVolatile.m_Step = s; }
94 float GetStep()
const{
returnm_PhysicsParmsVolatile.m_Step; }
97 void SetDamping(
floatd) { m_PhysicsParmsVolatile.m_Damping = d; }
98 float GetDamping()
const{
returnm_PhysicsParmsVolatile.m_Damping; }
101 void SetEdgeK(
floatk) { m_PhysicsParmsVolatile.m_EdgeK = k; }
102 float GetEdgeK()
const{
returnm_PhysicsParmsVolatile.m_EdgeK; }
106{ m_PhysicsParmsVolatile.m_RepulsionDist = d; }
108{
returnm_PhysicsParmsVolatile.m_RepulsionDist; }
112{ m_PhysicsParmsVolatile.m_VelocityThresholdK = k; }
114{
returnm_PhysicsParmsVolatile.m_VelocityThresholdK; }
125 bool IsDone()
const{
returnm_IsDone; }
134 voidUpdateAndSynch();
141 Edge() : from_idx(-1), to_idx(-1),
len(0.0f), rest_len_inv(0.0f), k(1.0f) {}
143: from_idx(idx1), to_idx(idx2),
len(0.0f), rest_len_inv(0.0f), k(1.0f) {}
157, constrained(0.0f) {}
184 voidx_UpdateVoxels();
186 voidx_ApplyRepulsiveForcesHashed();
188 voidx_ApplyRepulsiveForces();
190 voidx_ApplyNeighborCellForces(std::vector<int>& cell_nodes,
float m_RepulsionDist2
Square of current effective repulsion distance.
void SetPhysicsParms(const PhysicsParms &p)
Get/Set all the current physics parms.
float GetRepulsionDist() const
float m_RepulsionInv_x_ElectricalRepulsion
Inverse of repulsion dist * electrical repulsion factor.
void SetStep(float s)
Get/Set timestep.
PhysicsParms m_PhysicsParmsSafe
Updated from m_PhysicsPamsVolatile when safe to do so.
float m_MaxVelocity
The maximum velocity is the maximum node velocity during the last call to UpdateAndSynch()
float m_edge_forces_t
For timer values.
void SetVelocityThresholdK(float k)
Get/Set scaling factor for velocity threshold below which system stops.
float m_bound_update_safe_t
PhysicsParms getPhysicParms()
PhysicsParms m_PhysicsParmsVolatile
(potentially) updated from other thread(s)
void SetElectricalRepulsion(float r)
Get/Set particle system parameters.
void SetDamping(float d)
Get/Set damping parameter.
int m_node_node_interactions_safe_t
std::vector< CVect2< int > > m_ValidateGrid
Only used for debugging.
float m_edge_forces_safe_t
bool m_IsDone
If true, system has slowed down to the point where continuing to update it is not necessary.
std::vector< Node > m_Nodes
Set of all nodes.
float GetVelocityThresholdK() const
float m_DefaultEdgeLen
Default length for all edges in system.
TVec & GetMinPos()
Tracks bounding rectangle for all nodes.
float m_AdaptiveStep
Multiplier for m_PhysicsParmsSafe.m_Step to allow step size to be adaptively lowered if system appear...
void SetEdgeK(float k)
Get/Set edge stiffness.
float m_node_forces_safe_t
float GetMaxVelocity() const
Get max velocity from last call to UpdateAndSynch.
TVec m_MinPos
Tracks bounding rectangle for all nodes.
float m_LogDistMax
For debug-drawing.
void SetRepulsionDist(float d)
Get/Set maximum effective repulsion distance.
std::vector< Edge > m_Edges
Set of all edges.
int m_node_node_interactions_t
float & GetDefaultEdgeLen()
Default length for all edges in system.
std::vector< Node > & GetNodes()
Set of all nodes.
std::vector< Edge > & GetEdges()
Set of all edges.
bool IsDone() const
Return true if velocity has dropped below a threshold that indicates the system is stable (and doesn'...
float GetElectricalRepulsion() const
float m_PrevMaxVelocity
Maximum velocity in previous update.
CSpatialHash2D< std::vector< int > > m_NodeGrid
Grid that keeps track of adjacent nodes.
CPhyloTree * m_Tree
Root node of tree.
std::vector< CVect2< int > > m_ValidateNsq
Tree subclass also has functions and data needed for rendering and selection.
class CSpatialHash2D Class for simple 2D spatial organization that allows for some collision checking...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIWIDGETS_PHYLO_TREE_EXPORT
Defines to provide correct exporting from DLLs in Windows.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
Data structure for an edge between two nodes.
Data structure for a node in the particle system.
CPhyloTree::TTreeIdx tree_node_idx
float m_VelocityThresholdK
factor to scale final velocity threshold
float m_ElectricalRepulsion
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4