Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Ult Namespace Reference

Classes

class  Archive
 
class  ArchiveFileHeader
 
class  ArchiveHeader
 
class  BoundingBox
 
class  BoundingSphere
 
class  Camera
 
class  CollisionResponse
 
class  DynamicModel
 
class  Effect
 
class  EffectResource
 
class  EffectResourceTag
 
class  Endian
 
class  Frustum
 
class  GameMonkey
 
class  GameMonkeyFunction
 
class  GeometryNode
 
struct  GLSLParameter
 
struct  GLSLShader
 
class  GLTexture
 
class  Handle
 
class  HashItem
 
class  HashTable
 
class  Matrix4x4
 
class  ModelData
 
class  ModelResource
 
class  ModelResourceTag
 
class  MultiTexEffect
 
class  MultiTexShader
 
class  Network
 
class  Node
 
class  OBB
 
class  OctreeNode
 
class  OpenALSoundBuffer
 
class  OpenALSoundSource
 
class  OpenALSystem
 
class  OpenGLRenderer
 
class  Packet
 
class  PhysicsObject
 
class  PhysicsSpace
 
class  Plane
 
class  PointMass
 
struct  Property
 
class  PropertyScript
 
class  Quaternion
 
class  Ray
 
class  RenderInterface
 
struct  RenderParams
 
class  ResourceManager
 
class  ResourceName
 
class  SceneGraph
 
class  Socket
 
class  Spring
 
class  SpringMass
 
struct  stAxisPlaneVertex
 
struct  stOBJMeshVertex
 
struct  stObjModel
 
struct  stTexture
 
struct  stUnitBoxVertex
 
struct  stUnitSphereVertex
 
struct  stUnitSquareVertex
 
class  TextureMapEffect
 
class  TextureShader
 
class  TokenStream
 
class  TransformationNode
 
class  Vector3D
 
class  VertexDescriptor
 
class  VertexElement
 
class  WindowHandle
 

Typedefs

typedef char NetPacketValue
 
typedef void(* NetCallback) (int u, int y, char *d, int s)
 
typedef int ShaderHandle
 
typedef int ParameterHandle
 
typedef int GmScript
 
typedef std::vector< FilterTypeFilterList
 
typedef FilterListFilterListPtr
 
typedef Handle< stTextureTexture
 

Enumerations

enum  EndianType { ENDIAN_UNKNOWN , ENDIAN_BIG , ENDIAN_LITTLE }
 
enum  INPUT_BUTTON {
  BUTTON_LEFT_SHOULDER = 1 , BUTTON_RIGHT_SHOULDER , BUTTON_LEFT_TRIGGER , BUTTON_RIGHT_TRIGGER ,
  BUTTON_LEFT_THUMB , BUTTON_RIGHT_THUMB , BUTTON_START , BUTTON_BACK ,
  BUTTON_ARROW_UP , BUTTON_ARROW_DOWN , BUTTON_ARROW_LEFT , BUTTON_ARROW_RIGHT ,
  BUTTON_A , BUTTON_B , BUTTON_X , BUTTON_Y ,
  BUTTON_MOUSE_LEFT , BUTTON_MOUSE_RIGHT , BUTTON_0 , BUTTON_1 ,
  BUTTON_2 , BUTTON_3 , BUTTON_4 , BUTTON_5 ,
  BUTTON_6 , BUTTON_7 , BUTTON_8 , BUTTON_9 ,
  BUTTON_C , BUTTON_D , BUTTON_E , BUTTON_F ,
  BUTTON_G , BUTTON_H , BUTTON_I , BUTTON_J ,
  BUTTON_K , BUTTON_L , BUTTON_M , BUTTON_N ,
  BUTTON_O , BUTTON_P , BUTTON_Q , BUTTON_R ,
  BUTTON_S , BUTTON_T , BUTTON_U , BUTTON_V ,
  BUTTON_W , BUTTON_Z , BUTTON_ESCAPE , BUTTON_SPACE ,
  BUTTON_ENTER , BUTTON_TOTAL_BUTTONS
}
 
enum class  PlaneStatus {
  PlaneStatus::Front = 1 , PlaneStatus::Back , PlaneStatus::OnPlane , PlaneStatus::Clipped ,
  PlaneStatus::Culled , PlaneStatus::Visible
}
 
enum class  NetMsgType {
  NetMsgType::ServerDisconnect = 0 , NetMsgType::ClientDisconnect , NetMsgType::ForceDisconnect , NetMsgType::ConnectAccepted ,
  NetMsgType::SendError , NetMsgType::RespondRequire , NetMsgType::RespondOk
}
 
enum class  NetType { NetType::Null = 0 , NetType::Server , NetType::Client }
 
enum class  NetResult { NetResult::NoData = 0 , NetResult::DataFail , NetResult::PartialData , NetResult::DataSuccess }
 
enum  AlphaState { ULT_ALPHA_LESS = 1 , ULT_ALPHA_GREATER }
 
enum  ElementType {
  ULT_NULL_ELEMENT = 0 , ULT_IGNORE_2F , ULT_IGNORE_3F , ULT_VERTEX_3F ,
  ULT_NORMAL_3F , ULT_COLOR_3F , ULT_TEX1_2F , ULT_TEX2_2F ,
  ULT_TEX3_2F , ULT_TEX4_2F , ULT_TEX5_2F , ULT_TEX6_2F ,
  ULT_TEX7_2F , ULT_TEX8_2F , ULT_TEX1_3F , ULT_TEX2_3F ,
  ULT_TEX3_3F , ULT_TEX4_3F , ULT_TEX5_3F , ULT_TEX6_3F ,
  ULT_TEX7_3F , ULT_TEX8_3F
}
 
enum  MatrixFormat { ULT_IDENTITY_MATRIX = 1 , ULT_TRANSPOSE_MATRIX , ULT_INVERSE_MATRIX , ULT_INVERSE_TRANSPOSE_MATRIX }
 
enum  MatrixType { ULT_PROJECTION_MATRIX = 1 , ULT_MODELVIEW_MATRIX , ULT_TEXTURE_MATRIX , ULT_MVP_MATRIX }
 
enum  PrimitiveType {
  ULT_NULL_PRIM = 0 , ULT_POINT_LIST , ULT_TRI_LIST , ULT_TRI_STRIP ,
  ULT_LINE_LIST , ULT_LINE_STRIP
}
 
enum  ProjectionType { ULT_PROJECTION_NULL = 0 , ULT_PERSPECTIVE_TYPE , ULT_ORTHO_TYPE }
 
enum  RenderState {
  ULT_DEPTH_TESTING = 1 , ULT_SMOOTH_SHADING , ULT_TEXTURE_2D , ULT_TEXTURE_CUBE ,
  ULT_ALPHA_TESTING , ULT_BACK_CCW_CULLING , ULT_BACK_CW_CULLING , ULT_FRONT_CCW_CULLING ,
  ULT_FRONT_CW_CULLING , ULT_TOTAL_RENDER_STATES
}
 
enum  FilterType {
  ULT_NO_FILTER = 0 , ULT_MIN_POINT_FILTER , ULT_MAG_POINT_FILTER , ULT_MIP_POINT_FILTER ,
  ULT_MIN_LINEAR_FILTER , ULT_MAG_LINEAR_FILTER , ULT_MIP_LINEAR_FILTER , ULT_USE_ANISO_FILTER ,
  ULT_S_REPEAT_FILTER , ULT_T_REPEAT_FILTER , ULT_R_REPEAT_FILTER , ULT_S_CLAMP_FILTER ,
  ULT_T_CLAMP_FILTER , ULT_R_CLAMP_FILTER , ULT_S_EDGE_CLAMP_FILTER , ULT_T_EDGE_CLAMP_FILTER ,
  ULT_R_EDGE_CLAMP_FILTER
}
 
enum  TextureFormat { ULT_TEX_UNSIGNED_BYTE = 1 , ULT_TEX_FLOAT }
 
enum  TextureType { ULT_TEX2D_TYPE = 1 , ULT_CUBE_TYPE }
 

Functions

void InitInput ()
 
void UpdateInput ()
 
void DeinitInput ()
 
bool IsButtonDown (const INPUT_BUTTON btn)
 
bool IsButtonUp (const INPUT_BUTTON btn, const bool wasDown)
 
void GetMousePosition (int *mx, int *my)
 
bool GetWindowResize (int *width, int *height)
 
stObjModelLoadOBJ (const char *fileName)
 
bool CreateOBJMesh (const char *fileName, ModelData *model)
 
bool CreateXZPlaneMesh (float size, ModelData *model)
 
bool CreateSquareMesh (float width, float height, ModelData *model)
 
bool CreateUnitSquareMesh (Ult::ModelData *model)
 
float GetTimeMs ()
 
float GetTimeSeconds ()
 

Variables

bool gShouldQuit = false
 
constexpr size_t MAX_PACKET_SIZE = 256
 
constexpr char NetSystemUsage = 0
 
auto programStart = std::chrono::steady_clock::now()
 

Typedef Documentation

◆ FilterList

typedef std::vector<FilterType> Ult::FilterList

◆ FilterListPtr

◆ Texture

Enumeration Type Documentation

◆ EndianType

Enumerator
ENDIAN_UNKNOWN 
ENDIAN_BIG 
ENDIAN_LITTLE 

◆ FilterType

Enumerator
ULT_NO_FILTER 
ULT_MIN_POINT_FILTER 
ULT_MAG_POINT_FILTER 
ULT_MIP_POINT_FILTER 
ULT_MIN_LINEAR_FILTER 
ULT_MAG_LINEAR_FILTER 
ULT_MIP_LINEAR_FILTER 
ULT_USE_ANISO_FILTER 
ULT_S_REPEAT_FILTER 
ULT_T_REPEAT_FILTER 
ULT_R_REPEAT_FILTER 
ULT_S_CLAMP_FILTER 
ULT_T_CLAMP_FILTER 
ULT_R_CLAMP_FILTER 
ULT_S_EDGE_CLAMP_FILTER 
ULT_T_EDGE_CLAMP_FILTER 
ULT_R_EDGE_CLAMP_FILTER 

◆ TextureFormat

Enumerator
ULT_TEX_UNSIGNED_BYTE 
ULT_TEX_FLOAT 

◆ TextureType

Enumerator
ULT_TEX2D_TYPE 
ULT_CUBE_TYPE 

Function Documentation

◆ CreateOBJMesh()

bool Ult::CreateOBJMesh ( const char * fileName,
ModelData * model )
inline

Loads the OBJ model from file and stores its data into model.

◆ GetTimeMs()

float Ult::GetTimeMs ( )

Returns the time since the application started in milliseconds

◆ GetTimeSeconds()

float Ult::GetTimeSeconds ( )

Returns the time since the application started in seconds

◆ LoadOBJ()

stObjModel * Ult::LoadOBJ ( const char * fileName)
inline

Creates and initializes a stObjModel instance from the OBJ model contained in the file given by fileName.

Variable Documentation

◆ programStart

auto Ult::programStart = std::chrono::steady_clock::now()