Physics-Simulator  v1.4.0-beta.2
global.h File Reference

This file holds all of the references to variables declared in the Global namespace. See Main.cpp for more details. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 cannonballs
 
 global
 
 global::physics
 
 global::equations
 

Typedefs

typedef unsigned char uchar
 
typedef unsigned int uint
 
typedef unsigned long ulong
 

Enumerations

enum  Collisions { CollideElastic = 0, CollideInelastic, CollidePerfectInelastic, CollideNone }
 
enum  Tools {
  ToolRope = 0, ToolFire, ToolDrop, ToolDele,
  ToolDrag, ToolInfo
}
 

Variables

const bool global::blnDebugMode = false
 
clsConfig global::config
 
const float global::physics::kMeterPixelRatio = 10
 
const float global::physics::kBallDensity = 7850
 
const float global::physics::kGravity = -9.81
 
const float global::physics::kDragCofficient = 0.47
 
const float global::physics::kKineticFriction = 0.36
 
const float global::physics::kDensityAir = 1.2041
 
const float global::physics::kMinVelocity = 0.0
 
const float global::physics::kCoefficientRestitution = 0.76
 
uchar global::physics::collisionmethod = CollideInelastic
 
const double global::physics::kAirDynViscosity = 2.22043 * pow(10,-5)
 
const float global::equations::kVelocityScalar = 0.1
 
const float global::equations::kTimeSizeRatio = 0.025
 
const float global::equations::kMassAlphaRatio = 41.166
 
const float global::equations::kMassAlphaOffset = 130.84
 
const float global::equations::kAlphaMinimum = 50
 

Detailed Description

This file holds all of the references to variables declared in the Global namespace. See Main.cpp for more details.

Typedef Documentation

◆ uchar

typedef unsigned char uchar

Rename unsigned char to uchar because I'm lazy.

◆ uint

typedef unsigned int uint

Rename unsigned int to uint because I'm lazy.

◆ ulong

typedef unsigned long ulong

Rename unsigned long to ulong because I'm lazy.

Enumeration Type Documentation

◆ Collisions

enum Collisions

The method of the collision (I just wanted to play around with some options.)

Enumerator
CollideElastic 

This is normal collision in a perfect world without friction, they hit and bounce off, no energy is lost.

CollideInelastic 

This is the normal way things collide, Balls collide and bounce off of each other losing some energy.

CollidePerfectInelastic 

In this method the balls collide and then stick together.

CollideNone 

No collisions, balls pass through each other.

◆ Tools

enum Tools

The current tool being used in the toolbox.

Enumerator
ToolRope 

Tool to add a rope between balls, or pin ball to wall.

ToolFire 

The basic firing tool.

ToolDrop 

Drops a ball without velocity.

ToolDele 

Tool to delete selected ball.

ToolDrag 

Tool that allows ball to be dragged around.

ToolInfo 

Tool that writes information about the selected ball to screen