NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
GraphicsCore Namespace Reference

Namespace to contain every item that is related to the rendering engine. The name itself is a legacy, as is a lot of the code contain by it, from the Saturn V engine that built as part of Adam and Ricky's Engine class. More...

Namespaces

namespace  ORIENTATION
 Namespaced enumerated type to specify the default orientation of an object - designed for use by the Quad class.
namespace  ORIGIN
 Namespaced enumerated type to specify the origin of an object - designed for use by the Quad class.

Classes

class  CameraComponent
class  CubeRenderable
class  D3DFont
class  HeightmapRenderable
class  LightAmbientRenderable
class  LightDirectionalRenderable
class  LightPointRenderable
struct  MeshData
class  ModelComponent
class  PointLine
struct  QuadVertex
class  Quad
struct  HelixVertex
class  RenderableHelicalTube
class  Sprite
struct  Tile
struct  TileSet
class  TiledMap
class  RenderableComponent
class  InterfaceUpdateable
class  BasicMaterial
class  MaterialInterface
class  MaterialsSystemInterface
class  RenderModule
class  BasicTexture
struct  TextureAdjustableData
struct  SwapMarker
class  TextureAdjustable
class  TextureInterface
struct  UVA
class  TextureScroller
class  TexturesSystemInterface

Typedefs

typedef std::map< std::string,
std::shared_ptr< MeshData > > 
MeshCacheMap
typedef MeshCacheMap::value_type MeshCacheMapValue
typedef std::set
< MaterialInterface * > 
MatSet
typedef boost::bimaps::bimap
< std::string, CameraComponent * > 
cameramap
typedef cameramap::value_type namedcamera
typedef std::map< std::string,
Texture > 
TextureCacheMap
typedef TextureCacheMap::value_type TextureCacheMapValue
typedef std::shared_ptr
< TextureAdjustableData
TextureAdjustableDataPointer
typedef std::set
< TextureInterface * > 
TexSet
typedef D3DXCOLOR Color
typedef D3DMATERIAL9 Material
typedef LPDIRECT3DTEXTURE9 Texture
typedef D3DXVECTOR3 Vector3

Enumerations

enum  ECoordinateSpace { CS_SCREEN, CS_WORLD }

Functions

const std::string GP_WINDOW_WIDTH ("screenheight")
const std::string GP_WINDOW_HEIGHT ("screenwidth")
const std::string GP_CLIENT_WIDTH ("ClientWidth")
const std::string GP_CLIENT_HEIGHT ("ClientHeight")
const std::string GP_CLIENT_ASPECT ("ClientAspect")
const std::string GP_CLIENT_ASPECT_INV ("ClientAspectInv")
const std::string GP_GRAPHICS_PAUSE ("GraphicsPause")
const std::string GP_CLEAR_COLOR ("ClearColor")
const std::string GP_ANISOTROPIC_FILTERING ("AnisotropicFiltering")
const std::string GP_FOG_ENABLED ("FogEnabled")
const std::string GP_FOG_COLOR ("FogColor")
const std::string GP_FOG_MODE ("FogMode")
const std::string GP_FOG_RANGE_NEAR ("FogRangeNear")
const std::string GP_FOG_RANGE_FAR ("FogRangeFar")
const std::string GP_FOG_RANGE_DENSITY ("FogDensity")
const std::string GP_HWND ("hwnd")
template<typename T >
void getAttribute (const std::string type, std::map< std::string, boost::any > &attributes, const std::string key, boost::function< bool(T)> setter)
 For standard, single-parameter setters, provides a quick and easy way to reduce an immense number of lines of code in CreateComponent by centralizing all common operations.
template<typename T >
std::pair< bool, T > getAttributeAlt (const std::string type, std::map< std::string, boost::any > &attributes, const std::string key)
 For non-standard setters, provides a relatively quick and easy way to reduce an immense number of lines of code in CreateComponent by centralizing all common operations.
template<typename T >
EnvelopeSPTR HandleSetterMessage (boost::function< bool(T)> setter, const int msgID, const EnvelopeSPTR e, const T errValue, const int ackMsgNumber)
std::string getBasicTextureFileInfo (EnvelopeSPTR)
void getScrollTextureInfo (EnvelopeSPTR, std::string &, float &, float &, float &)
void getAdjustableTextureInfo (EnvelopeSPTR, std::string &, unsigned int &)

Variables

const float DEFAULT_NEAR_CLIP = 10.0f
const float DEFAULT_FAR_CLIP = 1000.0f
const float DEFAULT_FOV = D3DXToRadian(60.0f)
const D3DXVECTOR3 DEFAULT_OFFSET = D3DXVECTOR3(0.0f, 0.0f, 0.0f)
const D3DXQUATERNION DEFAULT_ROTATION = D3DXQUATERNION(0.0f, 0.0f, 0.0f, 1.0f)
const std::string CAMERA = "camera"
const std::string CAMERA__NAME = "name"
const std::string CAMERA__FOV = "fov"
const std::string CAMERA__NEAR_CLIP = "nearclip"
const std::string CAMERA__FAR_CLIP = "farclip"
const std::string CAMERA__OFFSET = "offset"
const std::string CAMERA__ROTATION = "rotation"
const std::string RENDER__SPACE = "space"
const std::string MATERIALS__DATA = "materials"
const std::string TEXTURES__DATA = "textures"
const std::string LIGHT_AMBIENT = "amblight"
const std::string LIGHT_DIRECTIONAL = "dirlight"
const std::string LIGHT_POINT = "pointlight"
const std::string LIGHT__AMBIENT_COLOR = "ambient"
const std::string LIGHT__DIFFUSE_COLOR = "diffuse"
const std::string LIGHT__SPECULAR_COLOR = "specular"
const std::string LIGHT__RANGE = "range"
const std::string HEIGHTMAP = "heightmap"
const std::string HEIGHTMAP__FILE = "heightmap"
const std::string HEIGHTMAP__TEXTURE_FILE = "texture"
const std::string MESH = "mesh"
const std::string MESH__FILE = "file"
const std::string HELICAL_TUBE = "helicaltube"
const std::string HELICAL_TUBE__RADIUS = "radius"
const std::string HELICAL_TUBE__LENGTH = "length"
const std::string HELICAL_TUBE__PITCH = "pitch"
const std::string HELICAL_TUBE__SEGMENTS = "segments"
const std::string TILED_MAP = "tiledmap"
const std::string POINTLINE = "pointline"
const std::string SPRITE = "sprite"
const std::string D3DFONT = "d3dfont"
const std::string QUAD = "quad"
const std::string QUAD__WIDTH = "width"
const std::string QUAD__HEIGHT = "height"
const std::string QUAD__ORIGIN = "origin"
const std::string QUAD__ORIENT = "orient"
const unsigned int GP_WINDOW_WIDTH_DEF = 1024
const unsigned int GP_WINDOW_HEIGHT_DEF = 768
const unsigned int GP_CLIENT_WIDTH_DEF = GP_WINDOW_WIDTH_DEF
const unsigned int GP_CLIENT_HEIGHT_DEF = GP_WINDOW_HEIGHT_DEF
const float GP_CLIENT_ASPECT_DEF = (float) GP_CLIENT_WIDTH_DEF / (float) GP_CLIENT_HEIGHT_DEF
const float GP_CLIENT_ASPECT_INV_DEF = 1.0f / GP_CLIENT_ASPECT_DEF
const bool GP_GRAPHICS_PAUSE_DEF = false
const Color GP_CLEAR_COLOR_DEF = Color(0.0, 0.0, 0.0, 1.0)
const unsigned int GP_ANISOTROPIC_FILTERING_DEF = 0
const bool GP_FOG_ENABLED_DEF = false
const Color GP_FOG_COLOR_DEF = Color(1.0, 1.0, 1.0, 1.0)
const unsigned int GP_FOG_MODE_DEF = 3
const float GP_FOG_RANGE_NEAR_DEF = 0.5f
const float GP_FOG_RANGE_FAR_DEF = 0.8f
const float GP_FOG_RANGE_DENSITY_DEF = 0.66f
const unsigned int ID_MATERIAL_BASIC = 0
const unsigned int ID_MATERIAL_BASIC_USING_MAT = 1
const unsigned int ID_MATERIAL_COLOR_AMBIENT = 0
const unsigned int ID_MATERIAL_COLOR_DIFFUSE = 1
const unsigned int ID_MATERIAL_COLOR_SPECULAR = 2
const unsigned int ID_MATERIAL_COLOR_EMISSIVE = 3
const unsigned int ID_MATERIAL_COLOR_POWER = 4
const unsigned int ACK_LOAD_GRAPHICS = 1001
 Message sent from the graphics module to indicate that the module has loaded.
const unsigned int MSG_START_GRAPHICS = 1002
 Message sent to the graphics module to start it up.
const unsigned int ACK_START_GRAPHICS = 1003
 Message sent from the graphics module with a status indicator.
const unsigned int MSG_STOP_GRAPHICS = 1098
 Message sent to the graphics module to shut it down.
const unsigned int ACK_STOP_GRAPHICS = 1099
 Message sent from the graphics module with a status indicator.
const unsigned int MSG_SET_RENDER_RATE = 1100
const unsigned int ACK_SET_RENDER_RATE = 1101
const unsigned int MSG_SET_RENDER_DELAY = 1102
const unsigned int ACK_SET_RENDER_DELAY = 1103
const unsigned int MSG_GET_RENDER_RATE = 1110
const unsigned int ACK_GET_RENDER_RATE = 1111
const unsigned int MSG_GET_RENDER_DELAY = 1112
const unsigned int ACK_GET_RENDER_DELAY = 1113
const unsigned int MSG_SET_FILL_MODE = 1500
const unsigned int ACK_SET_FILL_MODE = 1501
const unsigned int MSG_SET_CURRENT_CAMERA = 1600
const unsigned int ACK_SET_CURRENT_CAMERA = 1601
const unsigned int MSG_SYS_WINDOW_CHANGED = 9999
const D3DXVECTOR3 UP_DIRECTION = D3DXVECTOR3(0.0f, 1.0f, 0.0f)
const D3DFILLMODE DEFAULT_FILLMODE = D3DFILL_SOLID
const float DEFAULT_RENDER_DELAY = 1.0f / 30.0f
const Color BLACK = Color(0.0f, 0.0f, 0.0f, 1.0f)
const Color WHITE = Color(1.0f, 1.0f, 1.0f, 1.0f)
float AspectRatio
float AspectRatioInv
const unsigned int ID_TEXTURE_BASIC = 0
const unsigned int ID_TEXTURE_SCROLL_ANIM = 1
const unsigned int ID_TEXTURE_ADJUSTABLE = 2
const unsigned int ID_TEXTURE_PARAM_FILE = 0
const unsigned int ID_TEXTURE_PARAM_UV_VEL = 1
const unsigned int ID_TEXTURE_PARAM_A_VEL = 2
const unsigned int ID_TEXTURE_PARAM_MESSAGE_TYPE = 3
const Material BLANK_MATERIAL

Detailed Description

Namespace to contain every item that is related to the rendering engine. The name itself is a legacy, as is a lot of the code contain by it, from the Saturn V engine that built as part of Adam and Ricky's Engine class.


Function Documentation

template<typename T >
void GraphicsCore::getAttribute ( const std::string  type,
std::map< std::string, boost::any > &  attributes,
const std::string  key,
boost::function< bool(T)>  setter 
) [inline]

For standard, single-parameter setters, provides a quick and easy way to reduce an immense number of lines of code in CreateComponent by centralizing all common operations.

Definition at line 41 of file RenderModuleComponents.cpp.

template<typename T >
std::pair<bool, T> GraphicsCore::getAttributeAlt ( const std::string  type,
std::map< std::string, boost::any > &  attributes,
const std::string  key 
) [inline]

For non-standard setters, provides a relatively quick and easy way to reduce an immense number of lines of code in CreateComponent by centralizing all common operations.

Definition at line 63 of file RenderModuleComponents.cpp.


Variable Documentation

const unsigned int GraphicsCore::ACK_LOAD_GRAPHICS = 1001

Message sent from the graphics module to indicate that the module has loaded.

Definition at line 16 of file Messages.h.

const unsigned int GraphicsCore::ACK_START_GRAPHICS = 1003

Message sent from the graphics module with a status indicator.

Definition at line 19 of file Messages.h.

const unsigned int GraphicsCore::ACK_STOP_GRAPHICS = 1099

Message sent from the graphics module with a status indicator.

Definition at line 22 of file Messages.h.

const Material GraphicsCore::BLANK_MATERIAL
Initial value:
 {
    Color(1.0f, 1.0f, 1.0f, 1.0f), 
    Color(1.0f, 1.0f, 1.0f, 1.0f), 
    Color(1.0f, 1.0f, 1.0f, 1.0f), 
    Color(0.0f, 0.0f, 0.0f, 1.0f), 
    1.0f 
  }

Definition at line 27 of file Types.h.

const unsigned int GraphicsCore::MSG_START_GRAPHICS = 1002

Message sent to the graphics module to start it up.

Definition at line 18 of file Messages.h.

const unsigned int GraphicsCore::MSG_STOP_GRAPHICS = 1098

Message sent to the graphics module to shut it down.

Definition at line 21 of file Messages.h.