Support Forum G3D Web Page |
Namespaces | |
_BSPMAP | |
_internal | |
chrono | |
Discovery | |
units | |
Use using namespace G3D::units; to include all units into your program. | |
Classes | |
class | _GuiSliderBase |
class | AABox |
An axis-aligned box. More... | |
class | Access |
Access specifier for a buffer of data. More... | |
class | ActiveEvent |
Application visibility event structure. More... | |
class | AlignedMemoryManager |
Allocates memory on 16-byte boundaries. More... | |
class | AlphaFilter |
How the alpha value should be interpreted for partial coverage. More... | |
class | AmbientOcclusion |
Screen-space ambient obscurance. More... | |
class | AmbientOcclusionSettings |
For use with AmbientOcclusion. More... | |
class | Any |
Easy loading and saving of human-readable configuration files. More... | |
class | AnyTableReader |
Convenient iteration over the keys of a Any::TABLE, usually for implementing construction of an object from an Any. More... | |
class | AreaMemoryManager |
Allocates memory in large blocks and then frees it as an area. More... | |
class | Args |
Arguments to use when running a Shader. More... | |
class | Array |
Dynamic 1D array tuned for performance. More... | |
class | ArrowShape |
class | ArticulatedModel |
A 3D object composed of multiple rigid triangle meshes connected by joints. More... | |
class | ArticulatedModelSpecificationEditorDialog |
class | AttributeArray |
A block of GPU memory storing a stream of vector data (e.g., vertices, normals, texture coordinates) More... | |
class | AudioChannel |
A playing Sound. More... | |
class | AudioDevice |
Initializes the audio system. More... | |
class | AxesShape |
class | BilateralFilter |
(Separated) 2D Bilateral Filter. More... | |
class | BilateralFilterSettings |
class | BinaryInput |
Sequential or random access byte-order independent binary file access. More... | |
class | BinaryOutput |
Sequential or random access byte-order independent binary file access. More... | |
class | BindlessTextureHandle |
A wrapper for bindless texture handles, as introduced by https://www.opengl.org/registry/specs/ARB/bindless_texture.txt Only use this class if your OpenGL context supports ARB_bindless_texture. More... | |
class | BlockPoolMemoryManager |
A MemoryManager that allocates fixed-size objects and maintains a freelist that never shrinks. More... | |
class | Box |
An arbitrary (oriented) 3D box, useful as a bounding box. More... | |
class | Box2D |
2D oriented box More... | |
class | BoxShape |
class | BufferTexture |
A 1D array stored on the GPU, backed by a buffer object. More... | |
class | BufferUnmapper |
"Frees" mapped memory by unmapping it. More... | |
class | BumpMap |
Normal + bump map for use with G3D::UniversalMaterial. More... | |
class | CallbackWidget |
A widget that takes std::functions for its event handlers, avoiding the need to subclass Widget for basic "heartbeat" functions. More... | |
class | Camera |
Abstraction of a lens or pinhole camera. More... | |
class | CameraControlWindow |
Gui used by DeveloperWindow default for recording camera position and making splines. More... | |
class | Capsule |
A shape formed by extruding a sphere along a line segment. More... | |
class | CapsuleShape |
class | CharInputEvent |
An event triggered by character input (as from the keyboard) More... | |
class | CollisionDetection |
Collision detection primitives and tools for building higher order collision detection schemes. More... | |
class | Color1 |
Monochrome color. More... | |
class | Color1unorm8 |
Represents a single-channel color on [0, 1] with G3D::unorm8 precision. More... | |
class | Color2unorm8 |
Matches OpenGL GL_RG8 format. More... | |
class | Color3 |
Do not subclass– this implementation makes assumptions about the memory layout. More... | |
class | Color3unorm8 |
Represents a Color3 as a packed integer. More... | |
class | Color4 |
Do not subclass– this implementation makes assumptions about the memory layout. More... | |
class | Color4unorm8 |
Represents a Color4 as a packed integer. More... | |
class | CompassDelta |
Oriented angle measure on a compass; the difference of two CompassDirections. More... | |
class | CompassDirection |
Azimuth measured in degrees from 0 = North = -z, increasing clockwise in the ZX plane. More... | |
class | Component |
Common code for G3D::Component1, G3D::Component3, and G3D::Component4. More... | |
class | Conduit |
class | Cone |
An infinite cone. More... | |
class | ContinuousStopwatch |
Provides accurate measurement of sequences of durations. More... | |
class | ControlPointEditor |
class | ConvexPolygon |
class | ConvexPolygon2D |
class | ConvexPolyhedron |
class | CoordinateFrame |
A rigid body RT (rotation-translation) transformation. More... | |
class | CPUPixelTransferBuffer |
A PixelTransferBuffer in main memory. More... | |
class | CPUVertexArray |
Array of vertices with interlaced position, normal, texCoord, and tangent attributes. More... | |
class | CRTMemoryManager |
A MemoryManager implemented using the C runtime. More... | |
class | Crypto |
Cryptography and hashing helper functions. More... | |
class | CubeFace |
class | CubeMap |
A CPU seamless cube map. More... | |
class | CubeMapConvention |
Image alignment conventions specified by different APIs. More... | |
class | CullFace |
class | Cylinder |
Right cylinder More... | |
class | CylinderShape |
class | DDGIVolume |
A volume of space within which irradiance queries at arbitrary points are supported using a grid of DDGI probes. More... | |
class | DDGIVolumeSpecification |
A volume of space within which irradiance querries at arbitrary points are supported using a grid of DDGI probes. More... | |
class | DebugTextWidget |
Renders rasterizer statistics and debug text for GApp. More... | |
class | DebugVisualizationMode |
class | DefaultRenderer |
Supports both traditional forward shading and full-screen deferred shading. More... | |
class | DepthEncoding |
Encoding of the depth buffer (not the GBuffer::Field::CS_Z buffer) More... | |
class | DepthFirstTreeBuilder |
Template class for a depth first tree traversal supporting methods enterChild and goToParent. More... | |
class | DepthOfField |
Defocus post-process shader More... | |
class | DepthOfFieldModel |
The depth of field model. More... | |
class | DepthOfFieldSettings |
class | DepthReadMode |
A m_depth texture can automatically perform the m_depth comparison used for shadow mapping on a texture lookup. More... | |
class | DeveloperWindow |
Developer HUD controls instantiated by GApp::createDeveloperHUD for debugging. More... | |
class | DirectedEdge |
class | DirectionHistogram |
A histogram on the surface of a sphere. More... | |
class | Draw |
Useful routines for rendering primitives when debugging. More... | |
class | DXCaps |
Provides very basic DirectX detection and information support. More... | |
class | EmulatedGazeTracker |
Simulates the presence of a gaze tracker by assuming that the user is always looking straight forward, and making the eyes converge on the point hit by a ray cast. More... | |
class | EmulatedXR |
class | Entity |
Base class for objects in a G3D::Scene. More... | |
class | EventCoordinateMapper |
Used by Widgets for mapping between 2D events and 3D rendering. More... | |
class | ExposeEvent |
The "screen redraw" event. More... | |
class | FastPODTable |
Implemented with an open-addressing hash table that does not support remove. More... | |
class | FastPointHashGrid |
A multiset of values (i.e., with duplicates allowed) indexed efficiently by spatial location. More... | |
class | FileDialog |
More... | |
class | FileDropEvent |
Triggered when one or more files are dropped onto a window. More... | |
class | FileNotFound |
Thrown by various file opening routines if the file is not found. More... | |
class | FilePath |
Parsing of file system paths. More... | |
class | FileSystem |
OS-independent file system layer that optimizes the performance of queries by caching and prefetching. More... | |
class | Film |
Post processing: gamma correction, exposure, bloom, and screen-space antialiasing. More... | |
class | FilmSettings |
More... | |
class | FirstPersonManipulator |
Uses a First Person (Quake- or World of Warcraft style) mapping to translate keyboard and mouse input into a flying camera position. More... | |
class | FocusEvent |
class | FogVolumeSurface |
An infinite fog volume, implemented by drawing at the near plane and ray marching until it hits the depth buffer. More... | |
class | FontModel |
class | FOVDirection |
Stores the direction of the field of view for a G3D::Projection. More... | |
class | Framebuffer |
Holds a set of G3D::Textures for use as draw targets. More... | |
class | FrameName |
class | Frustum |
class | FullScreenWidget |
A widget that renders below everything else and fills the OSWindow. More... | |
class | G3DAllocator |
Maps the G3D default allocator (System::malloc) to an std::allocator. More... | |
class | G3DSpecification |
Options for initG3D and initGLG3D. More... | |
class | G3DString |
Very fast string class that follows the std::string /std::basic_string interface. More... | |
class | GameController |
Platform-independent tracking of input from an Xbox360 controller. More... | |
class | GApp |
Optional base class for quickly creating 3D applications. More... | |
class | GaussianBlur |
1D Gaussian blur. More... | |
class | GaussianMIPFilter |
class | GazeTracker |
API for low-level gaze tracking. More... | |
class | GBuffer |
Saito and Takahashi's Geometry Buffers, typically used today for deferred and forward+ shading. More... | |
class | GButtonState |
General keyboard/mouse state definitions used by GEvent. More... | |
class | GConsole |
Command-line console. More... | |
union | GEvent |
General low-level event structure. More... | |
class | GEventType |
Event code enumerations. More... | |
class | GFont |
Font class for use with RenderDevice. More... | |
class | GKey |
A mapping of every physical key on the keyboard and other input devices in a (mostly) platform independent manner. More... | |
class | GKeyMod |
Enumeration of valid key modifier codes (often used ORed together) More... | |
class | GKeySym |
Symbolic key structure. More... | |
class | GLCaps |
Low-level wrapper for OpenGL extension management. More... | |
class | GLFWWindow |
class | GLPixelTransferBuffer |
Abstraction of OpenGL Pixel Buffer Object, an efficient way of transferring data to or from a GPU. More... | |
class | GLSamplerObject |
A class holding all of the parameters one would want to use to when accessing a Texture, and an associated OpenGL Sampler Object More... | |
class | Grid |
A dense 3D grid of templated Cells. More... | |
class | GuiButton |
Push button that can be temporarily pressed. More... | |
class | GuiCheckBox |
Check box or toggle button. More... | |
class | GuiCloseEvent |
Triggered by pressing the close button on a G3D::GuiWindow. More... | |
class | GuiContainer |
Base class for controls that contain other controls. More... | |
class | GuiControl |
Base class for all controls. More... | |
class | GuiDrawer |
class | GuiDropDownList |
List box for viewing strings or GuiText. More... | |
class | GuiEvent |
Events triggered by the G3D GUI system (see G3D::GuiWindow for discussion) More... | |
class | GuiFrameBox |
For editing coordinate frames More... | |
class | GuiFunctionBox |
Displays a Spline<float> with editable control points. More... | |
class | GuiLabel |
A text label. More... | |
class | GuiMenu |
A special "popup" window that hides itself when it loses focus. More... | |
class | GuiMultiLineTextBox |
Text box with multiple line support for entering strings. More... | |
class | GuiNumberBox |
Number editing textbox with associated slider. More... | |
class | GuiPane |
Sub-rectangle of a window. More... | |
class | GuiRadioButton |
Radio button or exclusive set of toggle butons. More... | |
class | GuiScrollBar |
class | GuiScrollPane |
A conventional pane with scroll bars that allow the user to determine which part of the pane to view. More... | |
class | GuiSlider |
Slider. More... | |
class | GuiTabPane |
A gui control that allows the user to switch between a variety of differnt panes. More... | |
class | GuiText |
Text or Icon on a G3D::GuiControl. More... | |
class | GuiTextBox |
Text box for entering strings. More... | |
class | GuiTextureBox |
class | GuiTheme |
Renders UI elements. More... | |
class | GuiWidgetDestructor |
Detects when this object is removed from the GUI and removes the corresponding widget from its manager. More... | |
class | GuiWindow |
Retained-mode graphical user interface window. More... | |
class | GUniqueID |
Globally unique identifiers. More... | |
class | HaltonSequence |
class | HeightfieldModel |
A tiled regular heightfield with a single detail level, suitable for very large terrains observed mostly from above. More... | |
class | Icon |
class | IconSet |
A set of small image files packed into a single G3D::Texture for efficiency. More... | |
class | Image |
Provides general image loading, saving, conversion and pixel access. More... | |
class | Image1 |
Luminance image with 32-bit floating point storage. More... | |
class | Image1unorm8 |
Compact storage for luminance/alpha-only/red-only normalized 8-bit images. More... | |
class | Image3 |
RGB image with 32-bit floating point storage for each channel. More... | |
class | Image3unorm8 |
Compact storage for RGB 8-bit per channel images. More... | |
class | Image4 |
RGBA image with 32-bit floating point storage for each channel. More... | |
class | Image4unorm8 |
Compact storage for RGBA 8-bit per channel images. More... | |
class | ImageConvert |
Image conversion utility methods. More... | |
class | ImageFormat |
Information about common image formats. More... | |
class | ImageUtils |
class | IndexStream |
A stream of indices referencing into an AttributeBuffer More... | |
class | InterpolateMode |
class | Intersect |
More... | |
class | Journal |
Routines for programmatically working with journal.md.html and journal.dox files. More... | |
class | JoyAxisEvent |
Joystick axis motion event structure. More... | |
class | JoyBallEvent |
Joystick trackball motion event structure. More... | |
class | JoyButtonEvent |
class | JoyHatEvent |
Joystick hat position change event structure. More... | |
class | JoystickIndex |
Analog controller axes. More... | |
class | KDTree |
A set that supports spatial queries using a KD tree (axis-aligned BSP tree) for speed. More... | |
class | KeyboardEvent |
Keyboard event structure. More... | |
class | lazy_ptr |
Provides a level of indirection for accessing objects to allow computing them on demand or extending them with metadata without subclassing the object itself. More... | |
class | Light |
An (invisible) emitting surface (AREA) or point (DIRECTIONAL, SPOT, OMNI) light. More... | |
class | LightingEnvironment |
Lighting environment (not just "environment map") intended for hardware rendering using screen-space approximations of indirect light. More... | |
class | Line |
An infinite 3D line. More... | |
class | Line2D |
An infinite 2D line. More... | |
class | LineSegment |
An finite segment of an infinite 3D line. More... | |
class | LineSegment2D |
class | Log |
System log for debugging purposes. More... | |
class | LogScaleAdapter |
Used by GuiSlider. More... | |
class | Manipulator |
Exports a coordinate frame, typically in response to user input. More... | |
class | Map2D |
Map of values across a discrete 2D plane. More... | |
class | MapComponent |
Manages CPU and GPU versions of image data and performs conversions as needed. More... | |
class | MarkerEntity |
A normally invisible Entity used for example, as a trigger, invisible collision, or spawn point. More... | |
class | Material |
Base class for materials in G3D, mostly useful as an interface for ray tracing since hardware rasterization rendering needs to be specialized for each Surface and Material subclass. More... | |
class | Matrix |
N x M matrix. More... | |
class | Matrix2 |
class | Matrix2x3 |
A 2x3 matrix. More... | |
class | Matrix3 |
A 3x3 matrix. More... | |
class | Matrix3x4 |
A 3x4 matrix. More... | |
class | Matrix4 |
A 4x4 matrix. More... | |
class | Matrix4float64 |
Double-precision 4x4 matrix. More... | |
class | MD2Model |
Quake II model class primarily used for low-polygon keyframe animated characters. More... | |
class | MD3Model |
Quake III MD3 model loader. More... | |
class | MD5Hash |
See G3D::Crypto::md5. More... | |
class | MemoryManager |
Abstraction of memory management. More... | |
class | MeshAlg |
Indexed mesh algorithms. More... | |
class | MeshBuilder |
Allows creation of optimized watertight meshes from unoptimized polygon soups. More... | |
class | MeshShape |
Mesh shape is intended for debugging and for collision detection. More... | |
class | Milestone |
Used to set a marker in the GPU instruction stream that the CPU can later query or block on. More... | |
class | MirrorQuality |
Values for UniversalSurface::GPUGeom::mirrorHint. More... | |
class | Model |
Common base class for models. More... | |
class | MonitorXR |
class | MotionBlur |
Screen-space post-processed motion blur. More... | |
class | MotionBlurSettings |
class | MouseButtonEvent |
class | MouseMotionEvent |
Mouse motion event structure. More... | |
class | MouseScroll2DEvent |
2D scroll event structure More... | |
class | NativeTriTree |
Native C++ implementation of a static bounding interval hierarchy that is very good for box queries and OK for ray-triangle. More... | |
class | NegativeAdapter |
Negates a numeric type G3D::Pointer value. More... | |
class | NetAddress |
class | NetConnection |
A network connection between two machines that can send and receive messages. More... | |
class | NetConnectionIterator |
Note that it is not possible to construct a NetConnectionIterator (since nothing good could happen with it), so this must be initialized with a reference, e.g.,. More... | |
class | NetMessageIterator |
Iterates through new messages on a NetConnection. More... | |
class | NetSendConnection |
Base class for NetConnection that provides only the sending functionality. More... | |
class | NetServer |
Manages connections for a machine that accepts incoming ones. More... | |
class | NetworkDevice |
Abstraction of network (socket) functionality. More... | |
class | Noise |
3D fixed point Perlin noise generator. More... | |
class | NotAdapter |
Wraps a boolean Pointer with one that inverts its value. More... | |
class | OpenVR |
Implementation of the G3D::XR interface using the OpenVR API by Valve. More... | |
class | OptiXTriTree |
class | OrderedTable |
A Table that can be iterated through by index, preserves ordering, and implicitly supports removal during iteration. More... | |
class | OSWindow |
Interface to window APIs for window management, event processing, and OpenGL context management. More... | |
class | PacketSizeException |
class | Parse3DS |
Parses 3DS model files. More... | |
class | ParseError |
Thrown by TextInput, Any, and other parsers on unexpected input. More... | |
class | ParseMTL |
Parses Wavefront material (.mtl) files. More... | |
class | ParseOBJ |
Parses OBJ files with polygonal data and their associated MTL files. More... | |
class | ParsePLY |
Parses PLY geometry files to extract face and vertex information. More... | |
class | ParseSchematic |
Parser for the MagicaVoxel sparse voxel format http://ephtracy.github.io/index.html?page=mv_vox_format. More... | |
class | ParseVOX |
Parser for the MagicaVoxel sparse voxel format http://ephtracy.github.io/index.html?page=mv_vox_format. More... | |
class | ParticleMaterial |
For efficiency, individual Particles use materials that have been pre-registered with the ParticleSystem that are addressed with these handles. More... | |
class | ParticleSurface |
Each ParticleSurface is the set of particles for a single ParticleSystem (not a single particle–this allows them to be culled reasonably without creating a huge amount of CPU work managing the particles). More... | |
class | ParticleSystem |
An Entity composed of multiple translucent particles. More... | |
class | ParticleSystemModel |
Shared state for quickly instantiating particular types of ParticleSystems. More... | |
class | PathDirection |
Direction of light transport along a ray or path. More... | |
class | Pathfinder |
Finds good paths between nodes in an arbitrary directed graph. More... | |
class | PathTracer |
class | PercentageAdapter |
Maps a floating point fraction to a percentage G3D::Pointer value. More... | |
class | PhysicsFrame |
An RT transformation using a quaternion; suitable for physics integration. More... | |
class | PhysicsFrameSpline |
A subclass of Spline that keeps the rotation field of a PhysicsFrame normalized and rotating the short direction. More... | |
class | PhysicsFrameSplineEditor |
2D/3D control for editing PhysicsFrameSplines. More... | |
class | PixelTransferBuffer |
Base class for transfering arrays of pixels between major classes, generalized over CPU arrays, memory-mapped files, and OpenGL Pixel Buffer Objects. More... | |
class | Plane |
An infinite 2D plane in 3D space. More... | |
class | PlaneShape |
class | Pointer |
Acts like a pointer to a value of type ValueType (i.e., ValueType*), but can operate through accessor methods as well as on a value in memory. More... | |
class | PointHashGrid |
A sparse 3D grid of point-based data. More... | |
class | PointKDTree |
A set data structure that supports spatial queries using an axis-aligned BSP tree for speed. More... | |
class | PointModel |
class | PointShape |
class | PointSurface |
A G3D::Surface for point splatting. More... | |
class | PowerOfTwoAdapter |
Maps an integer pointer to a power of two G3D::Pointer value. More... | |
class | PrecomputedRandom |
Fast random numbers using a precomputed data table. More... | |
class | PrecomputedRay |
A 3D Ray optimized for AABox and Tri intersection, optionally limited to a positive subsegment of the ray. More... | |
class | PrefixTree |
class | PrimitiveType |
These are defined to have the same value as the equivalent OpenGL constant. More... | |
class | Profiler |
Measures execution time of CPU and GPU events across multiple threads. More... | |
class | ProfilerWindow |
More... | |
class | Projection |
A 3D perspective projection with bounding planes in camera space. More... | |
class | PythonInterpreter |
This class implements the Singleton design pattern. More... | |
class | Quat |
Arbitrary quaternion (not necessarily unit). More... | |
class | Queue |
Dynamic queue that uses a circular buffer for performance. More... | |
class | QuitEvent |
The "quit requested" event. More... | |
class | Random |
Random number generator. More... | |
class | Ray |
A 3D Ray, optionally limited to a positive subsegment of the ray. More... | |
class | RayGridIterator |
Computes conservative line raster/voxelization across a grid for use in walking a grid spatial data structure or or voxel scene searching for intersections. More... | |
class | RayShape |
class | Rect2D |
If you are using this class for pixel rectangles, keep in mind that the last pixel you can draw to is at x0() + width() - 1. More... | |
class | ReferenceCountedObject |
class | RefractionHint |
Values for UniversalSurface::GPUGeom::refractionHint. More... | |
class | RegistryUtil |
Provides generalized Windows registry querying. More... | |
class | RenderDevice |
Abstraction of a graphics rendering context (GPU). More... | |
class | Renderer |
Base class for 3D rendering pipelines. More... | |
class | RenderPassType |
Used by G3D::Surface and G3D::Renderer to specify the kind of rendering pass. More... | |
class | ResampleFilter |
Values for FilmSettings::upscaleFilter and FilmSettings::downscaleFilter. More... | |
class | ResizeEvent |
The "window resized" event When you get this event, you are responsible for setting a new video mode with the new width and height. More... | |
class | Sampler |
A class holding all of the parameters one would want to use to when accessing a Texture More... | |
class | Scene |
Base class for a scene graph. More... | |
class | SceneEditorWindow |
class | SceneVisualizationSettings |
Visualization and debugging render options for Surface. More... | |
class | ScreenCapture |
Handles screenshot and video capture with managed filename generation and Journal output. More... | |
class | Set |
An unordered data structure that has at most one of each element. More... | |
class | SettingsWindow |
More... | |
class | Shader |
Abstraction of the programmable hardware pipeline with G3D preprocessor extensions. More... | |
class | ShadowMap |
When rendering into a shadow map, SHADOW_MAP_FRAMEBUFFER is set to 1 in the depth shader by the ShadowMap's framebuffer. More... | |
class | Shape |
Base class for debugging shapes that can render themselves. More... | |
class | Skybox |
An infinite box with a cube-map texture. More... | |
class | SkyboxSurface |
An infinite cube that simulates the appearance of distant objects in the scene. More... | |
class | SlowMesh |
Used to convert old immediate mode OpenGL code to OpenGL 3+ core. More... | |
class | SmallArray |
Embeds N elements to reduce allocation time and increase memory coherence when working with arrays of arrays. More... | |
class | SmallTable |
An unordered data structure mapping keys to values; maintained behind the scenes in a linear array More... | |
class | snorm16 |
Represents numbers on [-1, 1] in 16 bits as an unsigned normalized 0.8 fixed-point value using the same encoding scheme as OpenGL. More... | |
class | snorm8 |
Represents numbers on [-1, 1] in 8 bits as a signed normalized 0.8 fixed-point value using the same encoding scheme as OpenGL. More... | |
class | Sound |
Sound file loaded into memory that can be played on an AudioChannel. More... | |
class | SoundEntity |
An invisilbe Entity that plays a positional sound and removes itself from the Scene when the sound ends. More... | |
class | Sphere |
Sphere. More... | |
class | SphereShape |
class | Spinlock |
A mutual exclusion lock that busy-waits when locking. More... | |
class | Spline |
Smooth parameteric curve implemented using a piecewise 3rd-order Catmull-Rom spline curve. More... | |
class | SplineBase |
Common implementation code for all G3D::Spline template parameters. More... | |
class | SplineExtrapolationMode |
Describes the behavior of G3D::Spline, etc. More... | |
class | SplineInterpolationMode |
Describes the interpolation behavior of G3D::Spline. More... | |
class | SquareAdapter |
Maps an integer pointer to a perfect square. More... | |
class | Stopwatch |
Provides accurate measurement of durations. More... | |
class | Surface |
The surface of a model, posed and ready for rendering. More... | |
class | Surface2D |
Primarily for use in GUI rendering. More... | |
class | Surfel |
Local surface geometry + BSDF + emission function. More... | |
class | SVO |
Sparse Voxel Octree: (compressed) 3D Analog of a GBuffer. More... | |
class | System |
OS and processor abstraction. More... | |
class | Table |
An unordered data structure mapping keys to values. More... | |
class | TemporalFilter |
A simple helper class for temporally filtering a screen-space buffer filled with world-space data. More... | |
class | TextInput |
A simple tokenizer for parsing text files. More... | |
class | TextOutput |
Convenient formatting of ASCII text written to a file. More... | |
class | TextSurface |
A billboard displaying text. More... | |
class | Texture |
A 1D, 2D, or 3D array (e.g., an image) stored on the GPU, commonly used for mapping reflectance values (colors) over meshes. More... | |
class | TextureBrowserWindow |
Gui used by DeveloperWindow default for displaying all currently allocated textures. More... | |
class | ThirdPersonManipulator |
By default, the ThirdPersonManipulator moves an object relative to its own axes. More... | |
class | ThreadsafeQueue |
A queue whose methods are synchronized with respect to each other. More... | |
class | TimeQueue |
Dynamic queue that works with timestamps to allow simulating latency. More... | |
class | Token |
For use with TextInput. More... | |
class | TransparencyTestMode |
Only used for depth writing purposes by G3D::Surface. More... | |
class | TransparencyType |
"Transparency" in G3D = transmission + alpha coverage More... | |
class | Tri |
Triangle implementation optimized for ray-triangle intersection. More... | |
class | Triangle |
A generic triangle representation. More... | |
class | TriangleShape |
A single triangle. More... | |
class | TriTree |
Interface for ray-casting data structures. More... | |
class | TriTreeBase |
Common partial implementation base class for ray-casting data structures. More... | |
class | uint128 |
Limited functionality 128-bit unsigned integer. More... | |
class | UniformTable |
Uniform and macro arguments for a G3D::Shader. More... | |
class | UniversalBSDF |
G3D's default description of how a surface reflects light (photons). More... | |
class | UniversalMaterial |
Description of a surface for rendering purposes. More... | |
class | UniversalSurface |
An optimized implementation G3D::Surface for G3D::Shader / G3D::UniversalMaterial classes. More... | |
class | UniversalSurfel |
A Surfel for a surface patch described by a UniversalMaterial. More... | |
class | unorm16 |
Represents numbers on [0, 1] in 16 bits as an unsigned normalized 0.8 fixed-point value using the same encoding scheme as OpenGL. More... | |
class | unorm8 |
Represents numbers on [0, 1] in 8 bits as an unsigned normalized 0.8 fixed-point value using the same encoding scheme as OpenGL. More... | |
class | UprightFrame |
Coordinate frame expressed in Euler angles. More... | |
class | UprightSpline |
Shortest-path linear velocity spline for camera positions. More... | |
class | UprightSplineManipulator |
Allows recording and playback of a G3D::UprightSpline based on a G3D::Camera. More... | |
class | UserEvent |
A user-defined event type. More... | |
class | UserInput |
User input class that consolidates joystick, keyboard, and mouse state. More... | |
class | Vector2 |
Do not subclass– this implementation makes assumptions about the memory layout. More... | |
class | Vector2int16 |
A Vector2 that packs its fields into G3D::int16 s. More... | |
class | Vector2int32 |
A Vector2 that packs its fields into int32s. More... | |
class | Vector2uint16 |
A Vector2 that packs its fields into G3D::uint16 s. More... | |
class | Vector2uint32 |
A Vector2 that packs its fields into int32s. More... | |
class | Vector2unorm16 |
A Vector2 that packs its fields into G3D::unorm16s. More... | |
class | Vector3 |
3x1 or 1x3 vector using float32 representation. More... | |
class | Vector3int16 |
A Vector3 that packs its fields into uint16s. More... | |
class | Vector3int32 |
\ Vector3int32 A Vector3 that packs its fields into uint32s. More... | |
class | Vector3uint8 |
class | Vector4 |
Do not subclass– this implementation makes assumptions about the memory layout. More... | |
class | Vector4int16 |
class | Vector4int32 |
\ Vector4int32 A Vector4 that packs its fields into int32s. More... | |
class | Vector4int8 |
Homogeneous vector stored efficiently in four signed int8s. More... | |
class | Vector4uint16 |
class | Vector4uint8 |
class | Vector4unorm8 |
class | VertexBuffer |
A block of GPU memory within which G3D::AttributeArrays for vertex, texcoord, normal, etc. More... | |
class | VideoInput |
Read video files from MPG, MP4, AVI, MOV, OGG, ASF, and WMV files. More... | |
class | VideoOutput |
Creates video files such as mp4/h264 from provided frames or textures. More... | |
class | VideoPlayer |
Play videos back at the correct speed and automatically update frame Textur or PixelTransferBuffer. More... | |
class | VideoRecordDialog |
A widget that allows the user to launch recording of the on-screen image to a movie. More... | |
class | VideoStreamClient |
class | VideoStreamServer |
Server-side class for streaming low-latency lossy video with GPU MPEG encoding. More... | |
class | VisibleEntity |
Base class for Entitys that use a built-in G3D::Model subclass. More... | |
class | VisualizeCameraSurface |
Displays a 3D representation of a Camera. More... | |
class | VisualizeLightSurface |
Displays a 3D representation of a Light. More... | |
class | VoxelModel |
class | VoxelSurface |
A G3D::Surface for voxel rendering. More... | |
class | VRApp |
Application framework for HMD Virtual Reality programs on HTC Vive, Oculus Rift, and Oculus DK2. More... | |
class | VulkanTriTree |
class | WeakCache |
A cache that does not prevent its members from being garbage collected. More... | |
class | WebServer |
Web server with support for https and websockets More... | |
class | Welder |
class | Widget |
Interface for 2D or 3D objects that experience standard virtual world events and are rendered. More... | |
class | WidgetManager |
Manages a group of G3D::Widget. More... | |
class | WrapMode |
Describes the behavior of G3D::Texture, G3D::Map2D, G3D::Image3, etc. More... | |
class | XML |
Easy loading and saving of XML and HTML files. More... | |
class | XR |
Low-level eXtended Reality (AR/VR/MR) API base class, analogous to 2D GUI OSWindow for a VR system. More... | |
class | XRWidget |
A G3D::Widget that manages world-space G3D::MarkerEntitys based on polling a low-level XR instance. More... | |
Typedefs | |
typedef class Rect2D | AABox2D |
typedef bool(* | AssertionHook) (const char *_expression, const String &message, const char *filename, int lineNumber, bool useGuiPrompt) |
typedef float | Biradiance |
typedef Color3 | Biradiance3 |
Radiance * measure(Solid Angle) between two points, measured at the receiver orthogonal to the axis between them; W/m^2. More... | |
typedef _BSPMAP::Map | BSPMap |
typedef class CoordinateFrame | CFrame |
typedef AreaMemoryManager | CoherentAllocator |
typedef CompassDelta | CompassBearing |
typedef Component< Color1, Image1 > | Component1 |
typedef Component< Color3, Image3 > | Component3 |
typedef Component< Color4, Image4 > | Component4 |
typedef void(* | ConsolePrintHook) (const String &) |
typedef int | DebugID |
Used with debugDraw. More... | |
typedef Color3 | Energy3 |
Force * distance; J. More... | |
typedef float | float32 |
typedef double | float64 |
typedef shared_ptr< class GConsole > | GConsoleRef |
typedef HGLRC | GLContext |
OpenGL context (argument to glMakeCurrent, return value of glGetCurrentContext). More... | |
typedef shared_ptr< class Image3unorm8 > | Image3unorm8Ref |
typedef shared_ptr< class Image4 > | Image4Ref |
typedef shared_ptr< class Image4unorm8 > | Image4unorm8Ref |
typedef int16_t | int16 |
typedef int32_t | int32 |
typedef int64_t | int64 |
typedef int8_t | int8 |
typedef float | Irradiance |
typedef Color3 | Irradiance3 |
Incident power per area; W/m^2. More... | |
typedef shared_ptr< class LightweightConduit > | LightweightConduitRef |
typedef Table< String, lazy_ptr< Model > > | ModelTable |
typedef uint32 | NetChannel |
Messages sent on different channels are asynchronous. More... | |
typedef shared_ptr< class NetListener > | NetListenerRef |
typedef uint32 | NetMessageType |
Application defined message type. More... | |
typedef PhysicsFrame | PFrame |
using | Point2 = Vector2 |
typedef Vector2int16 | Point2int16 |
typedef Vector2int32 | Point2int32 |
typedef Vector2uint16 | Point2uint16 |
typedef Vector2uint32 | Point2uint32 |
typedef Vector2unorm16 | Point2unorm16 |
typedef Vector3 | Point3 |
Points are technically distinct mathematical entities from vectors. More... | |
typedef Vector3int16 | Point3int16 |
typedef Vector3int32 | Point3int32 |
typedef Vector3uint8 | Point3uint8 |
typedef Vector4int32 | Point4int32 |
typedef float | Power |
typedef Color3 | Power3 |
Energy per time; W. More... | |
typedef Spline< Power3 > | Power3Spline |
typedef Vector4 | ProjInfo |
typedef float | Radiance |
typedef Color3 | Radiance3 |
Power per (measure(SolidAngle) * measure(Area)); W / (m^2 sr) More... | |
typedef float | Radiosity |
typedef Color3 | Radiosity3 |
Power per area; J / m^2. More... | |
typedef double | RealTime |
Actual wall clock time in seconds (Unix time). More... | |
typedef shared_ptr< class ReliableConduit > | ReliableConduitRef |
typedef float | SimTime |
Time, in seconds in a simulation. More... | |
typedef std::string | String |
typedef ImageFormat | TextureFormat |
typedef shared_ptr< class ThirdPersonManipulator > | ThirdPersonManipulatorRef |
typedef uint16_t | uint16 |
typedef uint32_t | uint32 |
typedef uint64_t | uint64 |
typedef uint8_t | uint8 |
typedef AttributeArray | VAR |
typedef AttributeArray | VertexRange |
Functions | |
~LightweightConduit () | |
Closes the socket. More... | |
~NetListener () | |
~ReliableConduit () | |
Closes the socket. More... | |
Vector2 | abs (const Vector2 &v) |
Vector3 | abs (const Vector3 &v) |
Vector4 | abs (const Vector4 &v) |
double | abs (double fValue) |
double | aCos (double fValue) |
float | acos (float fValue) |
NetAddress | address () const |
The address of the other end of the conduit. More... | |
bool | all (const Vector2 &v) |
bool | all (const Vector3 &v) |
bool | all (const Vector4 &v) |
bool | all (float x) |
Returns true if x is not exactly equal to 0.0f. More... | |
bool | alphabeticalIgnoringCaseG3DFirstLessThan (const String &a, const String &b) |
Compares a < b ignoring case, but puts names beginning with "G3D" first in a sort. More... | |
bool | any (const Vector2 &v) |
bool | any (const Vector3 &v) |
bool | any (const Vector4 &v) |
bool | any (float x) |
Returns true if x is not exactly equal to 0.0f. More... | |
double | aSin (double fValue) |
AssertionHook | assertionHook () |
double | aTan (double fValue) |
double | aTan2 (double fY, double fX) |
bool | beginsWith (const String &test, const String &pattern) |
Returns true if the test string begins with the pattern string. More... | |
void | buildPrefixTree (const Array< String > &list, DepthFirstTreeBuilder< String > &tree) |
Does a depth first traversal of a prefix tree generated from the passed list. More... | |
int32 | byteSize (BinaryFormat f) |
Returns -1 if the format is custom, otherwise the byte size of a single element in this format. More... | |
template<class PointerType > | |
void | categorizeByDerivedType (const Array< PointerType > &all, Array< Array< PointerType > > &derivedArray) |
Separates a large array into subarrays by their typeid(). More... | |
int | ceilPow2 (unsigned int in) |
Return the next power of 2 higher than the input If the input is already a power of 2, the output will be the same as the input. More... | |
int | ceilPow2 (int in) |
int | ceilPow2 (float in) |
Vector2 | clamp (const Vector2 &v, const Vector2 &a, const Vector2 &b) |
Vector3 | clamp (const Vector3 &v, const Vector3 &a, const Vector3 &b) |
Vector4 | clamp (const Vector4 &v, const Vector4 &a, const Vector4 &b) |
Vector3int32 | clamp (const Vector3int32 &v, const Vector3int32 &a, const Vector3int32 &b) |
int | clamp (int val, int low, int hi) |
double | clamp (double val, double low, double hi) |
float | clamp (float val, float low, float hi) |
bool | clientWaiting () const |
True if a client is waiting (i.e. More... | |
String | consolePrint (const String &) |
String | consolePrintf (const char *fmt ...) |
Sends output to the log and to the last GConsole instantiated. More... | |
ConsolePrintHook | consolePrintHook () |
template<class T > | |
bool | contains (const T *array, int len, const T &e) |
Array::contains for C-arrays. More... | |
int | countNewlines (const String &s) |
Number of new lines in the given string (handles \r\n and \n ). More... | |
FILE * | createTempFile () |
Returns a temporary file that is open for read/write access. More... | |
Vector3 | cross (const Vector3 &v1, const Vector3 &v2) |
template<class YType > | |
YType | cyclicCatmullRomSpline (double t, const YType *controlY, int numPoints) |
See also G3D::Spline. More... | |
template<class YType > | |
YType | cyclicCatmullRomSpline (double t, const Array< YType > &controlY) |
A cubic spline with regularly spaced control points. More... | |
DebugID | debugDraw (const shared_ptr< Shape > &shape, float displayTime=0.0f, const Color4 &solidColor=Color3::white(), const Color4 &wireColor=Color3::black(), const CoordinateFrame &cframe=CoordinateFrame()) |
Schedule a G3D::Shape for later rendering. More... | |
DebugID | debugDraw (const Box &b, float displayTime=0.0f, const Color4 &solidColor=Color3::white(), const Color4 &wireColor=Color3::black(), const CoordinateFrame &cframe=CoordinateFrame()) |
overloaded forms of debugDraw so that more common parameters can be passed (e.g Boxes, Spheres) More... | |
DebugID | debugDraw (const Array< Vector3 > &vertices, const Array< int > &indices, float displayTime=0.0f, const Color4 &solidColor=Color3::white(), const Color4 &wireColor=Color3::black(), const CoordinateFrame &cframe=CoordinateFrame()) |
DebugID | debugDraw (const CPUVertexArray &vertices, const Array< Tri > &tris, float displayTime=0.0f, const Color4 &solidColor=Color3::white(), const Color4 &wireColor=Color3::black(), const CoordinateFrame &cframe=CoordinateFrame()) |
DebugID | debugDraw (const Sphere &s, float displayTime=0.0f, const Color4 &solidColor=Color3::white(), const Color4 &wireColor=Color3::black(), const CoordinateFrame &cframe=CoordinateFrame()) |
DebugID | debugDraw (const Point3 &p, float displayTime=0.0f, const Color4 &solidColor=Color3::white(), const Color4 &wireColor=Color3::black(), const CoordinateFrame &cframe=CoordinateFrame()) |
Drawing of Points implemented as drawing small spheres. More... | |
DebugID | debugDraw (const CoordinateFrame &cf, float displayTime=0.0f, const Color4 &solidColor=Color3::white(), const Color4 &wireColor=Color3::black(), const CoordinateFrame &cframe=CoordinateFrame()) |
DebugID | debugDrawLabel (const Point3 &wsPos, const Vector3 &csOffset, const GuiText &text, float displayTime=0.0f, float size=0.1f, bool sizeInPixels=false, const GFont::XAlign xalign=GFont::XALIGN_CENTER, const GFont::YAlign yalign=GFont::YALIGN_CENTER) |
Draws a label onto the screen for debug purposes. More... | |
DebugID | debugDrawLabel (const Point3 &wsPos, const Vector3 &csOffset, const String &text, const Color3 &color, float displayTime=0.0f, float size=0.1f, bool sizeInPixels=false, const GFont::XAlign xalign=GFont::XALIGN_CENTER, const GFont::YAlign yalign=GFont::YALIGN_CENTER) |
String | debugPrintf (const char *fmt ...) |
Under Visual Studio, appears in the Debug pane of the Output window On Unix-based operating systems the output is sent to stderr. More... | |
void | describeSystem (class RenderDevice *rd, class NetworkDevice *nd, class TextOutput &t) |
Prints a human-readable description of this machine to the text output stream. More... | |
void | describeSystem (class RenderDevice *rd, class NetworkDevice *nd, String &s) |
void | deserialize (String &s, BinaryInput &b) |
void | deserialize (int32 &i, BinaryInput &b) |
void | deserialize (uint32 &i, BinaryInput &b) |
void | deserialize (bool &i, BinaryInput &b) |
void | deserialize (float32 &f, BinaryInput &b) |
void | deserialize (float64 &f, BinaryInput &b) |
template<typename T > | |
void | deserialize (Array< T > &array, BinaryInput &b) |
void | deserialize (Vector2 &v, class BinaryInput &b) |
void | deserialize (Vector3::Axis &a, class BinaryInput &bo) |
void | deserialize (Vector4 &v, class BinaryInput &b) |
void | deserialize (bool &b, TextInput &ti) |
void | deserialize (int &b, TextInput &ti) |
void | deserialize (uint8 &b, TextInput &ti) |
void | deserialize (double &b, TextInput &ti) |
void | deserialize (float &b, TextInput &ti) |
void | deserialize (String &b, TextInput &ti) |
void | deserialize (Vector3 &v, class BinaryInput &b) |
double | determinant (const Matrix3 &m) |
double | determinant (const Matrix4 &m) |
double | distance (double x, double y) |
double | distance (double x, double y, double z) |
float | distance (float x, float y) |
float | distance (float x, float y, float z) |
float | dot (const Vector2 &a, const Vector2 &b) |
float | dot (const Vector3 &a, const Vector3 &b) |
float | dot (const Vector4 &a, const Vector4 &b) |
float | dot (float a, float b) |
a * b (for DirectX/Cg support) More... | |
double | drand48 () |
bool | endsWith (const String &test, const String &pattern) |
Returns true if the test string ends with the pattern string. More... | |
template<class EnumClass , class EnumClassValue > | |
void | enumToJavaScriptDeclaration (TextOutput &t) |
Generates JavaScript source code defining an enum equivalent to EnumClass. More... | |
double | eps (double a, double b) |
Computes an appropriate epsilon for comparing a and b. More... | |
float | eps (float a, float b) |
Quat | exp (const Quat &q) |
AssertionHook | failureHook () |
String | filenameBase (const String &filename) |
Returns the portion of a filename to the left of the last period and to the right of the last slash or colon. More... | |
String | filenameBaseExt (const String &filename) |
Returns the part of the filename that includes the base and ext from parseFilename (i.e. More... | |
bool | filenameContainsWildcards (const String &filename) |
Returns true if '*' or '?' appears in the string. More... | |
String | filenameExt (const String &filename) |
Returns the extension on a filename. More... | |
String | filenamePath (const String &filename) |
Returns the drive (if Win32) and path from a filename, including a slash if there was one. More... | |
size_t | findLastSlash (const String &f, size_t start=String::npos) |
Finds the index of the first '\' or '/' character, starting at index start (if start is -1, starts at the end of the string). More... | |
size_t | findSlash (const String &f, size_t start=0) |
Finds the index of the first '\' or '/' character, starting at index start. More... | |
float | finf () |
uint16 | flipEndian16 (const uint16 x) |
Given a 16-bit integer, returns the integer with the bytes in the opposite order. More... | |
uint32 | flipEndian32 (const uint32 x) |
Given a 32-bit integer, returns the integer with the bytes in the opposite order. More... | |
float | fnan () |
String | format (const char *fmt ...) |
Produces a string from arguments of the style of printf. More... | |
float | fract (float x) |
double | fract (double x) |
bool | fuzzyEq (double a, double b) |
Note that fuzzyEq(a, b) && fuzzyEq(b, c) does not imply fuzzyEq(a, c), although that will be the case on some occasions. More... | |
bool | fuzzyEq (float a, float b) |
bool | fuzzyGe (double a, double b) |
Is a near or greater than b? More... | |
bool | fuzzyGt (double a, double b) |
Is a strictly greater than b? (Guaranteed false if a <= b). More... | |
bool | fuzzyLe (double a, double b) |
Is a near or less than b? More... | |
bool | fuzzyLt (double a, double b) |
Is a strictly less than b? (Guaranteed false if a >= b) More... | |
bool | fuzzyNe (double a, double b) |
True if a is definitely not equal to b. More... | |
int | g3dfnmatch (const char *pattern, const char *string, int flags) |
Function fnmatch() as specified in POSIX 1003.2-1992, section B.6. More... | |
void | gaussian1D (Array< float > &coeff, int N=5, float std=0.5f) |
Generates a set of 1D gaussian filter coefficients of size N. More... | |
float | gaussRandom (float mean=0.0f, float stdev=1.0f) |
Normally distributed random number. More... | |
uint32 | gcchtonl (uint32) |
String | generateFilenameBase (const String &prefix="", const String &suffix="") |
Creates a unique filename base in the current directory using the specified prefix and suffix. More... | |
String | generateFileNameBaseAnySuffix (const String &prefix) |
Creates a unique filename base in the current directory using the specified prefix, though any suffix is possible. More... | |
String | getOpenGLState (bool showDisabled=true) |
Returns all OpenGL state as a formatted string of C++ code that will reproduce that state. More... | |
void | glClipToBox (const class AABox &box) |
Configure (and enable) OpenGL clipping planes to clip to the inside of this box. More... | |
void | glColor (const G3D::Color3 &c) |
void | glColor (const G3D::Color4 &c) |
void | glColor (float r, float g, float b, float a) |
void | glColor (float r, float g, float b) |
void | glDisableAllClipping () |
Turn off all OpenGL clipping planes. More... | |
void | glDisableAllTextures () |
Calls glDisable() for all supported texture types: 1D, 2D, 3D, cube, rectangle. More... | |
const char * | GLenumToString (GLenum i) |
Pretty printer for GLenums. More... | |
GLboolean | glGetBoolean (GLenum which) |
A functional version of glGetDoublev More... | |
GLContext | glGetCurrentContext () |
Returns the current OpenGL context if more than one is in use. More... | |
GLdouble | glGetDouble (GLenum which) |
A functional version of glGetDoublev More... | |
void | glGetErrors () |
Read all errors off the OpenGL stack and ignore them. More... | |
GLfloat | glGetFloat (GLenum which) |
A functional version of glGetFloatv More... | |
GLint | glGetInteger (GLenum which) |
A functional version of glGetIntegerv More... | |
void | glGetMatrix (GLenum name, Matrix4 &m) |
Matrix4 | glGetMatrix (GLenum name) |
void * | glGetProcAddress (const char *name) |
Platform independent version of wglGetProcAddress/glXGetProcAddress/NSGLGetProcAddress. More... | |
Vector2 | glGetVector2 (GLenum which) |
Safe to call even if the glGet would return more than 2 values. More... | |
Vector3 | glGetVector3 (GLenum which) |
Vector4 | glGetVector4 (GLenum which) |
void | glLoadInvMatrix (const CoordinateFrame &cf) |
Loads the inverse of a coordinate frame into the current OpenGL matrix slot. More... | |
void | glLoadMatrix (const CoordinateFrame &cf) |
Loads a coordinate frame into the current OpenGL matrix slot. More... | |
void | glLoadMatrix (const Matrix4 &m) |
void | glMakeCurrent (const GLContext &c) |
This is a platform-independent version of the function to set the current OpenGL context for a thread. More... | |
void | glMultInvMatrix (const CoordinateFrame &cf) |
Multiplies the current GL matrix slot by the inverse of a matrix. More... | |
void | glMultiTexCoord (GLint unit, float v) |
void | glMultiTexCoord (GLint unit, const G3D::Vector2 &v) |
void | glMultiTexCoord (GLint unit, const G3D::Vector2int16 &v) |
void | glMultiTexCoord (GLint unit, const G3D::Vector3 &v) |
void | glMultiTexCoord (GLint unit, const G3D::Vector3int16 &v) |
void | glMultiTexCoord (GLint unit, const G3D::Vector4 &v) |
void | glMultMatrix (const CoordinateFrame &cf) |
Multiplies the current GL matrix slot by this matrix. More... | |
void | glNormal (const G3D::Vector3 &n) |
void | glTexCoord (const G3D::Vector4 &t) |
void | glTexCoord (const G3D::Vector3 &t) |
void | glTexCoord (const G3D::Vector2 &t) |
void | glTexCoord (const float t) |
Vector4 | glToScreen (const Vector4 &v) |
Takes an object space point to screen space using the current MODELVIEW and PROJECTION matrices. More... | |
void | glVertex (const G3D::Vector2 &v) |
void | glVertex (const G3D::Vector2int16 &v) |
void | glVertex (const G3D::Vector3 &v) |
void | glVertex (const G3D::Vector3int16 &v) |
void | glVertex (const G3D::Vector4 &v) |
String | greatestCommonPrefix (const String a, const String b) |
Finds the greatest common prefix of two strings of ' ', ':', ';', '/', and '\' separated words. More... | |
double | halfPi () |
void | hammersleySequence2D (int i, const int N, float &x, float &y) |
Returns the ith Hammersley point from a N-point sequence on the unit square, [0, 1]. More... | |
int | highestBit (uint32 x) |
Returnes the 0-based index of the highest 1 bit from the left. More... | |
int | iAbs (int iValue) |
int | iCeil (double fValue) |
int | iClamp (int val, int low, int hi) |
Clamps the value to the range [low, hi] (inclusive) More... | |
int16 | iClamp (int16 val, int16 low, int16 hi) |
int | iFloor (double fValue) |
Vector4int32 | iFloor (const Vector4 &) |
Vector3int32 | iFloor (const Vector3 &) |
int | iMax (int x, int y) |
int | iMin (int x, int y) |
int | iMod3 (int x) |
Computes x % 3. More... | |
bool | inConstSegment (const char *c) |
Returns true if this C string pointer is definitely located in the constant program data segment and does not require memory management. More... | |
double | inf () |
This value should not be tested against directly, instead G3D::isNan() and G3D::isFinite() will return reliable results. More... | |
void | initG3D (const G3DSpecification &spec=G3DSpecification()) |
Call from main() to initialize the G3D library state and register shutdown memory managers. More... | |
void | initGLG3D (const G3DSpecification &spec=G3DSpecification()) |
Call from main() to initialize the GLG3D library state and register shutdown memory managers. More... | |
int | iRound (double fValue) |
Fast round to integer using the lrint routine. More... | |
int | iRound (float f) |
Fast round to integer using the lrint routine. More... | |
bool | isDigit (const unsigned char c) |
These standard C functions are renamed for clarity/naming conventions and to return bool, not int. More... | |
bool | isDigitFast (const unsigned char c) |
Much faster than isDigit in MSVC. More... | |
bool | isEven (int num) |
bool | isFinite (double x) |
Returns true if the argument is a finite real number. More... | |
bool | isFinite (float x) |
int | iSign (int iValue) |
int | iSign (double fValue) |
int | iSign (float f) |
bool | isLetter (const unsigned char c) |
These standard C functions are renamed for clarity/naming conventions and to return bool, not int. More... | |
bool | isNaN (double x) |
Returns true if the argument is NaN (not a number). More... | |
bool | isNaN (float x) |
bool | isNaN (int x) |
bool | isNaN (uint64 x) |
bool | isNewline (const unsigned char c) |
These standard C functions are renamed for clarity/naming conventions and to return bool, not int. More... | |
template<class T > | |
bool | isNull (const shared_ptr< T > &ptr) |
template<class T > | |
bool | isNull (const T *ptr) |
template<class T > | |
bool | isNull (const lazy_ptr< T > &ptr) |
template<class T > | |
bool | isNull (const Pointer< T > &p) |
bool | isOdd (int num) |
bool | isPow2 (int num) |
True if num is a power of two. More... | |
bool | isPow2 (uint64 num) |
bool | isPow2 (uint32 x) |
bool | isQuote (const unsigned char c) |
bool | isSlash (const unsigned char c) |
bool | isValidHeapPointer (const void *x) |
Useful for debugging purposes. More... | |
bool | isValidIdentifier (const String &s) |
Returns true if s is a valid C identifier. More... | |
bool | isValidPointer (const void *x) |
Returns true if the pointer is likely to be a valid pointer (instead of an arbitrary number). More... | |
bool | isWhitespace (const unsigned char c) |
These standard C functions are renamed for clarity/naming conventions and to return bool, not int. More... | |
int | iWrap (int val, int hi) |
Wraps the value to the range [0, hi) (exclusive on the high end). More... | |
float | length (float v) |
float | length (const Vector2 &v) |
float | length (const Vector3 &v) |
float | length (const Vector4 &v) |
Vector2 | lerp (const Vector2 &v1, const Vector2 &v2, float f) |
Vector3 | lerp (const Vector3 &v1, const Vector3 &v2, float f) |
Vector4 | lerp (const Vector4 &v1, const Vector4 &v2, float f) |
Color1 | lerp (const Color1 &v1, const Color1 &v2, float f) |
Color3 | lerp (const Color3 &v1, const Color3 &v2, float f) |
Color4 | lerp (const Color4 &v1, const Color4 &v2, float f) |
double | lerp (double a, double b, double f) |
Returns a + (b - a) * f; More... | |
float | lerp (float a, float b, float f) |
float | lerpAngle (float a, float b, float t) |
A lerp() for angles in radians that guarantees moving the shortest way around the circle. More... | |
String | license () |
G3D, SDL, and IJG libraries require license documentation to be distributed with your program. More... | |
LightweightConduit (uint16 receivePort, bool enableReceive, bool enableBroadcast) | |
template<class XType , class YType > | |
YType | linearSpline (double x, const XType *controlX, const YType *controlY, int numControl) |
Interpolates a property according to a piecewise linear spline. More... | |
Color3 | log (const Color3 &c) |
Computes the log of each component. More... | |
Quat | log (const Quat &q) |
double | log2 (double x) |
float | log2 (float x) |
double | log2 (int x) |
void | logLazyPrintf (const char *fmt,...) |
Does not flush the buffer; follow up with a logPrintf to force the flush. More... | |
void | logPrintf (const char *fmt,...) |
Prints to the common system log, log.txt, which is usually in the working directory of the program. More... | |
String | makeValidIndentifierWithUnderscores (const String &s) |
Replaces invalid characters in a string with underscroes to make the string a valid C identifier. More... | |
Vector2 | max (const Vector2 &v1, const Vector2 &v2) |
Vector3 | max (const Vector3 &v1, const Vector3 &v2) |
Vector4 | max (const Vector4 &v1, const Vector4 &v2) |
Color3 | max (const Color3 &v1, const Color3 &v2) |
Color4 | max (const Color4 &v1, const Color4 &v2) |
template<class T > | |
T | max (const T &x, const T &y) |
template<class T > | |
T | max (const T &x, const T &y, const T &z) |
template<class T > | |
T | max (const T &x, const T &y, const T &z, const T &w) |
int | maxMessageSize () const |
The maximum length of a message that can be sent (G3D places a small header at the front of each UDP packet; this is already taken into account by the value returned). More... | |
size_t | maxNotNPOS (size_t i, size_t j) |
Returns the larger string index, ignoring String::npos. More... | |
virtual bool | messageWaiting () |
The message is actually copied from the socket to an internal buffer during this call. More... | |
Vector2 | min (const Vector2 &v1, const Vector2 &v2) |
Vector3 | min (const Vector3 &v1, const Vector3 &v2) |
Vector4 | min (const Vector4 &v1, const Vector4 &v2) |
Color3 | min (const Color3 &v1, const Color3 &v2) |
Color4 | min (const Color4 &v1, const Color4 &v2) |
template<class T > | |
T | min (const T &x, const T &y) |
template<class T > | |
T | min (const T &x, const T &y, const T &z) |
template<class T > | |
T | min (const T &x, const T &y, const T &z, const T &w) |
float | mod1 (float t) |
double | mod1 (double t) |
void | msgBox (const String &message, const String &title="Message") |
Displays a GUI prompt with "Ok" as the only choice. More... | |
Matrix4 | mul (const Matrix4 &a, const Matrix4 &b) |
Vector4 | mul (const Matrix4 &m, const Vector4 &v) |
Vector3 | mul (const Matrix3 &m, const Vector3 &v) |
Matrix3 | mul (const Matrix3 &a, const Matrix3 &b) |
float | mul (float a, float b) |
a * b (for DirectX/Cg support) More... | |
double | nan () |
This value should not be tested against directly, instead G3D::isNan() and G3D::isFinite() will return reliable results. More... | |
NetListener (uint16 port) | |
Port is in host byte order. More... | |
RealTime | networkCommunicationInterval () |
unsigned int | networkSendBacklog () |
Return the number of network transactions pending across all NetSendConnections. More... | |
int | nextMod3 (int i) |
Vector2 | normalize (const Vector2 &v) |
Vector3 | normalize (const Vector3 &v) |
Vector4 | normalize (const Vector4 &v) |
float | normalize (float v) |
v / v (for DirectX/Cg support) More... | |
template<class T > | |
bool | notNull (const shared_ptr< T > &ptr) |
template<class T > | |
bool | notNull (const T *ptr) |
template<class T > | |
bool | notNull (const lazy_ptr< T > &ptr) |
template<class T > | |
bool | notNull (const Pointer< T > &p) |
bool | ok () const |
template<class T1 , class T2 > | |
bool | operator!= (const G3DAllocator< T1 > &, const G3DAllocator< T2 > &) throw () |
bool | operator!= (const NetAddress &a, const NetAddress &b) |
Color4 | operator* (const Color3 &c3, const Color4 &c4) |
Extends the c3 with alpha = 1.0 More... | |
G3D::Color3 | operator* (float s, const G3D::Color3 &c) |
G3D::Color3 | operator* (G3D::Color1 &s, const G3D::Color3 &c) |
Vector2 | operator* (double s, const Vector2 &v) |
G3D::Color3 | operator* (const G3D::Color3 &c, G3D::Color1 &s) |
Vector2 | operator* (float s, const Vector2 &v) |
Vector2 | operator* (int s, const Vector2 &v) |
Color4 | operator* (float fScalar, const Color4 &other) |
Vector3 | operator* (const Vector3 &rkPoint, const Matrix3 &rkMatrix) |
v * M == M.transpose() * v More... | |
G3D::Vector3 | operator* (float s, const G3D::Vector3 &v) |
G3D::Vector3 | operator* (double s, const G3D::Vector3 &v) |
G3D::Vector3 | operator* (int s, const G3D::Vector3 &v) |
G3D::Quat | operator* (double s, const G3D::Quat &q) |
G3D::Quat | operator* (float s, const G3D::Quat &q) |
G3D::Color3 | operator/ (float s, const G3D::Color3 &c) |
std::ostream & | operator<< (std::ostream &os, const NetAddress &) |
std::ostream & | operator<< (std::ostream &os, const Vector3 &) |
template<class T1 , class T2 > | |
bool | operator== (const G3DAllocator< T1 > &, const G3DAllocator< T2 > &) throw () |
bool | operator== (const NetAddress &a, const NetAddress &b) |
Two addresses may point to the same computer but be != because they have different IP's. More... | |
void | parseCommaSeparated (const String s, Array< String > &array, bool stripQuotes=true) |
Separates a comma-separated line, properly escaping commas within double quotes (") and super quotes ("""). More... | |
void | parseFilename (const String &filename, String &drive, Array< String > &path, String &base, String &ext) |
Parses a filename into four useful pieces. More... | |
String | pathConcat (const String &dirname, const String &file) |
Appends file onto dirname, ensuring a / if needed. More... | |
double | pi () |
float | pif () |
int | pow2 (unsigned int x) |
Returns 2^x. More... | |
template<class T > | |
T | pow5 (T x) |
Returns x5 More... | |
int | prompt (const char *windowTitle, const char *promptx, const char **choice, int numChoices, bool useGui) |
Prints a prompt to stdout and waits for user input. More... | |
int | prompt (const char *windowTitle, const char *promptx, const char **choice, int numChoices) |
Prints a prompt and waits for user input. More... | |
String | readWholeFile (const String &filename) |
Returns the contents of a text file as a single string. More... | |
template<typename T > | |
bool | receive (T &message) |
If a message is waiting, deserializes the waiting message into message and returns true, otherwise returns false. More... | |
void | receive () |
Removes the current message from the queue. More... | |
bool | receive (NetAddress &sender) |
template<typename T > | |
bool | receive (NetAddress &sender, T &message) |
void | receiveHeader () |
Receives the messageType and messageSize from the socket. More... | |
void | receiveIntoBuffer () |
Accumulates whatever part of the message (not the header) is still waiting on the socket into the receiveBuffer during state = RECEIVING mode. More... | |
ReliableConduit (const NetAddress &addr) | |
ReliableConduit (const SOCKET &sock, const NetAddress &addr) | |
String | replace (const String &s, const String &pattern, const String &replacement) |
Returns a string which is s, with all instances of pattern replaced. More... | |
double | round (double f) |
float | round (float f) |
int | roundStochastically (float f) |
Rounds so that the mean of a set of rounded numbers is close to the mean of the original numbers. More... | |
float | rsq (float x) |
Computes 1 / sqrt(x). More... | |
double | rsqrt (double x) |
float | rsqrt (float x) |
void | runConcurrently (const Point3int32 &start, const Point3int32 &stopBefore, const std::function< void(Point3int32)> &callback, bool singleThread=false) |
Iterates over a 3D region using multiple threads and blocks until all threads have completed. More... | |
void | runConcurrently (const Point2int32 &start, const Point2int32 &stopBefore, const std::function< void(Point2int32)> &callback, bool singleThread=false) |
void | runConcurrently (const int &start, const int &stopBefore, const std::function< void(int)> &callback, bool singleThread=false) |
void | runConcurrently (const size_t &start, const size_t &stopBefore, const std::function< void(size_t)> &callback, bool singleThread=false) |
void | screenPrintf (const char *fmt ...) |
Displays output on the last G3D::GApp instantiated. More... | |
void | screenPrintf (const String &t ...) |
template<typename T > | |
void | send (uint32 type, const T &message) |
Serializes the message and schedules it to be sent as soon as possible, and then returns immediately. More... | |
void | send (uint32 type) |
Sends an empty message with the given type. More... | |
template<typename T > | |
void | send (const NetAddress &a, uint32 type, const T &msg) |
template<typename T > | |
void | send (const Array< NetAddress > &a, uint32 type, const T &m) |
Send the same message to multiple addresses (only serializes once). More... | |
void | sendBuffer (const BinaryOutput &b) |
void | sendBuffer (const NetAddress &a, BinaryOutput &b) |
void | serialize (const String &s, BinaryOutput &b) |
void | serialize (const int32 &i, BinaryOutput &b) |
void | serialize (const uint32 &i, BinaryOutput &b) |
void | serialize (const bool &i, BinaryOutput &b) |
void | serialize (const float32 &f, BinaryOutput &b) |
void | serialize (const float64 &f, BinaryOutput &b) |
template<typename T > | |
void | serialize (const Array< T > &array, BinaryOutput &b) |
serialize(const T&, BinaryOutput&) must have been overridden as well More... | |
void | serialize (const bool &b, TextOutput &to) |
void | serialize (const int &b, TextOutput &to) |
void | serialize (const uint8 &b, TextOutput &to) |
void | serialize (const double &b, TextOutput &to) |
void | serialize (const float &b, TextOutput &to) |
void | serialize (const String &b, TextOutput &to) |
void | serialize (const char *b, TextOutput &to) |
void | serialize (const Vector2 &v, class BinaryOutput &b) |
void | serialize (const Vector3::Axis &a, class BinaryOutput &bo) |
void | serialize (const Vector4 &v, class BinaryOutput &b) |
void | serialize (const Vector3 &v, class BinaryOutput &b) |
template<typename T > | |
void | serializeMessage (uint32 type, const T &m, BinaryOutput &b) const |
void | serviceNetwork () |
If NOT using G3D's internal threaded networking, you must invoke this periodically to service the receiving side network connections. More... | |
void | serviceNetworkSender (const G3D::NetChannel &channel) |
If NOT using G3D's internal threaded networking, you must invoke this periodically to service the sending side network connections. More... | |
void | setAssertionHook (AssertionHook hook) |
Allows customization of the global function invoked when a debugAssert fails. More... | |
void | setCocoaIcon (const char *filename) |
void | setConsolePrintHook (ConsolePrintHook h) |
Called by consolePrintf after the log and terminal have been written to. More... | |
void | setFailureHook (AssertionHook hook) |
Called by alwaysAssertM in case of failure in release mode. More... | |
void | setNetworkCommunicationInterval (const RealTime t) |
This is the amount of time G3D will pause the network thread to perform network communication, in seconds (default is 0s). More... | |
Vector2 | sign (const Vector2 &v) |
Vector3 | sign (const Vector3 &v) |
Vector4 | sign (const Vector4 &v) |
double | sign (double fValue) |
float | sign (float x) |
float | signedPow (float b, float e) |
Computes |b|^e * sign(b) More... | |
double | signedPow (double b, double e) |
Computes |b|^e * sign(b) More... | |
double | sinc (double x) |
sin(x)/x More... | |
int | sizeOfGLFormat (GLenum format) |
Returns the number of bytes occupied by a value in an OpenGL format (e.g. More... | |
float | smootherstep (float edge0, float edge1, float x) |
Perlin's C2 continous variation on smoothstep() More... | |
float | smoothstep (float edge0, float edge1, float x) |
The GLSL smoothstep function. More... | |
Array< String > | splitLines (const String &s) |
Splits string at new lines (handles \r\n and \n ). More... | |
double | square (double fValue) |
float | square (float x) |
int | square (int x) |
Vector2 | squareMagnitude (const Vector2 &x) |
Preserves sign while squaring magnitude. More... | |
Vector3 | squareMagnitude (const Vector3 &x) |
Preserves sign while squaring magnitude. More... | |
float | squareMagnitude (float x) |
Preserves sign while squaring magnitude. More... | |
double | squareMagnitude (double x) |
Preserves sign while squaring magnitude. More... | |
int | squareMagnitude (int x) |
Preserves sign while squaring magnitude. More... | |
int | stringCompare (const String &s1, const String &s2) |
A comparison function for passing to Array::sort. More... | |
String | stringJoin (const G3D::Array< String > &a, char joinChar) |
joinChar is not inserted at the beginning or end, just in between elements. More... | |
String | stringJoin (const G3D::Array< String > &a, const String &joinStr) |
int | stringPtrCompare (const String *s1, const String *s2) |
Array< String > | stringSplit (const String &x, char splitChar) |
Splits x at each occurance of splitChar. More... | |
void | stringSplit (const String &x, char splitChar, Array< String > &out) |
double | sumSquares (double x, double y) |
double | sumSquares (double x, double y, double z) |
float | sumSquares (float x, float y) |
float | sumSquares (float x, float y, float z) |
uint32_t | superFastHash (const void *_data, size_t numBytes) |
A hash function that is faster than CRC32 for arbitrary long strings. More... | |
void | System_free (void *) |
void * | System_malloc (size_t) |
void | tesselateComplexPolygon (const Array< Vector3 > &input, Array< Triangle > &output) |
Tesselates a complex polygon into a triangle set which is appended to the output. More... | |
double | toDegrees (double rad) |
float | toDegrees (float rad) |
float | toDegrees (int rad) |
String | toLower (const String &x) |
double | toRadians (double deg) |
float | toRadians (float deg) |
float | toRadians (int deg) |
SimTime | toSeconds (int hour, int minute, double seconds, AMPM ap) |
Converts a 12 hour clock time into the number of seconds since midnight. More... | |
SimTime | toSeconds (int hour, int minute, AMPM ap) |
String | toUpper (const String &x) |
Returns a new string that is an uppercase version of x. More... | |
void | toUTF8 (const String &s, Array< char > &result) |
Convert from ASCII to utf-8 encoding, adapted from https://everything2.com/title/Converting+ASCII+to+UTF-8. More... | |
String | trimWhitespace (const String &s) |
Strips whitespace from both ends of the string. More... | |
double | twoPi () |
unsigned int | uiClamp (unsigned int val, unsigned int low, unsigned int hi) |
float | uniformRandom (float low, float hi) |
double | uniformRandomD (double low, double hi) |
String | vformat (const char *fmt, va_list argPtr) |
Like format, but can be called with the argument list from a ... More... | |
ReliableConduitRef | waitForConnection () |
Block until a connection is received. More... | |
virtual uint32 | waitingMessageType () |
uint32_t | wangHash6432Shift (int64 key) |
Thomas Wang's 64-to-32-bit mix hash based on Robert Jenkin's hash http://www.concentric.net/~ttwang/tech/inthash.htm More... | |
String | wordWrap (const String &input, int numCols) |
Produces a new string that is the input string wrapped at a certain number of columns (where the line is broken at the latest space before the column limit.) Platform specific NEWLINEs are inserted to wrap. More... | |
float | wrap (float t, float lo, float hi) |
Computes a floating point modulo; the result is t wrapped to the range [lo, hi). More... | |
float | wrap (float t, float hi) |
double | wrap (double t, double lo, double hi) |
double | wrap (double t, double hi) |
void | writeWholeFile (const String &filename, const String &str, bool flush=true) |
More... | |
bool | zipfileExists (const String &filename, String &outZipfile, String &outInternalFile) |
Returns true if the given file (or directory) exists within a zipfile. More... | |
bool | zipfileExists (const String &filename) |
Variables | |
NetAddress | addr |
bool | alreadyReadMessage |
True when waitingForMessageType has read the message from the network into messageType/messageStream. More... | |
const bool | DONT_SHRINK_UNDERLYING_ARRAY = false |
Constant for passing to Array::resize More... | |
bool | ignoreBool |
double | ignoreDouble |
For use with default output arguments. More... | |
float | ignoreFloat |
For use with default output arguments. More... | |
int | ignoreInt |
For use with default output arguments. More... | |
String | ignoreString |
For use with default output arguments. More... | |
Array< uint8 > | messageBuffer |
The message received (the type has already been read off). More... | |
NetAddress | messageSender |
Origin of the received message. More... | |
uint32 | messageSize |
Total size of the incoming message (read from the header). More... | |
uint32 | messageType |
Type of the incoming message. More... | |
int | MTU |
Maximum transmission unit (packet size in bytes) for this socket. More... | |
const char * | NEWLINE |
HDC | OpenGLWindowHDC |
The HDC that wglMakeCurrent will use on Windows. More... | |
void * | receiveBuffer |
Shared buffer for receiving messages. More... | |
size_t | receiveBufferTotalSize |
Total size of the receiveBuffer. More... | |
size_t | receiveBufferUsedSize |
Size occupied by the current message... More... | |
SOCKET | sock |
const int | SORT_DECREASING = -1 |
Constant for Array::sort. More... | |
const int | SORT_INCREASING = 1 |
Constant for Array::sort. More... | |
enum G3D::State | state |
typedef Rect2D G3D::AABox2D |
typedef bool(* G3D::AssertionHook) (const char *_expression, const String &message, const char *filename, int lineNumber, bool useGuiPrompt) |
typedef float G3D::Biradiance |
typedef Color3 G3D::Biradiance3 |
Radiance * measure(Solid Angle) between two points, measured at the receiver orthogonal to the axis between them; W/m^2.
typedef _BSPMAP::Map G3D::BSPMap |
typedef CoordinateFrame G3D::CFrame |
typedef CompassDelta G3D::CompassBearing |
typedef Component<Color1, Image1> G3D::Component1 |
typedef Component<Color3, Image3> G3D::Component3 |
typedef Component<Color4, Image4> G3D::Component4 |
typedef void(* G3D::ConsolePrintHook) (const String &) |
typedef int G3D::DebugID |
Used with debugDraw.
typedef Color3 G3D::Energy3 |
Force * distance; J.
typedef float G3D::float32 |
typedef double G3D::float64 |
typedef shared_ptr<class GConsole> G3D::GConsoleRef |
typedef HGLRC G3D::GLContext |
OpenGL context (argument to glMakeCurrent, return value of glGetCurrentContext).
typedef shared_ptr<class Image3unorm8> G3D::Image3unorm8Ref |
typedef shared_ptr<class Image4> G3D::Image4Ref |
typedef shared_ptr<class Image4unorm8> G3D::Image4unorm8Ref |
typedef int16_t G3D::int16 |
typedef int32_t G3D::int32 |
typedef int64_t G3D::int64 |
typedef int8_t G3D::int8 |
typedef float G3D::Irradiance |
typedef Color3 G3D::Irradiance3 |
Incident power per area; W/m^2.
typedef shared_ptr<class LightweightConduit> G3D::LightweightConduitRef |
typedef Table< String, lazy_ptr<Model> > G3D::ModelTable |
typedef uint32 G3D::NetChannel |
Messages sent on different channels are asynchronous.
This is a way to send out-of-band information, such as transferring a giant file on one channel while sending small object updates on another.
typedef shared_ptr<class NetListener> G3D::NetListenerRef |
typedef uint32 G3D::NetMessageType |
Application defined message type.
typedef PhysicsFrame G3D::PFrame |
using G3D::Point2 = typedef Vector2 |
typedef Vector2int16 G3D::Point2int16 |
typedef Vector2int32 G3D::Point2int32 |
typedef Vector2uint16 G3D::Point2uint16 |
typedef Vector2uint32 G3D::Point2uint32 |
typedef Vector2unorm16 G3D::Point2unorm16 |
typedef Vector3 G3D::Point3 |
Points are technically distinct mathematical entities from vectors.
Actually distinguishing them at the class level tends to add lots of boilerplate (e.g., (P - Point3::zero()).direction() vs. P.direction()), so many programmers prefer use a single class, as GLSL does.
G3D provides this typedef as a way of documenting arguments that are locations in space and not directions. Beware that points and vectors are interchangable from the compiler's point of view, and that the programmer must track which is really which.
typedef Vector3int16 G3D::Point3int16 |
typedef Vector3int32 G3D::Point3int32 |
typedef Vector3uint8 G3D::Point3uint8 |
typedef Vector4int32 G3D::Point4int32 |
typedef float G3D::Power |
typedef Color3 G3D::Power3 |
Energy per time; W.
typedef Spline<Power3> G3D::Power3Spline |
typedef Vector4 G3D::ProjInfo |
typedef float G3D::Radiance |
typedef Color3 G3D::Radiance3 |
Power per (measure(SolidAngle) * measure(Area)); W / (m^2 sr)
typedef float G3D::Radiosity |
typedef Color3 G3D::Radiosity3 |
Power per area; J / m^2.
typedef double G3D::RealTime |
Actual wall clock time in seconds (Unix time).
typedef shared_ptr<class ReliableConduit> G3D::ReliableConduitRef |
typedef float G3D::SimTime |
Time, in seconds in a simulation.
Relatively low precision compared to RealTime.
typedef std::string G3D::String |
typedef ImageFormat G3D::TextureFormat |
typedef shared_ptr<class ThirdPersonManipulator> G3D::ThirdPersonManipulatorRef |
typedef uint16_t G3D::uint16 |
typedef uint32_t G3D::uint32 |
typedef uint64_t G3D::uint64 |
typedef uint8_t G3D::uint8 |
typedef AttributeArray G3D::VAR |
typedef AttributeArray G3D::VertexRange |
anonymous enum |
General keyboard/mouse state definitions.
Enumerator | |
---|---|
SDL_PRESSED | |
SDL_RELEASED |
anonymous enum |
Enumerator | |
---|---|
GKEYMOD_NONE | |
GKEYMOD_LSHIFT | |
GKEYMOD_RSHIFT | |
GKEYMOD_LCTRL | |
GKEYMOD_RCTRL | |
GKEYMOD_LALT | |
GKEYMOD_RALT | |
GKEYMOD_LMETA | |
GKEYMOD_RMETA | |
GKEYMOD_NUM | |
GKEYMOD_CAPS | |
GKEYMOD_MODE | |
GKEYMOD_RESERVED |
enum G3D::AMPM |
enum G3D::BinaryFormat |
Some values like float16 and int128 have no current CPU data structure that implements them but are useful for file formats and for GPUs.
CHUNK_BINFMT data follows the protocol.
enum G3D::G3DEndian |
enum G3D::ImageStorage |
Used by Component.
enum G3D::SpawnBehavior |
enum G3D::State |
G3D::~LightweightConduit | ( | ) |
Closes the socket.
G3D::~NetListener | ( | ) |
G3D::~ReliableConduit | ( | ) |
Closes the socket.
|
inline |
|
inline |
|
inline |
Referenced by aCos().
NetAddress G3D::address | ( | ) | const |
The address of the other end of the conduit.
|
inline |
|
inline |
|
inline |
|
inline |
Returns true if x is not exactly equal to 0.0f.
Referenced by categorizeByDerivedType(), and glsl::screenSpaceRayTrace_glsl::numLayers().
Compares a < b ignoring case, but puts names beginning with "G3D" first in a sort.
|
inline |
|
inline |
|
inline |
|
inline |
Returns true if x is not exactly equal to 0.0f.
Referenced by G3D::DDGIVolumeSpecification::DDGIVolumeSpecification(), G3D::HeightfieldModel::lazyCreate(), G3D::ParticleSystemModel::lazyCreate(), G3D::MD3Model::lazyCreate(), G3D::MD2Model::lazyCreate(), and G3D::Spline< UprightFrame >::Spline().
|
inline |
AssertionHook G3D::assertionHook | ( | ) |
|
inline |
|
inline |
Returns true if the test string begins with the pattern string.
void G3D::buildPrefixTree | ( | const Array< String > & | list, |
DepthFirstTreeBuilder< String > & | tree | ||
) |
Does a depth first traversal of a prefix tree generated from the passed list.
The list must be sorted alphabetically.
list | alphabetically sorted list of strings |
tree | depth first tree traversal, providing functions enterChild(n) and goToParent() |
int32 G3D::byteSize | ( | BinaryFormat | f | ) |
Returns -1 if the format is custom, otherwise the byte size of a single element in this format.
Referenced by G3D::_internal::_BinaryFormat< Color4unorm8 >::x().
void G3D::categorizeByDerivedType | ( | const Array< PointerType > & | all, |
Array< Array< PointerType > > & | derivedArray | ||
) |
Separates a large array into subarrays by their typeid().
Example:
|
inline |
Return the next power of 2 higher than the input If the input is already a power of 2, the output will be the same as the input.
Referenced by ceilPow2(), and G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::clear().
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by glsl::compatibility_glsl::atan2(), G3D::Vector2::clamp(), G3D::Vector4::clamp(), G3D::Vector3int32::clamp(), G3D::Color3::clamp(), G3D::Vector3::clamp(), glsl::UniversalMaterial_glsl::computeRefraction(), glsl::gradient_glsl::electricGradient(), glsl::Film_FXAA_13_performance_pix::FxaaPixelShader(), glsl::DDGIVolume_glsl::gridCoordToProbeIndex(), glsl::DefaultRenderer_gatherGlossy_pix::main(), glsl::DepthOfField_blur_pix::main(), glsl::gradient_glsl::neonGradient(), G3D::snorm16::operator float(), G3D::snorm8::operator float(), glsl::DDGIVolume_glsl::probeIndexToColor(), glsl::AmbientOcclusion_sample_glsl::sampleAO(), glsl::DDGIVolume_glsl::sampleOneDDGIVolume(), glsl::compatibility_glsl::saturate(), G3D::Light::setSpotHardness(), smootherstep(), smoothstep(), G3D::snorm16::snorm16(), G3D::snorm8::snorm8(), glsl::AmbientOcclusion_AO_pix::tapLocation(), glsl::screenSpaceRayTrace_glsl::traceScreenSpaceRay1(), glsl::g3dmath_glsl::unitSmoothstep(), G3D::unorm16::unorm16(), and G3D::unorm8::unorm8().
|
inline |
|
inline |
bool G3D::clientWaiting | ( | ) | const |
True if a client is waiting (i.e.
waitForConnection will return immediately).
String G3D::consolePrintf | ( | const char * | fmt ... | ) |
Sends output to the log and to the last GConsole instantiated.
Guarantees that the output has been flushed by the time the routine returns.
ConsolePrintHook G3D::consolePrintHook | ( | ) |
bool G3D::contains | ( | const T * | array, |
int | len, | ||
const T & | e | ||
) |
|
inline |
Number of new lines in the given string (handles \r\n
and \n
).
FILE* G3D::createTempFile | ( | ) |
Returns a temporary file that is open for read/write access.
This tries harder than the ANSI tmpfile, so it may succeed when that fails.
YType G3D::cyclicCatmullRomSpline | ( | double | t, |
const YType * | controlY, | ||
int | numPoints | ||
) |
See also G3D::Spline.
Referenced by cyclicCatmullRomSpline().
YType G3D::cyclicCatmullRomSpline | ( | double | t, |
const Array< YType > & | controlY | ||
) |
A cubic spline with regularly spaced control points.
The spline interpolates the control points. The spline will wrap from the last point back to the first.
The t parameter is on the range [0, controlY.size()], where integers correspond to control points exactly.
See also G3D::Spline
DebugID G3D::debugDraw | ( | const shared_ptr< Shape > & | shape, |
float | displayTime = 0.0f , |
||
const Color4 & | solidColor = Color3::white() , |
||
const Color4 & | wireColor = Color3::black() , |
||
const CoordinateFrame & | cframe = CoordinateFrame() |
||
) |
Schedule a G3D::Shape for later rendering.
Adds this shape and the specified information to the current G3D::GApp::debugShapeArray, to be rendered at runtime for debugging purposes.
Sample usage is:
displayTime | Real-world time in seconds to display the shape for. A shape always displays for at least one frame. 0 = one frame. inf() = until explicitly removed by the GApp. |
DebugID G3D::debugDraw | ( | const Box & | b, |
float | displayTime = 0.0f , |
||
const Color4 & | solidColor = Color3::white() , |
||
const Color4 & | wireColor = Color3::black() , |
||
const CoordinateFrame & | cframe = CoordinateFrame() |
||
) |
overloaded forms of debugDraw so that more common parameters can be passed (e.g Boxes, Spheres)
DebugID G3D::debugDraw | ( | const Array< Vector3 > & | vertices, |
const Array< int > & | indices, | ||
float | displayTime = 0.0f , |
||
const Color4 & | solidColor = Color3::white() , |
||
const Color4 & | wireColor = Color3::black() , |
||
const CoordinateFrame & | cframe = CoordinateFrame() |
||
) |
DebugID G3D::debugDraw | ( | const CPUVertexArray & | vertices, |
const Array< Tri > & | tris, | ||
float | displayTime = 0.0f , |
||
const Color4 & | solidColor = Color3::white() , |
||
const Color4 & | wireColor = Color3::black() , |
||
const CoordinateFrame & | cframe = CoordinateFrame() |
||
) |
DebugID G3D::debugDraw | ( | const Sphere & | s, |
float | displayTime = 0.0f , |
||
const Color4 & | solidColor = Color3::white() , |
||
const Color4 & | wireColor = Color3::black() , |
||
const CoordinateFrame & | cframe = CoordinateFrame() |
||
) |
DebugID G3D::debugDraw | ( | const Point3 & | p, |
float | displayTime = 0.0f , |
||
const Color4 & | solidColor = Color3::white() , |
||
const Color4 & | wireColor = Color3::black() , |
||
const CoordinateFrame & | cframe = CoordinateFrame() |
||
) |
Drawing of Points implemented as drawing small spheres.
DebugID G3D::debugDraw | ( | const CoordinateFrame & | cf, |
float | displayTime = 0.0f , |
||
const Color4 & | solidColor = Color3::white() , |
||
const Color4 & | wireColor = Color3::black() , |
||
const CoordinateFrame & | cframe = CoordinateFrame() |
||
) |
DebugID G3D::debugDrawLabel | ( | const Point3 & | wsPos, |
const Vector3 & | csOffset, | ||
const GuiText & | text, | ||
float | displayTime = 0.0f , |
||
float | size = 0.1f , |
||
bool | sizeInPixels = false , |
||
const GFont::XAlign | xalign = GFont::XALIGN_CENTER , |
||
const GFont::YAlign | yalign = GFont::YALIGN_CENTER |
||
) |
Draws a label onto the screen for debug purposes.
DebugID G3D::debugDrawLabel | ( | const Point3 & | wsPos, |
const Vector3 & | csOffset, | ||
const String & | text, | ||
const Color3 & | color, | ||
float | displayTime = 0.0f , |
||
float | size = 0.1f , |
||
bool | sizeInPixels = false , |
||
const GFont::XAlign | xalign = GFont::XALIGN_CENTER , |
||
const GFont::YAlign | yalign = GFont::YALIGN_CENTER |
||
) |
String G3D::debugPrintf | ( | const char * | fmt ... | ) |
Under Visual Studio, appears in the Debug pane of the Output window On Unix-based operating systems the output is sent to stderr.
Also sends output to the console (G3D::consolePrintf) if there is a consolePrintHook, and flushes before returning.
Referenced by G3D::PointHashGrid< Value, PosFunc, EqualsFunc >::debugPrintStatistics(), G3D::FastPointHashGrid< Value, PosFunc >::debugPrintStatistics(), G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::debugPrintStatus(), and G3D::Table< String, double >::debugPrintStatus().
void G3D::describeSystem | ( | class RenderDevice * | rd, |
class NetworkDevice * | nd, | ||
class TextOutput & | t | ||
) |
Prints a human-readable description of this machine to the text output stream.
Either argument may be nullptr.
void G3D::describeSystem | ( | class RenderDevice * | rd, |
class NetworkDevice * | nd, | ||
String & | s | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void G3D::deserialize | ( | Array< T > & | array, |
BinaryInput & | b | ||
) |
void G3D::deserialize | ( | Vector2 & | v, |
class BinaryInput & | b | ||
) |
void G3D::deserialize | ( | Vector3::Axis & | a, |
class BinaryInput & | bo | ||
) |
void G3D::deserialize | ( | Vector4 & | v, |
class BinaryInput & | b | ||
) |
void G3D::deserialize | ( | bool & | b, |
TextInput & | ti | ||
) |
void G3D::deserialize | ( | int & | b, |
TextInput & | ti | ||
) |
void G3D::deserialize | ( | double & | b, |
TextInput & | ti | ||
) |
void G3D::deserialize | ( | float & | b, |
TextInput & | ti | ||
) |
void G3D::deserialize | ( | Vector3 & | v, |
class BinaryInput & | b | ||
) |
|
inline |
|
inline |
|
inline |
Referenced by G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Node::intersectRay(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::intersectRay(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Node::intersects(), glsl::reverseReprojection_glsl::reverseReprojection(), and glsl::reverseReprojection_glsl::twoLayerReverseReprojection().
|
inline |
|
inline |
|
inline |
|
inline |
a * b (for DirectX/Cg support)
Referenced by glsl::Light_glsl::addLightContribution(), glsl::Light_glsl::computeAttenuation(), glsl::LightingEnvironment_LightUniforms_glsl::computeDirectLighting(), glsl::UniversalMaterial_glsl::computeRefraction(), glsl::Light_glsl::computeShading(), glsl::DefaultRenderer_gatherGlossy_pix::main(), glsl::g3dmath_glsl::mean(), glsl::noise_glsl::noise1_Point3(), glsl::AmbientOcclusion_AO_pix::sampleAO(), glsl::DDGIVolume_glsl::sampleOneDDGIVolume(), glsl::FogVolumeSurface_render_pix::shade(), glsl::Light_glsl::spotLightFalloff(), glsl::g3dmath_glsl::sum(), and glsl::UniversalMaterial_shade_glsl::UniversalMaterial_shade().
|
inline |
Returns true if the test string ends with the pattern string.
void G3D::enumToJavaScriptDeclaration | ( | TextOutput & | t | ) |
Generates JavaScript source code defining an enum equivalent to EnumClass.
|
inline |
|
inline |
Referenced by glsl::DepthOfField_blur_pix::main().
AssertionHook G3D::failureHook | ( | ) |
Returns the portion of a filename to the left of the last period and to the right of the last slash or colon.
Returns the part of the filename that includes the base and ext from parseFilename (i.e.
everything to the right of the path).
bool G3D::filenameContainsWildcards | ( | const String & | filename | ) |
Returns true if '*' or '?' appears in the string.
Returns the drive (if Win32) and path from a filename, including a slash if there was one.
filenamePath(f) + filenameBaseExt(f) == f
|
inline |
Finds the index of the first '\' or '/' character, starting at index start (if start is -1, starts at the end of the string).
|
inline |
Finds the index of the first '\' or '/' character, starting at index start.
float G3D::finf | ( | ) |
Referenced by G3D::PlaneShape::area(), G3D::PlaneShape::boundingSphere(), G3D::CollisionDetection::collisionTimeForMovingPointFixedTriangle(), G3D::FullScreenWidget::depth(), G3D::Light::distance(), G3D::FogVolumeSurface::getObjectSpaceBoundingSphere(), G3D::ControlPointEditor::ControlPointSurface::getObjectSpaceBoundingSphere(), G3D::Ray::intersectionTime(), G3D::PrecomputedRay::intersectionTime(), isFinite(), G3D::Pathfinder< Node, HashFunc >::PriorityQueue< Key, Value >::removeMin(), G3D::GuiNumberBox< int >::roundAndClamp(), G3D::GApp::setFrameDuration(), and G3D::Quat::slerp().
Given a 16-bit integer, returns the integer with the bytes in the opposite order.
Given a 32-bit integer, returns the integer with the bytes in the opposite order.
float G3D::fnan | ( | ) |
Referenced by G3D::Widget::positionalEventZ().
String G3D::format | ( | const char * | fmt ... | ) |
Produces a string from arguments of the style of printf.
This avoids problems with buffer overflows when using sprintf and makes it easy to use the result functionally. This function is fast when the resulting string is under 160 characters (not including terminator) and slower when the string is longer.
Referenced by G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::debugCheckStatus(), G3D::Image::get(), G3D::Any::IndexOutOfBounds::IndexOutOfBounds(), G3D::GBuffer::Specification::memorySize(), G3D::Array< G3D::AABox >::operator[](), G3D::GuiNumberBox< int >::precision(), serializeMessage(), G3D::Image::set(), G3D::Map2D< Color1, Color1 >::slowGet(), G3D::Framebuffer::texture(), G3D::GuiNumberBox< int >::updateText(), and G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Node::verifyNode().
|
inline |
|
inline |
|
inline |
Note that fuzzyEq(a, b) && fuzzyEq(b, c) does not imply fuzzyEq(a, c), although that will be the case on some occasions.
Referenced by G3D::Plane::fuzzyContains(), G3D::Vector2::fuzzyEq(), G3D::Vector4::fuzzyEq(), G3D::Vector3::fuzzyEq(), G3D::Color4::fuzzyEq(), G3D::Quat::fuzzyEq(), G3D::Color3::fuzzyEq(), fuzzyNe(), G3D::Vector3::getTangents(), G3D::Vector2::isUnit(), G3D::Vector3::isUnit(), G3D::Vector2::isZero(), G3D::Vector3::isZero(), and G3D::CoordinateFrame::pointToObjectSpace().
|
inline |
|
inline |
Is a near or greater than b?
|
inline |
Is a strictly greater than b? (Guaranteed false if a <= b).
(Possibly false if a > b)
|
inline |
Is a near or less than b?
|
inline |
Is a strictly less than b? (Guaranteed false if a >= b)
|
inline |
True if a is definitely not equal to b.
Guaranteed false if a == b. Possibly false when a != b.
Referenced by G3D::Vector2::fuzzyNe(), G3D::Vector4::fuzzyNe(), G3D::Vector3::fuzzyNe(), G3D::Color4::fuzzyNe(), and G3D::Color3::fuzzyNe().
int G3D::g3dfnmatch | ( | const char * | pattern, |
const char * | string, | ||
int | flags | ||
) |
Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
Compares a filename or pathname to a pattern.
The fnmatch() function checks whether the string argument matches the pattern argument, which is a shell wildcard pattern. The flags argument modifies the behaviour; it is the bitwise OR of zero or more of the following flags:
void G3D::gaussian1D | ( | Array< float > & | coeff, |
int | N = 5 , |
||
float | std = 0.5f |
||
) |
Generates a set of 1D gaussian filter coefficients of size N.
The coefficients are centered on element (N-1)/2 and have standard deviation given by std. The coefficients are normalized such that the sum across coeff is 1.0.
Matches the results returned by Matlab fspecial('gaussian', [1, N], std)
float G3D::gaussRandom | ( | float | mean = 0.0f , |
float | stdev = 1.0f |
||
) |
Creates a unique filename base in the current directory using the specified prefix and suffix.
Creates a unique filename base in the current directory using the specified prefix, though any suffix is possible.
String G3D::getOpenGLState | ( | bool | showDisabled = true | ) |
Returns all OpenGL state as a formatted string of C++ code that will reproduce that state.
Leaves all OpenGL state in exactly the same way it found it. Use this for debugging when OpenGL doesn't seem to be in the same state that you think it is in.
A common idiom is: {String s = getOpenGLState(false); debugPrintf("%s", s.c_str();}
showDisabled | if false, state that is not affecting rendering is not shown (e.g. if lighting is off, lighting information is not shown). |
void G3D::glClipToBox | ( | const class AABox & | box | ) |
Configure (and enable) OpenGL clipping planes to clip to the inside of this box.
Uses the current object-to-world and camera transformation to position the box. The box then stays fixed at that position in camera space.
|
inline |
|
inline |
|
inline |
|
inline |
void G3D::glDisableAllClipping | ( | ) |
Turn off all OpenGL clipping planes.
void G3D::glDisableAllTextures | ( | ) |
Calls glDisable() for all supported texture types: 1D, 2D, 3D, cube, rectangle.
const char* G3D::GLenumToString | ( | GLenum | i | ) |
Pretty printer for GLenums.
Useful for debugging OpenGL code.
GLboolean G3D::glGetBoolean | ( | GLenum | which | ) |
A functional version of glGetDoublev
|
inline |
Returns the current OpenGL context if more than one is in use.
BETA API– subject to change
GLdouble G3D::glGetDouble | ( | GLenum | which | ) |
A functional version of glGetDoublev
|
inline |
Read all errors off the OpenGL stack and ignore them.
GLfloat G3D::glGetFloat | ( | GLenum | which | ) |
A functional version of glGetFloatv
GLint G3D::glGetInteger | ( | GLenum | which | ) |
A functional version of glGetIntegerv
void G3D::glGetMatrix | ( | GLenum | name, |
Matrix4 & | m | ||
) |
Matrix4 G3D::glGetMatrix | ( | GLenum | name | ) |
void* G3D::glGetProcAddress | ( | const char * | name | ) |
Platform independent version of wglGetProcAddress/glXGetProcAddress/NSGLGetProcAddress.
Vector2 G3D::glGetVector2 | ( | GLenum | which | ) |
Safe to call even if the glGet would return more than 2 values.
Vector3 G3D::glGetVector3 | ( | GLenum | which | ) |
Vector4 G3D::glGetVector4 | ( | GLenum | which | ) |
void G3D::glLoadInvMatrix | ( | const CoordinateFrame & | cf | ) |
Loads the inverse of a coordinate frame into the current OpenGL matrix slot.
void G3D::glLoadMatrix | ( | const CoordinateFrame & | cf | ) |
Loads a coordinate frame into the current OpenGL matrix slot.
void G3D::glLoadMatrix | ( | const Matrix4 & | m | ) |
|
inline |
This is a platform-independent version of the function to set the current OpenGL context for a thread.
void G3D::glMultInvMatrix | ( | const CoordinateFrame & | cf | ) |
Multiplies the current GL matrix slot by the inverse of a matrix.
|
inline |
Referenced by glMultiTexCoord().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void G3D::glMultMatrix | ( | const CoordinateFrame & | cf | ) |
Multiplies the current GL matrix slot by this matrix.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Takes an object space point to screen space using the current MODELVIEW and PROJECTION matrices.
The resulting xy values are in pixels, the z value is on the glDepthRange scale, and the w value contains rhw (-1/z for camera space z), which is useful for scaling line and point size.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Finds the greatest common prefix of two strings of ' ', ':', ';', '/', and '\' separated words.
a | const String |
b | const String |
|
inline |
Referenced by aSin().
void G3D::hammersleySequence2D | ( | int | i, |
const int | N, | ||
float & | x, | ||
float & | y | ||
) |
Returns the ith Hammersley point from a N-point sequence on the unit square, [0, 1].
Referenced by G3D::Vector2::hammersleySequence2D().
int G3D::highestBit | ( | uint32 | x | ) |
Returnes the 0-based index of the highest 1 bit from the left.
-1 means the number was 0.
|
inline |
|
inline |
Referenced by G3D::BlockPoolMemoryManager::alloc(), and G3D::GuiNumberBox< int >::precision().
|
inline |
Clamps the value to the range [low, hi] (inclusive)
Referenced by clamp(), G3D::GuiDropDownList::selectedIndex(), G3D::Map2D< Color1, Color1 >::slowGet(), and G3D::unorm8::unorm8().
|
inline |
Vector4int32 G3D::iFloor | ( | const Vector4 & | ) |
Vector3int32 G3D::iFloor | ( | const Vector3 & | ) |
|
inline |
|
inline |
|
inline |
Computes x % 3.
bool G3D::inConstSegment | ( | const char * | c | ) |
Returns true if this C string pointer is definitely located in the constant program data segment and does not require memory management.
Used by G3D::G3DString.
Referenced by G3D::G3DString< INTERNAL_SIZE >::ensureAllocation(), G3D::G3DString< INTERNAL_SIZE >::G3DString(), G3D::G3DString< INTERNAL_SIZE >::inConst(), G3D::G3DString< INTERNAL_SIZE >::operator=(), and G3D::G3DString< INTERNAL_SIZE >::testInvariants().
double G3D::inf | ( | ) |
This value should not be tested against directly, instead G3D::isNan() and G3D::isFinite() will return reliable results.
Referenced by G3D::GuiNumberBox< int >::commit(), G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::distance(), eps(), G3D::FogVolumeSurface::getObjectSpaceBoundingBox(), G3D::ControlPointEditor::ControlPointSurface::getObjectSpaceBoundingBox(), G3D::GuiNumberBox< int >::GuiNumberBox(), isFinite(), G3D::GuiPane::maxVal(), G3D::GuiPane::minVal(), glsl::g3dmath_glsl::normInf(), G3D::GApp::setFrameDuration(), glsl::g3dmath_glsl::signNotZero(), and G3D::GuiNumberBox< int >::updateText().
void G3D::initG3D | ( | const G3DSpecification & | spec = G3DSpecification() | ) |
Call from main() to initialize the G3D library state and register shutdown memory managers.
This does not initialize OpenGL.
If you invoke initGLG3D, then it will automatically call initG3D. It is safe to call this function more than once–it simply ignores multiple calls.
void G3D::initGLG3D | ( | const G3DSpecification & | spec = G3DSpecification() | ) |
Call from main() to initialize the GLG3D library state and register shutdown memory managers.
This does not initialize OpenGL.
This automatically calls initG3D. It is safe to call this function more than once–it simply ignores multiple calls.
|
inline |
Fast round to integer using the lrint routine.
Typically 6x faster than casting to integer.
Referenced by G3D::Icon::height(), G3D::XML::operator int(), and G3D::Icon::width().
|
inline |
Fast round to integer using the lrint routine.
Typically 6x faster than casting to integer.
|
inline |
These standard C functions are renamed for clarity/naming conventions and to return bool, not int.
|
inline |
Much faster than isDigit in MSVC.
|
inline |
Referenced by G3D::Array< G3D::AABox >::medianPartition().
|
inline |
Returns true if the argument is a finite real number.
Referenced by G3D::Vector2::isFinite(), G3D::Vector4::isFinite(), G3D::Vector3::isFinite(), G3D::Color4::isFinite(), G3D::Box::isFinite(), and G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::makeNode().
|
inline |
|
inline |
Referenced by iSign(), and squareMagnitude().
|
inline |
|
inline |
|
inline |
These standard C functions are renamed for clarity/naming conventions and to return bool, not int.
bool G3D::isNaN | ( | double | x | ) |
Returns true if the argument is NaN (not a number).
You can't use x == nan to test this because all comparisons against nan return false.
Referenced by isFinite(), G3D::Vector2::isNaN(), G3D::Quat::isNaN(), G3D::ShadowMap::setPolygonOffset(), sinc(), and G3D::GuiNumberBox< int >::updateText().
bool G3D::isNaN | ( | float | x | ) |
|
inline |
|
inline |
|
inline |
These standard C functions are renamed for clarity/naming conventions and to return bool, not int.
bool G3D::isNull | ( | const shared_ptr< T > & | ptr | ) |
bool G3D::isNull | ( | const T * | ptr | ) |
bool G3D::isNull | ( | const lazy_ptr< T > & | ptr | ) |
Referenced by G3D::MeshShape::bspTree(), G3D::MapComponent< Image >::computeCPUStats(), G3D::MapComponent< Image >::create(), G3D::RenderDevice::currentDrawFramebufferComplete(), G3D::RenderDevice::currentReadFramebufferComplete(), G3D::GuiText::Element::font(), G3D::ArticulatedModel::Mesh::hasBones(), G3D::MapComponent< Image >::image(), G3D::ArticulatedModel::Part::isRoot(), G3D::Texture::opaqueBlackIfNull(), G3D::Texture::opaqueGrayIfNull(), G3D::FastPointHashGrid< Value, PosFunc >::Iterator::operator++(), G3D::AudioDevice::WeakCleanupArray< G3D::Sound >::remember(), G3D::Component< Color3, Image3 >::sample(), G3D::LightingEnvironment::screenColorTexture(), G3D::GuiNumberBox< int >::setRect(), G3D::MapComponent< Image >::texture(), G3D::Texture::whiteCubeIfNull(), G3D::Texture::whiteIfNull(), and G3D::Texture::zeroIfNull().
bool G3D::isNull | ( | const Pointer< T > & | p | ) |
|
inline |
|
inline |
True if num is a power of two.
Referenced by G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::FastPODTable(), G3D::MapComponent< Image >::getTexture(), and G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::grow().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Useful for debugging purposes.
Referenced by G3D::BlockPoolMemoryManager::alloc(), G3D::Table< Key, Value, HashFunc, EqualsFunc >::Iterator::operator Entry *(), G3D::Table< Key, Value, HashFunc, EqualsFunc >::Iterator::operator++(), and G3D::Table< Key, Value, HashFunc, EqualsFunc >::Iterator::operator->().
bool G3D::isValidIdentifier | ( | const String & | s | ) |
Returns true if s is a valid C identifier.
|
inline |
Returns true if the pointer is likely to be a valid pointer (instead of an arbitrary number).
Useful for debugging purposes.
|
inline |
These standard C functions are renamed for clarity/naming conventions and to return bool, not int.
|
inline |
Wraps the value to the range [0, hi) (exclusive on the high end).
This is like the clock arithmetic produced by % (modulo) except the result is guaranteed to be positive.
Referenced by G3D::Image::get(), G3D::Spline< UprightFrame >::getControl(), G3D::Image::set(), G3D::Map2D< Color1, Color1 >::slowGet(), and G3D::Vector3int32::wrap().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns a + (b - a) * f;
Referenced by G3D::UniversalBSDF::schlickFresnel().
|
inline |
float G3D::lerpAngle | ( | float | a, |
float | b, | ||
float | t | ||
) |
A lerp() for angles in radians that guarantees moving the shortest way around the circle.
String G3D::license | ( | ) |
G3D, SDL, and IJG libraries require license documentation to be distributed with your program.
This generates the string that must appear in your documentation. Your program can be commercial, closed-source under any license you want.
G3D::LightweightConduit | ( | uint16 | receivePort, |
bool | enableReceive, | ||
bool | enableBroadcast | ||
) |
YType G3D::linearSpline | ( | double | x, |
const XType * | controlX, | ||
const YType * | controlY, | ||
int | numControl | ||
) |
Interpolates a property according to a piecewise linear spline.
This provides C0 continuity but the derivatives are not smooth.
Example: const double times[] = {MIDNIGHT, SUNRISE - HOUR, SUNRISE, SUNRISE + sunRiseAndSetTime / 4, SUNRISE + sunRiseAndSetTime, SUNSET - sunRiseAndSetTime, SUNSET - sunRiseAndSetTime / 2, SUNSET, SUNSET + HOUR/2, DAY}; const Color3 color[] = {Color3(0, .0, .1), Color3(0, .0, .1), Color3::black(), Color3::black(), Color3::white() * .25, Color3::white() * .25, Color3(.5, .2, .2), Color3(.05, .05, .1), Color3(0, .0, .1), Color3(0, .0, .1)}; ambient = linearSpline(time, times, color, 10);
See also G3D::Spline
x | The spline is a function of x; this is the sample to choose. |
controlX | controlX[i], controlY[i] is a control points. It is assumed that controlX are strictly increasing. XType must support the "<" operator and a subtraction operator that returns a number. |
controlY | YType must support multiplication and addition. |
numControl | The number of control points. |
Computes the log of each component.
Useful for inverting the monitor gamma function or simulating perceptual response.
|
inline |
|
inline |
|
inline |
void G3D::logLazyPrintf | ( | const char * | fmt, |
... | |||
) |
Does not flush the buffer; follow up with a logPrintf to force the flush.
void G3D::logPrintf | ( | const char * | fmt, |
... | |||
) |
Prints to the common system log, log.txt, which is usually in the working directory of the program.
If your disk is not writable or is slow, it will attempt to write to "c:/tmp/log.txt" or "c:/temp/log.txt" on Windows systems instead.
Unlike printf or debugPrintf, this function guarantees that all output is committed before it returns. This is very useful for debugging a crash, which might hide the last few buffered print statements otherwise.
Many G3D routines write useful warnings and debugging information to the system log, which makes it a good first place to go when tracking down a problem.
Replaces invalid characters in a string with underscroes to make the string a valid C identifier.
|
inline |
Referenced by G3D::GuiPane::addNumberBox(), G3D::GuiPane::addRadioButton(), G3D::GuiPane::addSlider(), glsl::BilateralFilter_apply_pix::calculateBilateralWeight(), G3D::Rect2D::center(), G3D::G3DString< INTERNAL_SIZE >::chooseAllocationSize(), glsl::DepthOfField_glsl::circleOfConfusionRadiusPixels(), G3D::FastPointHashGrid< Value, PosFunc >::clear(), glsl::Light_glsl::computeAttenuation(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::computeBounds(), glsl::Light_glsl::computeShading(), G3D::Rect2D::contains(), G3D::Rect2D::corner(), G3D::AttributeArray::createInterleaved(), G3D::FastPointHashGrid< Value, PosFunc >::debugPrintStatistics(), glsl::UniversalMaterial_sample_glsl::dim(), G3D::G3DString< INTERNAL_SIZE >::erase(), G3D::Rect2D::extent(), glsl::Film_FXAA_13_performance_pix::FxaaLuma(), glsl::Film_FXAA_13_performance_pix::FxaaPixelShader(), G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::getStats(), G3D::GLFWWindow::handleResizeFromCallback(), glsl::gradient_glsl::heatmapGradient(), G3D::Rect2D::height(), G3D::Rect2D::intersect(), G3D::Rect2D::intersects(), G3D::Rect2D::intersectsOrTouches(), G3D::Rect2D::isEmpty(), G3D::Rect2D::isFinite(), glsl::g3dmath_glsl::lengthSquared(), G3D::Rect2D::lerp(), glsl::DepthOfField_blur_pix::main(), G3D::Color4unorm8::max(), G3D::Color3unorm8::max(), G3D::Vector3uint8::max(), G3D::Vector2uint32::max(), G3D::Vector2int32::max(), G3D::Vector3int16::max(), G3D::Vector2uint16::max(), G3D::Vector2int16::max(), G3D::Vector4int32::max(), G3D::Vector3int32::max(), G3D::Color1::max(), G3D::Color4::max(), G3D::Vector4::max(), G3D::Vector2::max(), G3D::Color3::max(), max(), G3D::Vector3::max(), glsl::g3dmath_glsl::max3(), G3D::G3DAllocator< T >::max_size(), maxNotNPOS(), glsl::g3dmath_glsl::meanComponent(), G3D::Rect2D::merge(), glsl::g3dmath_glsl::min4(), glsl::DefaultRenderer_pathTracedIndirect_pix::neonGradient(), glsl::gradient_glsl::neonGradient(), G3D::Texture::numMipMapLevels(), G3D::Rect2D::operator!=(), G3D::Rect2D::operator*(), G3D::Rect2D::operator+(), G3D::Rect2D::operator-(), G3D::Rect2D::operator/(), G3D::Rect2D::operator==(), G3D::Image::R(), G3D::Map2D< Color1, Color1 >::R(), G3D::Rect2D::randomPoint(), G3D::Rect2D::Rect2D(), G3D::SmallArray< G3D::Vector4, 8 >::resize(), G3D::Array< G3D::AABox >::resize(), glsl::AmbientOcclusion_sample_glsl::sampleAO(), glsl::LightingEnvironment_environmentMapUniforms_glsl::sampleEnvironmentMap(), glsl::DDGIVolume_glsl::sampleOneDDGIVolume(), G3D::UniversalBSDF::schlickFresnel(), G3D::UserInput::setArtificialLatency(), G3D::DepthOfFieldSettings::setFarBlurryPlaneZ(), G3D::DepthOfFieldSettings::setFarSharpPlaneZ(), G3D::GuiScrollBar::setMax(), G3D::DepthOfFieldSettings::setNearSharpPlaneZ(), G3D::GuiSlider< int >::setRange(), G3D::GuiNumberBox< int >::setRange(), G3D::GuiNumberBox< int >::setRect(), glsl::FogVolumeSurface_render_pix::shade(), G3D::UniversalBSDF::smoothnessToBlinnPhongExponent(), G3D::G3DString< INTERNAL_SIZE >::substr(), glsl::gradient_glsl::techGradient(), glsl::screenSpaceRayTrace_glsl::traceScreenSpaceRay1(), glsl::UniversalMaterial_shade_glsl::UniversalMaterial_shade(), G3D::AttributeArray::updateInterleaved(), G3D::Rect2D::wh(), G3D::Rect2D::width(), G3D::Rect2D::x0y1(), G3D::Rect2D::x1(), G3D::Rect2D::x1y0(), G3D::Rect2D::x1y1(), G3D::Rect2D::xyxy(), and G3D::Rect2D::y1().
|
inline |
|
inline |
|
inline |
The maximum length of a message that can be sent (G3D places a small header at the front of each UDP packet; this is already taken into account by the value returned).
Referenced by serializeMessage().
|
inline |
Returns the larger string index, ignoring String::npos.
Referenced by findLastSlash().
|
virtual |
The message is actually copied from the socket to an internal buffer during this call.
Receive only deserializes.
Referenced by receive().
|
inline |
Referenced by glsl::Light_glsl::addLightContribution(), G3D::GuiPane::addNumberBox(), G3D::GuiPane::addSlider(), G3D::Rect2D::center(), glsl::DepthOfField_glsl::circleOfConfusionRadiusPixels(), G3D::G3DString< INTERNAL_SIZE >::compare(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::computeBounds(), glsl::LightingEnvironment_LightUniforms_glsl::computeDirectLighting(), G3D::SmallArray< G3D::Vector4, 8 >::contains(), G3D::Rect2D::contains(), G3D::Rect2D::corner(), glsl::UniversalMaterial_sample_glsl::dim(), G3D::Rect2D::extent(), glsl::Film_FXAA_13_performance_pix::FxaaLuma(), glsl::Film_FXAA_13_performance_pix::FxaaPixelShader(), G3D::Rect2D::height(), G3D::Rect2D::intersect(), G3D::Rect2D::intersects(), G3D::Rect2D::intersectsOrTouches(), G3D::Rect2D::isEmpty(), G3D::Rect2D::isFinite(), G3D::Rect2D::lerp(), glsl::g3dmath_glsl::max4(), G3D::Rect2D::merge(), G3D::Color4unorm8::min(), G3D::Color3unorm8::min(), G3D::Vector3uint8::min(), G3D::Vector2uint32::min(), G3D::Vector2int32::min(), G3D::Vector3int16::min(), G3D::Vector2uint16::min(), G3D::Vector4int32::min(), G3D::Vector2int16::min(), G3D::Vector3int32::min(), G3D::Color1::min(), G3D::Color4::min(), G3D::Vector4::min(), G3D::Vector2::min(), G3D::Color3::min(), min(), G3D::Vector3::min(), glsl::g3dmath_glsl::min3(), glsl::DefaultRenderer_pathTracedIndirect_pix::neonGradient(), G3D::Rect2D::operator!=(), G3D::Rect2D::operator*(), G3D::Rect2D::operator+(), G3D::Rect2D::operator-(), G3D::Rect2D::operator/(), G3D::Rect2D::operator==(), G3D::UniversalBSDF::packGlossyExponent(), G3D::Rect2D::randomPoint(), G3D::Rect2D::Rect2D(), G3D::Array< G3D::AABox >::resize(), G3D::G3DString< INTERNAL_SIZE >::rfind(), glsl::AmbientOcclusion_sample_glsl::sampleAO(), G3D::DepthOfFieldSettings::setFarSharpPlaneZ(), G3D::DepthOfFieldSettings::setNearBlurryPlaneZ(), G3D::DepthOfFieldSettings::setNearSharpPlaneZ(), G3D::GuiSlider< int >::setRange(), G3D::GuiNumberBox< int >::setRange(), G3D::UniversalBSDF::smoothnessToBlinnPhongExponent(), glsl::Light_glsl::spotLightFalloff(), G3D::G3DString< INTERNAL_SIZE >::substr(), glsl::gradient_glsl::techGradient(), glsl::screenSpaceRayTrace_glsl::traceScreenSpaceRay1(), G3D::Rect2D::wh(), G3D::Rect2D::width(), G3D::Rect2D::x0(), G3D::Rect2D::x0y0(), G3D::Rect2D::x0y1(), G3D::Rect2D::x1y0(), G3D::Rect2D::xyxy(), and G3D::Rect2D::y0().
|
inline |
|
inline |
|
inline |
Referenced by G3D::Vector2::mod1().
|
inline |
Displays a GUI prompt with "Ok" as the only choice.
|
inline |
a * b (for DirectX/Cg support)
double G3D::nan | ( | ) |
This value should not be tested against directly, instead G3D::isNan() and G3D::isFinite() will return reliable results.
Referenced by G3D::GuiNumberBox< int >::commit(), G3D::UniversalMaterial::constant(), and G3D::Quat::log().
G3D::NetListener | ( | uint16 | port | ) |
Port is in host byte order.
RealTime G3D::networkCommunicationInterval | ( | ) |
unsigned int G3D::networkSendBacklog | ( | ) |
Return the number of network transactions pending across all NetSendConnections.
This is related to the underlying UDP packe queue and should be proportional to the number of bytes sent, but in complicated ways. If this number grows too large, then NetSendConnection::send is sending data faster than either the network can support or the other side can receive.
Use with an arbitrary threshold (e.g., 500) to avoid sending too much data and degrading network performance.
|
inline |
|
inline |
v / v (for DirectX/Cg support)
Referenced by glsl::Light_glsl::computeAttenuation(), glsl::UniversalMaterial_glsl::computeRefraction(), glsl::Light_glsl::computeShading(), glsl::UniversalMaterial_sample_glsl::dim(), glsl::Film_FXAA_13_performance_pix::FxaaPixelShader(), glsl::DDGIVolume_probeVisualization_pix::main(), glsl::UniversalSurface_gbuffer_pix::main(), glsl::octahedral_glsl::octEncode(), glsl::reconstructFromDepth_glsl::reconstructWSPositionFromDepth(), glsl::DDGIVolume_glsl::sampleOneDDGIVolume(), glsl::Light_glsl::spotLightFalloff(), glsl::SVO_sampling_glsl::svoSampleTrilinear(), glsl::UniversalMaterial_shade_glsl::UniversalMaterial_shade(), glsl::Draw_sphereSection_pix::writePixel(), and glsl::UniversalMaterial_writeToGBuffer_glsl::writeToGBuffer().
bool G3D::notNull | ( | const shared_ptr< T > & | ptr | ) |
bool G3D::notNull | ( | const T * | ptr | ) |
bool G3D::notNull | ( | const lazy_ptr< T > & | ptr | ) |
Referenced by G3D::UniformTable::append(), G3D::ParticleSystem::Block::Block(), G3D::AudioDevice::WeakCleanupArray< G3D::Sound >::cleanup(), G3D::FastPointHashGrid< Value, PosFunc >::clear(), G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::containsKey(), enumToJavaScriptDeclaration(), G3D::GuiNumberBox< int >::findControlUnderMouse(), G3D::OrderedTable< Key, Value >::findIndexOfKey(), G3D::Scene::getTypedEntityArray(), G3D::WeakCache< G3D::Sampler, shared_ptr< G3D::GLSamplerObject > >::getValues(), G3D::UniversalSurface::GPUGeom::hasBones(), G3D::Args::hasIndirectBuffer(), G3D::Component< Color3, Image3 >::image(), G3D::_internal::FastPODTable_Entry< Key, Value, false >::inUse(), G3D::GuiText::isIcon(), G3D::GBuffer::Specification::memorySize(), G3D::GuiTextureBox::movieRecording(), G3D::SmallTable< Key, Value, HashFunc, EqualsFunc >::Iterator::operator Entry *(), G3D::SmallTable< Key, Value, HashFunc, EqualsFunc >::Iterator::operator->(), G3D::Grid< Cell >::operator[](), G3D::CPUPixelTransferBuffer::ownsMemory(), G3D::Array< G3D::AABox >::removeNulls(), G3D::GuiNumberBox< int >::render(), G3D::Framebuffer::resize(), G3D::GuiNumberBox< int >::roundAndClamp(), G3D::GLPixelTransferBuffer::runMapHooks(), G3D::GLPixelTransferBuffer::runReallocateHooks(), G3D::Component< Color3, Image3 >::sample(), G3D::GApp::setCameraManipulator(), G3D::GuiNumberBox< int >::setEnabled(), G3D::RenderDevice::setFramebuffer(), G3D::Component< Color3, Image3 >::setStorage(), G3D::GuiWindow::setVisible(), G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::sizeInMemory(), G3D::Component< Color3, Image3 >::texture(), and G3D::Framebuffer::texture().
bool G3D::notNull | ( | const Pointer< T > & | p | ) |
bool G3D::ok | ( | ) | const |
bool G3D::operator!= | ( | const G3DAllocator< T1 > & | , |
const G3DAllocator< T2 > & | |||
) | |||
throw | ( | ||
) |
|
inline |
Extends the c3 with alpha = 1.0
|
inline |
|
inline |
|
inline |
v * M == M.transpose() * v
vector * matrix [1x3 * 3x3 = 1x3]
|
inline |
|
inline |
|
inline |
|
inline |
std::ostream& G3D::operator<< | ( | std::ostream & | os, |
const NetAddress & | |||
) |
std::ostream& G3D::operator<< | ( | std::ostream & | os, |
const Vector3 & | |||
) |
bool G3D::operator== | ( | const G3DAllocator< T1 > & | , |
const G3DAllocator< T2 > & | |||
) | |||
throw | ( | ||
) |
|
inline |
Two addresses may point to the same computer but be != because they have different IP's.
Separates a comma-separated line, properly escaping commas within double quotes (") and super quotes (""").
This matches Microsoft Excel's CSV output.
stripQuotes | If true, strips leading and trailing " and """ |
void G3D::parseFilename | ( | const String & | filename, |
String & | drive, | ||
Array< String > & | path, | ||
String & | base, | ||
String & | ext | ||
) |
Parses a filename into four useful pieces.
Examples:
c:\a\b\d.e
root = "c:\\" path = "a" "b" base = "d" ext = "e"
/a/b/d.e root = "/" path = "a" "b" base = "d" ext = "e"
/a/b root = "/" path = "a" base = "b" ext = "e"
Appends file onto dirname, ensuring a / if needed.
|
inline |
|
inline |
Referenced by acos(), and G3D::ParticleSystem::Particle::density().
|
inline |
Returns 2^x.
Referenced by G3D::SVO::fineVoxelResolution().
|
inline |
Returns x5
Referenced by glsl::g3dmath_glsl::meanComponent(), and G3D::UniversalBSDF::schlickFresnel().
int G3D::prompt | ( | const char * | windowTitle, |
const char * | promptx, | ||
const char ** | choice, | ||
int | numChoices, | ||
bool | useGui | ||
) |
Prints a prompt to stdout and waits for user input.
The return value is the number of the user's choice (the first is 0, if there are no choices, returns 0).
useGui | Under Win32, use a GUI, not stdout prompt. |
windowTitle | The title for the prompt window |
promptx | The text string to prompt the user with |
choice | An array of strings that are the choices the user may make |
numChoices | The length of choice. |
Referenced by prompt().
|
inline |
Prints a prompt and waits for user input.
The return value is the number of the user's choice (the first is 0, if there are no choices, returns 0).
Uses GUI under Win32, stdout prompt otherwise.
Returns the contents of a text file as a single string.
|
inline |
If a message is waiting, deserializes the waiting message into message and returns true, otherwise returns false.
You can determine the type of the message (and therefore, the class of message) using G3D::ReliableConduit::waitingMessageType().
Referenced by receive().
|
inline |
Removes the current message from the queue.
bool G3D::receive | ( | NetAddress & | sender | ) |
|
inline |
void G3D::receiveHeader | ( | ) |
Receives the messageType and messageSize from the socket.
void G3D::receiveIntoBuffer | ( | ) |
Accumulates whatever part of the message (not the header) is still waiting on the socket into the receiveBuffer during state = RECEIVING mode.
Closes the socket if anything goes wrong. When receiveBufferUsedSize == messageSize, the entire message has arrived.
G3D::ReliableConduit | ( | const NetAddress & | addr | ) |
G3D::ReliableConduit | ( | const SOCKET & | sock, |
const NetAddress & | addr | ||
) |
Returns a string which is s, with all instances of pattern replaced.
|
inline |
|
inline |
int G3D::roundStochastically | ( | float | f | ) |
Rounds so that the mean of a set of rounded numbers is close to the mean of the original numbers.
|
inline |
Computes 1 / sqrt(x).
Referenced by G3D::Vector3::fastDirection(), and G3D::Quat::unitize().
|
inline |
|
inline |
void G3D::runConcurrently | ( | const Point3int32 & | start, |
const Point3int32 & | stopBefore, | ||
const std::function< void(Point3int32)> & | callback, | ||
bool | singleThread = false |
||
) |
Iterates over a 3D region using multiple threads and blocks until all threads have completed.
Has highest coherence per thread in x, and then in blocks of y.
Evaluates object->method(x, y) for every start.x <= x < upTo.x
and start.y <= y < upTo.y
. Iteration is row major, so each thread can expect to see successive x values.
singleThread | If true, force all computation to run on the calling thread. Helpful when debugging |
Example:
Referenced by G3D::Image::forEachPixel().
void G3D::runConcurrently | ( | const Point2int32 & | start, |
const Point2int32 & | stopBefore, | ||
const std::function< void(Point2int32)> & | callback, | ||
bool | singleThread = false |
||
) |
void G3D::runConcurrently | ( | const int & | start, |
const int & | stopBefore, | ||
const std::function< void(int)> & | callback, | ||
bool | singleThread = false |
||
) |
void G3D::runConcurrently | ( | const size_t & | start, |
const size_t & | stopBefore, | ||
const std::function< void(size_t)> & | callback, | ||
bool | singleThread = false |
||
) |
void G3D::screenPrintf | ( | const char * | fmt ... | ) |
Displays output on the last G3D::GApp instantiated.
If there was no GApp instantiated, does nothing. Threadsafe.
This is primarily useful for code that prints (almost) the same values every frame (e.g., "current position = ...") because those values will then appear in the same position on screen.
For one-off print statements (e.g., "network message received") see G3D::consolePrintf.
Referenced by screenPrintf().
|
inline |
|
inline |
Serializes the message and schedules it to be sent as soon as possible, and then returns immediately.
The message can be any class with a serialize and deserialize method. On the receiving side, use G3D::ReliableConduit::waitingMessageType() to detect the incoming message and then invoke G3D::ReliableConduit::receive(msg) where msg is of the same class as the message that was sent.
The actual data sent across the network is preceeded by the message type and the size of the serialized message as a 32-bit integer. The size is sent because TCP is a stream protocol and doesn't have a concept of discrete messages.
void G3D::send | ( | uint32 | type | ) |
Sends an empty message with the given type.
Useful for sending commands that have no parameters.
|
inline |
|
inline |
Send the same message to multiple addresses (only serializes once).
Useful when server needs to send to a known list of addresses (unlike direct UDP broadcast to all addresses on the subnet)
void G3D::sendBuffer | ( | const BinaryOutput & | b | ) |
Referenced by send().
void G3D::sendBuffer | ( | const NetAddress & | a, |
BinaryOutput & | b | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void G3D::serialize | ( | const Array< T > & | array, |
BinaryOutput & | b | ||
) |
serialize(const T&, BinaryOutput&) must have been overridden as well
void G3D::serialize | ( | const bool & | b, |
TextOutput & | to | ||
) |
void G3D::serialize | ( | const int & | b, |
TextOutput & | to | ||
) |
void G3D::serialize | ( | const uint8 & | b, |
TextOutput & | to | ||
) |
void G3D::serialize | ( | const double & | b, |
TextOutput & | to | ||
) |
void G3D::serialize | ( | const float & | b, |
TextOutput & | to | ||
) |
void G3D::serialize | ( | const String & | b, |
TextOutput & | to | ||
) |
void G3D::serialize | ( | const char * | b, |
TextOutput & | to | ||
) |
void G3D::serialize | ( | const Vector2 & | v, |
class BinaryOutput & | b | ||
) |
void G3D::serialize | ( | const Vector3::Axis & | a, |
class BinaryOutput & | bo | ||
) |
void G3D::serialize | ( | const Vector4 & | v, |
class BinaryOutput & | b | ||
) |
void G3D::serialize | ( | const Vector3 & | v, |
class BinaryOutput & | b | ||
) |
void G3D::serializeMessage | ( | uint32 | type, |
const T & | m, | ||
BinaryOutput & | b | ||
) | const |
Referenced by send().
void G3D::serviceNetwork | ( | ) |
If NOT using G3D's internal threaded networking, you must invoke this periodically to service the receiving side network connections.
Receiving messages will only update inside this call–all other network calls queue for processing.
If using G3D's internal threaded networking, this is automatically called continuously on a separate thread.
void G3D::serviceNetworkSender | ( | const G3D::NetChannel & | channel | ) |
If NOT using G3D's internal threaded networking, you must invoke this periodically to service the sending side network connections.
Sending messages will only update inside this call–all other network calls queue for processing.
If using G3D's internal threaded networking, this is automatically called continuously on a separate thread.
void G3D::setAssertionHook | ( | AssertionHook | hook | ) |
void G3D::setCocoaIcon | ( | const char * | filename | ) |
void G3D::setConsolePrintHook | ( | ConsolePrintHook | h | ) |
Called by consolePrintf after the log and terminal have been written to.
Used by GConsole to intercept printing routines.
void G3D::setFailureHook | ( | AssertionHook | hook | ) |
Called by alwaysAssertM in case of failure in release mode.
If returns true then the program exits with -1 (you can replace this with your own version that throws an exception or has other failure modes).
void G3D::setNetworkCommunicationInterval | ( | const RealTime | t | ) |
This is the amount of time G3D will pause the network thread to perform network communication, in seconds (default is 0s).
This is equivalent to the timeout value for the POSIX select() call. If G3DSpecification::threadedNetwork is true, then a value of 0 minimizes network latency.
0 = 1 quantum (process already waiting messages, do not wait for new ones). Because the enet protocal requires confirmation messages, this can cause the network queue to backup.
Set this number higher if you are sending large messages and think that you are bottlenecked by not being able to send confirmation messages. Set lower if you think the network time is not being fully utilized
Or just multithread your network code.
For the current implementation, the effective precision is 1ms, the effective accuracy can be as poor as 50ms on Windows.
|
inline |
|
inline |
|
inline |
Computes |b|^e * sign(b)
|
inline |
Computes |b|^e * sign(b)
|
inline |
sin(x)/x
int G3D::sizeOfGLFormat | ( | GLenum | format | ) |
Returns the number of bytes occupied by a value in an OpenGL format (e.g.
GL_FLOAT). Returns 0 for unknown formats.
|
inline |
Perlin's C2 continous variation on smoothstep()
|
inline |
The GLSL smoothstep function.
Referenced by glsl::gradient_glsl::neonGradient().
Splits string at new lines (handles \r\n
and \n
).
Will create an empty string after new line if last character.
|
inline |
Referenced by glsl::DepthOfField_glsl::circleOfConfusionRadiusPixels(), glsl::gradient_glsl::electricGradient(), G3D::PointKDTree< T, PositionFunc, HashFunc, EqualsFunc >::Node::getIntersectingMembers(), glsl::gradient_glsl::heatmapGradient(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Node::intersectRay(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Node::intersects(), glsl::DepthOfField_blur_pix::main(), glsl::g3dmath_glsl::meanComponent(), G3D::Color3::neonGradient(), glsl::g3dmath_glsl::pow2(), G3D::FastPODTable< Key, Value, HashFunc, EqualsFunc, valueIsSimplePOD >::probe(), glsl::DDGIVolume_glsl::sampleOneDDGIVolume(), G3D::UniversalBSDF::schlickFresnel(), glsl::g3dmath_glsl::schlickFresnel(), G3D::UniversalBSDF::smoothnessToBlinnPhongExponent(), squareMagnitude(), and glsl::UniversalMaterial_shade_glsl::UniversalMaterial_shade().
|
inline |
|
inline |
|
inline |
Preserves sign while squaring magnitude.
|
inline |
Preserves sign while squaring magnitude.
|
inline |
Preserves sign while squaring magnitude.
A comparison function for passing to Array::sort.
String G3D::stringJoin | ( | const G3D::Array< String > & | a, |
char | joinChar | ||
) |
joinChar is not inserted at the beginning or end, just in between elements.
String G3D::stringJoin | ( | const G3D::Array< String > & | a, |
const String & | joinStr | ||
) |
Splits x at each occurance of splitChar.
|
inline |
Referenced by distance().
|
inline |
|
inline |
|
inline |
|
inline |
A hash function that is faster than CRC32 for arbitrary long strings.
Referenced by G3D::Vector4int32::hashCode(), HashTrait< G3D::String >::hashCode(), HashTrait< G3D::uint128 >::hashCode(), and HashTrait< G3D::Vector3int32 >::hashCode().
void G3D::System_free | ( | void * | ) |
Referenced by G3D::G3DString< INTERNAL_SIZE >::free().
void* G3D::System_malloc | ( | size_t | ) |
Referenced by G3D::G3DString< INTERNAL_SIZE >::alloc().
Tesselates a complex polygon into a triangle set which is appended to the output.
The input is a series of counter-clockwise winding vertices, where the last is implicitly connected to the first. Self-intersections are allowed; "inside" is determined by an "odd" winding rule. You may need to introduce a sliver polygon to cut holes out of the center.
|
inline |
Referenced by G3D::Projection::fieldOfViewAngleDegrees().
|
inline |
|
inline |
Referenced by G3D::GuiNumberBox< int >::commit().
|
inline |
|
inline |
|
inline |
Converts a 12 hour clock time into the number of seconds since midnight.
Note that 12:00 PM is noon and 12:00 AM is midnight.
Example: toSeconds(10, 00, AM)
Convert from ASCII to utf-8 encoding, adapted from https://everything2.com/title/Converting+ASCII+to+UTF-8.
Strips whitespace from both ends of the string.
Referenced by G3D::GuiNumberBox< int >::commit().
|
inline |
|
inline |
|
inline |
Referenced by G3D::Rect2D::randomPoint().
|
inline |
String G3D::vformat | ( | const char * | fmt, |
va_list | argPtr | ||
) |
Like format, but can be called with the argument list from a ...
function.
ReliableConduitRef G3D::waitForConnection | ( | ) |
Block until a connection is received.
Returns nullptr if something went wrong.
|
virtual |
|
inline |
Thomas Wang's 64-to-32-bit mix hash based on Robert Jenkin's hash http://www.concentric.net/~ttwang/tech/inthash.htm
Found by Morgan to produce the best net performance for building tables from Vector4int16
Referenced by HashTrait< G3D::Vector4int16 >::hashCode(), and HashTrait< G3D::Vector4uint16 >::hashCode().
Produces a new string that is the input string wrapped at a certain number of columns (where the line is broken at the latest space before the column limit.) Platform specific NEWLINEs are inserted to wrap.
|
inline |
Computes a floating point modulo; the result is t wrapped to the range [lo, hi).
Referenced by G3D::Map2D< Color1, Color1 >::bicubic(), G3D::Map2D< Color1, Color1 >::bilinear(), G3D::Map2D< Color1, Color1 >::create(), cyclicCatmullRomSpline(), G3D::Map2D< Color1, Color1 >::get(), G3D::Image::get(), G3D::CompassDirection::operator-(), G3D::Image::set(), G3D::Map2D< Color1, Color1 >::slowGet(), G3D::CompassDirection::value(), G3D::Vector2::wrap(), and wrap().
|
inline |
|
inline |
|
inline |
flush | If true (default), the file is ready for reading as soon as the function returns. If false, the function returns immediately and writes the file in the background. |
Returns true if the given file (or directory) exists within a zipfile.
Called if fileExists initially returns false and the lookInZipfiles flag has been set. Must not end in a trailing slash. Does not work for recursive zipfiles (.zips within another .zip)
filename | the path to test |
outZipfile | the path to the .zip file |
outInternalFile | the path (within the .zip) where the desired file is located, if valid |
bool G3D::zipfileExists | ( | const String & | filename | ) |
NetAddress G3D::addr |
Referenced by G3D::NetAddress::ip(), and G3D::NetAddress::port().
bool G3D::alreadyReadMessage |
True when waitingForMessageType has read the message from the network into messageType/messageStream.
const bool G3D::DONT_SHRINK_UNDERLYING_ARRAY = false |
Constant for passing to Array::resize
Referenced by G3D::Array< G3D::AABox >::append(), G3D::SmallTable< Key, Value, HashFunc, EqualsFunc >::getKeys(), G3D::Table< String, double >::getKeys(), G3D::SmallTable< Key, Value, HashFunc, EqualsFunc >::getValues(), and G3D::Table< String, double >::getValues().
bool G3D::ignoreBool |
double G3D::ignoreDouble |
For use with default output arguments.
The value is always undefined.
float G3D::ignoreFloat |
For use with default output arguments.
The value is always undefined.
int G3D::ignoreInt |
For use with default output arguments.
The value is always undefined.
String G3D::ignoreString |
For use with default output arguments.
The value is always undefined.
The message received (the type has already been read off).
Referenced by receive().
NetAddress G3D::messageSender |
Origin of the received message.
uint32 G3D::messageSize |
Total size of the incoming message (read from the header).
Referenced by receive().
uint32 G3D::messageType |
int G3D::MTU |
Maximum transmission unit (packet size in bytes) for this socket.
May vary between sockets.
Referenced by maxMessageSize(), and serializeMessage().
const char* G3D::NEWLINE |
HDC G3D::OpenGLWindowHDC |
The HDC that wglMakeCurrent will use on Windows.
Referenced by glMakeCurrent().
void* G3D::receiveBuffer |
Shared buffer for receiving messages.
Referenced by receive().
size_t G3D::receiveBufferTotalSize |
Total size of the receiveBuffer.
size_t G3D::receiveBufferUsedSize |
Size occupied by the current message...
so far. This will be equal to messageSize when the whole message has arrived.
Referenced by receive().
SOCKET G3D::sock |
const int G3D::SORT_DECREASING = -1 |
Constant for Array::sort.
const int G3D::SORT_INCREASING = 1 |
Constant for Array::sort.
Referenced by G3D::Array< G3D::AABox >::sort(), and G3D::Array< G3D::AABox >::sortSubArray().
enum G3D::State G3D::state |
Referenced by receive(), and G3D::GBuffer::setImageStore().