fluidvis
Classes | Enumerations | Functions | Variables
sx Namespace Reference

Classes

class  Annotation
 
class  AudioBuffer
 
class  AudioListener
 
class  AudioObject
 
class  AudioPass
 
class  Bitmap
 
struct  Bone
 
struct  BoneTransform
 
class  BufferedMesh
 
struct  BufferUniforms
 
class  ChangeIDInput
 
class  ChangeUniformInput
 
class  ChooseIDDialog
 
class  ClickableLabel
 
struct  ConfigParts
 
class  ConsoleLogger
 
class  CreateConfigDialog
 
class  DMatrix
 
class  DVector
 
class  Effect
 
struct  EffectCommand
 
class  EffectObject
 
class  Exception
 
class  FileLogger
 
class  GraphEditPane
 
class  GraphicWidget
 
class  Level
 
class  ListLogger
 
class  ListMarkup
 
class  Logger
 
class  LogMarkup
 
class  Matrix
 
class  Mesh
 
class  Pass
 
class  PassWidget
 
class  RenderObject
 
class  RenderTarget
 
class  SequenceLayout
 
class  Shader
 
class  ShadeX
 
class  Skeleton
 
class  SXEditor
 
class  SXInternalWidget
 
struct  SXLogicObject
 
struct  SXLogicObjects
 
struct  SXLogicPass
 
class  SXRenderArea
 
class  SXRenderListener
 
class  SXResource
 
class  SXWidget
 
class  SXWindow
 
class  Texture
 
class  Uniform
 
class  UniformDMatrix
 
class  UniformDouble
 
class  UniformDVector
 
class  UniformFloat
 
class  UniformMatrix
 
class  UniformVector
 
class  Vector
 
struct  VertexBuffer
 
class  Volume
 
class  Warning
 
struct  XBuffer
 
struct  XMesh
 
struct  XNode
 
struct  XTag
 
struct  XText
 
class  XUnit
 

Enumerations

enum  parserException {
  EX_IO, EX_SYNTAX, EX_COMPILE, EX_NODATA,
  EX_AMBIGUOUS, EX_BOUNDS, EX_INIT
}
 
enum  LogLevel {
  L_HARMLESS = 0, L_WARNING = 1, L_ERROR = 2, L_FATAL_ERROR = 3,
  L_NONE = 4
}
 
enum  FileLoggerState { FIRST_TABLE, COLLECT_ANNOTATIONS, COLLECT_MESSAGES }
 
enum  MouseButton { MOUSE_LEFT, MOUSE_MIDDLE, MOUSE_RIGHT }
 
enum  KeyboardSpecial {
  SX_F1 = 0x1000000, SX_F2 = 0x1000001, SX_F3 = 0x1000002, SX_F4 = 0x1000003,
  SX_F5 = 0x1000004, SX_F6 = 0x1000005, SX_F7 = 0x1000006, SX_F8 = 0x1000007,
  SX_F9 = 0x1000008, SX_F10 = 0x1000009, SX_F11 = 0x100000a, SX_F12 = 0x100000b,
  SX_ESC = 0x100000c, SX_INSERT = 0x100000d, SX_PAUSE = 0x100000e, SX_HOME = 0x100000f,
  SX_END = 0x1000010, SX_DELETE = 0x1000011, SX_PAGEUP = 0x1000012, SX_PAGEDOWN = 0x1000013,
  SX_LEFT = 0x1000014, SX_RIGHT = 0x1000015, SX_DOWN = 0x1000016, SX_UP = 0x1000017,
  SX_NUMLOCK = 0x1000018, SX_CLEAR = 0x1000019, SX_ENTER = 0x100001a, SX_CTRL = 0x100001b,
  SX_SHIFT = 0x100001c, SX_CAPSLOCK = 0x100001d, SX_START = 0x100001e, SX_ALT = 0x100001f,
  SX_RETURN = 0x1000020, SX_BACKSPACE = 0x1000021
}
 
enum  ShaderType {
  VERTEX, TESSELLATION_CONTROL, TESSELLATION_EVALUATION, GEOMETRY,
  FRAGMENT
}
 
enum  PixelFormat { BYTE_RGBA, FLOAT16_RGBA, FLOAT_RGBA }
 
enum  BlendFactor {
  ZERO, ONE, FRAGMENTCOLOR, FRAMEBUFFERCOLOR,
  FRAGMENTALPHA, FRAMEBUFFERALPHA, ONE_MINUS_FRAGMENTCOLOR, ONE_MINUS_FRAMEBUFFERCOLOR,
  ONE_MINUS_FRAGMENTALPHA, ONE_MINUS_FRAMEBUFFERALPHA
}
 
enum  DepthTest {
  ACCEPT_NEVER, ACCEPT_ALWAYS, ACCEPT_LESS, ACCEPT_LESS_EQUAL,
  ACCEPT_GREATER, ACCEPT_GREATER_EQUAL, ACCEPT_EQUAL, ACCEPT_NOT_EQUAL
}
 
enum  LayoutExpansion { EXPAND_VERTICALLY, EXPAND_HORIZONTALLY }
 
enum  EditMode { MODE_NONE, MODE_ADDPASS, MODE_EDITPASS, MODE_MOVE }
 

Functions

EXPA vector< double > parseNumbers (const string &numberList)
 
EXPA vector< string > parseStrings (const string &stringList)
 
EXPA string readFile (string filename)
 
EXPA XTagparseSXdata (const string &data)
 
EXPA XTagparseSXFile (const string path)
 
EXPA XTagparseXMLdata (const string &data)
 
EXPA XTagparseXMLFile (const string path)
 
EXPA XMeshparsePLYdata (const string &data)
 
EXPA XMeshparsePLYFile (const string path)
 
EXPA pair< vector< Bone >, MatrixparseColladaSkeleton (XTag &collada)
 
EXPA pair< vector< Bone >, MatrixparseColladaSkeleton (const string &data)
 
EXPA pair< vector< Bone >, MatrixparseColladaSkeletonFile (const string &path)
 
EXPA XMeshparseColladaData (XTag &data)
 
EXPA XMeshparseColladaData (const string &data)
 
EXPA XMeshparseColladaFile (const string path)
 

Variables

const float Pi = 3.1415926535f
 
const float Tau = 6.2831853072f
 
const float Exp = 2.7182818285f
 

Detailed Description

SX math classes (c) 2012 by Tristan Bauer

Testing framework (c) 2012 by Tristan Bauer

Enumeration Type Documentation

A blendfactor is used to specify, how a fragment is blended with its background, when it's drawn. When a fragment f is rendered, a blendfactor fragmentblendfactor is multiplied with the fragment, and another bendfactor targetblendfactor is multiplied with the fragment fbo in the framebuffer located on the position of fragment f, and the sum of both values replaces the former value fbo in the framebuffer. Hence the new value new_fbo of the framebufferfragment depending on the original value fbo of the framebufferfragment fbo, the value f of the fragment about to be rendered, and the blendfactors fragmentblendfactor, targetblendfactor is computed by evaluating the formula

new_fbo = fbo * targetblendfactor + f * fragmentblendfactor

the initial values of targetblendfactor and fragmentblendfactor are targetblendfactor = ZERO fragmentblendfactor = ONE

Example 1: Suppose a transparent primitive should be rendered, such that fragments of the primitive with alphavalue = 1 are covering the background completely, and fragments with alphavalue = 0 let the background shine through without being visible. This can be achieved by using the blendfactors fragmentblendfactor = FRAGMENTALPHA, targetblendfactor = ONE_MINUS_FRAGMENTALPHA Example 2: Suppose a non-transparent primitive should be rendered, such that the background is completely covered by the primitive. This can be achieved by using the blendfactors fragmentblendfactor = ONE, targetblendfactor = ZERO

A depth test is used to determine wether a pixel is covered by the framebuffercontent or not depending on its distance from the camera. The distances of the fragments in the framebuffer are stored in a depthbuffer. The depth test compares the depthvalue of the fragment about to be rendered with the depthvalue of the framebuffer , and discards it iff the depth test fails. The default depth test is ACCEPT_LESS.

state of the file logger

Enumerator
FIRST_TABLE 

First table has not been started. If a message or annotation appears without a markup before, print a table, and immediately change to state COLLECT_ANNOTATIONS, if an annotation was posted, or to state COLLECT_MESSAGES, if a common message was posted.

COLLECT_ANNOTATIONS 

accumulate incoming annotations to a single annotation, until a common message appears, then change to state COLLECT_MESSAGES

COLLECT_MESSAGES 

accumulate incoming common messages, until an annotation appears, then change to state COLLECT_ANNOTATIONS

keyboard special keys

Only iff the minLevel of the logger is not L_NONE, and the level is greater or equal than the minLevel of the logger, messages are recognized by the logger. The LogLevels from the lowest to the highest level are L_HARMLESS, L_WARNING, L_ERROR, L_FATAL_ERROR, L_NONE

mousebuttons

types of parser exception

format of a pixel of a texture

types of shaders

Function Documentation

EXPA XMesh* sx::parseColladaData ( XTag data)

Parses a XTag in Collada format, and returns an equivalent mesh. If the mesh has a bone structure attached to it, the wheights are stored in buffers with the names of the bones. All faces must be of the same type: one vertex per face, two vertex per face, or at least three vertices per face. If the faces are of the last type, every single one is transformed into triangles. If the XTag does not represent a mesh in Collada format with one of the above face types, or the function fails to parse for other reasons, an exception is thrown.

Parameters
dataXTag in Collada, a mesh
Returns
mesh representing the data of the parameter data
Exceptions
aninstance of Exception of type EX_SYNTAX is raised, if data can't be parsed
EXPA XMesh* sx::parseColladaData ( const string &  data)

Parses a string in Collada format, and returns an equivalent mesh. If the mesh has a bone structure attached to it, the wheights are stored in buffers with the names of the bones. All faces must be of the same type: one vertex per face, two vertex per face, or at least three vertices per face. If the faces are of the last type, every single one is transformed into triangles. If the string does not represent a mesh in Collada format with one of the above face types, or the function fails to parse for other reasons, an exception is thrown.

Parameters
datastring in Collada, a mesh
Returns
mesh representing the data of the parameter data
Exceptions
aninstance of Exception of type EX_SYNTAX is raised, if data can't be parsed
EXPA XMesh* sx::parseColladaFile ( const string  path)

Parses a file in Collada format at location path, and returns an equivalent mesh. If the mesh has a bone structure attached to it, the wheights are stored in buffers with the names of the bones. All faces must be of the same type: one vertex per face, two vertex per face, or at least three vertices per face. If the faces are of the last type, every single one is transformed into triangles. If the string does not represent a mesh in Collada format with one of the above face types, or the function fails to parse for other reasons, an exception is thrown.

Parameters
pathpath of the file, which should be parsed
Returns
mesh representing the data of the parameter data
Exceptions
aninstance of Exception is raised. It' of type EX_SYNTAX, if the file's content cannot be parsed, and it's of type EX_IO, if the file can't be read.
EXPA pair<vector<Bone>,Matrix> sx::parseColladaSkeleton ( XTag collada)

Parses the skeleton of XTag in Collada format, and returns an equivalent bone structure. If the XTag is not in Collada format, or does not specify bones, an exception is thrown.

Parameters
dataXTag in Collada format with a bone structure in it
Returns
collection of root bones, and a transformation from the space the root bones into model space.
Exceptions
aninstance of Exception of type EX_SYNTAX is raised, if data doesn't specify a skeleton
EXPA pair<vector<Bone>,Matrix> sx::parseColladaSkeleton ( const string &  data)

Parses the skeleton of a string in Collada format, and returns an equivalent bone structure. If the string is not in Collada format, or does not specify bones, an exception is thrown.

Parameters
datastring in Collada format with a bone structure in it
Returns
collection of root bones, and a transformation from the space the root bones into model space.
Exceptions
aninstance of Exception of type EX_SYNTAX is raised, if data can't be parsed, or no skeleton is specified
EXPA pair<vector<Bone>,Matrix> sx::parseColladaSkeletonFile ( const string &  path)

Parses the skeleton of a file in Collada format at location path, and returns an equivalent bone structure. If the file does not exist, or it's not in Collada format, or does not specify bones, an exception is thrown.

Parameters
pathlocation of a file in Collada format with a bone structure in it
Returns
collection of root bones, and a transformation from the space the root bones into model space.
Exceptions
aninstance of Exception is raised. The Exception's type type EX_SYNTAX, if data can't be parsed, or no skeleton is specified. The Exception's type is EX_IO, if the file can't be read.
EXPA vector<double> sx::parseNumbers ( const string &  numberList)

Parses a list of double values separated by space, tab and newline character sequences. If the string doesn't have the format (<double>)*, an exception is thrown.

Parameters
numberListstring containing a sequence of numbers separated by empty space, tabs and newlines
Returns
vector of equivalent numbers listed in the same order as in parameter numberList
Exceptions
inthe case of an error, an exception Exception with type EX_SYNTAX is thrown
EXPA XMesh* sx::parsePLYdata ( const string &  data)

Parses a string in PLY format, and returns an equivalent mesh, if it contains properties like x,y,z,nx,ny,nz,s,t,u,r,g,b, and a property vertex_indices for the specification of the faces. All faces must be of the same type: one vertex per face, two vertex per face, or at least three vertices per face. If the faces are of the last type, every single one is transformed into triangles. If the string does not represent a mesh in PLY format with one of the above face types, or the function fails to parse for other reasons, an exception is thrown.

Parameters
datastring in PLY, a mesh
Returns
mesh representing the data of the parameter data
Exceptions
aninstance of Exception of type EX_SYNTAX is raised, if data can't be parsed
EXPA XMesh* sx::parsePLYFile ( const string  path)

Parses a file in PLY format at location path, and returns an equivalent mesh, if it contains properties like x,y,z,nx,ny,nz,s,t,u,r,g,b, and a property vertex_indices for the specification of the faces. All faces must be of the same type: one vertex per face, two vertex per face, or at least three vertices per face. If the faces are of the last type, every single one is transformed into triangles. If the file does not represent a mesh in PLY format with one of the above face types, or the file can't be read, an exception is thrown.

Parameters
pathpath of the file, which should be parsed
Returns
mesh representing the data of the file at location path
Exceptions
aninstance of Exception is raised. It' of type EX_SYNTAX, if the file's content cannot be parsed, and it's of type EX_IO, if the file can't be read.
EXPA vector<string> sx::parseStrings ( const string &  stringList)

Parses a list of strings separated by space, tab and newline character sequences.

Parameters
stringListstring containing a sequence of strings separated by empty space, tabs and newlines
Returns
vector of equivalent strings listed in the same order as in parameter stringList
Exceptions
inthe case of an error, an exception Exception with typ EX_SYNTAX is thrown
EXPA XTag* sx::parseSXdata ( const string &  data)

Parses a string in SX markup language, and returns the equivalent node. If the string is no instance of the SX markup language, or the function fails to parse for other reasons, an exception is thrown.

Parameters
datastring in SX markup language
Returns
root of the tree representing the data of the parameter data
Exceptions
aninstance of Exception of type EX_SYNTAX is raised, if data can't be parsed
EXPA XTag* sx::parseSXFile ( const string  path)

Reads the file in SX markup language at location path, parses the content , and returns the equivalent node. If the content is no instance of the SX markup language, or the file can't be read, an exception is thrown.

Parameters
pathpath of the file, which should be parsed
Returns
root of the tree representing the data of the file at location path
Exceptions
aninstance of Exception is raised. It's of type EX_SYNTAX, if the file's content cannot be parsed, and it's of type EX_IO, if the file can't be read.
EXPA XTag* sx::parseXMLdata ( const string &  data)

Parses a string in XML, and returns the equivalent node. If the string is no instance of XML, or the function fails to parse for other reasons, an exception is thrown.

Parameters
datastring in XML
Returns
root of the tree representing the data of the parameter data
Exceptions
aninstance of Exception of type EX_SYNTAX is raised, if data can't be parsed
EXPA XTag* sx::parseXMLFile ( const string  path)

Reads the file in XML at location path, parses the content , and returns the equivalent node. If the content is no instance of XML, or the file can't be read, an exception is thrown.

Parameters
pathpath of the file, which should be parsed
Returns
root of the tree representing the data of the file at location path
Exceptions
aninstance of Exception is raised. It' of type EX_SYNTAX, if the file's content cannot be parsed, and it's of type EX_IO, if the file can't be read.
EXPA string sx::readFile ( string  filename)

Reads file at location filename, and returns the content as a string. The file must be a text file. If the file can't be read, an exception is thrown.

Parameters
filenamea valid path to a file
Returns
content of the textfile
Exceptions
inthe case of an error, an exception Exception with type EX_IO is thrown

Variable Documentation

const float sx::Exp = 2.7182818285f

the eulerian number

const float sx::Pi = 3.1415926535f

constant pi, one half of the circumference of the unit circle

const float sx::Tau = 6.2831853072f

2 * pi, the full circumference of the unit circle