|
Oolite 1.91.0.7712-251017-85ce217
|
#include "OOFunctionAttributes.h"#include <tgmath.h>#include <stdbool.h>#include <stdlib.h>#include <stdint.h>#include <limits.h>#include <assert.h>#include "OOOpenGL.h"#include "OOFastArithmetic.h"#include "OOVector.h"#include "OOHPVector.h"#include "OOQuaternion.h"#include "OOMatrix.h"#include "OOVoxel.h"#include "OOTriangle.h"#include "OOBoundingBox.h"#include "legacy_random.h"Go to the source code of this file.
Macros | |
| #define | OOMATHS_STANDALONE 0 |
| #define | OOMATHS_OPENGL_INTEGRATION !OOMATHS_STANDALONE |
| #define | M_PI 3.14159265358979323846 /* pi */ |
| #define | M_PI_2 1.57079632679489661923 /* pi/2 */ |
| #define | M_PI_4 0.78539816339744830962 /* pi/4 */ |
| #define | M_1_PI 0.31830988618379067154 /* 1/pi */ |
| #define | M_2_PI 0.63661977236758134308 /* 2/pi */ |
| #define | M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ |
| #define | M_SQRT2 1.41421356237309504880 /* sqrt(2) */ |
| #define | M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ |
| #define | MIN(A, B) |
| #define | MAX(A, B) |
| #define | ABS(A) |
Typedefs | |
| typedef GLfloat | OOScalar |
| typedef double | OOHPScalar |
| #define ABS | ( | A | ) |
Definition at line 117 of file OOMaths.h.
Referenced by Universe::findSystemNumberAtCoords:withGalaxy:includingHidden:.
| #define M_PI 3.14159265358979323846 /* pi */ |
Definition at line 73 of file OOMaths.h.
Referenced by DockEntity(OOPrivate)::addShipToShipsOnApproach:, OOSunEntity(Private)::calculateGLArrays:width:zDistance:, HeadUpDisplay::DrawSpecialOval, WormholeEntity::DrawWormholeCorona, Universe::firstEntityTargetedByPlayer, Universe::firstShipHitByLaserFromShip:inDirection:offset:gettingRangeFound:, MyOpenGLView::fov:, GLDrawBallBillboard(), HeadUpDisplay::GLDrawNonlinearCascadeWeapon, GLDrawOvalPoints(), HeadUpDisplay::hudRotateViewpointForVirtualDepth, OORingEffectEntity::initialize, OOLaserShotEntity::initLaserFromShip:direction:offset:, OOBreakPatternEntity::initWithPolygonSides:startAngle:aspectRatio:, WormholeEntity::initWormholeTo:fromShip:, DockEntity::launchShip:, OOOpenGLMatrixManager::perspectiveFovy:aspect:zNear:zFar:, MyOpenGLView::setFov:fromFraction:, ShipEntity::setPitch:, ShipEntity::setRoll:, OOSkyDrawable(OOPrivate)::setUpNebulaeWithColor1:color2:clusterFactor:nebulaHueFix:alpha:scale:, ShipEntity::setYaw:, StationSetProperty(), WormholeEntity::suckInShip:, OOFlasherEntity::update:, ShipEntity::update:, Universe::update:, and WormholeEntity::update:.
| #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ |
| #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ |
Definition at line 91 of file OOMaths.h.
Referenced by OOLightParticleEntity::initWithDiameter:.
| #define MAX | ( | A, | |
| B ) |
Definition at line 114 of file OOMaths.h.
Referenced by DockEntity(OOPrivate)::addShipToShipsOnApproach:, AddTriangle_slow(), RBSplitSubview::changeDimensionBy:mayCollapse:move:, ComponentsFromVersionString(), PlayerEntity::doBookkeeping:, PlayerEntity(OOPrivate)::fuelRequiredForJump, GrowCallbackList(), GrowTessPolygonData(), OOBreakPatternEntity::initWithPolygonSides:startAngle:aspectRatio:, OoliteSetProperty(), PlayerSetProperty(), RBSplitSubview(RB___SubviewAdditions)::RB___visibleDimension, OOOpenGLExtensionManager::reset, RBSplitSubview::setMinDimension:andMaxDimension:, OOOctreeBuilder::SetNode_slow, OOCache::setPruneThreshold:, OOTextureLoader::setUp, ShipRestoreSubEntities(), and Universe::shipsForSaleForSystem:withTL:atTime:.
| #define MIN | ( | A, | |
| B ) |
Definition at line 111 of file OOMaths.h.
Referenced by OOTextureLoader(OOPrivate)::applySettings, ShipEntity(Private)::coordinatesForEscortPosition:, OOMesh(Private)::debugDrawNormals, DescribeValue(), PlayerEntity::doBookkeeping:, DockIsQueued(), GuiDisplayGen(Internal)::drawGLDisplay:x:y:z:, EquipmentInfoStaticInfoForKey(), FontMeasureString(), OOTextureLoader(OOPrivate)::getDesiredWidth:andHeight:, GlobalAddFrameCallback(), GlobalAutoAIForRole(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalKeyBindingDescription(), GlobalRemoveFrameCallback(), OOTextureLoader::initWithPath:options:, OOBreakPatternEntity::initWithPolygonSides:startAngle:aspectRatio:, ManifestComment(), ManifestSetComment(), ManifestSetShortComment(), ManifestShortComment(), MissionMarkSystem(), MissionRunScreen(), MissionUnmarkSystem(), PlayerEntity::penaltyForUnauthorizedDocking, PlayerAddMessageToArrivalReport(), PlayerReplaceShip(), PlayerSetPlayerRole(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipCancelDockingRequest(), PlayerShipEngageAutopilotToStation(), PlayerShipHideHUDSelector(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRequestDockingClearance(), PlayerShipSetCustomHUDDial(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionText(), PlayerShipSetPrimedEquipment(), PlayerShipShowHUDSelector(), PlayerShipUseSpecialCargo(), RBSplitSubview(RB___SubviewAdditions)::RB___stepAnimation, OOALSoundVorbisCodec::readCreatingBuffer:withFrameCount:, ScaleToMatch(), ShipEntity::setPendingEscortCount:, OOBasicMaterial::setShininess:, ShipEntity::setUpShipFromDictionary:, ShipAddCargoEntity(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCommsMessage(), ShipDumpCargo(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEquipmentStatus(), ShipExitSystem(), ShipGroupAddShip(), ShipGroupContainsShip(), ShipGroupRemoveShip(), ShipHasEquipmentProviding(), ShipHasRole(), ShipReactToAIMessage(), ShipRemoveEquipment(), ShipSendAIMessage(), ShipSetAI(), ShipSetCrew(), ShipSetScript(), Universe::shipsForSaleForSystem:withTL:atTime:, ShipSpawn(), ShipStaticKeysForRole(), ShipStaticRoleIsInCategory(), ShipStaticSetShipDataForKey(), ShipStaticShipDataForKey(), ShipSwitchAI(), SoundStaticLoad(), SoundStaticPlayMusic(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationCanDockShip(), StationLaunchShipWithRole(), StationRemoveShipFromShipyard(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketQuantity(), SystemAddMoon(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemInfoDistanceToSystem(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), SystemLegacySpawnShip(), SystemSetPopulator(), SystemSetWaypoint(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemStaticSystemIDForName(), SystemStaticSystemNameForID(), VectorFromCoordinateSystem(), and VectorToCoordinateSystem().
| #define OOMATHS_OPENGL_INTEGRATION !OOMATHS_STANDALONE |
| typedef double OOHPScalar |