All data types are located in the DeltaEngine.Datatypes namespace. All data types are optimized for whatever they are used for most. For example Vectors, Matrices and Colors are used mostly in Vertex data structures and are as compact as possible (e.g. Color is just a uint), while still making external use quick and easy (e.g. Color can be created with 3 or 4 float values for R, G, B and optional A). Most operations are also heavily optimized for speed, especially all Matrix and Vector operations because they will be used a lot in inner loops for rendering, transformations, animations and bone calculations. In normal game code you don't have to worry about this, you can just use the normal operation methods. The optimized ones (with ref parameters) are only really needed for that extra bit of performance in animation and rendering code.
Classes
Structures
Structure | Description | |
---|---|---|
AtlasRegion |
Holds the information needed to render an individual sprite from within a texture atlas.
A Sprite can be stripped of its transparent borders when inserted into a texture atlas.
PadLeft says how much was stripped from the left side etc
View code on GitHub | |
BoundingBox |
Min and max vector for a 3D bounding box. Can also be used to calculate a BoundingSphere.
View code on GitHub | |
BoundingSphere |
Contains the center position in 3D and radius. Allows quick collision and intersection tests.
View code on GitHub | |
Color |
Color with a byte per component (red, green, blue, alpha), also provides float properties.
View code on GitHub | |
EulerAngles |
Yaw, Pitch and Roll used for 3D rotations. See: http://en.wikipedia.org/wiki/Euler_angles
View code on GitHub | |
Matrix |
4x4 Matrix from 16 floats, access happens via indexer, optimizations done in BuildService.
View code on GitHub | |
Plane |
Plane struct represented by a normal vector and a distance from the origin.
Details can be found at: http://en.wikipedia.org/wiki/Plane_%28geometry%29
View code on GitHub | |
Quaternion |
Useful for processing 3D rotations. Riemer's XNA tutorials have a nice introductory
example of use: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Quaternions.php
http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Flight_kinematics.php
View code on GitHub | |
Ray |
Ray struct, used to fire rays into a 3D scene to find out what we can
hit with that ray (for mouse picking and other simple collision stuff).
View code on GitHub | |
Rectangle |
Holds data for a rectangle by specifying its top left corner and the width and height.
View code on GitHub | |
Size |
Holds the width and height of an object (e.g. a rectangle).
View code on GitHub | |
Vector2D |
Represents a 2D vector, which is useful for screen positions (sprites, mouse, touch, etc.)
View code on GitHub | |
Vector3D |
Specifies a position in 3D space, used for 3D geometry, cameras and 3D physics.
View code on GitHub |
Interfaces
Interface | Description | |
---|---|---|
Lerp |
Base interface to use the generic Lerp, do not use this interface on its own. Used to find
out if some object implements the generic Lerp without having to go through reflection.
View code on GitHub | |
Lerp T |
Forces datatypes derived from this to implement a Lerp method to interpolate between values.
View code on GitHub |
Enumerations
Enumeration | Description | |
---|---|---|
FlipMode |
Sprites can be rendered flipped horizontally or vertically.
View code on GitHub |