Home | Site Map
Sunlight

Class Hierarchy

Introduction

This chapter will introduce each of the classes in the DirectX .NET class hierarchy.

 

Home Next

Namespace Hierarchy

The DirectX .NET classes reside in the Sunlight.DirectX namespace. This namespace is further partitioned into Graphics, Input and SoundMusic namespaces.

Sunlight.DirectX

The Sunlight.DirectX namespace contains the following class:

  • DirectXException. This class extends System.Exception to handle return values from DirectX methods.

Sunlight.DirectX.Graphics

The Sunlight.DirectX.Graphics namespace contains the following classes:

  • Direct3D. This class wraps an IDirect3D8 object. An application typically does not use this class directly.
  • Device. This class wraps an IDirect3DDevice8 object. This class handles device initialisation, mode switching, lost devices and page flipping.
  • Texture. This class wraps an IDirect3DTexture8 object. This class represents an unfiltered, managed DirectX Graphics texture.
  • Sprite. This class represents a rectangular object on the screen, with position and size.
  • SpriteManager. This class handles the display of Sprite objects on a Device. It holds an IDirect3DVertexBuffer8 object to perform this task.
  • GraphicsForm. This class extends System.Windows.Forms.Form to allow the use of the DirectX Graphics classes. It provides exception handling, idle-time events and device recovery.

Sunlight.DirectX.Input

The Sunlight.DirectX.Input namespace contains the following classes:

  • DirectInput. This class wraps an IDirectInput8 object. This class handles all input events, configuration, device acquisition and enumeration.
  • ActionMap. This class represents a collection of entries in a DirectInput action map.

Sunlight.DirectX.SoundMusic

The Sunlight.DirectX.SoundMusic namespace contains the following classes:

  • DirectMusic. This class wraps an IDirectMusicPerformance8 object and an IDirectMusicLoader8 object. This class handles performance initialisation for DirectMusic.
  • Sound. This class wraps an IDirectMusicSegment8 object. This class handles sound effect loading and playback.
  • BackgroundSound. This class extends Sound to allow the use of MIDI music and DirectShow-compatible audio tracks (Windows Media Audio, MP3). It provides capabilities for detecting the end of tracks, and for stopping the music while the application is inactive.
The next chapter will begin our exploration of the implementation of these classes.