Support Forum       Library Source       SourceForge Page       G3D Web Page     
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Selected APIs by Task

This page lists the most commonly used G3D APIs grouped into functional tasks:

  • Images and Video
  • Strings
  • File I/O
  • Ray Tracing and Physics
  • Network
  • Memory and Threads
  • Boldface links designate the most common and easy-to-use features. Indented links are subtopics; they may be helper classes or subclasses. Not all API entry points are shown in this index.

    Scene Graph

    Scene

    Sample scene graph.

    EntityBase class for objects in a G3D::Scene.
    VisibleEntity

    Base class for Entitys that use a built-in G3D model class.

    CameraAbstraction of a lens or pinhole camera.
    FilmPost processing: gamma correction, exposure, bloom, and screen-space antialiasing.
    MotionBlurMakes multiple gather passes.
    DepthOfField

    Simple defocus post-process shader.

    LightingA rich environment-lighting model that contains both global and local sources.
    LightAn (invisible) emitting surface (AREA) or point (DIRECTIONAL, SPOT, OMNI) light.
    ShadowMap
    AmbientOcclusion

    Screen-space ambient obscurance.

    ArticulatedModelLoad 3DS, IFS, PLY2, and OFF files, or construct models from code
    UniversalMaterial
    UniversalMaterial::Specification
    UniversalBSDF
    Component(See also MapComponent, Component1, Component3, Component4)
    BumpMap
    UniversalSurface

    MD2Model

    Quake 2 character

    GPU Rendering

    RenderDevice

    Abstraction of a graphics rendering context (GPU).

    Texture

    A 1D, 2D, or 3D array (e.g., an image) stored on the GPU, commonly used for mapping reflectance values (colors) over meshes.

    ShaderAbstraction of the programmable hardware pipeline.
    Args

    All arguments.

    VertexBufferA block of GPU memory within which G3D::AttributeArrays for vertex, texcoord, normal, etc.
    AttributeArrayA block of GPU memory storing a stream of vector data (e.g., vertices, normals, texture coordinates)
    IndexStream

    A stream of indices referencing into an AttributeBuffer.

    FramebufferHolds a set of G3D::Textures or G3D::Renderbuffers for use as draw targets.
    GBufferSaito and Takahashi's Geometry Buffers, typically used today for deferred shading.
    SurfaceThe surface of a model, posed and ready for rendering.

    2D Graphical User Interface

    GAppOptional base class for quickly creating 3D applications.
    GuiPaneContainer and creator of other GUI controls; obtained from a GuiWindow
    GuiWindowSkinnable GUI (documentation contains GUI sample code)
    GEvent, GEventTypeEvent class and type enum, used inside an event handler
    GFontExplicitly render text1
    GApp::onEvent, GApp::onUserInputOverridable event handlers
    UserInputPollable keyboard, mouse, and joystick state used inside an event handler
    GuiButton, GuiCheckBox, GuiDropDownList, GuiSlider, GuiRadioButton, GuiLabel, GuiTextBox, GuiTextureBox, GuiTabPaneGUI controls created by GuiPanel
    Widget
    Surface2D2D object scene graph, used by Widgets for rendering
    ManipulatorExports a coordinate frame, typically in response to user input.
    FirstPersonManipulatorUses a First Person (Quake- or World of Warcraft style) mapping to translate keyboard and mouse input into a flying camera position.
    ThirdPersonManipulatorBy default, the ThirdPersonManipulator moves an object relative to its own axes.
    msgBoxCreate a new OS window popup message

    Debugging

    debugAssertAssertion macro with friendly dialog box in DEBUG builds
    debugPrintfPrints to the 3D console, terminal, and log.txt
    screenPrintfPrints information that repeats every frame to the screen
    debugDrawDraw a shape for debugging purposes
    consolePrintfPrints to the 3D console and log.txt
    logPrintfPrints to log.txt
    GApp::debugPaneAdd your own debugging GUI controls to this provided window
    debugPrintfPrints to the terminal (Unix) or Output Window (Win) in DEBUG builds
    logPrintfPrints to the log.txt file (which you should regularly check for warnings!)
    DrawRender simple geometric primitives without loading a model
    debugAssertMAssertion macro with a string message in DEBUG builds
    alwaysAssertMAssertion macro that remains even in optimized builds
    GApp::catchCommonExceptionsTurn uncaught exceptions into assertion failures
    LogGuarantees output is written to disk before Log::printf returns
    describeSystemReturns a string describing the current machine
    isValidHeapPointerUsed in assertions to identify bad pointers
    isValidPointerUsed in assertions to identify bad pointers
    setAssertionHookOverride the behavior of assertion failures
    setFailureHookOverride the behavior of alwaysAssertM failures in RELEASE builds
    GApp::showDebugTextEnable GApp::debugPrintf output

    Profiling

    ProfilerMeasures execution time on the CPU and GPU of parts of a program.
    StopwatchAccurately measure durations and framerates.
    RenderDevice::StatsReports measured GPU performance and throughput.
    GApp::showRenderingStatsDisplay performance information on the 3D window
    System::mallocPerformance, System::mallocStatus, System::resetMallocPerformanceCountersMeasure heap size and detect memory leaks
    System::beginCycleCount, System::endCycleCountCycle-accurate timing of very short routines

    Images and Video

    ImageProvides general image loading, saving, conversion and pixel access.
    PixelTransferBufferBase class for transfering arrays of pixels between major classes, generalized over CPU arrays, memory-mapped files, and OpenGL Pixel Buffer Objects.
    Texture

    GPU image representation

    VideoInputRead from AVI, MPG and other video files in real-time
    VideoOutput

    Write video files

    Draw::rect2DStretch a Texture over a rectangle on screen
    RenderDevice::applyRectAssumes push2D mode is already active.
    RenderDevice::push2D
    FramebufferAn "off-screen" rendering surface used for image processing on the GPU
    Image3RGB floating point image
    Color1, Color3, Color4Floating-point monochrome, RGB, and RGBA color (no clamping)
    Color1uint8, Color3uint8, Color4uint88-bit Monochrome, 24-bit RGB, and 32-bit RGBA color (clamped to 0-1 / 0-255)
    Map2DTemplated image class, e.g., for creating normal maps or arbitrary grids of values
    WrapModeSpecifies how out-of-bounds image locations are treated for Texture, Map2D, and Image classes
    gaussian1DGenerate 1D blur filter coefficients
    GaussianBlurFast GPU 1D blur
    FilmGamma correct, adaptation, and bloom for realistic lighting

    String Processing

    beginsWith, endsWith

    format

    Convert numbers to strings (a safe sprintf)

    isSlash, isWhiteSpace, isDigit, isNewline, isLetter, isQuote

    stringSplit, stringJoin

    toUpper, toLower

    Change case

    trimWhitespace

    Remove blanks at the beginning and end of a string

    STR

    Macro for creating large blocks of quoted text, usually used with OldShader

    TextInput(TextInput::FROM_STRING, ...)Tokenizer for parsing complex strings

    File I/O

    AnyEasy loading and saving of human-readable configuration files.
    BinaryInput, BinaryOutput
    TextInput, TextOutput
    FileSystem
    filenameContainsWildcards
    readWholefile, writeWholeFile
    createTempFile

    Ray Tracing and Physics

    Ray tracing and physical simulation both compute intersections between geometric primitives. G3D distinguishes between "moving" collision detection, where two objects are moving with relative constant velocity; and "fixed" detection where where the relative velocity of the objects is zero. The two problems are related. A "moving point" is the same as a fixed ray, a "moving sphere" is a fixed capsule, and so on. Thus for ray tracing one often uses "moving point" collision detection instead of rays (which is reasonable, since ray tracing simulates photons moving around a scene).

    TriTreeStatic bounding interval hierarchy for Ray-Tri intersections.
    Intersect
    CollisionDetectionMoving and fixed collisions between many kinds of primitives
    Ray,
    RayGridIteratorComputes conservative line raster/voxelization across a grid for use in walking a grid spatial data structure or or voxel scene searching for intersections. Sphere, Plane, Box, AABox, Triangle, Tri, Plane, Line, Cylinder, Capsule, Shape Geometric primitives
    DirectionHistogramA histogram on the surface of a sphere.
    MeshAlgRoutines for operating on triangle meshes
    KDTreeAxis-aligned binary space partition tree for O(log n) collision detection
    PointKDTreeAABSP tree optimized for zero-extent objects. Primarily used as a photon map
    Camera::worldRayObtain the ray through a pixel
    Image3, Image4Useful for software rendering output and texture maps
    Vector3::reflectionDirection, Vector3::refractionDirection

    Networking

    ReliableConduitMessage-based TCP infrastructure ideal for most games
    NetListenerServer-side way of listening for incoming connections
    BinaryInput, BinaryOutputUsed by serialize/deserialize methods to binary encode messages for transfer.
    NetAddressIP, port, and hostname addressing
    LightweightConduitMessage-based UDP infrastructure. Allows multi-cast and NAT traversal, but at the cost of unreliable transfer.

    Memory and Threads

    GThreadPlatform independent thread implementation.
    ThreadSetManages a set of threads.
    GMutexMutual exclusion lock used for synchronization.
    SpinlockA mutual exclusion lock that busy-waits when locking.
    AtomicInt32An integer that may safely be used on different threads without external locking.
    MemoryManagerAbstraction of memory management.
    AlignedMemoryManagerAllocates memory on 16-byte boundaries.
    CRTMemoryManagerA MemoryManager implemented using the C runtime.
    AreaMemoryManagerAllocates memory in large blocks and then frees it as an area.

    documentation generated on Sat Jan 12 2013 22:49:53 using doxygen 1.8.2