fluidvis
|
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 XTag * | parseSXdata (const string &data) |
EXPA XTag * | parseSXFile (const string path) |
EXPA XTag * | parseXMLdata (const string &data) |
EXPA XTag * | parseXMLFile (const string path) |
EXPA XMesh * | parsePLYdata (const string &data) |
EXPA XMesh * | parsePLYFile (const string path) |
EXPA pair< vector< Bone >, Matrix > | parseColladaSkeleton (XTag &collada) |
EXPA pair< vector< Bone >, Matrix > | parseColladaSkeleton (const string &data) |
EXPA pair< vector< Bone >, Matrix > | parseColladaSkeletonFile (const string &path) |
EXPA XMesh * | parseColladaData (XTag &data) |
EXPA XMesh * | parseColladaData (const string &data) |
EXPA XMesh * | parseColladaFile (const string path) |
Variables | |
const float | Pi = 3.1415926535f |
const float | Tau = 6.2831853072f |
const float | Exp = 2.7182818285f |
SX math classes (c) 2012 by Tristan Bauer
Testing framework (c) 2012 by Tristan Bauer
enum sx::BlendFactor |
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
enum sx::DepthTest |
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.
enum sx::FileLoggerState |
state of the file logger
enum sx::KeyboardSpecial |
keyboard special keys
enum sx::LogLevel |
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
enum sx::MouseButton |
mousebuttons
enum sx::parserException |
types of parser exception
enum sx::PixelFormat |
format of a pixel of a texture
enum sx::ShaderType |
types of shaders
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.
data | XTag in Collada, a mesh |
an | instance 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.
data | string in Collada, a mesh |
an | instance 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.
path | path of the file, which should be parsed |
an | instance 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. |
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.
data | XTag in Collada format with a bone structure in it |
an | instance of Exception of type EX_SYNTAX is raised, if data doesn't specify a skeleton |
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.
data | string in Collada format with a bone structure in it |
an | instance of Exception of type EX_SYNTAX is raised, if data can't be parsed, or no skeleton is specified |
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.
path | location of a file in Collada format with a bone structure in it |
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.
numberList | string containing a sequence of numbers separated by empty space, tabs and newlines |
in | the 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.
data | string in PLY, a mesh |
an | instance 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.
path | path of the file, which should be parsed |
an | instance 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.
stringList | string containing a sequence of strings separated by empty space, tabs and newlines |
in | the 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.
data | string in SX markup language |
an | instance 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.
path | path of the file, which should be parsed |
an | instance 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.
data | string in XML |
an | instance 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.
path | path of the file, which should be parsed |
an | instance 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.
filename | a valid path to a file |
in | the case of an error, an exception Exception with type EX_IO is thrown |
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