VCSSL ライブラリ 全ての関数・定数一覧

VCSSLの標準ライブラリに含まれている、全ての関数・定数を、一括で表示しています。仕様を調べたい関数が、どのライブラリに所属しているかわからない場合などにご利用ください。(多くのブラウザでは、「Ctrl」キーと「F」キーの同時押しで検索を行えます。)


全ての関数・定数一覧

System ライブラリ

各種の重要な基盤機能を提供するライブラリです。

const string VER
Represents the VCSSL version code supported by the implementation.
const string REV
Represents the development revision code of the implementation.
const complex I
The imaginary unit of the complex type.
const varcomplex VCI
The imaginary unit of the varcomplex type.
const float INF
The Inf, that is, infinity, value of the float type.
const float NAN
The NaN, that is, not-a-number, value of the float type. Note that NaN is not equal to any value. In other words, comparisons such as value == NAN cannot be used to determine whether a variable value is NaN. To test for NaN, use the nan function.
const float FLOAT_MAX
The maximum value of the float type.
const float FLOAT_MIN_ABS_NORMAL
The smallest non-zero positive value representable by the float type within the range of normalized numbers.
const float FLOAT_MIN_ABS_DENORMAL
The smallest non-zero positive value representable by the float type including the range of denormalized numbers.
const float FLOAT_MIN
Equivalent to FLOAT_MIN_ABS_DENORMAL.Because this shorter name is somewhat ambiguous in meaning and specification, use of the more explicit namesFLOAT_MIN_ABS_DENORMAL orFLOAT_MIN_ABS_NORMAL is generally recommended.
const int INT_MAX
The maximum value of the int type.
const int INT_MIN
The minimum value of the int type.
const string EOL
The environment-dependent newline code. It stores the value appropriate for the current environment, such as CR, LF, or CR+LF.
const string CR
The newline code CR, that is, 0x0D.
const string LF
The newline code LF, that is, 0x0A.
const string OS
A string for roughly distinguishing the type or generation of the operating system in the execution environment, usually the OS name. Note that numbers representing generations in product branding are often included in this OS name rather than treated as version numbers.
const string OSVER
A string useful as a reference when distinguishing the generation of the operating system in the execution environment, specifically information such as the OS development or internal version. Note that it may differ from the version used in product information for general users.
const string READ
The file input/output mode for reading. It is used by the open function.
const string WRITE
The file input/output mode for writing. It is used by the open function.
const string APPEND
The file input/output mode for append writing. It is used by the open function.
const string READ_TSV
The file input/output mode for TSV reading. It is used by the open function.
const string WRITE_TSV
The file input/output mode for TSV writing. It is used by the open function.
const string APPEND_TSV
The file input/output mode for TSV append writing. It is used by the open function.
const string READ_CSV
The file input/output mode for CSV reading. It is used by the open function.
const string WRITE_CSV
The file input/output mode for CSV writing. It is used by the open function.
const string APPEND_CSV
The file input/output mode for CSV append writing. It is used by the open function.
const string READ_BINARY
The file input/output mode for binary reading. It is used by the open function.
const string WRITE_BINARY
The file input/output mode for binary writing. It is used by the open function.
const string APPEND_BINARY
The file input/output mode for binary append writing. It is used by the open function.
const string STDIN
A special file path for using file input/output functions with standard input.
const string STDOUT
A special file path for using file input/output functions with standard output.
const string STDERR
A special file path for using file input/output functions with standard error output.
const int UP
A rounding mode that performs upward rounding by specifying the number of digits in the fractional part relative to zero, that is, the decimal part. It is used by the round function.
const int UP_SIGNIF
A rounding mode that performs upward rounding by specifying the number of digits in the significant part. It is used by the round function. This mode had been introduced experimentally as "UP" before VCSSL 3.3.
const int DOWN
A rounding mode that performs downward rounding by specifying the number of digits in the fractional part relative to zero, that is, the decimal part. It is used by the round function.
const int DOWN_SIGNIF
A rounding mode that performs downward rounding by specifying the number of digits in the significant part. It is used by the round function. This mode had been introduced experimentally as "DOWN" before VCSSL 3.3.
const int HALF_UP
A rounding mode that performs half-up rounding by specifying the number of digits in the fractional part relative to zero, that is, the decimal part. It is used by the round function.
const int HALF_UP_SIGNIF
A rounding mode that performs half-up rounding by specifying the number of digits in the significant part. It is used by the round function. This mode had been introduced experimentally as "HALF_UP" before VCSSL 3.3.
const int HALF_DOWN
A rounding mode that performs half-down rounding by specifying the number of digits in the fractional part relative to zero, that is, the decimal part. It is used by the round function.
const int HALF_DOWN_SIGNIF
A rounding mode that performs half-down rounding by specifying the number of digits in the significant part. It is used by the round function. This mode had been introduced experimentally as "HALF_DOWN" before VCSSL 3.3.
const int HALF_TO_EVEN
A rounding mode that performs half-to-even rounding by specifying the number of digits in the fractional part relative to zero, that is, the decimal part. It is used by the round function.
const int HALF_TO_EVEN_SIGNIF
A rounding mode that performs half-to-even rounding by specifying the number of digits in the significant part. It is used by the round function. This mode had been introduced experimentally as "HALF_EVEN" before VCSSL 3.3.
macro print(...)
Outputs strings to the console. The arguments may be of any type and are automatically converted to strings.If multiple arguments are specified, how they are formatted in the output depends on the implementation.Normally, they will probably be output separated by spaces.
macro println(...)
Outputs strings to the console and then outputs a newline. The arguments may be of any type and are automatically converted to strings.If multiple arguments are specified, how they are formatted in the output depends on the implementation.Normally, they will probably be output separated by spaces.
macro output(...)
Outputs strings to the area for displaying the processing result of the program.The arguments may be of any type and are automatically converted to strings.If multiple arguments are specified, how they are formatted in the output depends on the implementation.Normally, they will probably be output separated by spaces.
macro input(...)
Accepts an arbitrary string input from the user.The arguments may be of any type and are automatically converted to strings and displayed as the message of the input field.If multiple arguments are specified, how they are displayed depends on the implementation.Normally, they will probably be displayed separated by newlines.Note that the last argument is used as the default value of the input field.
macro select(...)
Presents choices to the user and obtains the selected item.The arguments may be of any type and are automatically converted to strings and displayed as the choices.
macro alert(...)
Outputs a message to an alert window and waits until the user acknowledges it.If multiple arguments are specified, how they are displayed depends on the implementation.Normally, they will probably be displayed separated by newlines.For output of messages without a warning intention, the popup function with nearly the same function is available since VCSSL 3.4.From now on, alert is recommended for messages intended as warnings.
macro popup(...)
Outputs a message to a popup window and waits until the user acknowledges it.If multiple arguments are specified, how they are displayed depends on the implementation.Normally, they will probably be displayed separated by newlines.At present, this function behaves exactly the same as alert, but it was newly supported since VCSSL 3.4 for outputting messages without a warning intention.By distinguishing it from alert, it becomes clear in code whether the displayed message is intended as a warning or as a normal message.In the future, the display icon on the window and so on may become different from alert.
macro pop(...)
Equivalent to the popup function.This function had the same name as the pop function of the data.Stack library,so the popup function with the same behavior was added later for cases where it is desirable to make it easier to see in code which one is being called.Note that the pop function of the Stack library has type parameters, and in current VCSSL those type parameters cannot be omitted,so there is at least currently no possibility of a signature conflict with this function.This function is supported for compatibility and can continue to be used,but to avoid confusion as much as possible, it is recommended to prefer popup unless there is a special reason not to.
macro confirm(...)
Outputs a message and presents the user with the two choices of acceptance or rejection.If multiple arguments are specified, how they are displayed depends on the implementation.Normally, they will probably be displayed separated by newlines.
string[ ] choose()
Presents the user with a file selection dialog and waits until a file is selected.
string[ ] choose(string message)
Presents the user with a file selection dialog and waits until a file is selected.
string[ ] choose(string message, string directory)
Presents the user with a file selection dialog and waits until a file is selected.
void beep()
Sounds a beep. However, whether it can actually be sounded depends on the environment.In some cases, a sound other than a beep, such as an operating-system warning sound, may be played.
void beep(int repeat)
Sounds a beep. However, whether it can actually be sounded depends on the environment.In some cases, a sound other than a beep, such as an operating-system warning sound, may be played.
void beep(int repeat, int wait)
Sounds a beep. However, whether it can actually be sounded depends on the environment.In some cases, a sound other than a beep, such as an operating-system warning sound, may be played.
void clear()
Clears the contents of the console. However, the behavior of this function depends on the implementation.For example, when console contents are displayed in a window attached to the implementation, the result will probably be as expected.However, in an implementation based only on standard input and output without a console window, it will probably do nothing.
void hide()
Hides the console. However, the behavior of this function depends on the implementation.For example, when console contents are displayed in a window attached to the implementation, the result will probably be as expected.However, in an implementation based only on standard input and output without a console window, it will probably do nothing.
void show()
Shows the console if it has been hidden. However, the behavior of this function depends on the implementation.For example, when console contents are displayed in a window attached to the implementation, the result will probably be as expected.However, in an implementation based only on standard input and output without a console window, it will probably do nothing.
int time()
Returns the elapsed time since the start of program execution, in milliseconds.
macro sleep(int milliSecond)
Suspends execution of the program temporarily.
void exit()
Ends execution of the program.Note that this function requests termination of the program to the implementation, and it does not necessarily guarantee that execution will end immediately.The ideal timing for calling this function is when the implementation is in an idle state, such as at the final line of the program after leaving all loops and branches.If this function is called while the implementation is performing high-speed processing, it can become close to a forced termination.Details depend on the implementation and its optimization policy, but when this function is called, the implementation may be in the middle of a sequence of operations that cannot be interrupted immediately.In that case, a time lag may occur and execution may continue for a short while even after the call.
void exit(int code)
Ends execution of the program with a specified exit status code.Note that this function requests termination of the program to the implementation, and it does not necessarily guarantee that execution will end immediately.The ideal timing for calling this function is when the implementation is in an idle state, such as at the final line of the program after leaving all loops and branches.If this function is called while the implementation is performing high-speed processing, it can become close to a forced termination.Details depend on the implementation and its optimization policy, but when this function is called, the implementation may be in the middle of a sequence of operations that cannot be interrupted immediately.In that case, a time lag may occur and execution may continue for a short while even after the call.
void reset(string programName, string args[ ])
Resets the implementation and executes another program.
macro error(...)
Outputs an error message.After outputting the error message, whether program execution ends or continues depends on the implementation.If you want to ensure termination, call exit afterward.
macro assert(bool expectedCondition)
Evaluates the value of an expression, does nothing if it is true, and outputs an error message if it is false.Program execution will probably be terminated. This function is used for testing.
macro exec(...)
Executes an operating-system command or an external program asynchronously in another process.Execution of the calling program does not wait for completion of the process. It continues in parallel with the created process.If you want to wait for execution to finish or control standard input and output, use the Process library.
macro system(...)
Executes an operating-system command or an external program synchronously.Execution of the calling program waits until the process completes.
macro alloc(...)
Changes the number of elements of an array.Elements at the same indices keep the same values before and after the change.
macro free(...)
Sets the number of elements of all dimensions of an array to 0.
bool exists(string filePath)
Checks whether a file exists.
void mkdir(string directoryPath)
Creates a new directory, that is, a folder. If the directory already exists, nothing is done.
bool isdir(string filePath)
Checks whether a file is a directory.
string[ ] listdir(string directoryPath)
Returns the list of file names in a directory.
macro rank(...)
Returns the number of dimensions of an array.For example, for an array a[11][28][32], rank(a) is 3.
macro length(...)
Returns the number of elements of an array. The second argument specifies the dimension whose element count is to be obtained, as an index counted from the left as 0, 1, 2, and so on.For example, for an array a[11][28][32], length(a, 0) is 11, length(a, 1) is 28, and length(a, 2) is 32.
bool nan( float value )
Determines whether a float variable or value is NaN, that is, not a number.
bool inf( float value )
Determines whether a float variable or value is Inf, that is, infinity.
string bin( int number )
Returns a string representing an int variable or value in binary. The prefix 0b is added at the beginning.
string oct( int number )
Returns a string representing an int variable or value in octal. The prefix 0 is added at the beginning.
string hex( int number )
Returns a string representing an int variable or value in hexadecimal. The prefix 0x is added at the beginning.
macro digit(arg)
Specifies the number of operation digits for the varfloat type or the varcomplex type.
macro digit()
Gets the number of operation digits for the varfloat type or the varcomplex type.
float round(float value, int digit, int mode)
Rounds a float value to the specified number of digits in the specified mode.Note that float values are stored internally as binary floating-point data, while rounding is performed on a decimal basis, so care is required regarding binary-decimal conversion errors.In general, conversions between binary and decimal floating-point numbers may not fit into a finite number of digits, and small errors may occur.Therefore, the internal data of a float value may differ slightly from the value you imagine in decimal notation.Accordingly, if the target value is very close to the rounding boundary, the result may appear strange at first glance, although it is internally correct.Also, the relationship between the result of this function and the result obtained when converting a float value to a string or displaying it with the print function may sometimes seem strange,but this is because implicit rounding is also performed internally in the latter case. If you want to apply additional rounding to that displayed result, convert the argument value to string before passing it.
string round(string value, int digit, int mode)
Interprets the contents of a string value as a number, and rounds it to the specified number of digits in the specified mode.This function is used when you want to apply additional rounding based on the same content that is obtained when a float value is converted to a string or displayed by the print function,where implicit rounding is performed internally. Compared with rounding a float value directly, the effect of binary-decimal conversion errors may differ slightly.For details, refer to the description for the case where the argument value is of float type.
complex round(complex value, int digit, int mode)
Rounds a complex value to the specified number of digits in the specified mode.Note that the real and imaginary parts of a complex value are stored internally as binary floating-point data, while rounding is performed on a decimal basis, so care is required regarding binary-decimal conversion errors.For details, refer to the description for the case where the argument value is of float type.
varfloat round(varfloat value, varint digit, int mode)
Rounds a varfloat value to the specified number of digits in the specified mode.
varcomplex round(varcomplex value, varint digit, int mode)
Rounds a varcomplex value to the specified number of digits in the specified mode.
void round(int mode)
Specifies the default rounding mode for calculations on varfloat and varcomplex values.Note that rounding control for varfloat and varcomplex values, and the implementation of this function, are currently introduced on an experimental basis.At present, it is not always guaranteed that rounding control will be performed exactly as specified for all operations.Be sure to verify the behavior in advance before using it.Rounding control for varfloat and varcomplex values, and the implementation of this round function, are planned to be officially introduced in VCSSL 4 or later after this trial period.
float re( complex value )
Returns the real part of a complex value.
float im( complex value )
Returns the imaginary part of a complex value.
void re( complex value, float realValue )
Sets the real part of a complex value.
void im( complex value, float imagValue )
Sets the imaginary part of a complex value.
varfloat re( varcomplex value )
Returns the real part of a varcomplex value.
varfloat im( varcomplex value )
Returns the imaginary part of a varcomplex value.
void re( varcomplex value, varfloat realValue )
Sets the real part of a varcomplex value.
void im( varcomplex value, varfloat imagValue )
Sets the imaginary part of a varcomplex value.
macro save(string filePath, content)
A simple file output function. Saves the contents held by a string variable to a file.
void save(string filePath)
A simple file output function. Saves the contents currently displayed on the console to a file. However, the behavior of this function depends on the implementation.For example, if the console contents are displayed in a window provided by the implementation, you will probably get the expected result.However, in a standard-input/output-based implementation that has no console window, this function will probably do nothing.
string load(string filePath)
A simple file input function. Reads the entire contents of a file and returns them as a string. The file is closed automatically after reading.
string load()
A simple file input function. Obtains the contents currently displayed on the console and returns them as a string. However, the behavior of this function depends on the implementation.For example, if the console contents are displayed in a window provided by the implementation, you will probably get the expected result.However, in a standard-input/output-based implementation that has no console window, this function will probably obtain nothing.
int open(string filePath, string mode)
Opens a file, assigns and returns a unique identifier for it, called a file ID.Normally, specify a file name or path for the argument filePath,but you can also specify STDIN, STDOUT, or STDERR to read from or write to the standard input/output streams instead.
int open(string filePath, string mode, string textEncoding)
Opens a file, assigns and returns a unique identifier for it, called a file ID.Normally, specify a file name or path for the argument filePath,but you can also specify STDIN, STDOUT, or STDERR to read from or write to the standard input/output streams instead.
macro openw(...)
This function belongs to the VCSSL 1.0 generation, and opens a file with the same behavior as open( filePath, "wtsv" ). This function is supported for compatibility.
macro opencsvw(...)
This function belongs to the VCSSL 1.0 generation, and opens a file with the same behavior as open( filePath, "wcsv" ). This function is supported for compatibility.
macro openr(...)
This function belongs to the VCSSL 1.0 generation, and opens a file with the same behavior as open( filePath, "rtsv" ). This function is supported for compatibility.
macro opencsvr(...)
This function belongs to the VCSSL 1.0 generation, and opens a file with the same behavior as open( filePath, "rcsv" ). This function is supported for compatibility.
void close(int fileID)
Closes a file. All buffered output is flushed at that time.
void flush(int fileID)
Flushes buffered output for a file.
macro write(int fileID, ...)
Writes content to a file. The content may be of any type, and it is converted to a string when written.If multiple pieces of content are specified, how they are written depends on the file I/O mode. In "w" or WRITE mode : The written contents are concatenated as they are. , In "wtsv" or WRITE_TSV mode : The written contents are concatenated with tab separators. , In "wcsv" or WRITE_CSV mode : The written contents are concatenated with comma separators. , Note that this function inserted a line break in VCSSL 2.1 and earlier, but does not insert one in VCSSL 2.2 and later. The behavior with a line break is provided by the writeln function.
macro writeln(int fileID, ...)
Writes content to a file and then inserts a line break. The content may be of any type, and it is converted to a string when written.If multiple pieces of content are specified, how they are written depends on the file I/O mode. In "w" or WRITE mode : The written contents are concatenated as they are. , In "wtsv" or WRITE_TSV mode : The written contents are concatenated with tab separators. , In "wcsv" or WRITE_CSV mode : The written contents are concatenated with comma separators. , The line break code is automatically chosen appropriately for the execution environment.If you want to use a specific line break code such as LF or CR,use the write function instead of this function,and write the content with LF or CR appended to it.
string[ ] read(int fileID)
Reads the entire contents of a file.The return value is a string array, and how the read contents are stored in it depends on the file I/O mode. In "r" or READ mode : The entire contents of the file are returned as a string array with one element. , In "rtsv" or READ_TSV mode : The contents of the file are returned in a string array separated by whitespace and line breaks. Tab characters and half-width spaces are treated as the same. , In "rcsv" or READ_CSV mode : The contents of the file are returned in a string array separated by commas and line breaks. , In CSV and TSV reading, enclosures and delimiters are not interpreted, and the contents are simply split at the positions where separator characters exist. Also, in TSV, tab characters and half-width spaces are not distinguished.If you want to control this behavior more strictly, use the file.TextFile library.Note that this function read data line by line in VCSSL 2.1 and earlier, but was changed in VCSSL 2.2 and later to read the entire contents. The old line-by-line behavior is provided by the readln function.
string[ ] readln(int fileID)
Reads one line of content from a file.The return value is a string array, and how the read contents are stored in it depends on the file I/O mode. In "r" or READ mode : The line contents are returned as a string array with one element. , In "rtsv" or READ_TSV mode : The line contents are returned in a string array separated by whitespace. Tab characters and half-width spaces are treated as the same. , In "rcsv" or READ_CSV mode : The line contents are returned in a string array separated by commas. , In CSV and TSV reading, enclosures and delimiters are not interpreted, and the contents are simply split at the positions where separator characters exist. Also, in TSV, tab characters and half-width spaces are not distinguished.If you want to control this behavior more strictly, use the file.TextFile library.
string load(int fileID)
Reads the entire contents of a file and returns them as a string.
string loadln(int fileID)
Reads an entire line from a file and returns it as a string.
int countln(int fileID)
Counts the number of lines in a file.
macro eval(string expression)
Evaluates a string as an expression. Variables and functions can also be accessed within lexical scope, and assignments can be performed as well.The value of the expression is returned after being converted to a string array (if the value of the expression is non-array, the returned array has one element).A string array is the type with the greatest conversion flexibility, and can be assigned to arrays and non-arrays of any primitive type (assignment to a non-array is possible only when the number of elements is one).On the other hand, if you want to evaluate expressions repeatedly at high speed, especially when the return value is of int or float type, type conversion through strings can become a bottleneck.In such cases, you can avoid that bottleneck by assigning the result to a variable within the evaluated expression and discarding the return value instead of using it.
macro eval(string expression, literalType)
Evaluates a string as an expression. Unlike the eval function with one argument, this version lets you specify how numeric literals without explicit suffixes are interpreted.For example, the expression "1 / 2" is normally treated as division between int values, so the result is 0. If you want it to be treated as division between float values and obtain 0.5, specify a float value such as 0.0 as the second argument.Note that only the type of the second argument is meaningful, and its value is ignored (however, since some meaning may be added to it in the future, it is recommended to specify 0 or 0.0 unless you have a particular reason not to).
macro feval(string expression)
Evaluates a string as an expression, and returns the value as a non-array float.
macro feval(string expression, literalType)
Evaluates a string as an expression, and returns the value as a non-array float.
macro ieval(string expression)
Evaluates a string as an expression, and returns the value as a non-array int.
macro ieval(string expression, literalType)
Evaluates a string as an expression, and returns the value as a non-array int.
macro ceval(string expression)
Evaluates a string as an expression, and returns the value as a non-array complex.
macro ceval(string expression, literalType)
Evaluates a string as an expression, and returns the value as a non-array complex.
macro beval(string expression)
Evaluates a string as an expression, and returns the value as a non-array bool.
macro beval(string expression, literalType)
Evaluates a string as an expression, and returns the value as a non-array bool.
macro seval(string expression)
Evaluates a string as an expression, and returns the value as a non-array string.
macro seval(string expression, literalType)
Evaluates a string as an expression, and returns the value as a non-array string.
macro vfeval(string expression)
Evaluates a string as an expression, and returns the value as a non-array varfloat.
macro vfeval(string expression, literalType)
Evaluates a string as an expression, and returns the value as a non-array varfloat.
macro vieval(string expression)
Evaluates a string as an expression, and returns the value as a non-array varint.
macro vieval(string expression, literalType)
Evaluates a string as an expression, and returns the value as a non-array varint.
macro vceval(string expression)
Evaluates a string as an expression, and returns the value as a non-array varcomplex.
macro vceval(string expression, literalType)
Evaluates a string as an expression, and returns the value as a non-array varcomplex.
macro evaluable(string expression)
Determines whether the contents of an expression are syntactically correct.If the eval function fails in parsing, processing speed decreases, so if you want to evaluate an expression repeatedly at high speed, it is recommended to check its validity in advance with this function.
macro evaluable(string expression, literalType)
Determines whether the contents of an expression are syntactically correct.If the eval function fails in parsing, processing speed decreases, so if you want to evaluate an expression repeatedly at high speed, it is recommended to check its validity in advance with this function.
macro evaltr(string expression)
Evaluates a string as an expression, and returns internal processing information of the implementation. The contents are completely implementation-dependent.Note that the expressions that can be used are subject to implementation-dependent restrictions, and the returned contents do not necessarily correspond exactly to those of normal expression evaluation.In addition, this function generally cannot be used with expressions that have side effects. This function is mainly intended for development and debugging.
macro evaltr(string expression, literalType)
Evaluates a string as an expression, and returns internal processing information of the implementation. The contents are completely implementation-dependent.Note that the expressions that can be used are subject to implementation-dependent restrictions, and the returned contents do not necessarily correspond exactly to those of normal expression evaluation.In addition, this function generally cannot be used with expressions that have side effects. This function is mainly intended for development and debugging.
macro override(string functionName, string argumentType[ ], string functionCode)
Changes the implementation of a function at runtime.Since the eval function cannot declare local variables or execute multiple statements, use this function when you want to perform such processing by dynamic evaluation.Note that this function can only change the implementation of an existing function, and cannot declare a new function.
string lf()
Returns the environment-dependent line break code. In VCSSL 3 and later, the constant EOL can be used directly as the line break code.This function wastes the overhead of a function call. In new programs, using the constant EOL is recommended.This function is supported for compatibility.
string linefeed()
Returns the environment-dependent line break code. In VCSSL 3 and later, the constant EOL can be used directly as the line break code.This function wastes the overhead of a function call. In new programs, using the constant EOL is recommended.This function is supported for compatibility.

Event Handlers

void main( )
This is the so-called main function.It is called automatically after processing of the global scope in all modules(for example, initialization of global constants) has been completed.If main functions exist in multiple modules, only the one defined lastaccording to the module loading order is called (this differs from ordinary event handlers).
void main( string args[ ] )
This is the so-called main function.It is called automatically after processing of the global scope in all modules(for example, initialization of global constants) has been completed.If main functions exist in multiple modules, only the one defined lastaccording to the module loading order is called (this differs from ordinary event handlers).

Math ライブラリ

各種数学関数を提供するライブラリです。

const float PI
The value of pi in float precision. To obtain a varfloat value in arbitrary precision, use pi().
const float E
The value of Euler's number, the base of natural logarithms, in float precision. To obtain a varfloat value in arbitrary precision, calculate it with exp( 1.0vf ).
macro nan( float arg )
Determines whether a float value is NaN.
macro inf( float arg )
Determines whether a float value is Inf.
macro and( int number1, int number2 )
Calculates the bitwise AND operation on int values.
macro or( int number1, int number2 )
Calculates the bitwise OR operation on int values.
macro xor( int number1, int number2 )
Calculates the bitwise XOR operation on int values.
macro random()
Returns a value greater than or equal to 0.0 and less than 1.0. Note that the documentation before VCSSL 3.0.20 stated that it "returns a random value from 0.0 to 1.0," but that expression was ambiguous, and in practice a value exactly equal to 1.0 is never returned.
macro rand()
Equivalent to random. The use of random is currently recommended instead. Because the name of this function can cause confusion with integer random numbers, its use is no longer recommended. In the future, changing the type of this function may be considered.
varfloat pi()
Calculates the value of pi.Internally, it is calculated by the Gauss-Legendre algorithm using 1.1 times the original number of digits.A high-precision value of pi is required when calculating periodic functions or simulations with periodic boundaries, such as rotational systems and mapping systems, in order to obtain remainders of arguments or coordinates modulo pi.In fact, the Math library itself uses it for calculations such as varfloat trigonometric functions.
macro exp( float arg )
Calculates the exponential function with Euler's number as the base.
varfloat exp( varfloat arg )
Calculates the exponential function with Euler's number as the base.Internally, it is calculated by Maclaurin expansion using 1.34 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using the original number of digits plus 4.This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro pow( float arg1, float arg2 )
Calculates a power.
varfloat pow( varfloat arg1, varint arg2 )
Calculates a power whose exponent is an integer.Internally, it is calculated by repeated multiplication using 2.1 times the number of digits given by "the original number of digits plus the absolute value of the order of the exponent (arg2)."However, when the number of digits is 10 or less, it is calculated using the original number of digits plus 4.This extra number of digits may be changed in the future, probably in the direction of higher precision.
varfloat pow( varfloat arg1, varfloat arg2 )
Calculates a power whose exponent is a floating-point number, that is, a real number.Internally, it is calculated using 1.2 times the number of digits given by "the original number of digits plus the absolute value of the order of the exponent (arg2)," by either Maclaurin expansion or a combination of exponential and logarithmic functions.However, when the number of digits is 10 or less, it is calculated using the original number of digits plus 4.This extra number of digits may be changed in the future, probably in the direction of higher precision.
varfloat pow( varint arg1, varfloat arg2 )
Calculates a power.Internally, arg1 is cast to varfloat and then pow( varfloat, varfloat ) is used.
macro ln( float arg )
Calculates the natural logarithm. It is the same as log.
macro ln( varfloat arg )
Calculates the natural logarithm. It is the same as log.Internally, log(varfloat) is used as is.
macro log( float arg )
Calculates the natural logarithm. It is the same as ln.
varfloat log( varfloat arg )
Calculates the natural logarithm. It is the same as ln.Internally, it is calculated using 1.34 times the original number of digits, by Newton's method for arguments greater than or equal to 1, and by Taylor expansion for arguments less than or equal to 1.However, when the number of digits is 10 or less, it is calculated using the original number of digits plus 4.This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro log10( float arg )
Calculates the common logarithm.
varfloat log10( varfloat arg )
Calculates the common logarithm.Internally, it is calculated by "log10(x) = ln(x) / ln(10)" using 2.2 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using the original number of digits plus 4. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro sqrt( float arg )
Calculates the square root.
varfloat sqrt( varfloat arg )
Calculates the square root.Internally, it is calculated by Newton's method using 1.34 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using the original number of digits plus 4. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro root( float arg, int rootPower )
Calculates the n-th root.
varfloat root( varfloat arg, varint p )
Calculates the n-th root.Internally, it is calculated by Newton's method using 1.34 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using the original number of digits plus 4. This extra number of digits may be changed in the future, probably in the direction of higher precision.
varfloat root( varfloat arg, varfloat vfp )
Calculates the n-th root.Internally, it is calculated by Newton's method using 1.34 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using the original number of digits plus 4. This extra number of digits may be changed in the future, probably in the direction of higher precision.Note that the second argument of this function is always regarded as an integer.This function is supported only for convenience in modes such as calculator software, where numeric literals are regarded as floating-point numbers.Since there is no particular advantage to using it in ordinary situations, please use root( varfloat, varint ).
macro abs( float arg )
Calculates the absolute value.
macro abs( int arg )
Calculates the absolute value.
varfloat abs( varfloat arg )
Calculates the absolute value.
varint abs( varint arg )
Calculates the absolute value.
macro max( float arg1, float arg2 )
Returns the larger of the two arguments.
macro max( int arg1, int arg2 )
Returns the larger of the two arguments.
varfloat max( varfloat arg1, varfloat arg2 )
Returns the larger of the two arguments.
varint max( varint arg1, varint arg2 )
Returns the larger of the two arguments.
macro min( float arg1, float arg2 )
Returns the smaller of the two arguments.
macro min( int arg1, int arg2 )
Returns the smaller of the two arguments.
varfloat min( varfloat arg1, varfloat arg2 )
Returns the smaller of the two arguments.
varint min( varint arg1, varint arg2 )
Returns the smaller of the two arguments.
float fac( float arg )
Calculates the factorial. Although both the argument and the return value of this function are float, the calculation is performed after internally rounding to a nearby int. The conversion may affect the precision because of rounding error. If strict exactness is required, use the version taking an int argument.
macro fac( int arg )
Calculates the factorial.
varint fac( varint arg )
Calculates the factorial.
varfloat fac( varfloat arg )
Calculates the factorial.
macro sin( float arg )
Calculates the sine function.
varfloat sin( varfloat arg )
Calculates the sine function.Internally, it is calculated by Maclaurin expansion using "1.34 times the original number of digits plus 10 times the order of the argument" digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4, plus 10 times the order of the argument" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.For arguments outside the range from 0 to pi/2, the symmetry and periodicity of trigonometric functions are used, and internally the calculation is performed using values in the range from 0 to pi.
macro cos( float arg )
Calculates the cosine function.
varfloat cos( varfloat arg )
Calculates the cosine function.Internally, it is calculated by Maclaurin expansion using "1.34 times the original number of digits plus 10 times the order of the argument" digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4, plus 10 times the order of the argument" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.For arguments outside the range from 0 to pi/2, the symmetry and periodicity of trigonometric functions are used, and internally the calculation is performed using values in the range from 0 to pi.
macro tan( float arg )
Calculates the tangent function.
varfloat tan( varfloat arg )
Calculates the tangent function.Internally, it is calculated by "tan(x) = sin(x) / cos(x)" using 2.1 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro asin( float arg )
Calculates the arcsine function, which is the inverse function of sine.
varfloat asin( varfloat arg )
Calculates the arcsine function, which is the inverse function of sine.Internally, it is calculated using 1.34 times the original number of digits, by Maclaurin expansion for arguments whose absolute value is 0.7 or less, and by Newton's method outside that range.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro acos( float arg )
Calculates the arccosine function, which is the inverse function of cosine.
varfloat acos( varfloat arg )
Calculates the arccosine function, which is the inverse function of cosine.Internally, it is calculated by "acos(x) = pi/2 - asin(x)" using 1.34 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro atan( float arg )
Calculates the arctangent function, which is the inverse function of tangent.
varfloat atan( varfloat arg )
Calculates the arctangent function, which is the inverse function of tangent.Internally, it is calculated using 1.34 times the original number of digits, by Maclaurin expansion for arguments whose absolute value is 0.7 or less, and by Newton's method outside that range.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro sinh( float arg )
Calculates the hyperbolic sine function.
varfloat sinh( varfloat arg )
Calculates the hyperbolic sine function.Internally, it is calculated by "sinh(x) = ( exp(x) - exp(-x) ) / 2" using 2.1 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro cosh( float arg )
Calculates the hyperbolic cosine function.
varfloat cosh( varfloat arg )
Calculates the hyperbolic cosine function.Internally, it is calculated by "cosh(x) = ( exp(x) + exp(-x) ) / 2" using 2.1 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro tanh( float arg )
Calculates the hyperbolic tangent function.
varfloat tanh( varfloat arg )
Calculates the hyperbolic tangent function.Internally, it is calculated by "tanh(x) = ( exp(x) - exp(-x) ) / ( exp(x) + exp(-x) )" using 2.8 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro asinh( float arg )
Calculates the inverse hyperbolic sine function.
varfloat asinh( varfloat arg )
Calculates the inverse hyperbolic sine function.Internally, it is calculated by "asinh(x) = ln( x + sqrt( x*x + 1 ) )" using 2.1 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro acosh( float arg )
Calculates the inverse hyperbolic cosine function.
varfloat acosh( varfloat arg )
Calculates the inverse hyperbolic cosine function.Internally, it is calculated by "acosh(x) = ln( x + sqrt( x*x - 1 ) )" using 2.1 times the original number of digits.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.
macro atanh( float arg )
Calculates the inverse hyperbolic tangent function.
varfloat atanh( varfloat arg )
Calculates the inverse hyperbolic tangent function.Internally, it is calculated using 2.1 times the original number of digits. For arguments whose absolute value is 0.9 or less, "atanh(x) = 1/2 * log(1+x)/log(1-x)" is used, and outside that range it is calculated by Newton's method.However, when the number of digits is 10 or less, it is calculated using "the original number of digits plus 4" digits. This extra number of digits may be changed in the future, probably in the direction of higher precision.By using the symmetry of the function, negative arguments are calculated using the value for the corresponding positive argument.In older versions, values could not be obtained for arguments less than or equal to -0.7, on the negative-infinity side. The calculation would not finish, or 0 would be returned. This problem was fixed in VCSSL 3.3.2.
macro deg( float rad )
Converts an angle from radians to degrees.
varfloat deg(varfloat rad)
Converts an angle from radians to degrees.Internally, it is calculated using 1.34 times the original number of digits, by "radians = degrees * pi / 180".
macro rad( float deg )
Converts an angle from degrees to radians.
varfloat rad(varfloat deg)
Converts an angle from degrees to radians.Internally, it is calculated using 1.34 times the original number of digits, by "degrees = radians * 180 / pi".

Graphics ライブラリ

グラフィックスの基盤機能を提供cd するライブラリです。

int newGraphics()
Creates a graphics resource and returns its unique identifier, called the graphics resource ID.The graphics resource created by this function holds an image of size 0 pixels.
int newGraphics( string filePath )
Creates a graphics resource and returns its unique identifier, called the graphics resource ID.The graphics resource created by this function is pre-filled with an image loaded from an image file.
int newGraphics( int red[ ][ ], int green[ ][ ], int blue[ ][ ], int alpha[ ][ ] )
Creates a graphics resource and returns its unique identifier, called the graphics resource ID.The graphics resource created by this function is pre-filled with an image loaded from pixel arrays.
int newGraphics( int rgba[ ][ ][ ] )
Creates a graphics resource and returns its unique identifier, called the graphics resource ID.The graphics resource created by this function is pre-filled with an image loaded from a pixel array.
int newGraphics( int baseGraphics, int fromRed, int fromGreen, int fromBlue, int fromAlpha, int toRed, int toGreen, int toBlue, int toAlpha )
Creates a graphics resource and returns its unique identifier, called the graphics resource ID.The graphics resource created by this function is pre-filled with an image in which a specific color in another graphics resource has been converted to another color.
int newGraphics( int baseGraphics, int fromColor[ ], int toColor[ ] )
Creates a graphics resource and returns its unique identifier, called the graphics resource ID.The graphics resource created by this function is pre-filled with an image in which a specific color in another graphics resource has been converted to another color.
int newGraphics ( int baseGraphics, int width, int height, bool antialiasing )
Creates a graphics resource and returns its unique identifier, called the graphics resource ID.The graphics resource created by this function is pre-filled with a resized version of another graphics resource.
int newGraphics ( int baseGraphics, int cropX, int cropY, int cropWidth, int cropHeight )
Creates a graphics resource and returns its unique identifier, called the graphics resource ID.The graphics resource created by this function is pre-filled with a cropped portion of another graphics resource.
void deleteGraphics( int id )
Disposes a graphics resource.
int getGraphicsWidth( int id )
Returns the width, in pixels, of the image held by the graphics resource.
int getGraphicsHeight( int id )
Returns the height, in pixels, of the image held by the graphics resource.
void exportGraphics( int id, string name, string format )
Outputs the image held by the graphics resource as an image file.
void exportGraphics( int id, string name, string format, double quality )
Outputs the image held by the graphics resource as an image file.
void setGraphicsPixel( int id, int red[ ][ ], int green[ ][ ], int blue[ ][ ], int alpha[ ][ ] )
Replaces the image held by the graphics resource with the specified pixel arrays.
void setGraphicsPixel( int id, int rgba[ ][ ][ ] )
Replaces the image held by the graphics resource with the specified pixel array.
int[ ][ ][ ] getGraphicsPixel( int id )
Returns an array storing all pixel color components of the image.
int[ ][ ] getGraphicsPixelRed( int id )
Returns an array storing only the red component for all pixels of the image.
int[ ][ ] getGraphicsPixelGreen( int id )
Returns an array storing only the green component for all pixels of the image.
int[ ][ ] getGraphicsPixelBlue( int id )
Returns an array storing only the blue component for all pixels of the image.
int[ ][ ] getGraphicsPixelAlpha( int id )
Returns an array storing only the alpha component for all pixels of the image.

Graphics2D ライブラリ

2DCG(2次元グラフィックス)機能を提供するライブラリです。

int newGraphics2DRenderer( int width, int height, int graphicsID )
Creates a 2DCG renderer and returns its unique identifier, called the renderer ID.
void deleteGraphics2DRenderer( int rendererID )
Disposes a 2DCG renderer.
macro paintGraphics2D( int rendererID )
Composites sprites and renders the 2DCG scene.
macro clearGraphics2D( int rendererID )
Clears the drawing contents with the background color.
macro clearGraphics2D( int rendererID, bool removeAll )
Clears the drawing contents with the background color and, if necessary, removes all mounted sprites.
macro setGraphics2DColor( int rendererID, int red, int green, int blue, int alpha )
Sets the background color.
void setGraphics2DColor( int rendererID, int rgba[ ] )
Sets the background color.
macro setGraphics2DSize( int rendererID, int width, int height )
Sets the size of the drawing area.
macro setDrawColor( int rendererID, int red, int green, int blue, int alpha )
Sets the drawing color.
void setDrawColor( int rendererID, int rgba[ ] )
Sets the drawing color.
void setDrawFont( int rendererID, string name )
Sets the font used for text drawing.
void setDrawFontSize( int rendererID, int size )
Sets the size of the font used for text drawing.
void setDrawFontBold( int rendererID, bool isBold )
Enables or disables bold style for the font used in text drawing. It cannot be used together with italic style.
void setDrawFontItalic( int rendererID, bool isItalic )
Enables or disables italic style for the font used in text drawing. It cannot be used together with bold style.
void drawPoint( int rendererID, int vertex_x, int vertex_y, int radius, bool fill )
Draws a point.
macro drawLine( int rendererID, int vertex_x1, int vertex_y1, int vertex_x2, int vertex_y2 )
Draws a straight line segment.
macro drawLine( int rendererID, int vertex_x1, int vertex_y1, int vertex_x2, int vertex_y2, int lineWidth )
Draws a straight line segment with an arbitrary thickness.
macro drawEllipse( int rendererID, int vertex_x, int vertex_y, int width, int height, bool fill )
Draws an ellipse.
macro drawRectangle( int rendererID, int vertex_x, int vertex_y, int width, int height, bool fill )
Draws a rectangle.
macro drawPolyline( int rendererID, int vertex_x[ ], int vertex_y[ ] )
Draws a polyline.
macro drawPolyline( int rendererID, int vertex_x[ ], int vertex_y[ ], int lineWidth )
Draws a polyline with an arbitrary thickness.
macro drawPolygon( int rendererID, int vertex_x[ ], int vertex_y[ ], bool fill )
Draws a polygon.
macro drawPolygon( int rendererID, int vertex_x[ ], int vertex_y[ ], int lineWidth )
Draws a polygon with an arbitrary thickness.
macro drawText( int rendererID, int vertex_x, int vertex_y, string textString )
Draws a single line of text.
macro drawText( int rendererID, int vertex_x, int vertex_y, int width, int height, string textString )
Draws text over multiple lines with wrapping.
macro drawImage( int rendererID, int vertex_x, int vertex_y, int graphicsID )
Draws an image. The drawing result of another 2D or 3D renderer can also be composited and drawn as an image.
macro drawImage( int rendererID, int vertex_x, int vertex_y, int width, int height, int graphicsID )
Draws an image after resizing it. The drawing result of another 2D or 3D renderer can also be composited and drawn as an image.
void drawImage( int rendererID, int x, int y, int width, int height, int cropX, int cropY, int cropWidth, int cropHeight, int graphicsID )
Draws a cropped portion of an image. The drawing result of another 2D or 3D renderer can also be composited and drawn as an image.In VCSSL 3.4.8 and earlier, the behavior of this function differed from the argument descriptions in the documentation.In VCSSL 3.4.10, the behavior was corrected to match the documentation.If you need the behavior of VCSSL 3.4.8 or earlier, replace calls to this function with calls to drawGraphics instead.
macro setPixel( int rendererID, int red[ ][ ], int green[ ][ ], int blue[ ][ ], int alpha[ ][ ] )
Directly sets the drawing contents from pixel color-component arrays.
macro setPixel( int rendererID, int rgba[ ][ ][ ] )
Directly sets the drawing contents from a pixel color-component array.
void drawPixel( int rendererID, int x, int y, int red[ ][ ], int green[ ][ ], int blue[ ][ ], int alpha[ ][ ] )
Draws the contents of pixel color-component arrays on top of the current drawing contents.
void drawPixel( int rendererID, int x, int y, int rgba[ ][ ][ ] )
Draws the contents of a pixel color-component array on top of the current drawing contents.
void drawPixel( int rendererID, int x, int y, int width, int height, int red[ ][ ], int green[ ][ ], int blue[ ][ ], int alpha[ ][ ] )
Resizes the contents of pixel color-component arrays and draws them on top of the current drawing contents.
void drawPixel( int rendererID, int x, int y, int width, int height, int rgba[ ][ ][ ] )
Resizes the contents of a pixel color-component array and draws them on top of the current drawing contents.
void drawPixel( int rendererID, int x, int y, int width, int height, int baseX, int baseY, int baseWidth, int baseHeight, int red[ ][ ], int green[ ][ ], int blue[ ][ ], int alpha[ ][ ] )
Extracts a specified region from pixel color-component arrays and draws it on top of the current drawing contents.
void drawPixel( int rendererID, int x, int y, int width, int height, int baseX, int baseY, int baseWidth, int baseHeight, int rgba[ ][ ][ ] )
Extracts a specified region from a pixel color-component array and draws it on top of the current drawing contents.
int[ ][ ][ ] getPixel( int rendererID )
Converts the contents of the drawing area into a pixel color-component array and returns it.
int[ ][ ] getPixelRed( int rendererID )
Converts the contents of the drawing area into an array of red pixel components and returns it.
int[ ][ ] getPixelGreen( int rendererID )
Converts the contents of the drawing area into an array of green pixel components and returns it.
int[ ][ ] getPixelBlue( int rendererID )
Converts the contents of the drawing area into an array of blue pixel components and returns it.
int[ ][ ] getPixelAlpha( int rendererID )
Converts the contents of the drawing area into an array of alpha pixel components and returns it.
int newPointSprite( int x, int y, int radius, bool fill )
Creates a point sprite and returns its unique identifier, called the sprite ID.
int newLineSprite( int x1, int y1, int x2, int y2 )
Creates a line-segment sprite and returns its unique identifier, called the sprite ID.
int newEllipseSprite( int x, int y, int width, int height, bool fill )
Creates an ellipse sprite and returns its unique identifier, called the sprite ID.
int newRectangleSprite( int x, int y, int width, int height, bool fill )
Creates a rectangle sprite and returns its unique identifier, called the sprite ID.
int newPolylineSprite( int x[ ], int y[ ] )
Creates a polyline sprite and returns its unique identifier, called the sprite ID.
int newPolygonSprite( int x[ ], int y[ ], bool fill )
Creates a polygon sprite and returns its unique identifier, called the sprite ID.
int newImageSprite( int x, int y, int width, int height, int graphicsID )
Creates an image sprite and returns its unique identifier, called the sprite ID.
int newTextSprite( int x, int y, int width, int height, string text )
Creates a text sprite and returns its unique identifier, called the sprite ID.
void deleteSprite( int spriteID )
Disposes a sprite.
void mountSprite( int spriteID, int rendererID )
Mounts a sprite onto a renderer.
void demountSprite( int spriteID, int rendererID )
Demounts a sprite from a renderer.
macro setSpriteDepth( int spriteID, double vertex_z )
Sets the depth of a sprite. A larger depth value places the sprite farther back, and a smaller value places it closer to the front.
macro setSpriteLocation( int spriteID, int vertex_x, int vertex_y )
Sets the position of a sprite.
void setSpriteSize( int spriteID, int size )
Sets the size of a sprite. This function is used for sprites whose size can be specified by a single parameter, such as point sprites.
macro setSpriteSize( int spriteID, int width, int height )
Sets the size of a sprite.
macro setSpriteClip( int spriteID, int clip_x, int clip_y, int clip_width, int clip_height )
Sets the clipping information of a sprite.
macro setSpriteColor( int spriteID, int red, int green, int blue, int alpha )
Sets the color of a sprite.
void setSpriteColor( int spriteID, int rgba[ ] )
Sets the color of a sprite.
macro setSpriteFill( int spriteID, bool fillState )
Sets whether the sprite is filled.
macro setSpriteText( int spriteID, string textString )
Sets the text of a sprite.
macro setSpriteImage( int spriteID, int graphicsID )
Sets the image of a sprite.
void setSpriteFont( int spriteID, string name )
Sets the font used for sprite text drawing.
void setSpriteFontSize( int spriteID, int size )
Sets the size of the font used for sprite text drawing.
void setSpriteFontBold( int spriteID, bool isBold )
Enables or disables bold style for the font used in sprite text drawing. It cannot be used together with italic style.
void setSpriteFontItalic( int spriteID, bool isItalic )
Enables or disables italic style for the font used in sprite text drawing. It cannot be used together with bold style.
macro drawOval( int rendererID, int vertex_x, int vertex_y, int width, int height, bool fill )
Draws an ellipse.The newer drawEllipse function has been supported since VCSSL 3.3.24.This function is supported for compatibility.
macro drawRect( int rendererID, int vertex_x, int vertex_y, int width, int height, bool fill )
Draws a rectangle.The newer drawRectangle function has been supported since VCSSL 3.3.24.This function is supported for compatibility.
macro drawGraphics( int rendererID, int vertex_x, int vertex_y, int graphicsID )
Draws the contents of graphics data generated from the drawing result of another renderer or from an image file.The newer drawImage function has been supported since VCSSL 3.3.24.This function is supported for compatibility.
macro drawGraphics( int rendererID, int vertex_x, int vertex_y, int width, int height, int graphicsID )
Draws resized contents of graphics data generated from the drawing result of another renderer or from an image file.The newer drawImage function has been supported since VCSSL 3.3.24.This function is supported for compatibility.
void drawGraphics( int rendererID, int fromLeftTopX, int fromLeftTopY, int fromRightBottomX, int fromRightBottmY, int toLeftTopX, int toLeftTopY, int toRightBottmX, int toRightBottomY, int graphicsID )
Draws a specified region extracted from graphics data generated from the drawing result of another renderer or from an image file.The newer drawImage function has been supported since VCSSL 3.3.24.This function is supported for compatibility.In VCSSL 3.4.8 and earlier, the documented explanation of the arguments for this function was incorrect, so the documentation was corrected in VCSSL 3.4.10. Therefore, the behavior of this function itself has not changed.On the other hand, the newer drawImage function was changed so that its behavior matches the original documentation.Therefore, use this function when compatibility with older programs is important, and use drawImage in new programs.
int newOvalSprite( int x, int y, int width, int height, bool fill )
Creates an ellipse sprite and returns its unique identifier, called the sprite ID.The newer newEllipseSprite function has been supported since VCSSL 3.3.24.This function is supported for compatibility.
int newRectSprite( int x, int y, int width, int height, bool fill )
Creates a rectangle sprite and returns its unique identifier, called the sprite ID.The newer newRectangleSprite function has been supported since VCSSL 3.3.24.This function is supported for compatibility.
int newGraphicsSprite( int x, int y, int width, int height, int graphicsID )
Creates an image sprite and returns its unique identifier, called the sprite ID.The newer newImageSprite function has been supported since VCSSL 3.3.24.This function is supported for compatibility.
void addSprite( int spriteID, int rendererID )
Mounts a sprite. The newer mountSprite function has been supported since VCSSL 3. This function is supported for compatibility.
void removeSprite( int spriteID, int rendererID )
Demounts a sprite. The newer demountSprite function has been supported since VCSSL 3. This function is supported for compatibility.
macro setSpriteGraphics( int spriteID, int graphicsID )
Sets the graphics data of a sprite.The newer setSpriteImage function has been supported since VCSSL 3.3.24.This function is supported for compatibility.
int newLayer()
The use of this function is not recommended. This function is supported for compatibility.
void deleteLayer( int spriteID )
The use of this function is not recommended. This function is supported for compatibility.
void mountLayer( int spriteID, int rendererID )
The use of this function is not recommended. This function is supported for compatibility.
void addLayer( int spriteID, int rendererID )
The use of this function is not recommended. This function is supported for compatibility.
void demountLayer( int spriteID, int rendererID )
The use of this function is not recommended. This function is supported for compatibility.
void removeLayer( int spriteID, int rendererID )
The use of this function is not recommended. This function is supported for compatibility.
macro setLayerDepth( int spriteID, double vertex_z )
The use of this function is not recommended. This function is supported for compatibility.
macro setLayerLocation( int spriteID, int vertex_x, int vertex_y )
The use of this function is not recommended. This function is supported for compatibility.
macro setLayerSize( int spriteID, int width, int height )
The use of this function is not recommended. This function is supported for compatibility.
macro setLayerClipping( int spriteID, int clip_x, int clip_y, int clip_width, int clip_height )
The use of this function is not recommended. This function is supported for compatibility.
macro setLayerColor( int spriteID, int red, int green, int blue, int alpha )
The use of this function is not recommended. This function is supported for compatibility.
macro setLayerFill( int spriteID, bool fillState )
The use of this function is not recommended. This function is supported for compatibility.
macro setLayerText( int spriteID, string textString )
The use of this function is not recommended. This function is supported for compatibility.
macro setLayerGraphics( int spriteID, int graphicsID )
The use of this function is not recommended. This function is supported for compatibility.
void setLayerFont( int spriteID, string name )
The use of this function is not recommended. This function is supported for compatibility.
void setLayerFontSize( int spriteID, int size )
The use of this function is not recommended. This function is supported for compatibility.
void setLayerFontBold( int spriteID, bool b )
The use of this function is not recommended. This function is supported for compatibility.
void setLayerFontItalic( int spriteID, bool b )
The use of this function is not recommended. This function is supported for compatibility.
int newOvalLayer( int x, int y, int width, int height, bool fill )
The use of this function is not recommended. This function is supported for compatibility.
int newRectLayer( int x, int y, int width, int height, bool fill )
The use of this function is not recommended. This function is supported for compatibility.
int newLineLayer( int x1, int y1, int x2, int y2 )
The use of this function is not recommended. This function is supported for compatibility.
int newPolylineLayer( int x[ ], int y[ ] )
The use of this function is not recommended. This function is supported for compatibility.
int newPolygonLayer( int x[ ], int y[ ], bool fill )
The use of this function is not recommended. This function is supported for compatibility.
int newGraphicsLayer( int x, int y, int width, int height, int graphicsID )
The use of this function is not recommended. This function is supported for compatibility.
int newTextLayer( int x, int y, int width, int height, string text )
The use of this function is not recommended. This function is supported for compatibility.

Graphics3D ライブラリ

3DCG(3次元グラフィックス)機能を提供するライブラリです。

const int QUADRANGLE_LIST
The coordinate-array format that directly stores the coordinate values of a quadrangle-polygon set. It is used by functions such as newModel.
const int QUADRANGLE_GRID
The coordinate-array format that stores the coordinates of grid points in a surface-like arrangement of quadrangle polygons. It is used by functions such as newModel.
const int TRIANGLE_LIST
The coordinate-array format that directly stores the coordinate values of a triangle-polygon set. It is used by functions such as newModel.
const int TRIANGLE_FAN
The coordinate-array format that stores the coordinates of the center and arc in a fan-shaped arrangement of triangle polygons. It is used by functions such as newModel.
const int TRIANGLE_STRIP
The coordinate-array format in which adjacent triangle polygons arranged in sequence share vertices. It is used by functions such as newModel.
const int VIEW
The constant representing the view coordinate system. It is used by functions such as setPolygonVertexOffset and setModelVertexOffset.
const int LOCAL
The constant representing the local coordinate system. It is used by functions such as setPolygonVertexOffset and setModelVertexOffset.
int newGraphics3DRenderer( int width, int height, int graphicsID )
Creates a 3DCG renderer and returns its unique identifier, called the renderer ID.
void deleteGraphics3DRenderer( int rendererID )
Disposes a 3DCG renderer.
macro paintGraphics3D( int rendererID )
Renders the 3DCG scene.
macro clearGraphics3D( int rendererID, bool removeModel, bool removeLight, bool removeCoordinate )
Clears the drawing contents with the background color and, if necessary, removes all solids (models and polygons), lights, and coordinate systems.
void setGraphics3DMagnification( int rendererID, float magnification )
Sets the rendering magnification. A line segment of length 1.0 located at a distance of 1.0 from the viewpoint is rendered with a length of magnification pixels.By combining this with the setGraphics3DDistance function, the strength of perspective can also be adjusted. Displaying nearby objects smaller emphasizes perspective, while displaying distant objects larger weakens it.
void setGraphics3DAngle( int rendererID, float angle )
Sets the angle of view.
void setGraphics3DDistance( int rendererID, float distance )
Sets the distance between the screen and the point being looked at. When this function is called, the world-coordinate origin is automatically adjusted so that it is always located on the Z axis of the view coordinate system. Then the distance between the origins of the world and view coordinate systems becomes the value specified by the argument distance.By combining this with the setGraphics3DMagnification function, the strength of perspective can also be adjusted. Displaying nearby objects smaller emphasizes perspective, while displaying distant objects larger weakens it.
void setGraphics3DCenter( int rendererID, int x, int y )
Sets the drawing-center coordinates. The drawing center here is the position on the screen that coincides with the origin of the view coordinate system, and visually corresponds to the so-called vanishing point in one-point perspective.For example, even with the same camera angle, setting the screen center lower (a smaller Y coordinate) shows more of the sky. Conversely, setting it higher (a larger Y coordinate) shows more of the ground.
void setGraphics3DClip( int rendererID, float frontClipZ, float backClipZ )
Sets the near and far clipping planes.
void setGraphics3DColor( int rendererID, int red, int green, int blue, int alpha )
Sets the background color.
void setGraphics3DColor( int rendererID, int rgba[ ] )
Sets the background color.
void setGraphics3DSize( int rendererID, int width, int height )
Sets the size of the drawing area.
void setGraphics3DDefaultEventHandler( int rendererID, int componentID )
Automatically creates the default event handler that associates mouse and key operations on the specified GUI component for screen display with intuitive operations for the 3DCG view.
int newQuadranglePolygon( float ax, float ay, float az, float bx, float by, float bz, float cx, float cy, float cz, float dx, float dy, float dz )
Creates a quadrangle polygon and returns its unique identifier, called the polygon ID.
int newQuadranglePolygon( int aVectorID, int bVectorID, int cVectorID, int dVectorID )
Creates a quadrangle polygon and returns its unique identifier, called the polygon ID.
int newTrianglePolygon( float ax, float ay, float az, float bx, float by, float bz, float cx, float cy, float cz )
Creates a triangle polygon and returns its unique identifier, called the polygon ID.
int newTrianglePolygon( int aVectorID, int bVectorID, int cVectorID )
Creates a triangle polygon and returns its unique identifier, called the polygon ID.
int newLinePolygon( float ax, float ay, float az, float bx, float by, float bz )
Creates a line polygon and returns its unique identifier, called the polygon ID.
int newLinePolygon( float ax, float ay, float az, float bx, float by, float bz, float width )
Creates a line polygon and returns its unique identifier, called the polygon ID.
int newLinePolygon( int aVectorID, int bVectorID )
Creates a line polygon and returns its unique identifier, called the polygon ID.
int newLinePolygon( int aVectorID, int bVectorID, float width )
Creates a line polygon and returns its unique identifier, called the polygon ID.
int newPointPolygon( float ax, float ay, float az, float size )
Creates a point polygon and returns its unique identifier, called the polygon ID.
int newPointPolygon( int vectorID, float size )
Creates a point polygon and returns its unique identifier, called the polygon ID.
int newTextPolygon( float ax, float ay, float az, float size, string text )
Creates a text polygon and returns its unique identifier, called the polygon ID.
int newTextPolygon( int vectorID, float size, string text )
Creates a text polygon and returns its unique identifier, called the polygon ID.
int newImagePolygon( float ax, float ay, float az, float width, float height, int graphicsID )
Creates an image polygon and returns its unique identifier, called the polygon ID.
int newImagePolygon( int vectorID, float width, float height, int graphicsID )
Creates an image polygon and returns its unique identifier, called the polygon ID.
int newPolygon( int copyID )
Creates a copy of an existing polygon and returns its unique identifier (polygon ID).
void deletePolygon( int polygonID )
Disposes the specified polygon.
void mountPolygon( int polygonID, int rendererID )
Mounts the polygon onto the world coordinate system.
void mountPolygon( int polygonID, int rendererID, int coordinateID )
Mounts the polygon onto the specified coordinate system.
int demountPolygon( int polygonID, int rendererID )
Demounts the polygon from the world coordinate system.
int demountPolygon( int polygonID, int rendererID, int coordinateID )
Demounts the polygon from the specified coordinate system.
macro movePolygon( int polygonID, float deltaX, float deltaY, float deltaZ )
Translates the polygon.
void movePolygon( int polygonID, int deltaVectorID )
Translates the polygon.
macro rotPolygonX( int polygonID, float angle )
Rotates the polygon around the X-axis.
macro rotPolygonY( int polygonID, float angle )
Rotates the polygon around the Y-axis.
macro rotPolygonZ( int polygonID, float angle )
Rotates the polygon around the Z-axis.
macro rotPolygon( int polygonID, float angle, float vectorX, float vectorY, float vectorZ )
Rotates the polygon around an axis that passes through the origin and points in an arbitrary direction.
void rotPolygon( int polygonID, float angle, int dirVectorID )
Rotates the polygon around an axis that passes through the origin and points in an arbitrary direction.
macro rotPolygon( int polygonID, float angle, float vectorX, float vectorY, float vectorZ, float pointX, float pointY, float pointZ )
Rotates the polygon around an axis that passes through the specified point and points in an arbitrary direction.
void rotPolygon( int polygonID, float angle, int dirVectorID, int pointVectorID )
Rotates the polygon around an axis that passes through the specified point and points in an arbitrary direction.
macro scalePolygon( int polygonID, float rateX, float rateY, float rateZ )
Scales the polygon.
void reversePolygon( int polygonID )
Reverses the front and back faces of the polygon.
void mirrorPolygon( int polygonID, bool mx, bool my, bool mz )
Mirrors the vertex coordinates of the polygon.Each mirroring along one axis also flips the front and back faces of the polygon, so use the reversePolygon function to correct the face orientation if necessary.
macro setPolygonVertex( int polygonID, float vertex_ax, float vertex_ay, float vertex_az )
Sets the vertex coordinates of the polygon.
macro setPolygonVertex( int polygonID, float vertex_ax, float vertex_ay, float vertex_az, float vertex_bx, float vertex_by, float vertex_bz )
Sets the vertex coordinates of the polygon.
macro setPolygonVertex( int polygonID, float vertex_ax, float vertex_ay, float vertex_az, float vertex_bx, float vertex_by, float vertex_bz, float vertex_cx, float vertex_cy, float vertex_cz )
Sets the vertex coordinates of the polygon.
macro setPolygonVertex( int polygonID, float vertex_ax, float vertex_ay, float vertex_az, float vertex_bx, float vertex_by, float vertex_bz, float vertex_cx, float vertex_cy, float vertex_cz, float vertex_dx, float vertex_dy, float vertex_dz )
Sets the vertex coordinates of the polygon.
void setPolygonVertex( int polygonID, float vertex[ ][ ] )
Sets the vertex coordinates of the polygon.
void setPolygonVertex( int polygonID, ... int vectorID[ ] )
Sets the vertex coordinates of the polygon.
float[ ][ ] getPolygonVertex( int polygonID )
Gets the vertex coordinates of the polygon.
void getPolygonVertex( int polygonID, ... int vectorID[ ] )
Gets the vertex coordinates of the polygon and stores them into the specified vectors.
void setPolygonColor( int polygonID, int red, int green, int blue, int alpha )
Sets the color of the polygon.
void setPolygonColor( int polygonID, int rgba[ ] )
Sets the color of the polygon.
int[ ][ ] getPolygonColor( int polygonID )
Gets the color of the polygon.
macro setPolygonSize( int polygonID, float value )
Sets the size information of the polygon.
macro setPolygonSize( int polygonID, float width, float height )
Sets the width and height of the polygon.
macro setPolygonText( int polygonID, string textString )
Sets the text information of the polygon. This setting is valid only for text polygons.
macro setPolygonImage( int polygonID, int graphicsID )
Sets the image of the polygon. This setting is valid only for image polygons.
macro setPolygonFill( int polygonID, bool fillState )
Sets whether the polygon is filled.
void setPolygonCull( int polygonID, bool frontCulling, bool backCulling )
Sets the culling options of the polygon.
void setPolygonVertexOffset( int polygonID, float offsetX, float offsetY, float offsetZ, int offsetMode )
Sets the offset values used to draw the polygon at a shifted position.
macro setPolygonVertexOffset( int polygonID, int vectorID, int offsetMode )
Sets the offset values used to draw the polygon at a shifted position.
void setPolygonDepthOffset( int polygonID, float offsetX, float offsetY, float offsetZ, int offsetMode )
Sets the offset values used when calculating the depth order of the polygon, treating the polygon as if it were located at a shifted position.
macro setPolygonDepthOffset( int polygonID, int vectorID, int offsetMode )
Sets the offset values used when calculating the depth order of the polygon, treating the polygon as if it were located at a shifted position.
void setPolygonDiffuse( int polygonID, float rate )
Sets the diffuse reflection coefficient of the polygon.
void setPolygonDiffractive( int polygonID, float rate )
Sets the diffractive reflection coefficient of the polygon.
void setPolygonAmbient( int polygonID, float rate )
Sets the ambient reflection coefficient of the polygon.
void setPolygonEmissive( int polygonID, float rate )
Sets the emissive coefficient of the polygon.
void setPolygonSpecular( int polygonID, float rate, float angle )
Sets the specular reflection coefficient of the polygon.
void transformPolygon( int polygonID, int transformedPolygonID, int coordinateID )
Transforms the polygon and stores the result into the polygon specified by the argument.The source polygon and the destination polygon must have the same number of vertices and the same polygon type.
bool getPolygonIntersection( int polygonID, int directionalVectorID, int pointVectorID, int intersectionVectorID, int normalVectorID )
Finds the intersection point and normal between the polygon and a half-line, and stores the result into the specified vectors.
int newAxisModel( float lx, float ly, float lz )
Creates an axis model and returns its unique identifier (model ID).
int newSphereModel( float rx, float ry, float rz, int n1, int n2 )
Creates a sphere model and returns its unique identifier (model ID).
int newBoxModel( float lx, float ly, float lz )
Creates a box model and returns its unique identifier (model ID).
int newBoxModel( float lx, float ly, float lz, int nx, int ny, int nz )
Creates a box model and returns its unique identifier (model ID).
int newCylinderModel( float rx, float ry, float height, int n1, int n2 )
Creates a closed cylinder model and returns its unique identifier (model ID).
int newTubeModel( float rx, float ry, float height, int n1, int n2 )
Creates an open cylinder model and returns its unique identifier (model ID).
int newConeModel( float rx, float ry, float height, int n1, int n2 )
Creates a closed cone model and returns its unique identifier (model ID).
int newShadeModel( float rx, float ry, float height, int n1, int n2 )
Creates an open cone model and returns its unique identifier (model ID).
int newDiskModel( float rx, float ry, int n1 )
Creates a disk model and returns its unique identifier (model ID).
int newModel( int copyID )
Creates a copy of an existing model and returns its unique identifier (model ID).
int newModel( int polygonID[ ] )
Creates a model from an array of polygons and returns its unique identifier (model ID).
macro newModel( float vertex[ ][ ], int format )
Creates a model from a coordinate array and returns its unique identifier (model ID).
macro newModel( float vertex[ ][ ][ ], int format )
Creates a model from a coordinate array and returns its unique identifier (model ID).
void deleteModel( int modelID )
Disposes the specified model.
void mountModel( int modelID, int rendererID )
Mounts the model onto the world coordinate system.
void mountModel( int modelID, int rendererID, int coordinateID )
Mounts the model onto the specified coordinate system.
int demountModel( int modelID, int rendererID )
Demounts the model from the world coordinate system.
int demountModel( int modelID, int rendererID, int coordinateID )
Demounts the model from the specified coordinate system.
macro moveModel( int modelID, float deltaX, float deltaY, float deltaZ )
Translates the model.
void moveModel( int modelID, int deltaVectorID )
Translates the model.
macro rotModelX( int modelID, float angle )
Rotates the model around the X-axis.
macro rotModelY( int modelID, float angle )
Rotates the model around the Y-axis.
macro rotModelZ( int modelID, float angle )
Rotates the model around the Z-axis.
macro rotModel( int modelID, float angle, float vectorX, float vectorY, float vectorZ )
Rotates the model around an axis that passes through the origin and points in an arbitrary direction.
void rotModel( int modelID, float angle, int dirVectorID )
Rotates the model around an axis that passes through the origin and points in an arbitrary direction.
macro rotModel( int modelID, float angle, float vectorX, float vectorY, float vectorZ, float pointX, float pointY, float pointZ )
Rotates the model around an axis that passes through the specified point and points in an arbitrary direction.
void rotModel( int modelID, float angle, int dirVectorID, int pointVectorID )
Rotates the model around an axis that passes through the specified point and points in an arbitrary direction.
macro scaleModel( int modelID, float rateX, float rateY, float rateZ )
Scales the model.
void reverseModel( int modelID )
Reverses the front and back faces of the polygons composing the model.
void mirrorModel( int modelID, bool mx, bool my, bool mz )
Mirrors the vertex coordinates of the model.Each mirroring along one axis also flips the front and back faces of the polygons composing the model, so use the reverseModel function to correct the face orientation if necessary.
void setModelColor( int modelID, int r, int g, int b, int a )
Sets the color of the model.
void setModelColor( int modelID, int rgba[ ] )
Sets the color of the model.
macro setModelColor( int modelID, int color[ ][ ] )
Sets the colors of the polygons composing the model.
void setModelPolygonColor( int modelID, int polygonIndex, int red, int green, int blue, int alpha )
Sets the color of a polygon composing the model.
void setModelPolygonColor( int modelID, int polygonIndex, int rgba[ ] )
Sets the color of a polygon composing the model.
float[ ][ ] getModelPolygonColor( int modelID, int polygonIndex )
Gets the color of a polygon composing the model.
void setModelFill( int polygonID, bool fill )
Sets whether the model is filled.
void setModelCull( int modelID, bool frontCulling, bool backCulling )
Sets the culling options of the model.
void setModelSize( int modelID, ... float size[ ] )
Sets the size information of the model.
macro setModelVertex( int modelID, float vertex[ ][ ], int format )
Sets the vertex coordinates of the model.
macro setModelVertex( int modelID, float vertex[ ][ ][ ], int format )
Sets the vertex coordinates of the model.
void setModelPolygonVertex( int modelID, int polygonIndex, float vertex[ ][ ] )
Sets the vertex coordinates of a polygon composing the model.
void setModelPolygonVertex( int modelID, int polygonIndex, float vertex_ax, float vertex_ay, float vertex_az )
Sets the vertex coordinates of a polygon composing the model.
void setModelPolygonVertex( int modelID, int polygonIndex, float vertex_ax, float vertex_ay, float vertex_az, float vertex_bx, float vertex_by, float vertex_bz )
Sets the vertex coordinates of a polygon composing the model.
void setModelPolygonVertex( int modelID, int polygonIndex, float vertex_ax, float vertex_ay, float vertex_az, float vertex_bx, float vertex_by, float vertex_bz, float vertex_cx, float vertex_cy, float vertex_cz )
Sets the vertex coordinates of a polygon composing the model.
void seModeltPolygonVertex( int modelID, int polygonIndex, float vertex_ax, float vertex_ay, float vertex_az, float vertex_bx, float vertex_by, float vertex_bz, float vertex_cx, float vertex_cy, float vertex_cz, float vertex_dx, float vertex_dy, float vertex_dz )
Sets the vertex coordinates of a polygon composing the model.
void setModelPolygonVertex( int modelID, int polygonIndex, ... int vectorID[ ] )
Sets the vertex coordinates of a polygon composing the model.
void getModelPolygonVertex( int modelID, int polygonIndex, ... int vectorID[ ] )
Gets the vertex coordinates of a polygon composing the model and stores them into the specified vectors.
float[ ][ ] getModelPolygonVertex( int modelID, int polygonIndex )
Gets the vertex coordinates of a polygon composing the model.
void setModelVertexOffset( int modelID, float offsetX, float offsetY, float offsetZ, int offsetMode )
Sets the offset values used to draw the model at a shifted position.
macro setModelVertexOffset( int modelID, int vectorID, int offsetMode )
Sets the offset values used to draw the model at a shifted position.
void setModelDepthOffset( int modelID, float offsetX, float offsetY, float offsetZ, int offsetMode )
Sets the offset values used when calculating the depth order of the polygons composing the model, treating them as if they were located at shifted positions.
macro setModelDepthOffset( int modelID, int vectorID, int offsetMode )
Sets the offset values used when calculating the depth order of the polygons composing the model, treating them as if they were located at shifted positions.
void setModelDiffuse( int id, float rate )
Sets the diffuse reflection coefficient of the model.
void setModelDiffractive( int id, float rate )
Sets the diffractive reflection coefficient of the model.
void setModelAmbient( int id, float rate )
Sets the ambient reflection coefficient of the model.
void setModelEmissive( int id, float rate )
Sets the emissive coefficient of the model.
void setModelSpecular( int id, float rate, float angle )
Sets the specular reflection coefficient of the model.
void transformModel( int modelID, int transformedModelID, int coordinateID )
Transforms the model and stores the result into the specified model.The source model and the destination model must have the same number of vertices and the same structure.
bool getModelIntersection( int modelID, int directionalVectorID, int pointVectorID, int intersectionVectorID, int normalVectorID )
Finds the intersection point and normal between the model and a half-line, and stores the result into the specified vectors.
int newLight( float x, float y, float z, float power )
Creates a light and returns its unique identifier (light ID).Currently, this function creates the same directional light as the newDirectionalLight function.It may create a more extended type of light in the future, but at present there is no difference.
int newLight( int copyID )
Creates a copy of a light and returns its unique identifier (light ID).
int newDirectionalLight( float x, float y, float z, float power )
Creates a directional light and returns its unique identifier (light ID).
int newPointLight( float x, float y, float z, float power )
Creates a point light and returns its unique identifier (light ID).
int newAmbientLight( float x, float y, float z, float power )
Creates an ambient light and returns its unique identifier (light ID).
void deleteLight( int lightID )
Disposes the specified light.
void mountLight( int lightID, int rendererID )
Mounts the light onto the world coordinate system.
void mountLight( int lightID, int rendererID, int coordinateID )
Mounts the light onto the specified coordinate system.
int demountLight( int lightID, int rendererID )
Demounts the light from the world coordinate system.
int demountLight( int lightID, int rendererID, int coordinateID )
Demounts the light from the specified coordinate system.
macro moveLight( int lightID, float deltaX, float deltaY, float deltaZ )
Translates the light.
void moveLight( int lightID, int deltaVectorID )
Translates the light.
macro rotLightX( int lightID, float angle )
Rotates the light around the X-axis.
macro rotLightY( int lightID, float angle )
Rotates the light around the Y-axis.
macro rotLightZ( int lightID, float angle )
Rotates the light around the Z-axis.
macro rotLight( int lightID, float angle, float vectorX, float vectorY, float vectorZ )
Rotates the light around an axis that passes through the origin and points in an arbitrary direction.
void rotLight( int lightID, float angle, int dirVectorID )
Rotates the light around an axis that passes through the origin and points in an arbitrary direction.
macro rotLight( int lightID, float angle, float vectorX, float vectorY, float vectorZ, float pointX, float pointY, float pointZ )
Rotates the light around an axis that passes through the specified point and points in an arbitrary direction.
void rotLight( int lightID, float angle, int dirVectorID, int pointVectorID )
Rotates the light around an axis that passes through the specified point and points in an arbitrary direction.
void scaleLight( int lightID, float sx, float sy, float sz )
Scales the light.
void mirrorLight( int lightID, bool mx, bool my, bool mz )
Mirrors the coordinates of the light.
macro setLightBrightness( int lightID, float power )
Sets the light intensity of the light.
macro getLightBrightness( int lightID )
Gets the light intensity of the light.
macro setLightColor( int lightID, int red, int green, int blue, int alpha )
Sets the color of the light.
macro setLightColor( int lightID, int rgba[ ] )
Sets the color of the light.
float[ ] getLightColor( int lightID )
Gets the color of the light.
macro setLightLocation( int lightID, float locationX, float locationY, float locationZ )
Sets the position or direction vector of the light.
void setLightLocation( int lightID, int vectorID )
Sets the position or direction vector of the light.
float[ ] getLightLocation( int lightID )
Gets the position or direction of the light.
void getLightLocation( int lightID, int vectorID )
Gets the position or direction of the light and stores it into the specified vector.
int newVector()
Creates a vector and returns its unique identifier (vector ID).
int newVector( float x, float y, float z )
Creates a vector and returns its unique identifier (vector ID).
int newVector( float vertex[ ] )
Creates a vector and returns its unique identifier (vector ID).
int newVector( int copyID )
Creates a copy of a vector and returns its unique identifier (vector ID).
void deleteVector( int vectorID )
Disposes the specified vector.
void mountVector( int vectorID, int rendererID )
Mounts the vector onto the world coordinate system.
void mountVector( int vectorID, int rendererID, int coordinateID )
Mounts the vector onto the specified coordinate system.
int demountVector( int id, int rendererID )
Demounts the vector from the world coordinate system.
int demountVector( int id, int rendererID, int coordinateID )
Demounts the vector from the specified coordinate system.
macro moveVector( int vectorID, float deltaX, float deltaY, float deltaZ )
Translates the vector.
void moveVector( int vectorID, int deltaVectorID )
Translates the vector.
macro rotVectorX( int vectorID, float angle )
Rotates the vector around the X-axis.
macro rotVectorY( int vectorID, float angle )
Rotates the vector around the Y-axis.
macro rotVectorZ( int vectorID, float angle )
Rotates the vector around the Z-axis.
macro rotVector( int vectorID, float angle, float vectorX, float vectorY, float vectorZ )
Rotates the vector around an axis that passes through the origin and points in an arbitrary direction.
void rotVector( int vectorID, float angle, int dirVectorID )
Rotates the vector around an axis that passes through the origin and points in an arbitrary direction.
macro rotVector( int vectorID, float angle, float vectorX, float vectorY, float vectorZ, float pointX, float pointY, float pointZ )
Rotates the vector around an axis that passes through the specified point and points in an arbitrary direction.
void rotVector( int vectorID, float angle, int dirVectorID, int pointVectorID )
Rotates the vector around an axis that passes through the specified point and points in an arbitrary direction.
macro scaleVector( int vectorID, float rateX, float rateY, float rateZ )
Scales the vector.
macro mirrorVector( int vectorID, bool mirrorX, bool mirrorY, bool mirrorZ )
Mirrors the components of the vector.
macro setVector( int vectorID, float vectorComponentX, float vectorComponentY, float vectorComponentZ )
Sets the components of the vector.
void setVector( int vectorID, float vectorComponent[ ] )
Sets the components of the vector.
void setVector( int vectorID, int vertexVectorID )
Sets the components of the vector.
macro setVectorX( int vectorID, float value )
Sets the X component of the vector.
macro setVectorY( int vectorID, float value )
Sets the Y component of the vector.
macro setVectorZ( int vectorID, float value )
Sets the Z component of the vector.
macro getVectorX( int vectorID )
Gets the X component of the vector.
macro getVectorY( int vectorID )
Gets the Y component of the vector.
macro getVectorZ( int vectorID )
Gets the Z component of the vector.
macro setVectorLength( int vectorID, float newlength )
Sets the magnitude (absolute value) of the vector.In this operation, the direction of the vector, that is, the ratio among its X, Y, and Z components, is preserved.
macro getVectorLength( int vectorID )
Gets the magnitude (absolute value) of the vector.
float getVectorInnerProduct( int vector1, int vector2 )
Gets the inner product of vectors.
float getVectorCrossProduct( int vector1, int vector2, int crossVector )
Gets the cross product of vectors and stores it into the specified vector.
int getVectorCrossProduct( int vector1, int vector2 )
Gets the cross product of vectors, stores it into a newly created vector, and returns that vector.
int projectVectorX( int vectorID, int rendererID )
Gets the X component of the screen projection of the vector.
int projectVectorY( int vectorID, int rendererID )
Gets the Y component of the screen projection of the vector.
void transformVector( int vectorID, int transformedVectorID, int coordinateID )
Transforms the vector and stores the result into the specified vector.
int newCoordinate()
Creates a coordinate system and returns its unique identifier (coordinate-system ID).
void deleteCoordinate( int coordinateID )
Disposes the specified coordinate system.
void mountCoordinate( int coordinateID, int rendererID )
Mounts the coordinate system onto the world coordinate system.
void mountCoordinate( int coordinateID, int rendererID, int parentID )
Mounts the coordinate system onto another coordinate system.
int demountCoordinate( int coordinateID, int rendererID )
Demounts the coordinate system from the world coordinate system.
int demountCoordinate( int coordinateID, int rendererID, int parentID )
Demounts the coordinate system from another coordinate system.
int getWorldCoordinate( int rendererID )
Gets the ID of the world coordinate system reserved by the renderer.
int getViewCoordinate( int rendererID )
Gets the ID of the view coordinate system reserved by the renderer.
macro moveCoordinate( int coordinateID, float deltaX, float deltaY, float deltaZ )
Translates the coordinate system with respect to the axes of its parent coordinate system.
void moveCoordinate( int coordinateID, int deltaVectorID )
Translates the coordinate system with respect to the axes of its parent coordinate system.
macro walkCoordinate( int coordinateID, float deltaX, float deltaY, float deltaZ )
Translates the coordinate system with respect to its own axes.In VCSSL, this kind of movement is called "walking."
void walkCoordinate( int coordinateID, int deltaVectorID )
Translates the coordinate system with respect to its own axes.In VCSSL, this kind of movement is called "walking."
macro rotCoordinateX( int coordinateID, float angle )
Rotates the coordinate system around the X-axis of its parent coordinate system.
macro rotCoordinateY( int coordinateID, float angle )
Rotates the coordinate system around the Y-axis of its parent coordinate system.
macro rotCoordinateZ( int coordinateID, float angle )
Rotates the coordinate system around the Z-axis of its parent coordinate system.
macro rotCoordinate( int coordinateID, float angle, float vectorX, float vectorY, float vectorZ )
Rotates the coordinate system around an axis that passes through the origin and points in an arbitrary direction, using the axes of the parent coordinate system as the reference.
void rotCoordinate( int coordinateID, float angle, int dirVectorID )
Rotates the coordinate system around an axis that passes through the origin and points in an arbitrary direction, using the axes of the parent coordinate system as the reference.
macro rotCoordinate( int coordinateID, float angle, float vectorX, float vectorY, float vectorZ, float pointX, float pointY, float pointZ )
Rotates the coordinate system around an axis that passes through the specified point and points in an arbitrary direction, using the axes of the parent coordinate system as the reference.
void rotCoordinate( int coordinateID, float angle, int dirVectorID, int pointVectorID )
Rotates the coordinate system around an axis that passes through the specified point and points in an arbitrary direction, using the axes of the parent coordinate system as the reference.
macro spinCoordinateX( int coordinateID, float angle )
Rotates the coordinate system around its own X-axis.In VCSSL, this kind of rotation is called "spinning."
macro spinCoordinateY( int coordinateID, float angle )
Rotates the coordinate system around its own Y-axis.In VCSSL, this kind of rotation is called "spinning."
macro spinCoordinateZ( int coordinateID, float angle )
Rotates the coordinate system around its own Z-axis.In VCSSL, this kind of rotation is called "spinning."
macro spinCoordinate( int coordinateID, float angle, float vectorX, float vectorY, float vectorZ )
Rotates the coordinate system around an axis that passes through the origin and points in an arbitrary direction, using its own axes as the reference.
void spinCoordinate( int coordinateID, float angle, int dirVectorID )
Rotates the coordinate system around an axis that passes through the origin and points in an arbitrary direction, using its own axes as the reference.
macro spinCoordinate( int coordinateID, float angle, float vectorX, float vectorY, float vectorZ, float pointX, float pointY, float pointZ )
Rotates the coordinate system around an axis that passes through the specified point and points in an arbitrary direction, using its own axes as the reference.
void spinCoordinate( int coordinateID, float angle, int dirVectorID, int pointVectorID )
Rotates the coordinate system around an axis that passes through the specified point and points in an arbitrary direction, using its own axes as the reference.
macro setCoordinateLocation( int coordinateID, float locationX, float locationY, float locationZ )
Sets the origin coordinates of the coordinate system as seen from its parent coordinate system.
macro setCoordinateLocation( int coordinateID, float locationVector[ ] )
Sets the origin coordinates of the coordinate system as seen from its parent coordinate system.
void setCoordinateLocation( int coordinateID, int localocationVectorID )
Sets the origin coordinates of the coordinate system as seen from its parent coordinate system.
macro getCoordinateLocation( int coordinateID )
Gets the origin coordinates of the coordinate system as seen from its parent coordinate system.
void setCoordinateAngle( int coordinateID, float alpha, float beta, float gamma )
Sets the angle of the coordinate system in Z-X-Z Euler angles.
void setCoordinateAngle( int coordinateID, float angle[ ] )
Sets the angle of the coordinate system in Z-X-Z Euler angles.
float[ ] getCoordinateAngle( int coordinateID )
Gets the angle of the coordinate system in Z-X-Z Euler angles.
macro setCoordinateBaseX( int coordinateID, float baseVectorX, float baseVectorY, float baseVectorZ )
Sets the base vector of the X-axis of the coordinate system.
void setCoordinateBaseX( int coordinateID, int baseVectorID )
Sets the base vector of the X-axis of the coordinate system.
macro setCoordinateBaseY( int coordinateID, float baseVectorX, float baseVectorY, float baseVectorZ )
Sets the base vector of the Y-axis of the coordinate system.
void setCoordinateBaseY( int coordinateID, int baseVectorID )
Sets the base vector of the Y-axis of the coordinate system.
macro setCoordinateBaseZ( int coordinateID, float baseVectorX, float baseVectorY, float baseVectorZ )
Sets the base vector of the Z-axis of the coordinate system.
void setCoordinateBaseZ( int coordinateID, int baseVectorID )
Sets the base vector of the Z-axis of the coordinate system.
macro getCoordinateBaseX( int coordinateID )
Gets the base vector of the X-axis of the coordinate system.
macro getCoordinateBaseY( int coordinateID )
Gets the base vector of the Y-axis of the coordinate system.
macro getCoordinateBaseZ( int coordinateID )
Gets the base vector of the Z-axis of the coordinate system.
macro setCoordinateMatrixL( int coordinateID, float[ ][ ] matrixArray )
Sets the transformation matrix of the coordinate system in the format interpreted as acting from the left.
macro setCoordinateMatrixR( int coordinateID, float[ ][ ] matrixArray )
Sets the transformation matrix of the coordinate system in the format interpreted as acting from the right.
macro getCoordinateMatrixL( int coordinateID )
Gets the transformation matrix of the coordinate system in the format interpreted as acting from the left.
macro getCoordinateMatrixR( int coordinateID )
Gets the transformation matrix of the coordinate system in the format interpreted as acting from the right.
void setCoordinateTransformL( int coordinateID, float[ ][ ] matrix )
Sets the transformation matrix of the coordinate system in the format interpreted as acting from the left.
float[ ][ ] getCoordinateTransformL( int coordinateID )
Gets the transformation matrix of the coordinate system in the format interpreted as acting from the left.
void setCoordinateTransformR( int coordinateID, float[ ][ ] matrix )
Sets the transformation matrix of the coordinate system in the format interpreted as acting from the right.
float[ ][ ] getCoordinateTransformR( int coordinateID )
Gets the transformation matrix of the coordinate system in the format interpreted as acting from the right.
void moveView( int rendererID, float dx, float dy, float dz )
Translates the view coordinate system relative to the axes of the world coordinate system.
void moveView( int rendererID, int deltaVectorID )
Translates the view coordinate system relative to the axes of the world coordinate system.
void walkView( int rendererID, float deltaX, float deltaY, float deltaZ )
Translates the view coordinate system relative to its own axes.
void walkView( int rendererID, int deltaVectorID )
Translates the view coordinate system relative to its own axes.
void rotViewX( int rendererID, float angle )
Rotates the view coordinate system about the X-axis relative to the axes of the world coordinate system.
void rotViewY( int rendererID, float angle )
Rotates the view coordinate system about the Y-axis relative to the axes of the world coordinate system.
void rotViewZ( int rendererID, float angle )
Rotates the view coordinate system about the Z-axis relative to the axes of the world coordinate system.
void rotView( int rendererID, float angle, float vectorX, float vectorY, float vectorZ )
Rotates the view coordinate system about an axis passing through the origin and oriented in an arbitrary direction, relative to the axes of the world coordinate system.
void rotView( int rendererID, float angle, int dirVectorID )
Rotates the view coordinate system about an axis passing through the origin and oriented in an arbitrary direction, relative to the axes of the world coordinate system.
void rotView( int rendererID, float angle, float vectorX, float vectorY, float vectorZ, float pointX, float pointY, float pointZ )
Rotates the view coordinate system about an axis passing through an arbitrary point and oriented in an arbitrary direction, relative to the axes of the world coordinate system.
void rotView( int rendererID, float angle, int dirVectorID, int pointVectorID )
Rotates the view coordinate system about an axis passing through an arbitrary point and oriented in an arbitrary direction, relative to the axes of the world coordinate system.
void spinViewX( int rendererID, float angle )
Rotates the view coordinate system about its own X-axis.
void spinViewY( int rendererID, float angle )
Rotates the view coordinate system about its own Y-axis.
void spinViewZ( int rendererID, float angle )
Rotates the view coordinate system about its own Z-axis.
void spinView( int rendererID, float angle, float vectorX, float vectorY, float vectorZ )
Rotates the view coordinate system about an axis passing through the origin and oriented in an arbitrary direction, relative to its own axes.
void spinView( int rendererID, float angle, int dirVectorID )
Rotates the view coordinate system about an axis passing through the origin and oriented in an arbitrary direction, relative to its own axes.
void spinView( int rendererID, float angle, float vectorX, float vectorY, float vectorZ, float pointX, float pointY, float pointZ )
Rotates the view coordinate system about an axis passing through an arbitrary point and oriented in an arbitrary direction, relative to its own axes.
void spinView( int rendererID, float angle, int dirVectorID, int pointVectorID )
Rotates the view coordinate system about an axis passing through an arbitrary point and oriented in an arbitrary direction, relative to its own axes.
void setViewLocation( int rendererID, float x, float y, float z )
Sets the origin position of the view coordinate system as seen from the world coordinate system.
void setViewLocation( int rendererID, float locationVector[ ] )
Sets the origin position of the view coordinate system as seen from the world coordinate system.
void setViewLocation( int rendererID, int locationVectorID )
Sets the origin position of the view coordinate system as seen from the world coordinate system.
void setViewAngle( int rendererID, float alpha, float beta, float gamma )
Sets the angle of the view coordinate system in Z-X-Z Euler angles.
int newGraphicsPolygon( float ax, float ay, float az, float width, float height, int graphicsID )
Creates a graphics polygon, assigns a unique identifier (polygon ID), and returns it.Since VCSSL 3.3.24, the newer newImagePolygon function has been supported.This function is supported for compatibility.
int newGraphicsPolygon( int vectorID, float width, float height, int graphicsID )
Creates a graphics polygon, assigns a unique identifier (polygon ID), and returns it.Since VCSSL 3.3.24, the newer newImagePolygon function has been supported.This function is supported for compatibility.
macro setPolygonGraphics( int polygonID, int graphicsID )
Sets the graphics resource of the polygon.Since VCSSL 3.3.24, the newer setPolygonImage function has been supported.This function is supported for compatibility.
macro setPolygonVector( int polygonID, float vertex_a1, float vertex_a2, float vertex_a3 )
The use of this function is not recommended. This function is supported for compatibility.
macro setPolygonVector( int polygonID, float vertex_a1, float vertex_a2, float vertex_a3, float vertex_b1, float vertex_b2, float vertex_b3 )
The use of this function is not recommended. This function is supported for compatibility.
macro setPolygonVector( int polygonID, float vertex_a1, float vertex_a2, float vertex_a3, float vertex_b1, float vertex_b2, float vertex_b3, float vertex_c1, float vertex_c2, float vertex_c3 )
The use of this function is not recommended. This function is supported for compatibility.
macro setPolygonVector( int polygonID, float vertex_a1, float vertex_a2, float vertex_a3, float vertex_b1, float vertex_b2, float vertex_b3, float vertex_c1, float vertex_c2, float vertex_c3, float vertex_d1, float vertex_d2, float vertex_d3 )
The use of this function is not recommended. This function is supported for compatibility.
float[ ] getPolygonVector( int polygonID )
The use of this function is not recommended. This function is supported for compatibility.
void getPolygonVector( int polygonID, ... int vectorID[ ] )
The use of this function is not recommended. This function is supported for compatibility.
void setPolygonVector( int polygonID, ... int vectorID[ ] )
The use of this function is not recommended. This function is supported for compatibility.
void addPolygon( int polygonID, int rendererID )
Mounts a polygon onto the world coordinate system.Since VCSSL 3, the newer mountPolygon function has been supported. This function is supported for compatibility.
void addPolygon( int polygonID, int rendererID, int coordinateID )
Mounts a polygon onto an arbitrary coordinate system.Since VCSSL 3, the newer mountPolygon function has been supported. This function is supported for compatibility.
int removePolygon( int polygonID, int rendererID )
Demounts a polygon from the world coordinate system.Since VCSSL 3, the newer demountPolygon function has been supported. This function is supported for compatibility.
int removePolygon( int polygonID, int rendererID, int coordinateID )
Demounts a polygon from an arbitrary coordinate system.Since VCSSL 3, the newer demountPolygon function has been supported. This function is supported for compatibility.
macro rotXPolygon( int polygonID, float angle )
Rotates a polygon about the X-axis.The newer rotPolygonX function is currently supported. This function is supported for compatibility.
macro rotYPolygon( int polygonID, float angle )
Rotates a polygon about the Y-axis.The newer rotPolygonY function is currently supported. This function is supported for compatibility.
macro rotZPolygon( int polygonID, float angle )
Rotates a polygon about the Z-axis.The newer rotPolygonZ function is currently supported. This function is supported for compatibility.
macro setPolygonSortOffset( int polygonID, float offset )
Sets the offset value used to adjust front/back ordering of polygons in Z-sort rendering.The newer and more capable setPolygonDepthOffset function is available.This function is supported for compatibility.
void addModel( int modelID, int rendererID )
Mounts a model onto the world coordinate system.Since VCSSL 3, the newer mountModel function has been supported. This function is supported for compatibility.
void addModel( int modelID, int rendererID, int coordinateID )
Mounts a model onto an arbitrary coordinate system.Since VCSSL 3, the newer mountModel function has been supported. This function is supported for compatibility.
int removeModel( int modelID, int rendererID )
Demounts a model from the world coordinate system.Since VCSSL 3, the newer demountModel function has been supported. This function is supported for compatibility.
int removeModel( int modelID, int rendererID, int coordinateID )
Demounts a model from an arbitrary coordinate system.Since VCSSL 3, the newer demountModel function has been supported. This function is supported for compatibility.
macro rotXModel( int modelID, float angle )
Rotates a model about the X-axis.The newer rotModelX function is currently supported. This function is supported for compatibility.
macro rotYModel( int modelID, float angle )
Rotates a model about the Y-axis.The newer rotModelY function is currently supported. This function is supported for compatibility.
macro rotZModel( int modelID, float angle )
Rotates a model about the Z-axis.The newer rotModelZ function is currently supported. This function is supported for compatibility.
macro setModelSortOffset( int modelID, float offset )
Sets the offset value used to adjust front/back ordering of models in Z-sort rendering.The newer and more capable setModelDepthOffset function is available.This function is supported for compatibility.
void addLight( int lightID, int rendererID )
Mounts a light onto the world coordinate system.Since VCSSL 3, the newer mountPolygon function has been supported. This function is supported for compatibility.
void addLight( int lightID, int rendererID, int coordinateID )
Mounts a light onto an arbitrary coordinate system.Since VCSSL 3, the newer mountPolygon function has been supported. This function is supported for compatibility.
int removeLight( int lightID, int rendererID )
Demounts a light from the world coordinate system.Since VCSSL 3, the newer demountPolygon function has been supported. This function is supported for compatibility.
int removeLight( int lightID, int rendererID, int coordinateID )
Demounts a light from an arbitrary coordinate system.Since VCSSL 3, the newer demountPolygon function has been supported. This function is supported for compatibility.
macro rotXLight( int lightID, float angle )
Rotates a light about the X-axis.The newer rotLightX function is currently supported. This function is supported for compatibility.
macro rotYLight( int lightID, float angle )
Rotates a light about the Y-axis.The newer rotLightY function is currently supported. This function is supported for compatibility.
macro rotZLight( int lightID, float angle )
Rotates a light about the Z-axis.The newer rotLightZ function is currently supported. This function is supported for compatibility.
macro setLightVector( int lightID, float locationX, float locationY, float locationZ )
Sets the position or direction vector of the light.The newer setLightLocation function is currently supported. This function is supported for compatibility.
void setLightVector( int lightID, int vectorID )
Sets the position or direction vector of the light.The newer setLightLocation function is currently supported. This function is supported for compatibility.
float[ ] getLightVector( int lightID )
Gets the position or direction of the light.The newer getLightLocation function is currently supported. This function is supported for compatibility.
void getLightVector( int lightID, int vectorID )
Gets the position or direction of the light and stores it into the specified vector.The newer getLightLocation function is currently supported. This function is supported for compatibility.
void addVector( int vectorID, int rendererID )
Mounts a vector onto the world coordinate system.Since VCSSL 3, the newer mountVector function has been supported. This function is supported for compatibility.
void addVector( int vectorID, int rendererID, int coordinateID )
Mounts a vector onto a coordinate system.Since VCSSL 3, the newer mountVector function has been supported. This function is supported for compatibility.
int removeVector( int id, int rendererID )
Demounts a vector from the world coordinate system.Since VCSSL 3, the newer demountVector function has been supported. This function is supported for compatibility.
int removeVector( int id, int rendererID, int coordinateID )
Demounts a vector from a coordinate system.Since VCSSL 3, the newer demountVector function has been supported. This function is supported for compatibility.
macro rotXVector( int vectorID, float angle )
Rotates a vector about the X-axis.The newer rotVectorX function is currently supported. This function is supported for compatibility.
macro rotYVector( int vectorID, float angle )
Rotates a vector about the Y-axis.The newer rotVectorY function is currently supported. This function is supported for compatibility.
macro rotZVector( int vectorID, float angle )
Rotates a vector about the Z-axis.The newer rotVectorZ function is currently supported. This function is supported for compatibility.
int getScreenCoordinate( int rendererID )
Gets the ID of the view coordinate system allocated by the renderer.The name of this function is confusing, so its use is not recommended. In new programs, use getViewCoordinate instead. This function is supported for compatibility.
void addCoordinate( int coordinateID, int rendererID )
Mounts a coordinate system onto the world coordinate system.Since VCSSL 3, the newer mountCoordinate function has been supported. This function is supported for compatibility.
void addCoordinate( int coordinateID, int rendererID, int parentID )
Mounts a coordinate system onto another coordinate system.Since VCSSL 3, the newer mountCoordinate function has been supported. This function is supported for compatibility.
int removeCoordinate( int coordinateID, int rendererID )
Demounts a coordinate system from the world coordinate system.Since VCSSL 3, the newer demountCoordinate function has been supported. This function is supported for compatibility.
int removeCoordinate( int coordinateID, int rendererID, int parentID )
Demounts a coordinate system from another coordinate system.Since VCSSL 3, the newer demountCoordinate function has been supported. This function is supported for compatibility.
macro rotXCoordinate( int coordinateID, float angle )
Rotates a coordinate system about the X-axis relative to the axes of its parent coordinate system.The newer rotCoordinateX function is currently supported. This function is supported for compatibility.
macro rotYCoordinate( int coordinateID, float angle )
Rotates a coordinate system about the Y-axis relative to the axes of its parent coordinate system.The newer rotCoordinateY function is currently supported. This function is supported for compatibility.
macro rotZCoordinate( int coordinateID, float angle )
Rotates a coordinate system about the Z-axis relative to the axes of its parent coordinate system.The newer rotCoordinateZ function is currently supported. This function is supported for compatibility.
macro spinXCoordinate( int coordinateID, float angle )
Rotates a coordinate system about its own X-axis.In VCSSL, this kind of rotation is called spin.The newer spinCoordinateX function is currently supported. This function is supported for compatibility.
macro spinYCoordinate( int coordinateID, float angle )
Rotates a coordinate system about its own Y-axis.In VCSSL, this kind of rotation is called spin.The newer spinCoordinateY function is currently supported. This function is supported for compatibility.
macro spinZCoordinate( int coordinateID, float angle )
Rotates a coordinate system about its own Z-axis.In VCSSL, this kind of rotation is called spin.The newer spinCoordinateZ function is currently supported. This function is supported for compatibility.
macro setCoordinateOrigin( int coordinateID, float originVectorX, float originVectorY, float originVectorZ )
Sets the origin position of the coordinate system as seen from its parent coordinate system.The newer setCoordinateLocation function is currently supported. This function is supported for compatibility.
void setCoordinateOrigin( int coordinateID, int originVectorID )
Sets the origin position of the coordinate system as seen from its parent coordinate system.The newer setCoordinateLocation function is currently supported. This function is supported for compatibility.
macro getCoordinateOriginX( int coordinateID )
Gets the X component of the origin position of the coordinate system as seen from its parent coordinate system.The newer getCoordinateLocation function is currently supported. This function is supported for compatibility.
macro getCoordinateOriginY( int coordinateID )
Gets the Y component of the origin position of the coordinate system as seen from its parent coordinate system.The newer getCoordinateLocation function is currently supported. This function is supported for compatibility.
macro getCoordinateOriginZ( int coordinateID )
Gets the Z component of the origin position of the coordinate system as seen from its parent coordinate system.The newer getCoordinateLocation function is currently supported. This function is supported for compatibility.
macro getCoordinateOrigin( int coordinateID )
Gets the origin position of the coordinate system as seen from its parent coordinate system.The newer getCoordinateLocation function is currently supported. This function is supported for compatibility.
macro setCoordinateEulerAngle( int coordinateID, float alpha, float beta, float gamma )
Sets the angle of the coordinate system in Z-X-Z Euler angles.The newer setCoordinateAngle function is currently supported. This function is supported for compatibility.
macro getCoordinateEulerAngleAlpha( int coordinateID )
Gets the alpha angle when the angle of the coordinate system is expressed in Z-X-Z Euler angles.The newer getCoordinateAngle function is currently supported. This function is supported for compatibility.
macro getCoordinateEulerAngleBeta( int coordinateID )
Gets the beta angle when the angle of the coordinate system is expressed in Z-X-Z Euler angles.The newer getCoordinateAngle function is currently supported. This function is supported for compatibility.
macro getCoordinateEulerAngleGamma( int coordinateID )
Gets the gamma angle when the angle of the coordinate system is expressed in Z-X-Z Euler angles.The newer getCoordinateAngle function is currently supported. This function is supported for compatibility.
macro getCoordinateAlphaAngle( int coordinateID )
The use of this function is not recommended. This function does not conform to the correct Z-X-Z Euler angles. Use setCoordinateAngle instead. This function is supported for compatibility.
macro getCoordinateBetaAngle( int coordinateID )
The use of this function is not recommended. This function does not conform to the correct Z-X-Z Euler angles. Use setCoordinateAngle instead. This function is supported for compatibility.
macro getCoordinateGammaAngle( int coordinateID )
The use of this function is not recommended. This function does not conform to the correct Z-X-Z Euler angles. Use setCoordinateAngle instead. This function is supported for compatibility.
void rotXView( int rendererID, float angle )
Rotates the view coordinate system about the X-axis relative to the axes of the world coordinate system.The newer rotViewX function is currently supported. This function is supported for compatibility.
void rotYView( int rendererID, float angle )
Rotates the view coordinate system about the Y-axis relative to the axes of the world coordinate system.The newer rotViewY function is currently supported. This function is supported for compatibility.
void rotZView( int rendererID, float angle )
Rotates the view coordinate system about the Z-axis relative to the axes of the world coordinate system.The newer rotViewZ function is currently supported. This function is supported for compatibility.
void spinXView( int rendererID, float angle )
Rotates the view coordinate system about its own X-axis.The newer spinViewX function is currently supported. This function is supported for compatibility.
void spinYView( int rendererID, float angle )
Rotates the view coordinate system about its own Y-axis.The newer spinViewY function is currently supported. This function is supported for compatibility.
void spinZView( int rendererID, float angle )
Rotates the view coordinate system about its own Z-axis.The newer spinViewZ function is currently supported. This function is supported for compatibility.
void setViewOrigin( int rendererID, float x, float y, float z )
Sets the origin position of the view coordinate system as seen from the world coordinate system.The newer setViewLocation function is currently supported. This function is supported for compatibility.
void setViewOrigin( int rendererID, int originVectorID )
Sets the origin position of the view coordinate system as seen from the world coordinate system.The newer setViewLocation function is currently supported. This function is supported for compatibility.
void setViewEulerAngle( int rendererID, float alpha, float beta, float gamma )
The use of this function is not recommended. This function does not conform to the correct Z-X-Z Euler angles. Use setViewAngle instead. This function is supported for compatibility.
void moveCamera( int worldID, float dx, float dy, float dz )
Translates the view coordinate system relative to the axes of the world coordinate system.The newer moveView function is currently supported. This function is supported for compatibility.
void moveCamera( int worldID, int deltaVectorID )
Translates the view coordinate system relative to the axes of the world coordinate system.The newer moveView function is currently supported. This function is supported for compatibility.
void walkCamera( int worldID, float dx, float dy, float dz )
Translates the view coordinate system relative to its own axes.The newer walkCamera function is currently supported. This function is supported for compatibility.
void walkCamera( int worldID, int deltaVectorID )
Translates the view coordinate system relative to its own axes.The newer walkCamera function is currently supported. This function is supported for compatibility.
void rotCameraX( int worldID, float angle )
Rotates the view coordinate system about the X-axis relative to the axes of the world coordinate system.The newer rotViewX function is currently supported. This function is supported for compatibility.
void rotCameraY( int worldID, float angle )
Rotates the view coordinate system about the Y-axis relative to the axes of the world coordinate system.The newer rotViewY function is currently supported. This function is supported for compatibility.
void rotCameraZ( int worldID, float angle )
Rotates the view coordinate system about the Z-axis relative to the axes of the world coordinate system.The newer rotViewZ function is currently supported. This function is supported for compatibility.
void rotXCamera( int worldID, float angle )
Rotates the view coordinate system about the X-axis relative to the axes of the world coordinate system.The newer rotViewX function is currently supported. This function is supported for compatibility.
void rotYCamera( int worldID, float angle )
Rotates the view coordinate system about the Y-axis relative to the axes of the world coordinate system.The newer rotViewY function is currently supported. This function is supported for compatibility.
void rotZCamera( int worldID, float angle )
Rotates the view coordinate system about the Z-axis relative to the axes of the world coordinate system.The newer rotViewZ function is currently supported. This function is supported for compatibility.
void rotCamera( int worldID, float angle, float vx, float vy, float vz )
Rotates the view coordinate system about an axis passing through the origin and oriented in an arbitrary direction, relative to the axes of the world coordinate system.The newer rotView function is currently supported. This function is supported for compatibility.
void rotCamera( int worldID, float angle, int dirVectorID )
Rotates the view coordinate system about an axis passing through the origin and oriented in an arbitrary direction, relative to the axes of the world coordinate system.The newer rotView function is currently supported. This function is supported for compatibility.
void rotCamera( int worldID, float angle, float vx, float vy, float vz, float px, float py, float pz )
Rotates the view coordinate system about an axis passing through an arbitrary point and oriented in an arbitrary direction, relative to the axes of the world coordinate system.The newer rotView function is currently supported. This function is supported for compatibility.
void rotCamera( int worldID, float angle, int dirVectorID, int pointVectorID )
Rotates the view coordinate system about an axis passing through an arbitrary point and oriented in an arbitrary direction, relative to the axes of the world coordinate system.The newer rotView function is currently supported. This function is supported for compatibility.
void spinCameraX( int worldID, float angle )
Rotates the view coordinate system about its own X-axis.The newer spinViewX function is currently supported. This function is supported for compatibility.
void spinCameraY( int worldID, float angle )
Rotates the view coordinate system about its own Y-axis.The newer spinViewY function is currently supported. This function is supported for compatibility.
void spinCameraZ( int worldID, float angle )
Rotates the view coordinate system about its own Z-axis.The newer spinViewZ function is currently supported. This function is supported for compatibility.
void spinXCamera( int worldID, float angle )
Rotates the view coordinate system about its own X-axis.The newer spinViewX function is currently supported. This function is supported for compatibility.
void spinYCamera( int worldID, float angle )
Rotates the view coordinate system about its own Y-axis.The newer spinViewY function is currently supported. This function is supported for compatibility.
void spinZCamera( int worldID, float angle )
Rotates the view coordinate system about its own Z-axis.The newer spinViewZ function is currently supported. This function is supported for compatibility.
void spinCamera( int worldID, float angle, float vx, float vy, float vz )
Rotates the view coordinate system about an axis passing through the origin and oriented in an arbitrary direction, relative to its own axes.The newer spinView function is currently supported. This function is supported for compatibility.
void spinCamera( int worldID, float angle, int dirVectorID )
Rotates the view coordinate system about an axis passing through the origin and oriented in an arbitrary direction, relative to its own axes.The newer spinView function is currently supported. This function is supported for compatibility.
void spinCamera( int worldID, float angle, float vx, float vy, float vz, float px, float py, float pz )
Rotates the view coordinate system about an axis passing through an arbitrary point and oriented in an arbitrary direction, relative to its own axes.The newer spinView function is currently supported. This function is supported for compatibility.
void spinCamera( int worldID, float angle, int dirVectorID, int pointVectorID )
Rotates the view coordinate system about an axis passing through an arbitrary point and oriented in an arbitrary direction, relative to its own axes.The newer spinView function is currently supported. This function is supported for compatibility.
void setCameraOrigin( int worldID, float x, float y, float z )
Sets the origin position of the view coordinate system as seen from the world coordinate system.The newer setViewLocation function is currently supported. This function is supported for compatibility.
void setCameraOrigin( int worldID, int originVectorID )
Sets the origin position of the view coordinate system as seen from the world coordinate system.The newer setViewLocation function is currently supported. This function is supported for compatibility.
void setCameraLocation( int worldID, float x, float y, float z )
Sets the origin position of the view coordinate system as seen from the world coordinate system.The newer setViewLocation function is currently supported. This function is supported for compatibility.
void setCameraLocation( int worldID, float originVector[ ] )
Sets the origin position of the view coordinate system as seen from the world coordinate system.The newer setViewLocation function is currently supported. This function is supported for compatibility.
void setCameraLocation( int worldID, int originVectorID )
Sets the origin position of the view coordinate system as seen from the world coordinate system.The newer setViewLocation function is currently supported. This function is supported for compatibility.
void setCameraAngle( int worldID, float alpha, float beta, float gamma )
Sets the angle of the view coordinate system in Z-X-Z Euler angles.The newer setViewAngle function is currently supported. This function is supported for compatibility.
void setCameraEulerAngle( int worldID, float alpha, float beta, float gamma )
The use of this function is not recommended. This function does not conform to the correct Z-X-Z Euler angles. Use setViewAngle instead. This function is supported for compatibility.

GUI ライブラリ

GUIの生成や制御機能を提供するライブラリです。

const int MOUSE_LEFT
The constant representing the left mouse button.
const int MOUSE_MIDDLE
The constant representing the middle mouse button.
const int MOUSE_RIGHT
The constant representing the right mouse button.
const int MOUSE_SINGLE
The constant representing a single mouse click.
const int MOUSE_DOUBLE
The constant representing a double mouse click.
const int KEY_SPACE
The constant representing the Space key.
const int KEY_ENTER
The constant representing the Enter key.
const int KEY_SHIFT
The constant representing the Shift key.
const int KEY_ALT
The constant representing the Alt key.
const int KEY_AT
The constant representing the @ key.
const int KEY_TAB
The constant representing the Tab key.
const int KEY_CONTROL
The constant representing the Ctrl key.
const int KEY_BACK_SPACE
The constant representing the Backspace key.
const int KEY_A
The constant representing the A key.
const int KEY_B
The constant representing the B key.
const int KEY_C
The constant representing the C key.
const int KEY_D
The constant representing the D key.
const int KEY_E
The constant representing the E key.
const int KEY_F
The constant representing the F key.
const int KEY_G
The constant representing the G key.
const int KEY_H
The constant representing the H key.
const int KEY_I
The constant representing the I key.
const int KEY_J
The constant representing the J key.
const int KEY_K
The constant representing the K key.
const int KEY_L
The constant representing the L key.
const int KEY_M
The constant representing the M key.
const int KEY_N
The constant representing the N key.
const int KEY_O
The constant representing the O key.
const int KEY_P
The constant representing the P key.
const int KEY_Q
The constant representing the Q key.
const int KEY_R
The constant representing the R key.
const int KEY_S
The constant representing the S key.
const int KEY_T
The constant representing the T key.
const int KEY_U
The constant representing the U key.
const int KEY_V
The constant representing the V key.
const int KEY_W
The constant representing the W key.
const int KEY_X
The constant representing the X key.
const int KEY_Y
The constant representing the Y key.
const int KEY_Z
The constant representing the Z key.
const int KEY_0
The constant representing the 0 key.
const int KEY_1
The constant representing the 1 key.
const int KEY_2
The constant representing the 2 key.
const int KEY_3
The constant representing the 3 key.
const int KEY_4
The constant representing the 4 key.
const int KEY_5
The constant representing the 5 key.
const int KEY_6
The constant representing the 6 key.
const int KEY_7
The constant representing the 7 key.
const int KEY_8
The constant representing the 8 key.
const int KEY_9
The constant representing the 9 key.
const int KEY_NUMPAD0
The constant representing the 0 key.
const int KEY_NUMPAD1
The constant representing the 1 key.
const int KEY_NUMPAD2
The constant representing the 2 key.
const int KEY_NUMPAD3
The constant representing the 3 key.
const int KEY_NUMPAD4
The constant representing the 4 key.
const int KEY_NUMPAD5
The constant representing the 5 key.
const int KEY_NUMPAD6
The constant representing the 6 key.
const int KEY_NUMPAD7
The constant representing the 7 key.
const int KEY_NUMPAD8
The constant representing the 8 key.
const int KEY_NUMPAD9
The constant representing the 9 key.
const int KEY_UP
The constant representing the Up key.
const int KEY_DOWN
The constant representing the Down key.
const int KEY_RIGHT
The constant representing the Right key.
const int KEY_LEFT
The constant representing the Left key.
const int KEY_INSERT
The constant representing the Insert key.
const int KEY_HOME
The constant representing the Home key.
const int KEY_DELETE
The constant representing the Delete key.
const int KEY_END
The constant representing the End key.
const int KEY_PAGE_UP
The constant representing the Page Up key.
const int KEY_PAGE_DOWN
The constant representing the Page Down key.
const int KEY_CAPS_LOCK
The constant representing the Caps Lock key.
const int KEY_BACK_SLASH
The constant representing the backslash key.
const int KEY_SLASH
The constant representing the slash key.
const int KEY_MINUS
The constant representing the minus key.
const int KEY_PLUS
The constant representing the plus key.
const int KEY_NUMBER
The constant representing the /ja-jp/lib/GUI# key.
const int KEY_SEMICOLON
The constant representing the semicolon key.
const int KEY_COLON
The constant representing the colon key.
const int KEY_COMMA
The constant representing the comma key.
const int KEY_PERIOD
The constant representing the period key.
const int KEY_UNDERSCORE
The constant representing the _ key.
const int KEY_EXCLAMATION
The constant representing the exclamation mark key.
const int KEY_EQUALS
The constant representing the equals key.
const int KEY_DOLLAR
The constant representing the dollar sign key.
const int KEY_CIRCUMFLEX
The constant representing the circumflex key.
const int KEY_LEFT_SQUARE_BRACKET
The constant representing the left square bracket key.
const int KEY_RIGHT_SQUARE_BRACKET
The constant representing the right square bracket key.
const int KEY_LEFT_PARENTHESIS
The constant representing the left parenthesis key.
const int KEY_RIGHT_PARENTHESIS
The constant representing the right parenthesis key.
const int KEY_SEPARATOR
The constant representing the vertical bar key.
const int KEY_ADD
The constant representing the add key.
const int KEY_SUBTRACT
The constant representing the subtract key.
const int KEY_DIVIDE
The constant representing the divide key.
const int KEY_MULTIPLY
The constant representing the multiply key.
const int KEY_F1
The constant representing the F1 key.
const int KEY_F2
The constant representing the F2 key.
const int KEY_F3
The constant representing the F3 key.
const int KEY_F4
The constant representing the F4 key.
const int KEY_F5
The constant representing the F5 key.
const int KEY_F6
The constant representing the F6 key.
const int KEY_F7
The constant representing the F7 key.
const int KEY_F8
The constant representing the F8 key.
const int KEY_F9
The constant representing the F9 key.
const int KEY_F10
The constant representing the F10 key.
const int KEY_F11
The constant representing the F11 key.
const int KEY_F12
The constant representing the F12 key.
const int KEY_F13
The constant representing the F13 key.
const int KEY_F14
The constant representing the F14 key.
const int KEY_F15
The constant representing the F15 key.
const int KEY_F16
The constant representing the F16 key.
const int KEY_F17
The constant representing the F17 key.
const int KEY_F18
The constant representing the F18 key.
const int KEY_F19
The constant representing the F19 key.
const int KEY_F20
The constant representing the F20 key.
const int INNER
The constant used to specify the inner area of a GUI component. It is used in the getComponentSize function.
const int OUTER
The constant used to specify the outer area of a GUI component. It is used in the getComponentSize function.
const int LISTED
The constant used to specify all listed items. It is used in the setComponentStringArray and getComponentStringArray functions.
const int SELECTED
The constant used to specify all selected items. It is used in the setComponentStringArray and getComponentStringArray functions.
void mountComponent( int componentID, int parentComponentID )
Mounts a GUI component onto another GUI component.
void demountComponent( int componentID, int parentComponentID )
Demounts a GUI component.
void deleteComponent( int componentID )
Disposes a GUI component.
int newWindow( int x, int y, int w, int h, string title )
Creates a window, assigns a unique identifier (GUI component ID), and returns it.
int newButton( int x, int y, int w, int h, string text )
Creates a button, assigns a unique identifier (GUI component ID), and returns it.
int newTextField( int x, int y, int w, int h, string text )
Creates a text field, which is a component for entering a single line of text, assigns a unique identifier (GUI component ID), and returns it.
int newTextArea( int x, int y, int w, int h, string text )
Creates a text area, which is a component for entering multiple lines of text, assigns a unique identifier (GUI component ID), and returns it.
int newTextLabel( int x, int y, int w, int h, string text )
Creates a text label, which is a component for displaying a single line of text, assigns a unique identifier (GUI component ID), and returns it.
int newImageLabel( int x, int y, int w, int h, int graphicsID )
Creates an image label, assigns a unique identifier (GUI component ID), and returns it.
int newCheckBox( int x, int y, int w, int h, string text, boolean b )
Creates a check box, assigns a unique identifier (GUI component ID), and returns it.
int newSelectField( int x, int y, int w, int h, string str[ ] )
Creates a select field, which is a single-line component allowing one item to be selected from choices, and returns its unique identifier (GUI component ID).
int newSelectArea( int x, int y, int w, int h, string str[ ] )
Creates a select area, which is a multi-line component allowing multiple items to be selected from choices, and returns its unique identifier (GUI component ID).
int newVerticalSlider( int x, int y, int w, int h, float value )
Creates a vertical slider for operating a float value in the range from 0.0 to 1.0, and returns its unique identifier (GUI component ID).
int newVerticalSlider( int x, int y, int w, int h, float value, float min, float max )
Creates a vertical slider for operating a float value, and returns its unique identifier (GUI component ID).
int newVerticalSlider( int x, int y, int w, int h, int value, int min, int max )
Creates a vertical slider for operating an int value, and returns its unique identifier (GUI component ID).
int newHorizontalSlider( int x, int y, int w, int h, float value )
Creates a horizontal slider for operating a float value in the range from 0.0 to 1.0, and returns its unique identifier (GUI component ID).
int newHorizontalSlider( int x, int y, int w, int h, float value, float min, float max )
Creates a horizontal slider for operating a float value, and returns its unique identifier (GUI component ID).
int newHorizontalSlider( int x, int y, int w, int h, int value, int min, int max )
Creates a horizontal slider for operating an int value, and returns its unique identifier (GUI component ID).
int newPanel( int x, int y, int w, int h, string title )
Creates a panel for free-position layout, and returns its unique identifier (GUI component ID).
int newGridPanel( int x, int y, int w, int h, string title, int rows, int columns )
Creates a panel for grid layout, and returns its unique identifier (GUI component ID).
int newFlowPanel( int x, int y, int w, int h, string title )
Creates a panel for flow layout, and returns its unique identifier (GUI component ID).
int newTabPanel( int x, int y, int w, int h, string title )
Creates a panel for tab display, and returns its unique identifier (GUI component ID). Use this panel by placing another panel on it.
int newScrollPanel( int x, int y, int w, int h, string title )
Creates a panel for scroll display, and returns its unique identifier (GUI component ID). Use this panel by placing another panel on it.
macro paintComponent( int componentID )
Repaints a GUI component.Repainting is necessary when the displayed text or graphics resource has changed.It is also necessary when the displayed content of child components mounted on the component has changed.
void setComponentLocation( int componentID, int x, int y )
Sets the location of a GUI component.
int[ ] getComponentLocation( int componentID )
Gets the location of a GUI component.
void setComponentSize( int componentID, int width, int height )
Sets the size of a GUI component.
int[ ] getComponentSize( int componentID )
Gets the size of a GUI component.
int[ ] getComponentSize( int componentID, int option )
Gets the size of a specific part of a GUI component.
void setComponentColor( int componentID, int fr, int fg, int fb, int fa, int br, int bg, int bb, int ba )
Sets the colors of a GUI component.
void setComponentColor( int componentID, int fgRGBA[ ], int bgRGBA[ ] )
Sets the colors of a GUI component.
macro getComponentColor( int componentID )
Returns the colors of a GUI component.
void setComponentText( int componentID, string text )
Sets the text of a GUI component.
string getComponentText( int componentID )
Gets the text of a GUI component.
void setComponentText( int componentID, string text[ ], int option )
Sets the text data of a GUI component.
string[ ] getComponentText( int componentID, int option )
Gets the text data of a GUI component.
void setComponentImage( int componentID, int graphicsID )
Sets the image of a GUI component.
int getComponentImage( int componentID )
Returns the ID of the graphics resource storing the image of a GUI component.
void showComponent( int componentID )
Shows a GUI component.
void hideComponent( int componentID )
Hides a GUI component.
void setComponentFont( int componentID, string name )
Sets the font of a GUI component.
void setComponentFontSize( int componentID, int size )
Sets the font size of a GUI component.
void setComponentFontBold( int componentID, bool isBold )
Enables or disables bold style for the font of a GUI component. It cannot be used together with italic style.
void setComponentFontItalic( int componentID, bool isItalic )
Enables or disables italic style for the font of a GUI component. It cannot be used together with bold style.
void setComponentFloat( int componentID, float value )
Sets the float value held by a GUI component.
float getComponentFloat( int componentID )
Returns the float value held by a GUI component.
void setComponentInt( int componentID, int value )
Sets the int value held by a GUI component.
int getComponentInt( int componentID )
Returns the int value held by a GUI component.
void setComponentBool( int componentID, bool state )
Sets the bool value held by a GUI component.
bool getComponentBool( int componentID )
Returns the bool value held by a GUI component.
void setComponentString( int componentID, string text )
Sets the string value held by a GUI component.
string getComponentString( int componentID )
Returns the string value held by a GUI component.
void setComponentStringArray( int componentID, string text[ ], int option )
Sets the string array value held by a GUI component.
string[ ] getComponentStringArray( int componentID, int option )
Returns the string array value held by a GUI component.
void setComponentIntArray( int componentID, int value[ ] )
Sets the int array value held by a GUI component.
int[ ] getComponentIntArray( int componentID )
Returns the int array value held by a GUI component.
void addComponent( int componentID, int parentComponentID )
Mounts a GUI component on another GUI component. Since VCSSL 3, the newer mountComponent function has been supported. This function is supported for compatibility.
void removeComponent( int componentID, int parentComponentID )
Demounts a GUI component. Since VCSSL 3, the newer demountComponent function has been supported. This function is supported for compatibility.
int newGraphicsLabel( int x, int y, int w, int h, int graphicsID )
Creates a graphics label, which is a component displaying drawn content or an image, and returns its unique identifier (GUI component ID).Since VCSSL 3.3.24, the newer newImageLabel function has been supported.This function is supported for compatibility.
void setComponentGraphics( int componentID, int graphicsID )
Sets the graphics resource ID of a GUI component.Since VCSSL 3.3.24, the newer setComponentImage function has been supported.This function is supported for compatibility.
int getComponentGraphics( int componentID )
Returns the graphics resource ID of a GUI component.Since VCSSL 3.3.24, the newer getComponentImage function has been supported.This function is supported for compatibility.
void setComponentVisible( int componentID, bool b )
The use of this function is not recommended. This function is supported for compatibility.
bool getComponentVisible( int componentID )
The use of this function is not recommended. This function is supported for compatibility.
int[ ] getComponentInnerSize( int componentID )
The use of this function is not recommended. This function is supported for compatibility.
int[ ] getComponentInner( int componentID )
The use of this function is not recommended. This function is supported for compatibility.
void setComponentValue( int componentID, float value )
The use of this function is not recommended. This function is supported for compatibility.
float getComponentValue( int componentID )
The use of this function is not recommended. This function is supported for compatibility.
void setComponentState( int componentID, bool state )
The use of this function is not recommended. This function is supported for compatibility.
bool getComponentState( int componentID )
The use of this function is not recommended. This function is supported for compatibility.
void setComponentValueFloat( int componentID, float value )
The use of this function is not recommended. This function is supported for compatibility.
float getComponentValueFloat( int componentID )
The use of this function is not recommended. This function is supported for compatibility.
void setComponentValueInt( int componentID, int value )
The use of this function is not recommended. This function is supported for compatibility.
int getComponentValueInt( int componentID )
The use of this function is not recommended. This function is supported for compatibility.
void setComponentValueBool( int componentID, bool state )
The use of this function is not recommended. This function is supported for compatibility.
bool getComponentValueBool( int componentID )
The use of this function is not recommended. This function is supported for compatibility.
void setComponentValueString( int componentID, string text )
The use of this function is not recommended. This function is supported for compatibility.
string getComponentValueString( int componentID )
The use of this function is not recommended. This function is supported for compatibility.

Event Handlers

void onWindowOpen( int componentID )
Called when a window is opened.
void onWindowClose( int componentID )
Called when a window is closed.
void onWindowMove( int componentID, int x, int y )
Called when a window is moved.
void onWindowResize( int componentID, int width, int height )
Called when a window is resized.
void onWindowShow( int componentID )
Called when a window becomes visible.
void onWindowHide( int componentID )
Called when a window becomes invisible.
void onButtonClick( int componentID, string text )
Called when a button is clicked.
void onSelectFieldClick( int componentID, string text )
Called when an item in a select field is selected.
void onCheckBoxClick( int componentID, bool value )
Called when a checkbox item is selected or deselected.
void onSliderMove( int componentID, int value )
Called when an int slider is operated.
void onSliderMove( int componentID, float value )
Called when a float slider is operated.
void onKeyDown( int componentID, string keyLabel )
Called when a keyboard key is pressed.
void onKeyDown( int componentID, string keyConstant )
Called when a keyboard key is pressed.
void onKeyUp( int componentID, string keyLabel )
Called when a keyboard key is released.
void onKeyUp( int componentID, string keyConstant )
Called when a keyboard key is released.
void onMouseDown( int componentID, int x, int y, int button )
Called when a mouse button is pressed.
void onMouseUp( int componentID, int x, int y, int button )
Called when a mouse button is released.
void onMouseClick( int componentID, int x, int y, int button, int count )
Called when the mouse is clicked.
void onMouseDrag( int componentID, int x, int y, int button, int count )
Called when the mouse is dragged.
void onMouseScroll( int componentID, int degree )
Called when the mouse wheel is scrolled.

Text ライブラリ

テキスト(文字列)処理機能を提供するライブラリです。

const int ALL
The search mode for finding all parts matching a string.
const int ALL_PATTERN
The search mode for finding all parts matching a regular expression.
const int FIRST
The search mode for finding the first part matching a string.
const int FIRST_PATTERN
The search mode for finding the first part matching a regular expression.
const int LAST
The search mode for finding the last part matching a string.
const int LAST_PATTERN
The search mode for finding the last part matching a regular expression.
const int START
The checking mode for determining whether the beginning of a string matches a substring.
const int START_PATTERN
The checking mode for determining whether the beginning of a string matches a regular expression.
const int END
The checking mode for determining whether the end of a string matches a substring.
const int END_PATTERN
The checking mode for determining whether the end of a string matches a regular expression.
const int CONTAIN
The checking mode for determining whether any part of a string matches a substring.
const int CONTAIN_PATTERN
The checking mode for determining whether any part of a string matches a regular expression.
const int FULL_PATTERN
The checking mode for determining whether an entire string matches a regular expression.
const int TRIM
The mode of the adjustText function for trimming leading and trailing whitespace and line breaks.
const int LOWER_CASE
The mode of the adjustText function for converting uppercase alphabetic characters to lowercase.
const int UPPER_CASE
The mode of the adjustText function for converting lowercase alphabetic characters to uppercase.
string atText( string text, int index )
Returns the character at the specified index in a string as a one-character string value.
bool checkText( string text, string query, int mode )
Determines whether the beginning, end, or whole of a string matches the specified string or regular expression.
string adjustText( string text, int mode )
Adjusts text in the specified mode.Depending on the mode, leading and trailing whitespace and line breaks can be removed, or alphabetic characters can be unified to uppercase or lowercase.
string cropText( string text, int cropBegin, int cropEnd )
Returns the specified range extracted from a text.If indices are assigned to the characters of the text starting from 0, the extracted range is the substring from cropBegin to cropEnd - 1.Also, if indices are assigned to the gaps between characters, the extracted range is exactly the part between the gap at cropBegin and the gap at cropEnd.
int countText( string text )
Counts and returns the number of characters in a text.
int countText( string text, string query, int mode )
Searches a text for parts matching a substring or regular expression, and returns the number of matches.
int countText( string text, string query, int searchBegin, int mode )
Searches a text for parts matching a substring or regular expression from the specified position onward, and returns the number of matches.
int countText( string text, string query, int searchBegin, int searchEnd, int mode )
Searches within the specified range of a text for parts matching a substring or regular expression, and returns the number of matches.
int[ ] findText( string text, string query, int mode )
Searches a text for parts matching a substring or regular expression, and returns an array containing the character indices of the matched parts.
int[ ] findText( string text, string query, int searchBegin, int mode )
Searches from the specified position onward in a text for parts matching a substring or regular expression, and returns an array containing the character indices of the matched parts.If no match is found, the return value is an array with zero elements.
int[ ] findText( string text, string query, int searchBegin, int searchEnd, int mode )
Searches within the specified range of a text for parts matching a substring or regular expression, and returns an array containing the character indices of the matched parts.If no match is found, the return value is an array with zero elements.
string[ ] extractText( string text, string query, int mode )
Searches a text for parts matching a substring or regular expression, and returns an array containing the extracted matched strings.If no match is found, the return value is an array with zero elements.
string[ ] extractText( string text, string query, int searchBegin, int mode )
Searches from the specified position onward in a text for parts matching a substring or regular expression, and returns an array containing the extracted matched strings.If no match is found, the return value is an array with zero elements.
string[ ] extractText( string text, string query, int searchBegin, int searchEnd, int mode )
Searches within the specified range of a text for parts matching a substring or regular expression, and returns an array containing the extracted matched strings.If no match is found, the return value is an array with zero elements.
string replaceText( string text, string query, string newPart, int mode )
Searches a text for parts matching a substring or regular expression, and returns the text with the matched parts replaced by another string.
string replaceText( string text, string query, string newPart, int searchBegin, int mode )
Searches from the specified position onward in a text for parts matching a substring or regular expression, and returns the text with the matched parts replaced by another string.
string replaceText( string text, string query, string newPart, int searchBegin, int searchEnd, int mode )
Searches within the specified range of a text for parts matching a substring or regular expression, and returns the text with the matched parts replaced by another string.
string[ ] splitText( string text, string query, int mode )
Searches a text for parts matching a substring or regular expression, and returns an array containing the original text split at those matched parts.
string[ ] splitText( string text, string query, int searchBegin, int mode )
Searches from the specified position onward in a text for parts matching a substring or regular expression, and returns an array containing the original text split at those matched parts.
string[ ] splitText( string text, string query, int searchBegin, int searchEnd, int mode )
Searches within the specified range of a text for parts matching a substring or regular expression, and returns an array containing the original text split at those matched parts.
string[ ] split( string text, string query )
Splits a string at positions matching a specific string, and returns the result as an array.Currently, the newer splitText function is supported and provides the same or more advanced functionality.For example, splitText(text, query, ALL) gives the same result as this function.This function is supported for compatibility.Note that in this function, if query exists exactly at the end of the argument text, it is not regarded as being followed by an empty string, and no empty string is stored in the last element of the returned array.This behavior differs from splitText, but it will not be changed in order to preserve compatibility.
string[ ] splitPattern( string text, string query )
Splits a string at positions matching a specific regular expression, and returns the result as an array.Currently, the newer splitText function is supported and provides the same or more advanced functionality.For example, splitText(text, query, ALL_PATTERN) gives the same result as this function.This function is supported for compatibility.Note that in this function, if query exists exactly at the end of the argument text, it is not regarded as being followed by an empty string, and no empty string is stored in the last element of the returned array.This behavior differs from splitText, but it will not be changed in order to preserve compatibility.
string replace( string text, string oldText, string newText )
Returns a string in which all occurrences of a substring contained in a string are replaced with another substring.Currently, the newer replaceText function is supported and provides the same or more advanced functionality.For example, replaceText(text, query, ALL) gives the same result as this function.This function is supported for compatibility.
string replacePattern( string text, string oldText, string newText )
Returns a string in which all ranges matching a regular expression in a string are replaced with another substring.Currently, the newer replaceText function is supported and provides the same or more advanced functionality.For example, replaceText(text, query, ALL_PATTERN) gives the same result as this function.This function is supported for compatibility.
string replaceFirst( string text, string oldText, string newText )
Returns a string in which only the first occurrence of a substring contained in a string is replaced with another substring.Currently, the newer replaceText function is supported and provides the same or more advanced functionality.For example, replaceText(text, query, FIRST) gives the same result as this function.This function is supported for compatibility.
string replaceFirstPattern( string text, string oldText, string newText )
Returns a string in which only the first range matching a regular expression in a string is replaced with another substring.Currently, the newer replaceText function is supported and provides the same or more advanced functionality.For example, replaceText(text, query, FIRST_PATTERN) gives the same result as this function.This function is supported for compatibility.
string replaceFirst( string text, string oldText, string newText, int start )
Returns a string in which a substring is replaced with another substring.If multiple matching substrings exist, only the first one at or after the index specified by the argument start is replaced.Currently, the newer replaceText function is supported and provides the same or more advanced functionality.For example, replaceText(text, query, start, FIRST) gives the same result as this function.This function is supported for compatibility.
string replaceFirstPattern( string text, string oldText, string newText, int start )
Returns a string in which a range matching a regular expression is replaced with another substring.If multiple matching ranges exist, only the first one at or after the index specified by the argument start is replaced.Currently, the newer replaceText function is supported and provides the same or more advanced functionality.For example, replaceText(text, query, start, FIRST_PATTERN) gives the same result as this function.This function is supported for compatibility.
string substring( string text, int start, int end )
Returns the substring in the specified index range within a string.Currently, the newer cropText function is supported and provides the same functionality.For example, cropText(text, start, end) gives the same result as this function.This function is supported for compatibility.
int lengthOf( string text )
Returns the number of characters in a string.Currently, the newer countText function is supported and provides the same functionality.For example, countText(text) gives the same result as this function.This function is supported for compatibility.
bool startsWith( string text, string word )
Determines whether a string starts with the specified substring.Currently, the newer checkText function is supported and provides the same functionality.For example, checkText(text, word, START) gives the same result as this function.This function is supported for compatibility.
bool endsWith( string text, string word )
Determines whether a string ends with the specified substring.Currently, the newer checkText function is supported and provides the same functionality.For example, checkText(text, word, END) gives the same result as this function.This function is supported for compatibility.
string match( string text, string pattern )
Use of this API is not recommended.Currently, the newer extractText function is supported and provides the same functionality.For example, extractText(text, pattern, FIRST_PATTERN) gives the same result as this function.This function is supported for compatibility.
string match( string text, string pattern, int start )
Use of this API is not recommended.Currently, the newer extractText function is supported and provides the same functionality.For example, extractText(text, pattern, start, FIRST_PATTERN) gives the same result as this function.This function is supported for compatibility.
bool matchFull( string text, string pattern )
Determines whether an entire string matches a regular expression.Currently, the newer checkText function is supported and provides the same functionality.For example, checkText(text, word, FULL_PATTERN) gives the same result as this function.This function is supported for compatibility.
string matchFirst( string text, string pattern )
Extracts and returns the first part matching a regular expression from a string.Currently, the newer extractText function is supported and provides the same functionality.For example, extractText(text, pattern, FIRST_PATTERN) gives the same result as this function.This function is supported for compatibility.
string matchFirst( string text, string pattern, int start )
Extracts and returns a part matching a regular expression from a string.If multiple matching parts exist, only the first one at or after the index specified by the argument start is selected.Currently, the newer extractText function is supported and provides the same functionality.For example, extractText(text, pattern, start, FIRST_PATTERN) gives the same result as this function.This function is supported for compatibility.
string matchLast( string text, string pattern )
Extracts and returns the last part matching a regular expression from a string.Currently, the newer extractText function is supported and provides the same functionality.For example, extractText(text, pattern, LAST_PATTERN) gives the same result as this function.This function is supported for compatibility.
string matchLast( string text, string pattern, int end )
Extracts and returns a part matching a regular expression from a string.If multiple matching parts exist, only the last one before the position of the index specified by the argument end is selected.Currently, the newer extractText function is supported and provides the same functionality.For example, extractText(text, pattern, 0, end, LAST_PATTERN) gives the same result as this function.This function is supported for compatibility.
int indexOf( string text, string word )
Obtains the position of the specified substring in a string.If multiple occurrences exist, the first one is selected. If none exists, -1 is returned.Currently, the newer findText function is supported and provides the same functionality.For example, findText(text, word, FIRST) gives the same result as this function.(However, if there is no match, an array with zero elements is returned.)To determine whether a string contains a substring, you can use something like 0 < countText(text, word, ALL).This function is supported for compatibility.
int indexOf( string text, string word, int start )
Obtains the position of the specified substring in a string.If multiple occurrences exist, the first one at or after the index specified by the argument start is selected. If none exists, -1 is returned.Currently, the newer findText function is supported and provides the same functionality.For example, findText(text, word, start, FIRST) gives the same result as this function.(However, if there is no match, an array with zero elements is returned.)To determine whether a substring exists at or after the specified position in a string, you can use something like 0 < countText(text, word, start, ALL).This function is supported for compatibility.
string indexOfPattern( string text, string word )
Obtains the position of the specified regular expression match in a string.If multiple matches exist, the first one is selected. If none exists, -1 is returned.Currently, the newer findText function is supported and provides the same functionality.For example, findText(text, word, FIRST_PATTERN) gives the same result as this function.(However, if there is no match, an array with zero elements is returned.)This function is supported for compatibility.
string indexOfPattern( string text, string word, int start )
Obtains the position of the specified regular expression match in a string.If multiple matches exist, the first one at or after the index specified by the argument start is selected. If none exists, -1 is returned.Currently, the newer findText function is supported and provides the same functionality.For example, findText(text, word, start, FIRST_PATTERN) gives the same result as this function.(However, if there is no match, an array with zero elements is returned.)This function is supported for compatibility.
int lastIndexOf( string text, string word )
Obtains the position of the specified substring in a string.If multiple occurrences exist, the last one is selected. If none exists, -1 is returned.Currently, the newer findText function is supported and provides the same functionality.For example, findText(text, word, LAST) gives the same result as this function.(However, if there is no match, an array with zero elements is returned.)This function is supported for compatibility.
int lastIndexOf( string text, string word, int end )
Obtains the position of the specified substring in a string.If multiple occurrences exist, the last one before or at the index specified by the argument end is selected. If none exists, -1 is returned.Currently, the newer findText function is supported and provides the same functionality.For example, findText(text, word, 0, end, LAST) gives the same result as this function.(However, if there is no match, an array with zero elements is returned.)This function is supported for compatibility.
string lastIndexOfPattern( string text, string word )
Obtains the position of the specified regular expression match in a string.If multiple matches exist, the last one is selected. If none exists, -1 is returned.Currently, the newer findText function is supported and provides the same functionality.For example, findText(text, word, LAST_PATTERN) gives the same result as this function.(However, if there is no match, an array with zero elements is returned.)This function is supported for compatibility.
string lastIndexOfPattern( string text, string word, int end )
Obtains the position of the specified regular expression match in a string.If multiple matches exist, the last one before or at the index specified by the argument end is selected. If none exists, -1 is returned.Currently, the newer findText function is supported and provides the same functionality.For example, findText(text, word, 0, end, LAST_PATTERN) gives the same result as this function.(However, if there is no match, an array with zero elements is returned.)This function is supported for compatibility.
string charAt( string text, int index )
Returns the character at the specified index in a string.Currently, the newer atText function is supported and provides the same functionality.For example, atText(text, index) gives the same result as this function.This function is supported for compatibility.
string[ ] tokenize( string text )
Splits a string into tokens separated by spaces, tabs, or line breaks, and returns them as an array.

File ライブラリ

ファイル一覧取得やパス処理などの機能を提供するライブラリです。

const int ABSOLUTE
The option value representing an absolute path.
const int RELATIVE
The option value representing a relative path.
const int PARENT
The option value representing a parent directory.
const int HOME
The option value representing the user's home directory.
const int ROOT
The option value representing the root directory.
const int TMP
The option value representing the temporary-file directory provided by the computer.
const int UNORDERED
The option value representing an unordered file order.
const int LEXICAL
The option value representing a lexically sorted file order.
bool isDirectory( string pathOrName )
Determines whether the specified file is a directory.
void makeDirectory( string pathOrName )
Creates a new directory.
string[ ] listDirectory( string pathOrName )
Returns the list of file names directly under the specified directory. The order of file names is not specifically sorted and depends on the environment and implementation.
string[ ] listDirectory( string pathOrName, bool sortByIgnoreCase, int sortOption )
Returns the list of file names directly under the specified directory. A sorting option for file names can be specified.
void makeFile( string pathOrName )
Creates a new file.
string getFileName( string path )
Gets the file-name part from a file path.
void removeFile( string pathOrName )
Deletes a file.If the target is a directory, it cannot be deleted unless it is empty, so its contents must be removed first.
void moveFile( string pathOrName, string newName )
Moves a file or changes its file name.If both arguments are only file names, or if both are file paths in the same directory, the operation becomes a file rename.If the arguments are file paths in different directories, the operation becomes a file move.Moving across drives may not be supported depending on the environment.
void renameFile( string pathOrName, string newName )
Renames a file.If a path is specified instead of just a file name as the destination,the file is moved. However, moving across drives may not be supported depending on the environment.
Note: The use of this API is not recommended. Its behavior depends on the implementation and version. In VCSSL 3.3 and later, use moveFile instead.If you must use this API and want to avoid such dependencies, specify the destination file path newPath as an absolute path. The behavior when specifying only a relative path or file name depends on the implementation and version.In the current standard VCSSL runtime, if a file name or relative path is specified for newPath, it is interpreted relative to the location of the executed program. However, in older versions such as VCSSL 3.2 and earlier, it may instead be interpreted relative to the implementation location.By specifying an absolute path, you can avoid version-dependent behavior.For example, if you write renameFile("Test1.txt", "Test2.txt");, the current standard VCSSL runtime renames Test1.txt to Test2.txt in the same directory. However, in older versions, "Test2.txt" may be interpreted as a path relative to the implementation, so the file may be moved to the implementation directory where VCSSL.jar exists. Even in older versions, if you want to rename a file within the same directory, write something like renameFile("hoge1.txt", getFilePath("hoge2.txt", getFilePath(".")) );.
void copyFile( string inputPath, string outputPath )
Copies a file.
string getFilePath( string pathOrName )
Gets and returns the absolute path from a file name or relative path.
string getFilePath( string pathOrName, int type )
Gets and returns an absolute path, relative path, or parent-directory path from a file name or path.
string getFilePath( string pathOrName, string directory )
Converts and returns a file name or relative path, interpreted from the specified base directory, as an absolute path.
string getFilePath( string pathOrName, string directory, int type )
Converts a file name or relative path interpreted from the specified base directory into an absolute path, a relative path based on the executed program, or a parent-directory path based on the executed program.
string[ ] getFilePath( int target )
Gets the paths of special locations in the runtime environment or operating system.
string getMainDirectory()
Returns the path of the directory containing the executed program.It can now be obtained by getFilePath("."). This function is supported for compatibility.
string getHomeDirectory()
Returns the path of the home directory.It can now be obtained by getFilePath( HOME ). This function is supported for compatibility.
string[ ] getRootDirectory()
Returns the path of the root directory.It can now be obtained by getFilePath( ROOT ). This function is supported for compatibility.
string getParentDirectory( string pathOrName )
Returns the path of the parent directory.It can now be obtained by getFilePath( pathOrName, PARENT ). This function is supported for compatibility.
string getFileRelativePath( string pathOrName, string directory )
Converts and returns a relative path based on the specified directory into a relative path based on the executed program.It can now be obtained by getFilePath( pathOrName, directory, RELATIVE ). This function is supported for compatibility.
string[ ] getFileList( string pathOrName )
Gets the list of file names directly under the specified directory.It can now be obtained by listDirectory( pathOrName ). This function is supported for compatibility.In this function, the ordering of file names depends on the environment and operating system. Processing that assumes a specific order is not recommended. The newer listDirectory( pathOrName ) can accept sorting options.

Time ライブラリ

時間計測や、時刻取得などの機能を提供するライブラリです。

int time()
Returns the elapsed time since the start of program execution in milliseconds.Because this function is used frequently, it has also been supported in the System library since VCSSL 3.4.22.Therefore, this function can now be used without importing the Time library.(This is because all functions belonging to the System library can be used without import.)
int millisecond( int t )
Converts a value returned by the time function and so on into milliseconds, that is, returns it as is.
int second( int t )
Converts a value returned by the time function and so on into seconds. Any remainder less than one second is discarded.
int minute( int t )
Converts a value returned by the time function and so on into minutes. Any remainder less than one minute is discarded.
int hour( int t )
Converts a value returned by the time function and so on into hours. Any remainder less than one hour is discarded.
int day( int t )
Converts a value returned by the time function and so on into days. Any remainder less than one day is discarded.Note that astronomical and physical effects such as fluctuations in the Earth's rotation speed and leap seconds are not taken into account. Conversion is performed simply by treating 86400000 milliseconds as one day.
int year()
Returns the current year in the Gregorian calendar.
int month()
Returns the current month in the Gregorian calendar.The range is 1 to 12. Note that it is not 0 to 11.
int day()
Returns the current day in the Gregorian calendar.
int hour()
Returns the current hour of the day.
int minute()
Returns the current minute of the time.
int second()
Returns the current second of the time.
string date()
Returns a text representing the current date and time in the Gregorian calendar.The format is currently unspecified in the specification and depends on the implementation. If you need a guaranteed format, construct it yourself by using functions such as year and hour.

Process ライブラリ

時間計測や、時刻取得などの機能を提供するライブラリです。

int newProcess( string command[ ] )
Creates a process for a native application, assigns its unique identifier called a process ID, and returns it.After creating the process with this function, execution does not start until startProcess is called, since VCSSL 3.3, so you can set standard input and other properties in the meantime.Processes can also be created by System.exec, but exec starts execution at the same time as process creation.For example, to start "test.exe" with the command-line arguments "1", "2", and "3", after importing the File and Process libraries:string command[] = { getFilePath("test.exe"), "1", "2", "3" }int processID = newProcess(command);and so on. To start execution, then call:startProcess(processID);To wait until it finishes, then call:waitForProcess(processID);By default, the working directory of the created process is set to the directory containing the VCSSL script, that is, the main directory.You can set the working directory as needed by using setProcessWorkingDirectory.In either case, it may fail to be set for special path formats. See the overview at the beginning of this page for details.
int newProcess( string command )
Creates a process for a native application, assigns its unique identifier called a process ID, and returns it.Basically, it provides the same function as newProcess(string command[]), but you can write the command as a single line like in a command-line terminal without splitting the arguments into an array.This is convenient, but because how the contents are split depends on the environment and implementation, it can instead lead to behavior that is harder to debug when running on different environments or after version changes.If it does not work as expected, or if you want to emphasize future stability, using newProcess(string command[]) with arguments explicitly split into an array is recommended.
void startProcess( int processID )
Starts execution of a native application process.After execution starts, processing is performed asynchronously and independently of VCSSL execution.If you want VCSSL-side processing to wait until the process finishes,call waitForProcess.
void deleteProcess( int processID )
Disposes of the resources related to a native application process. Call it after the process has finished executing.However, it must not be called while the process is still running. To dispose of a process during execution,first terminate it forcibly with destroyProcess.
void destroyProcess( int processID )
Forcibly terminates a native application process while it is running.
void setProcessInput( int processID, string command )
Sets the standard input content to be passed to the process.The input content is buffered and passed to the process when the process actually enters a waiting-for-input state.Therefore, you can also set all standard input needed until the process finishes at once, separated by newline characters.For example, to input "1", "2", and "3" in sequence:setProcessInput(processID, "1" + EOL + "2" + EOL + "3" + EOL);and so on.If the input becomes garbled, set the character encoding appropriate for the process with setProcessInputEncoding.Also, instead of relying on buffering, you can perform standard input interactively, that is, step by step, together with obtaining standard output.In that case, depending on the environment, the input may not be accepted unless a newline character is appended at the end.
string getProcessOutput( int processID )
Gets the standard output content of the process buffered up to the time of the call.Depending on the environment, there may be a limit on the buffer size, or efficiency may decrease as the buffer accumulates.Therefore, for native applications that produce a large amount of standard output,clear the buffer as needed with clearProcessOutput.If the retrieved content becomes garbled, set the character encoding appropriate for the process with setProcessOutputEncoding.
string getProcessError( int processID )
Gets the standard error output content of the process buffered up to the time of the call.Depending on the environment, there may be a limit on the buffer size, or efficiency may decrease as the buffer accumulates.Therefore, for native applications that produce a large amount of standard error output,clear the buffer as needed with clearProcessError.If the retrieved content becomes garbled, set the character encoding appropriate for the process with setProcessErrorEncoding.
void clearProcessOutput( int processID )
Clears the standard output buffer of the process.For native applications producing a large amount of standard output,clear it as needed because efficiency may decrease as the buffer accumulates.
void clearProcessError( int processID )
Clears the standard error output buffer of the process.For native applications producing a large amount of standard output,clear it as needed because efficiency may decrease as the buffer accumulates.
void flushProcessOutput( int processID )
Flushes the standard output buffer of the process.When flushed, all content buffered at that point is sent toonProcessOutput.
void flushProcessError( int processID )
Flushes the standard error output buffer of the process.When flushed, all content buffered at that point is sent toonProcessError.
void setProcessInputEncoding( int processID, string inputEncoding )
Sets the text encoding of the standard input passed to the process.This setting must be made before using the standard input of the process.If it is set after some standard input has already been performed, it may not be applied.
void setProcessOutputEncoding( int processID, string outputEncoding )
Sets the text encoding of the standard output content of the process.This setting must be made before using the standard output of the process.If it is set after some standard output has already been performed, it may not be applied.
void setProcessErrorEncoding( int processID, string errorEncoding )
Sets the text encoding of the standard error output content of the process.This setting must be made before using the standard error output of the process.If it is set after some standard error output has already been performed, it may not be applied.
void setProcessWorkingDirectory( int processID, string workingDirectoryPath )
Sets the working directory of the process.This setting must be made before starting execution of the process by startProcess.If it is set after execution starts, it will not be applied.If you execute the process without setting a working directory, the directory containing the VCSSL script, that is, the main directory, becomes the working directory.Note that this is not the directory containing the executable file of the process.Also note that the working directory of the process may not always be set as expected depending on the environment, and the same applies to the default directory.For example, on classic shells and command-line terminals, special paths that cannot be set as the current directory may fail to be assigned as the working directory.A known concrete example is a UNC-format path pointing to a directory on the network that is not connected as a network drive.To control conditions such as the working directory more reliably and make debugging easier, it is effective to use methods such as wrapping the execution command in a shell script and setting the working directory inside that shell script.
int getProcessExitValue( int processID )
Returns the exit status code of the process.
void waitForProcess( int processID )
Waits on the VCSSL side until execution of the process finishes.

Event Handlers

void onProcessStart(int processID)
Called when a process is created.
void onProcessEnd(int processID)
Called when a process ends.
void onProcessOutput(int processID, string output)
Called when a process writes to standard output.However, because the output content is buffered, this handler is not called at the exact moment when output is produced, and there is a time lag.The timing at which the buffer is flushed strictly depends on the implementation, but it is probably normally line by line.In that case, the output content is also passed to this event handler line by line(however, for very long lines that exceed the buffer capacity of the implementation, the content of one line may be split and passed in multiple calls).To forcibly flush the buffer at any timing without waiting for a newline, use the flushProcessOutput function.If the output content becomes garbled, set the character encoding appropriate for the process with setProcessOutputEncoding.
void onProcessError(int processID, string output)
Called when a process writes to standard error output.However, because the output content is buffered, this handler is not called at the exact moment when output is produced, and there is a time lag.The timing at which the buffer is flushed strictly depends on the implementation, but it is probably normally line by line.In that case, the output content is also passed to this event handler line by line(however, for very long lines that exceed the buffer capacity of the implementation, the content of one line may be split and passed in multiple calls).To forcibly flush the buffer at any timing without waiting for a newline, use the flushProcessError function.If the output content becomes garbled, set the character encoding appropriate for the process with setProcessErrorEncoding.

Thread ライブラリ

スレッド関連機能を提供するライブラリです。

int newThread()
Creates a thread, assigns it a unique identifier called a thread ID, and returns it.
void deleteThread( int threadID )
Disposes of a thread.
void startThread( int threadID )
Starts execution of a thread.
void waitForThread( int threadID )
Waits until execution of the thread has finished.
void sleepThread( int threadID, int time )
Suspends execution of a thread temporarily.
void sleepThread( int threadID, int milliSeconds, nanoSeconds )
Suspends execution of a thread temporarily.
void awaitThread( int threadID )
Waits until execution of the thread has finished.Currently, the equivalent waitForThread is recommended instead.This function is supported for compatibility.

Event Handlers

void onThreadStart( int threadID )
Called when a thread is created and its execution starts.This function is executed as the processing of the created thread.Implement here the processing that you want the thread to perform.
void onThreadEnd( int threadID )
Called when the processing of a thread has finished.

Sound ライブラリ

サウンド関連機能を提供するライブラリです。

int newSound(string filePath)
Loads a sound file, creates sound data from it, assigns its unique identifier, called the sound data ID, and returns it.
void deleteSound(int soundID)
Disposes of sound data.
void startSound(int soundID)
Starts playback of a sound.
void stopSound(int soundID)
Stops playback of a sound temporarily.
void setSoundGain(int soundID, float gain)
Sets the volume gain of a sound.
void setSoundFrame(int soundID, int frame)
Sets the playback position of a sound in units of frames.
int getSoundFrame(int soundID)
Gets the playback position of a sound in units of frames.
int getSoundFrameLength(int soundID)
Gets the length of a sound in units of frames.
void setSoundTime(int soundID, int milliSec)
Sets the playback position of a sound in units of time, in milliseconds.
int getSoundTime(int soundID)
Gets the playback position of a sound in units of time, in milliseconds.
int getSoundTimeLength(int soundID)
Gets the length of a sound in units of time, in milliseconds.

Event Handlers

void onSoundStart( int soundID )
Called when sound playback starts.
void onSoundStop( int soundID )
Called when sound playback stops.
void onSoundEnd( int soundID )
Called when sound playback ends.

Color ライブラリ

色の制御機能を提供するライブラリです。

const int BLACK[ ]
The array storing the color components of black.
const int WHITE[ ]
The array storing the color components of white.
const int RED[ ]
The array storing the color components of red.
const int GREEN[ ]
The array storing the color components of green.
const int BLUE[ ]
The array storing the color components of blue.
const int MAGENTA[ ]
The array storing the color components of purple (magenta).
const int YELLOW[ ]
The array storing the color components of yellow.
const int CYAN[ ]
The array storing the color components of light blue (cyan).
int[ ] color(int red, int green, int blue, int alpha)
Creates and returns an array storing color components from integer RGBA values in the range from 0 to 255.
int[ ] color(int red, int green, int blue)
Creates and returns an array storing color components for an opaque color from integer RGB values in the range from 0 to 255.
int[ ] color(float red, float green, float blue, float alpha)
Creates and returns an array storing color components from floating-point RGBA values in the range from 0.0 to 1.0.
int[ ] color(float red, float green, float blue)
Creates and returns an array storing color components for an opaque color from floating-point RGB values in the range from 0.0 to 1.0.
int[ ] color(int hexCode)
Creates and returns an array storing color components for an opaque color from a hexadecimal color code.For example, to convert the blue color code 0000ff:int rgba[] = color(0x0000ff);Here, 0x is the prefix used to write an integer literal in hexadecimal notation.
int getColorCode(int rgba[ ])
Converts an array of color components into a color code and returns it.For example, to convert purple (magenta) into a color code:int rgba[] = { 255, 0, 255, 255 };int colorCode = getColorCode(rgba);string hexCode = hex(colorCode);The result stored in the variable hexCode is 0xff00ff. For green, the result is 0xff00, and for blue, it is 0xff. To format it into a more common color-code style, remove the leading 0x and pad it with zeros on the left so that it has six digits. The Text library is useful for such string processing.

tool.Graph2D ライブラリ

2次元グラフソフトを制御するAPIライブラリです。

int newGraph2D()
Creates a 2D graph with the default size, assigns its unique identifier, the graph ID, and returns it.
int newGraph2D( int x, int y, int width, int height, string title )
Creates a 2D graph with the specified size, assigns its unique identifier, the graph ID, and returns it.
int getGraph2D()
If there is a special graph started and allocated by the implementation, gets its graph ID. Otherwise, creates a new one.
void deleteGraph2D( int graphID )
Destroys the graph.
void clearGraph2D( int graphID )
Clears the contents of the graph.
int getGraph2DGraphics( int graphID )
Converts the drawing contents held by the graph into graphics resource compatible with the Graphics library.The converted graphics resource can be processed with a 2D or 3D renderer and so on.
void setGraph2DLocation( int graphID, int x, int y )
Sets the location of the graph window.
void setGraph2DSize( int graphID, int width, int height )
Sets the size of the graph window.
void hideGraph2D( int graphID )
Hides the graph window.
void showGraph2D( int graphID )
Shows the graph window.
void setGraph2DFile( int graphID, string filePath )
Loads a file and plots it on the graph.
void setGraph2DFile( int graphID, string file[ ] )
Loads multiple files and plots them on the graph.
void setGraph2DData( int graphID, string data )
Loads text written in the same format as the contents of a file and plots it on the graph.
void setGraph2DData( int graphID, float dataX[ ], float dataY[ ] )
Loads float arrays storing coordinate values and plots them on the graph.
void setGraph2DData( int graphID, float dataX[ ][ ], float dataY[ ][ ] )
Loads float arrays storing coordinate values and plots them on the graph.
void addGraph2DData( int graphID, float dataX[ ], float dataY[ ] )
Loads float arrays storing coordinate values and adds them to the graph as an additional plot.
void addGraph2DData( int graphID, float dataX[ ][ ], float dataY[ ][ ] )
Loads float arrays storing coordinate values and adds them to the graph as an additional plot.
void setGraph2DConfigurationFile( int graphID, string file )
Loads a configuration file and applies settings to the graph automatically.
void setGraph2DConfigurationCode( int graphID, string code )
Loads code written in the same format as a configuration file, configuration code, and applies settings to the graph automatically.
void setGraph2DRange( int graphID, double xMin, double xMax, double yMin, double yMax )
Sets the plot range.
void setGraph2DRangeX( int graphID, double xMin, double xMax )
Sets the plot range of the X axis.
void setGraph2DRangeY( int graphID, double yMin, double yMax )
Sets the plot range of the Y axis.
void setGraph2DAutoRange( int graphID, bool autoX, bool autoY )
Enables or disables the automatic adjustment feature for the plot range.
void setGraph2DLabel( int graphID, string xLabel, string yLabel )
Sets the labels of each axis.
void setGraph2DLabelX( int graphID, string label )
Sets the label of the X axis.
void setGraph2DLabelY( int graphID, string label )
Sets the label of the Y axis.
void setGraph2DTick( int graphID, double xTickCoords[ ], string xTickLabels[ ], double yTickCoords[ ], string yTickLabels[ ] )
Sets the tick marks of each axis.
void setGraph2DTickX( int graphID, double tickCoords[ ], string tickLabels[ ] )
Sets the tick marks of the X axis.
void setGraph2DTickY( int graphID, double tickCoords[ ], string tickLabels[ ] )
Sets the tick marks of the Y axis.
void setGraph2DOption( int graphID, string option, bool value )
Sets an option item of the graph. The item names depend on the implementation. Representative option item names are as follows: WITH_POINTS : Point plot , WITH_LINES : Line plot , WITH_DOTS : Dot plot , WITH_GRID_LINE : Grid-line drawing , LOG_X : Display the X axis in logarithmic scale , LOG_Y : Display the Y axis in logarithmic scale , REVERSE_X : Reverse the X axis , REVERSE_Y : Reverse the Y axis ,
void setGraph2DMenu( int graphID, string menu, string value )
This function is effectively used only for label settings, and it can now be replaced by functions such as setGraph2DLabel and setGraph2DLabelX or Y.Because that is more readable, it is recommended to use that form from now on unless there is a specific reason not to.Sets a menu item of the graph. The item name depends on the implementation.
void setGraph2DAnimation( int graphID, string mode, bool state )
Enables or disables graph animation. The available animation modes depend on the implementation. Representative animation modes are as follows: TRACE : Animate points while leaving trajectories , INDEX : Animate points , INDEX-SERIES : Animate series ,
void setGraph2DTitle( int graphID, string title )
Sets the title of the graph.
void setGraph2DLabel( int graphID, string xLabel, string yLabel )
Sets the axis labels of the graph.
void setGraph2DLegend( int graphID, string legend[ ] )
Sets the legend of the graph.
void exportGraph2D( int graphID, string filename, string format )
Outputs the graph as an image.
void exportGraph2D( int graphID, string filename, string format, float quality )
Outputs the graph as an image.

tool.graph.Graph3D ライブラリ

3次元グラフソフトを制御するAPIライブラリです。

int newGraph3D()
Creates a 3D graph with the default size, assigns its unique identifier, the graph ID, and returns it.
int newGraph3D( int x, int y, int width, int height, string title )
Creates a 3D graph with the specified size, assigns its unique identifier, the graph ID, and returns it.
int getGraph3D()
If there is a special graph started and allocated by the implementation, gets its graph ID. Otherwise, creates a new one.
void deleteGraph3D( int graphID )
Destroys the graph.
void clearGraph3D( int graphID )
Clears the contents of the graph.
int getGraph3DGraphics( int graphID )
Converts the drawing contents held by the graph into graphics resource compatible with the Graphics library.The converted graphics resource can be processed with a 2D or 3D renderer and so on.
void setGraph3DLocation( int graphID, int x, int y )
Sets the location of the graph window.
void setGraph3DSize( int graphID, int width, int height )
Sets the size of the graph window.
void hideGraph3D( int graphID )
Hides the graph window.
void showGraph3D( int graphID )
Shows the graph window.
void setGraph3DFile( int graphID, string filePath )
Loads a file and plots it on the graph.
void setGraph3DFile( int graphID, string filePath, string mode )
Loads a file in the specified mode and plots it on the graph.Specify the mode as one of the following string values. AUTO : A mode that automatically determines the format from the contents of the file , MATRIX_CSV : A mode that loads the file as a comma-separated matrix format , MATRIX_STSV : A mode that loads the file as a tab- or space-separated matrix format , 3COL_CSV or 3COLUMNS_CSV : A mode that loads the file as a comma-separated three-column format , 3COL_STSV or 3COLUMNS_STSV : A mode that loads the file as a tab- or space-separated three-column format , 4COL_CSV or 4COLUMNS_CSV : A mode that loads the file as a comma-separated four-column format , 4COL_STSV or 4COLUMNS_STSV : A mode that loads the file as a tab- or space-separated four-column format , Note that, regarding delimiters, the file may still be loaded even if the specified mode and the actual file contents do not match, for example, a CSV file in an STSV mode or vice versa.However, that behavior depends on the correction mechanism on the graph-software side, and there is no guarantee that it will still work in future versions. Therefore, specify the mode correctly whenever possible.
void setGraph3DFile( int graphID, string file[ ] )
Loads multiple files and plots them on the graph.
void setGraph3DFile( int graphID, string file[ ], string mode[ ] )
Loads multiple files in the specified modes and plots them on the graph.Specify each mode as one of the following string values. AUTO : A mode that automatically determines the format from the contents of the file , MATRIX_CSV : A mode that loads the file as a comma-separated matrix format , MATRIX_STSV : A mode that loads the file as a tab- or space-separated matrix format , 3COL_CSV or 3COLUMNS_CSV : A mode that loads the file as a comma-separated three-column format , 3COL_STSV or 3COLUMNS_STSV : A mode that loads the file as a tab- or space-separated three-column format , 4COL_CSV or 4COLUMNS_CSV : A mode that loads the file as a comma-separated four-column format , 4COL_STSV or 4COLUMNS_STSV : A mode that loads the file as a tab- or space-separated four-column format , Note that, regarding delimiters, the file may still be loaded even if the specified mode and the actual file contents do not match, for example, a CSV file in an STSV mode or vice versa.However, that behavior depends on the correction mechanism on the graph-software side, and there is no guarantee that it will still work in future versions. Therefore, specify the mode correctly whenever possible.
void setGraph3DData( int graphID, string data )
Loads text written in the same format as the contents of a file and plots it on the graph.
void setGraph3DData( int graphID, float dataX[ ], float dataY[ ], float dataZ[ ] )
Loads float arrays storing coordinate values and plots them on the graph.
void setGraph3DData( int graphID, float dataX[ ][ ], float dataY[ ][ ], float dataZ[ ][ ] )
Loads float arrays storing coordinate values and plots them on the graph.
void setGraph3DData( int graphID, float dataX[ ][ ][ ], float dataY[ ][ ][ ], float dataZ[ ][ ][ ] )
Loads float arrays storing coordinate values and plots them on the graph.
void addGraph3DData( int graphID, float dataX[ ], float dataY[ ], float dataZ[ ] )
Loads float arrays storing coordinate values and adds them to the graph as an additional plot.
void addGraph3DData( int graphID, float dataX[ ][ ], float dataY[ ][ ], float dataZ[ ][ ] )
Loads float arrays storing coordinate values and adds them to the graph as an additional plot.
void addGraph3DData( int graphID, float dataX[ ][ ][ ], float dataY[ ][ ][ ], float dataZ[ ][ ][ ] )
Loads float arrays storing coordinate values and adds them to the graph as an additional plot.
void setGraph3DConfigurationFile( int graphID, string file )
Loads a configuration file and applies settings to the graph automatically.
void setGraph3DConfigurationCode( int graphID, string code )
Loads code written in the same format as a configuration file, configuration code, and applies settings to the graph automatically.
void setGraph3DRange( int graphID, double xMin, double xMax, double yMin, double yMax, double zMin, double zMax )
Sets the plot range.
void setGraph3DRangeX( int graphID, double xMin, double xMax )
Sets the plot range of the X axis.
void setGraph3DRangeY( int graphID, double yMin, double yMax )
Sets the plot range of the Y axis.
void setGraph3DRangeZ( int graphID, double zMin, double zMax )
Sets the plot range of the Z axis.
void setGraph3DAutoRange( int graphID, bool autoX, bool autoY, bool autoZ )
Enables or disables the automatic adjustment feature for the plot range.
void setGraph3DLabel( int graphID, string xLabel, string yLabel, string zLabel )
Sets the labels of each axis.
void setGraph3DLabelX( int graphID, string label )
Sets the label of the X axis.
void setGraph3DLabelY( int graphID, string label )
Sets the label of the Y axis.
void setGraph3DLabelZ( int graphID, string label )
Sets the label of the Z axis.
void setGraph3DTick( int graphID, double xTickCoords[ ], string xTickLabels[ ], double yTickCoords[ ], string yTickLabels[ ], double zTickCoords[ ], string zTickLabels[ ], double colorBarTickCoords[ ], string colorBarTickLabels[ ] )
Sets the tick marks of each axis.
void setGraph3DTickX( int graphID, double tickCoords[ ], string tickLabels[ ] )
Sets the tick marks of the X axis.
void setGraph3DTickY( int graphID, double tickCoords[ ], string tickLabels[ ] )
Sets the tick marks of the Y axis.
void setGraph3DTickZ( int graphID, double tickCoords[ ], string tickLabels[ ] )
Sets the tick marks of the Z axis.
void setGraph3DTickColorBar( int graphID, double tickCoords[ ], string tickLabels[ ] )
Sets the tick marks of the color-bar axis.
void setGraph3DCameraAngle( int graphID, float horizontalAngle, float verticalAngle, string mode )
Sets the camera angle.Specify the vector from the origin of the graph to the camera position, the camera-direction vector, by using the horizontal angle and the vertical angle based on the zenith axis described below for the horizontalAngle and verticalAngle arguments.The vertical angle specifies the angle between the camera-direction vector and the zenith axis.The horizontal angle specifies the direction of the projection of the camera-direction vector onto the plane perpendicular to the zenith axis.Here, the zenith axis can be selected from the X, Y, or Z axis by specifying one of the following values in the mode argument: ZENITH_X : An angle-specification mode in which the X axis is treated as the zenith axis , ZENITH_Y : An angle-specification mode in which the Y axis is treated as the zenith axis , ZENITH_Z : An angle-specification mode in which the Z axis is treated as the zenith axis ,
void setGraph3DCameraMagnification( int graphID, float magnification )
Sets the camera magnification.
void setGraph3DCameraDistance( int graphID, float distance )
Sets the camera distance.
void setGraph3DCameraPerspective( int graphID, bool perspective )
Sets whether the camera perspective is enabled.
void setGraph3DOption( int graphID, string option, bool value )
Sets an option item of the graph. The item names depend on the implementation. Representative option item names are as follows: WITH_POINTS : Point plot , WITH_LINES : Line plot , WITH_MESHES : Mesh plot , WITH_SURFACES : Surface plot , WITH_MEMBRANES : Surface plot (Same as WITH_SURFACES) , FLAT : Flattening , FRAME : Frame drawing , SCALE : Scale drawing , GRID_LINE : Grid-line drawing , GRADATION : Gradient coloring by Z values , ALPHA : Translucent drawing , LOG_X : Display the X axis in logarithmic scale , LOG_Y : Display the Y axis in logarithmic scale , LOG_Z : Display the Z axis in logarithmic scale , REVERSE_X : Reverse the X axis , REVERSE_Y : Reverse the Y axis , REVERSE_Z : Reverse the Z axis ,
void setGraph3DMenu( int graphID, string option, string value )
This function is effectively used only for label settings, and it can now be replaced by functions such as setGraph3DLabel and setGraph3DLabelX, Y, or Z.Because that is more readable, it is recommended to use that form from now on unless there is a specific reason not to.Sets a menu item of the graph. The item names depend on the implementation. Representative menu item names are as follows: SET_LABEL_X : The X-axis label , SET_LABEL_Y : The Y-axis label , SET_LABEL_Z : The Z-axis label ,
void setGraph3DAnimation( int graphID, string option, bool state )
Enables or disables graph animation. The available animation modes depend on the implementation. Representative animation modes are as follows: TRACE : Animate points while leaving trajectories , INDEX : Animate points , INDEX-SERIES : Animate series , INDEX-X : Animate lines in the X direction of mesh data , INDEX-Y : Animate lines in the Y direction of mesh data , RANGE-X : Slide the plot range in the X direction , RANGE-Y : Slide the plot range in the Y direction , RANGE-Z : Slide the plot range in the Z direction ,
void exportGraph3D( int graphID, string filename, string format )
Outputs the graph as an image.
void exportGraph3D( int graphID, string filename, string format, float quality )
Outputs the graph as an image.

graphics2d.Graphics2DFramework ライブラリ

2DCG( 2次元グラフィックス )を手軽に扱うための軽量フレームワークです。

int getGraphics()
Returns the graphics ID of the 2D CG resource.
int getRenderer()
Returns the renderer ID of the 2D CG renderer.
int getImageLabel()
Returns the GUI component ID of the image label displaying the drawing contents.
int getGraphicsLabel()
Returns the GUI component ID of the image label.The newer getImageLabel function is available for this purpose.This function is supported for compatibility.
int getWindow()
Returns the GUI component ID of the window.
void setAnimationState(bool enable)
Sets whether animation mode is enabled.
bool getAnimationState()
Gets whether animation mode is enabled.
void setFrameRate(float rate)
Sets the screen update frequency of the animation, that is, the number of redraws per second.
float getFrameRate()
Gets the configured screen update frequency of the animation, that is, the number of redraws per second.
float getCurrentFrameRate()
Gets the measured screen update frequency of the animation, that is, the number of redraws per second.
int getLastFrameTime()
Gets the time of the last screen update of the animation.The returned time usually represents the elapsed time from program startup in milliseconds.However, the unit may differ depending on the implementation.To eliminate implementation dependence completely, convert it through the Time.millisecond function before using it.
void setPaintGraphics2DState(bool b)
Sets whether Graphics2D.paintGraphics2D is called automatically when the screen is drawn, before the paint call.If true is specified, it is called automatically.If false is set, it is not called automatically, so it needs to be called explicitly in the paint event handler or elsewhere.
bool getPaintGraphics2DState()
Gets whether Graphics2D.paintGraphics2D is called automatically when the screen is drawn, before the paint call.
void setBackgroundColor(int r, int g, int b, int a)
Sets the background color. Specify the red, green, blue, and alpha components of the background color in the range from 0 to 255.
void setBackgroundColor(int color[ ])
Sets the background color. Specify an array storing the red, green, blue, and alpha components of the background color in the range from 0 to 255.
int[ ] getBackgroundColor()
Gets the background color. The returned value is an array storing the red, green, blue, and alpha components of the background color in the range from 0 to 255.
void setWindowTitle(string title)
Sets the window title.
string getWindowTitle()
Gets the window title.
void setWindowSize(int width, int height)
Sets the window size.
void setWindowSize(int size[ ])
Sets the window size.
int[ ] getWindowSize()
Gets the window size.
void setWindowLocation(int x, int y)
Sets the window location.
void setWindowLocation(int location[ ])
Sets the window location.
int[ ] getWindowLocation()
Gets the window location.
void setMarginRight(int margin)
Sets the right margin of the window.
int getMarginRight()
Gets the right margin of the window.
void setMarginLeft(int margin)
Sets the left margin of the window.
int getMarginLeft()
Gets the left margin of the window.
void setMarginTop(int margin)
Sets the top margin of the window.
int getMarginTop()
Gets the top margin of the window.
void setMarginBottom(int margin)
Sets the bottom margin of the window.
int getMarginBottom()
Gets the bottom margin of the window.
void setAnimationWaitMin(int wait)
Sets the lower limit of the animation wait time, that is, the wait time of the main loop.
int getAnimationWaitMin()
Sets the lower limit of the animation wait time, that is, the wait time of the main loop.
void setAnimationWaitMax(int wait)
Sets the upper limit of the animation wait time, that is, the wait time of the main loop.
int getAnimationWaitMax()
Sets the upper limit of the animation wait time, that is, the wait time of the main loop.
void setMainLoopState(bool state)
Sets whether the main loop continues. If it is set to false, the animation main loop exits and the program ends.
bool getMainLoopState()
Gets whether the main loop continues.
string[ ] getMainArgument()
Gets the arguments of the main function.
void export( string filePath, string format, float quality )
Outputs the current contents of the drawing label as an image file.File output is not performed at the moment this function is called.It is executed at the next screen update timing.
void main( string args[ ] )
The main function. It is normally executed automatically and calls the frameworkMain function.However, if the main program defines the main function,this function is no longer executed automatically, sothe frameworkMain function below needs to be called explicitly.
void frameworkMain( string args[ ] )
The main processing of the framework. It is normally executed automatically from the main function.However, if the main program defines the main function,it is no longer executed automatically, so it needs to be called at an appropriate timing.
void onWindowResize( int id, int width, int height )
The event handler called when the window is resized.
void onWindowClose( int id )
The event handler called when the window is closed.
void paintWindow()
Repaints the window.It is called automatically at the screen update timing of the animation, butit can also be called explicitly at any timing to force a repaint.
void render()
Calls the paint function and related processing to render the screen contents.It is normally executed automatically, but when animation is disabled and in similar cases,it needs to be called explicitly when the screen is updated.

Event Handlers

void onStart( int rendererID )
Called only once at startup. Write initialization processing such as creating and placing sprites here.
void onExit( int rendererID )
Called only once at shutdown. Write any processing you want to perform at shutdown here.
void onPaint( int rendererID )
Called every time at the screen update timing, usually dozens of times per second. Write processing here when you want to draw 2D CG contents directly for animation.
void onUpdate( int rendererID )
Called every time between screen updates, usually dozens of times per second. Write processing here when you want to move sprites and so on.
void onResize( int rendererID )
Called when the window size is changed. Write processing here when you want to adjust the layout of GUI components placed on the screen.

graphics3d.Graphics3DFramework ライブラリ

3DCG( 2次元グラフィックス )を手軽に扱うための軽量フレームワークです。

int getGraphics()
Returns the graphics resource ID of the 3D CG graphics.
int getBackgroundGraphics()
Returns the graphics resource ID of the background 2D CG graphics.
int getForegroundGraphics()
Returns the graphics resource ID of the foreground 2D CG graphics.
int getRenderer()
Returns the renderer ID of the 3D CG renderer.
int getBackgroundRenderer()
Returns the renderer ID of the background 2D CG renderer.
int getForegroundRenderer()
Returns the renderer ID of the foreground 2D CG renderer.
void setBackgroundRendererState(bool state)
Sets whether the background 2D CG renderer is enabled.
void setForegroundRendererState(bool state)
Sets whether the foreground 2D CG renderer is enabled.
int getImageLabel()
Returns the GUI component ID of the image label displaying the drawing contents.
int getGraphicsLabel()
Returns the GUI component ID of the image label.The newer getImageLabel function is available for this purpose.This function is supported for compatibility.
int getWindow()
Gets the GUI component ID of the window.
void setAnimationState(bool enable)
Sets whether animation mode is enabled.
bool getAnimationState()
Gets whether animation mode is enabled.
void setFrameRate(float rate)
Sets the screen update frequency of the animation, that is, the number of redraws per second.
float getFrameRate()
Gets the configured screen update frequency of the animation, that is, the number of redraws per second.
float getCurrentFrameRate()
Gets the measured screen update frequency of the animation, that is, the number of redraws per second.
int getLastFrameTime()
Gets the time of the last screen update of the animation.The returned time usually represents the elapsed time from program startup in milliseconds.However, the unit may differ depending on the implementation.To eliminate implementation dependence completely, convert it through the Time.millisecond function before using it.
float getCurrentFrameRate()
Gets the measured screen update frequency of the animation, that is, the number of redraws per second.
int getLastFrameTime()
Gets the time of the last screen update of the animation.The returned time usually represents the elapsed time from program startup in milliseconds.However, the unit may differ depending on the implementation.To eliminate implementation dependence completely, convert it through the Time.millisecond function before using it.
void setPaintGraphics2DState(bool state)
Sets whether Graphics3D.paintGraphics2D is called automatically for background and foreground drawing when the screen is drawn, before the paint call.If true is specified, it is called automatically.If false is set, it is not called automatically, so it needs to be called explicitly in the paint event handler or elsewhere.
bool getPaintGraphics3DState()
Gets whether Graphics3D.paintGraphics3D is called automatically when the screen is drawn, before the paint call.
void setMagnification(float rate)
Sets the drawing scale. The scale corresponds to the radius in pixels at which a circle of radius 1.0 located at a distance of 1.0 from the viewpoint is drawn.
float getMagnification()
Gets the drawing scale. The scale corresponds to the radius in pixels at which a circle of radius 1.0 located at a distance of 1.0 from the viewpoint is drawn.
void setBackgroundColor(int r, int g, int b, int a)
Sets the background color. Specify the red, green, blue, and alpha components of the background color in the range from 0 to 255.
void setBackgroundColor(int color[ ])
Sets the background color. Specify an array storing the red, green, blue, and alpha components of the background color in the range from 0 to 255.
int[ ] getBackgroundColor()
Gets the background color. The returned value is an array storing the red, green, blue, and alpha components of the background color in the range from 0 to 255.
void setDirectionalLightVector(float x, float y, float z)
Sets the direction vector of the directional light source. Specify the vector pointing toward the direction in which the light exists.
void setDirectionalLightVector(float v[ ])
Sets the direction vector of the directional light source. Specify the vector pointing toward the direction in which the light exists.
float[ ] getDirectionalLightVector()
Gets the direction vector of the directional light source. The returned vector points toward the direction in which the light exists.
void setDirectionalLightBrightness(float power)
Sets the intensity of the directional light source.
float getDirectionalLightBrightness()
Gets the intensity of the directional light source.
void setAmbientLightBrightness(float power)
Sets the intensity of the ambient light source.
float getAmbientLightBrightness()
Gets the intensity of the ambient light source.
void setWindowTitle(string title)
Sets the window title.
string getWindowTitle()
Gets the window title.
void setWindowSize(int width, int height)
Sets the window size.
void setWindowSize(int size[ ])
Sets the window size.
int[ ] getWindowSize()
Gets the window size.
void setWindowLocation(int x, int y)
Sets the window location.
void setWindowLocation(int location[ ])
Sets the window location.
int[ ] getWindowLocation()
Gets the window location.
void setMarginRight(int margin)
Sets the right margin of the window.
int getMarginRight()
Gets the right margin of the window.
void setMarginLeft(int margin)
Sets the left margin of the window.
int getMarginLeft()
Gets the left margin of the window.
void setMarginTop(int margin)
Sets the top margin of the window.
int getMarginTop()
Gets the top margin of the window.
void setMarginBottom(int margin)
Sets the bottom margin of the window.
int getMarginBottom()
Gets the bottom margin of the window.
void setAnimationWaitMin(int wait)
Sets the lower limit of the animation wait time, that is, the wait time of the main loop.
int getAnimationWaitMin()
Sets the lower limit of the animation wait time, that is, the wait time of the main loop.
void setAnimationWaitMax(int wait)
Sets the upper limit of the animation wait time, that is, the wait time of the main loop.
int getAnimationWaitMax()
Sets the upper limit of the animation wait time, that is, the wait time of the main loop.
void setMainLoopState(bool state)
Sets whether the main loop continues. If it is set to false, the animation main loop exits and the program ends.
bool getMainLoopState()
Gets whether the main loop continues.
string[ ] getMainArgument()
Gets the arguments of the main function.
void export( string filePath, string format, float quality )
Outputs the current contents of the drawing label as an image file.File output is not performed at the moment this function is called.It is executed at the next screen update timing.
void main( string args[ ] )
The main function. It is normally executed automatically and calls the frameworkMain function.However, if the main program defines the main function,this function is no longer executed automatically, sothe frameworkMain function below needs to be called explicitly.
void frameworkMain( string args[ ] )
The main processing of the framework. It is normally executed automatically from the main function.However, if the main program defines the main function,it is no longer executed automatically, so it needs to be called at an appropriate timing.
void onWindowClose( int id )
The event handler called when the window is closed.
void onWindowResize( int id, int width, int height )
The event handler called when the window is resized.
void paintWindow()
Repaints the window.It is normally executed automatically, butIt is normally executed automatically, but when animation is disabled and in similar cases,it needs to be called explicitly when the screen is updated.
void render()
Calls the paint function and related processing to render the screen contents.It also composites the 3D CG contents with the background and foreground 2D CG contents.It is normally executed automatically, but when animation is disabled and in similar cases,it needs to be called explicitly when the screen is updated.

Event Handlers

void onStart( int rendererID )
Called only once at startup. Write initialization processing such as creating and placing 3D models here.
void onExit( int rendererID )
Called only once at shutdown. Write any processing you want to perform at shutdown here.
void onPaint( int rendererID )
Called every time at the screen update timing, usually dozens of times per second. Write processing here when you want to draw foreground or background 2D CG contents.
void onUpdate( int rendererID )
Called every time between screen updates, usually dozens of times per second. Write processing here when you want to move 3D models and so on.
void onResize( int rendererID )
Called when the window size is changed. Write processing here when you want to adjust the layout of GUI components placed on the screen.

file.TextFile ライブラリ

CSV/TSV形式などのテキストファイル入出力機能を提供します。

struct TextFile
The text file struct. It holds system resources such as the file ID, and information such as delimiters.
const string READ
The "read" mode for generic text files.No delimiter or enclosure symbol is configured.The quotation behavior is ENCLOSED_NONE.
const string WRITE
The "write" mode for generic text files.No delimiter or enclosure symbol is configured.The quotation behavior is ENCLOSED_NONE.
const string APPEND
The "append" mode for generic text files.No delimiter or enclosure symbol is configured.The quotation behavior is ENCLOSED_NONE.
const string READ_TSV
The "read" mode for TSV files.The delimiter is set to a tab character, and the enclosure symbol is set to a double quotation mark.The quotation behavior is ENCLOSED_IF_NECESSARY.
const string WRITE_TSV
The "write" mode for TSV files.The delimiter is set to a tab character, and the enclosure symbol is set to a double quotation mark.The quotation behavior is ENCLOSED_IF_NECESSARY.
const string APPEND_TSV
The "append" mode for TSV files.The delimiter is set to a tab character, and the enclosure symbol is set to a double quotation mark.The quotation behavior is ENCLOSED_IF_NECESSARY.
const string READ_CSV
The "read" mode for CSV files.The delimiter is set to a comma, and the enclosure symbol is set to a double quotation mark.The quotation behavior is ENCLOSED_IF_NECESSARY.
const string WRITE_CSV
The "write" mode for CSV files.The delimiter is set to a comma, and the enclosure symbol is set to a double quotation mark.The quotation behavior is ENCLOSED_IF_NECESSARY.
const string APPEND_CSV
The "append" mode for CSV files.The delimiter is set to a comma, and the enclosure symbol is set to a double quotation mark.The quotation behavior is ENCLOSED_IF_NECESSARY.
const int ENCLOSED_ALL
The option to enclose all values in enclosure symbols.
const int ENCLOSED_IF_NECESSARY
The option to enclose only necessary values in enclosure symbols. This is the default setting for CSV and TSV files.
const int ENCLOSED_NONE
The option not to enclose any values in enclosure symbols. This is the default setting for generic text files.
TextFile openTextFile(string filePath, string mode)
Opens a text file by specifying its file name and mode.Select the mode from the constants below. WRITE : The write mode for generic text files with no special settings. You can also configure settings manually. , APPEND : The append mode for generic text files with no special settings. You can also configure settings manually. , READ : The read mode for generic text files with no special settings. You can also configure settings manually. , WRITE_CSV : The write mode configured for CSV (comma-separated) files. , APPEND_CSV : The append mode configured for CSV (comma-separated) files. , READ_CSV : The read mode configured for CSV (comma-separated) files. , WRITE_TSV : The write mode configured for TSV (tab-separated) files. , APPEND_TSV : The append mode configured for TSV (tab-separated) files. , READ_TSV : The read mode configured for TSV (tab-separated) files. ,
TextFile openTextFile(string filePath, string mode, string textEncoding)
Opens a text file by specifying its file name, mode, and text encoding.Select the mode from the constants below. WRITE : The write mode for generic text files with no special settings. You can also configure settings manually. , APPEND : The append mode for generic text files with no special settings. You can also configure settings manually. , READ : The read mode for generic text files with no special settings. You can also configure settings manually. , WRITE_CSV : The write mode configured for CSV (comma-separated) files. , APPEND_CSV : The append mode configured for CSV (comma-separated) files. , READ_CSV : The read mode configured for CSV (comma-separated) files. , WRITE_TSV : The write mode configured for TSV (tab-separated) files. , APPEND_TSV : The append mode configured for TSV (tab-separated) files. , READ_TSV : The read mode configured for TSV (tab-separated) files. , Also, choose the text encoding from the following string literals. "Shift_JIS" : Shift_JIS. Note that it uses an underscore ( _ ), not a hyphen ( - ). , "UTF-8" : UTF-8. Note that it uses a hyphen ( - ), not an underscore ( _ ). , "EUC-JP" : EUC-JP. Note that it uses a hyphen ( - ), not an underscore ( _ ). ,
void close(TextFile &textFile)
Closes access to the text file.In particular, after write access, this function must always be called in order to flush all buffered contents to the end.
string getEndOfLineCode(TextFile &textFile)
Obtains the line break code used for file input/output.In read mode, the line break code used in the file is analyzed,and the one considered appropriate among CR+LF, LF, and CR is returned.If multiple line break codes are mixed,they are checked in the order of priority CR+LF, LF, and CR.If none of them applies, NULL is returned.After the line break code has been explicitly specified with the setEndOfLineCode function,that specified value is returned.
void setEndOfLineCode(TextFile &textFile, string endOfLineCode)
Specifies the line break code used for file input/output.To specify the line break code, it is recommended to use the following constants defined in the System library. LF : A line break code with character code 0x0A, corresponding to \n in common escape sequences. , CR : A line break code with character code 0x0D, corresponding to \r in common escape sequences. , CR+LF : A line break code with character codes 0x0D 0x0A, corresponding to \r\n in common escape sequences. (This is not a single constant but an expression adding CR and LF.) , EOL : Represents the default line break code in the execution environment. Usually CR, LF, or CR+LF is used. ,
void setCommentLineCode(TextFile &textFile, string commentLineCode)
Specifies the line-start string representing a comment line.Lines starting with the string specified here are ignored when reading.Also, when outputting a comment line with the commentln function,the string specified here is used.In read mode, when this function is called,the information about how far the file has been read is reset.This item is not set by default,so it must be set explicitly when comment lines need to be taken into account.Commonly used line-start strings include the following. "/ja-jp/lib/file/TextFile#" (number sign) : Often used in CSV/TSV files and scripts. , ":" (colon) : Used in some configuration files and scripts. , ";" (semicolon) : Used in some configuration files and scripts. , "//" (double slash) : Used in some programming languages. ,
string getCommentLineCode(TextFile &textFile)
Returns the line-start string representing a comment line.
bool isReadable(TextFile &textFile)
Checks whether the file is in a readable state.
bool isWritable(TextFile &textFile)
Checks whether the file is in a writable state.
void setDelimiter(TextFile &textFile, string delimiter)
Sets the delimiter used to separate values.When a delimiter is set, the read function andthe readln function return values separated by that delimiter as an array.Also, the write andwriteln functions separate values with the delimiter when writing.Commonly used delimiters include the following. "," (comma) : Used in CSV files. , " " (tab) : Used in TSV files. , " " (space) : Used in SSV files. , ";" (semicolon) : Used in some configuration files. , In read mode, when this function is called,the information about how far the file has been read is reset.
void setEnclosure(TextFile &textFile, string enclosure, string enclosureEscapeCharacter, int enclosingOption)
Sets the enclosure symbol used to surround values.When an enclosure symbol is set, the write andwriteln functions surround values with the enclosure symbol when writing.Also, the read andreadln functions interpret enclosure symbols when reading.The enclosure symbol is specified by the enclosure argument. Commonly used enclosure symbols include the following. "\"" (double quotation mark) : This is the " symbol. It is commonly used in CSV and TSV files. In VCSSL, double quotation marks have a special meaning, so they are specified with a literal such as "\"". , "'" (single quotation mark) : Used in some files. , Whether values should always be enclosed, or enclosed only when necessary,is specified by the enclosingOption argument.Choose this option from the following constants. ENCLOSED_ALL : A format in which values are always enclosed. , ENCLOSED_IF_NECESSARY : A format in which values are enclosed only when necessary. "Necessary" means that the written or read contents include any of the following: delimiter, enclosure symbol, comment-line prefix, or line break. , ENCLOSED_NONE : A format in which values are never enclosed in any case. , If a value to be enclosed itself contains enclosure symbols,they need to be escaped with another character. This is specified by the enclosureEscapeCharacter argument.Commonly used escape characters include the following. "\"" (double quotation mark) : This is the " symbol. In CSV and TSV files, it is often used when the enclosure symbol is a double quotation mark. The escaping result becomes consecutive double quotation marks. In VCSSL, double quotation marks have a special meaning, so they are specified with a literal such as "\"". , "\\" (backslash) : This is the \ symbol. It is often used in programming languages. In VCSSL, backslashes have a special meaning, so they are specified with a literal such as "\\". , In read mode, when this function is called,the information about how far the file has been read is reset.
void write(TextFile &textFile, ... string value[ ])
Writes strings to a text file.If multiple contents are specified, and a delimiter is set, they are written with the delimiter inserted between them.Also, values are enclosed in quotation symbols when necessary.The setting for how values are enclosed is configured by setEnclosure.Note that no delimiter is appended after the last written value.Therefore, when writing by calling this function repeatedly, it is necessary to insert delimiters with thedelimit function when needed.
void writeln(TextFile &textFile, ... string value[ ])
Writes strings to a text file and then inserts a line break.If multiple contents are specified, and a delimiter is set, they are written with the delimiter inserted between them.Also, values are enclosed in quotation symbols when necessary.The setting for how values are enclosed is configured by setEnclosure.
void delimit(TextFile &textFile)
Writes a delimiter to the text file.
void commentln(TextFile &textFile, string comment)
Writes a comment line to the text file.Before calling this function, it is necessary to set the line-start string of comment lines with thesetCommentLineCode function.
string[ ] readln(TextFile &textFile)
Reads the contents of one line from the text file.If a delimiter is set, the contents are split by the delimiter and returned as an array.However, if an enclosure is set,delimiters and line breaks inside enclosed sections are interpreted as part of the value (except when the ENCLOSED_NONE option is used).The setting for how enclosures are interpreted is configured by setEnclosure.
string[ ] read(TextFile &textFile)
Reads all contents from the text file.If a delimiter is set, the contents are split by delimiters or line breaks and returned as an array.However, if an enclosure is set,delimiters and line breaks inside enclosed sections are interpreted as part of the value (except when the ENCLOSED_NONE option is used).The setting for how enclosures are interpreted is configured by setEnclosure.
string loadln(TextFile &textFile)
Reads one line from the file and returns it as is.However, if an enclosure symbol is set and there are line breaks inside enclosed sections, they are not regarded as line ends.If multiple line break codes are mixed in the file,they are normalized to the same line break code returned by the getEndOfLineCode function.Also, if a comment-line prefix is set, comment lines are skipped.
string load(TextFile &textFile)
Reads all lines from the file and returns them as is.However, if a comment-line prefix is set, comment lines are skipped.Also, if multiple line break codes are mixed in the file, they are normalized.If multiple line break codes are mixed in the file,they are normalized to the same line break code returned by the getEndOfLineCode function.
int countln(TextFile &textFile)
Counts the effective number of lines in the text file.If no enclosure symbol is set, the effective number of lines is equal to the number of lines in the file.If an enclosure symbol is set, line breaks inside enclosed sections are not counted.In other words, in CSV and TSV files, line breaks contained in values are not counted.When reading CSV or TSV files with the readln function, obtain the effective number of lines with this function first.The readln function cannot be called beyond the effective line count returned by this function.

data.DataWrapper ライブラリ

任意型の変数値を構造体でラッピングする機能を提供するライブラリです。

struct DataWrapper<Type>
A struct for wrapping data of an arbitrary type.
DataWrapper<Type> wrap<Type>(Type arg)
Wraps data of an arbitrary type.
Type unwrap<Type>(DataWrapper<Type> wrapper)
Extracts the wrapped data.

data.List ライブラリ

リスト型のデータ構造を提供するライブラリです。配列には対応していません。

struct List<Type>
The list struct. It stores list data.
void clear<Type>( List<Type> &list )
Removes all elements.
int size<Type>( List<Type> &list )
Returns the size currently in use.
void add<Type>( List<Type> &list, Type value )
Adds an element to the end of the list.
Type get<Type>( List<Type> &list, int index )
Obtains the element at the specified index.
void set<Type>( List<Type> &list, int index, Type element )
Assigns an element to the specified index.The element that was at that index is overwritten.
Type insert<Type>( List<Type> &list, int index, Type value )
Inserts an element at the specified index.The element that was at that index moves to the next index.All elements after that also shift one position backward.
bool contains<Type>( List<Type> &list, Type element )
Determines whether the list contains the specified element.
Type removeAt<Type>( List<Type> &list, int index )
Removes the element at the specified index.
void remove<Type>( List<Type> &list, Type element )
Removes the specified element.If multiple such elements exist, only the first one is removed.
void removeAll<Type>( List<Type> &list, Type element )
Removes all specified elements.
int indexOf<Type>( List<Type> &list, Type element )
Searches for the specified element from the beginning toward the end.If it exists, its index is returned.If it does not exist, -1 is returned.
int indexOf<Type>( List<Type> &list, Type element, int from )
Searches for the specified element from the specified index toward the end.If it exists, its index is returned.If it does not exist, -1 is returned.
int lastIndexOf<Type>( List<Type> &list, Type element )
Searches for the specified element from the end toward the beginning.If it exists, its index is returned.If it does not exist, -1 is returned.
int lastIndexOf<Type>( List<Type> &list, Type element, int from )
Searches for the specified element backward starting from the specified index.If it exists, its index is returned.If it does not exist, -1 is returned.
void reverse<Type>( List<Type> &list )
Reverses the order of all elements held by the list.
Type[ ] toArray<Type>( List<Type> &list )
Stores all elements held by the list into a one-dimensional array and returns it.

data.Queue ライブラリ

キュー型のデータ構造を提供するライブラリです。配列には対応していません。

struct Queue<Type>
The queue struct. It stores queue data.
void clear<Type>( Queue<Type> &queue )
Removes all elements.
int size<Type>( Queue<Type> &queue )
Returns the size currently in use.
void enqueue<Type>( Queue<Type> &queue, Type value )
Adds an element to the queue.
Type dequeue<Type>( Queue<Type> &queue )
Removes and returns an element from the queue. The extracted element is deleted from the queue.
Type peek<Type>( Queue<Type> &queue )
Returns an element from the queue without removing it.
bool contains<Type>( Queue<Type> &queue, Type element )
Determines whether the queue contains the specified element.
void reverse<Type>( Queue<Type> &queue )
Reverses the order of all elements held by the queue.
Type[ ] toArray<Type>( Queue<Type> &queue )
Converts all elements held by the queue into a one-dimensional array and returns it.

data.Stack ライブラリ

スタック型のデータ構造を提供するライブラリです。配列には対応していません。

struct Stack<Type>
The stack struct. It stores stack data.
void clear<Type>( Stack<Type> &stack )
Removes all elements.
int size<Type>( Stack<Type> &stack )
Returns the size currently in use.
void push<Type>( Stack<Type> &stack, Type value )
Adds an element to the stack.
Type pop<Type>( Stack<Type> &stack )
Removes and returns an element from the stack.The extracted element is deleted from the stack.
Type peek<Type>( Stack<Type> &stack )
Returns an element from the stack without removing it.
bool contains<Type>( Stack<Type> &stack, Type element )
Determines whether the stack contains the specified element.
void reverse<Type>( Stack<Type> &stack )
Reverses the order of all elements held by the stack.
Type[ ] toArray<Type>( Stack<Type> &stack )
Converts all elements held by the stack into a one-dimensional array and returns it.The order is such that the element obtained first by pop or peek becomes [0].

data.WrappedList ライブラリ

リスト型のデータ構造を提供するライブラリです。配列に対応しています。

struct WrappedList<Type>
The list struct. It stores list data.
void clear<Type>( WrappedList<Type> &list )
Removes all elements.
int size<Type>( WrappedList<Type> &list )
Returns the size currently in use.
void add<Type>( WrappedList<Type> &list, Type value )
Adds an element to the end of the list.
Type get<Type>( WrappedList<Type> &list, int index )
Obtains the element at the specified index.
void set<Type>( WrappedList<Type> &list, int index, Type element )
Assigns an element to the specified index.The element that was at that index is overwritten.
Type insert<Type>( WrappedList<Type> &list, int index, Type value )
Inserts an element at the specified index.The element that was at that index moves to the next index.All elements after that also shift one position backward.
bool contains<Type>( WrappedList<Type> &list, Type element )
Determines whether the list contains the specified element.
Type removeAt<Type>( WrappedList<Type> &list, int index )
Removes the element at the specified index.
void remove<Type>( WrappedList<Type> &list, Type element )
Removes the specified element.If multiple such elements exist, only the first one is removed.
void removeAll<Type>( WrappedList<Type> &list, Type element )
Removes all specified elements.
int indexOf<Type>( WrappedList<Type> &list, Type element )
Searches for the specified element from the beginning toward the end.If it exists, its index is returned.If it does not exist, -1 is returned.
int indexOf<Type>( WrappedList<Type> &list, Type element, int from )
Searches for the specified element from the specified index toward the end.If it exists, its index is returned.If it does not exist, -1 is returned.
int lastIndexOf<Type>( WrappedList<Type> &list, Type element )
Searches for the specified element from the end toward the beginning.If it exists, its index is returned.If it does not exist, -1 is returned.
int lastIndexOf<Type>( WrappedList<Type> &list, Type element, int from )
Searches for the specified element backward starting from the specified index.If it exists, its index is returned.If it does not exist, -1 is returned.
void reverse<Type>( WrappedList<Type> &list )
Reverses the order of all elements held by the list.
DataWrapper<Type>[ ] toDataWrapperArray<Type>( WrappedList<Type> &list )
Stores all elements held by the list into a DataWrapper array and returns it.

data.WrappedQueue ライブラリ

キュー型のデータ構造を提供するライブラリです。配列に対応しています。

struct WrappedQueue<Type>
The queue struct. It stores queue data.
void clear<Type>( WrappedQueue<Type> &queue )
Removes all elements.
int size<Type>( WrappedQueue<Type> &queue )
Returns the size currently in use.
void enqueue<Type>( WrappedQueue<Type> &queue, Type value )
Adds an element to the queue.
Type dequeue<Type>( WrappedQueue<Type> &queue )
Removes and returns an element from the queue. The extracted element is deleted from the queue.
Type peek<Type>( WrappedQueue<Type> &queue )
Returns an element from the queue without removing it.
bool contains<Type>( WrappedQueue<Type> &queue, Type element )
Determines whether the queue contains the specified element.
void reverse<Type>( WrappedQueue<Type> &queue )
Reverses the order of all elements held by the queue.
DataWrapper<Type>[ ] toDataWrapperArray<Type>( WrappedQueue<Type> &queue )
Converts all elements held by the queue into a DataWrapper array and returns it.

data.WrappedStack ライブラリ

スタック型のデータ構造を提供するライブラリです。配列に対応しています。

struct WrappedStack<Type>
The stack struct. It stores stack data.
void clear<Type>( WrappedStack<Type> &stack )
Removes all elements.
int size<Type>( WrappedStack<Type> &stack )
Returns the size currently in use.
void push<Type>( WrappedStack<Type> &stack, Type value )
Adds an element to the stack.
Type pop<Type>( WrappedStack<Type> &stack )
Removes and returns an element from the stack.The extracted element is deleted from the stack.
Type peek<Type>( WrappedStack<Type> &stack )
Returns an element from the stack without removing it.
bool contains<Type>( WrappedStack<Type> &stack, Type element )
Determines whether the stack contains the specified element.
void reverse<Type>( WrappedStack<Type> &stack )
Reverses the order of all elements held by the stack.
DataWrapper<Type>[ ] toDataWrapperArray<Type>( WrappedStack<Type> &stack )
Stores all elements held by the stack into a DataWrapper array and returns it.The order is such that the element obtained first by pop or peek becomes [0].

system.Int ライブラリ

int型を補助する機能を提供するライブラリです。

int[ ] toIntArray(... int args[ ])
Returns multiple int values together as an array.
bool isInt(string s)
Determines whether the contents of the string can be converted to the int type.
bool isDec(string s)
Determines whether the contents of the string are written in decimal notation and can be converted to the int type.In other words, it returns true if all characters other than the sign are digits.
bool isHex(string s)
Determines whether the contents of the string are written in hexadecimal notation and can be converted to the int type.
bool isOct(string s)
Determines whether the contents of the string are written in octal notation and can be converted to the int type.
bool isOct(string s)
Determines whether the contents of the string are written in octal notation and can be converted to the int type.
bool isBin(string s)
Determines whether the contents of the string are written in binary notation and can be converted to the int type.

system.Float ライブラリ

float型を補助する機能を提供するライブラリです。

float[ ] toFloatArray(... float args[ ])
Returns multiple float values together as an array.
bool isFloat(string s)
Determines whether the contents of the string can be converted to the float type.

system.Complex ライブラリ

complex型を補助する機能を提供するライブラリです。

const int RE
The index of the real part when float[2] is treated as a complex number.
const int IM
The index of the imaginary part when float[2] is treated as a complex number.
complex toComplex(float arg[ ])
Converts float[2] to complex.
complex[ ] toComplexArray(... complex args[ ])
Returns multiple complex values together as an array.
varcomplex[ ] toVarcomplexArray(... varcomplex args[ ])
Returns multiple varcomplex values together as an array.
float[ ] toFloatArray(complex arg)
Converts complex to float[2].
varcomplex toVarcomplex(varfloat arg[ ])
Converts varfloat[2] to varcomplex.
varfloat[ ] toVarfloatArray(varcomplex arg)
Converts varcomplex to varfloat[2].
float creal(complex arg)
Returns the real part of a complex number. This function directly wraps System.re( complex ).
varfloat creal(varcomplex arg)
Returns the real part of a complex number. This function directly wraps System.re( varcomplex ).
float creal(float arg[ ])
Returns the real part of a complex number.
varfloat creal(varfloat arg[ ])
Returns the real part of a complex number.
float cimag(complex arg)
Returns the imaginary part of a complex number. This function directly wraps System.im( complex ).
varfloat cimag(varcomplex arg)
Returns the imaginary part of a complex number. This function directly wraps System.im( varcomplex ).
float cimag(float arg[ ])
Returns the imaginary part.
varfloat cimag(varfloat arg[ ])
Returns the imaginary part.
float[ ] cadd(float a[ ], float b[ ])
Treats float[2] or varfloat[2] as a complex number and returns the addition result.
varfloat[ ] cadd(varfloat a[ ], varfloat b[ ])
Treats float[2] or varfloat[2] as a complex number and returns the addition result.
float[ ] csub(float a[ ], float b[ ])
Treats float[2] or varfloat[2] as a complex number and returns the subtraction result.
varfloat[ ] csub(varfloat a[ ], varfloat b[ ])
Treats float[2] or varfloat[2] as a complex number and returns the subtraction result.
float[ ] cmul(float a[ ], float b[ ])
Treats float[2] or varfloat[2] as a complex number and returns the multiplication result.
varfloat[ ] cmul(varfloat a[ ], varfloat b[ ])
Treats float[2] or varfloat[2] as a complex number and returns the multiplication result.
float[ ] cdiv(float a[ ], float b[ ])
Treats float[2] or varfloat[2] as a complex number and returns the division result.
varfloat[ ] cdiv(varfloat a[ ], varfloat b[ ])
Treats float[2] or varfloat[2] as a complex number and returns the division result.

system.Bool ライブラリ

bool型を補助する機能を提供するライブラリです。

bool isBool(string s)
Determines whether the contents of the string can be converted to the bool type.
bool[ ] toBoolArray(... bool args[ ])
Returns multiple bool values together as an array.

system.String ライブラリ

string型を補助する機能を提供するライブラリです。

string[ ] toStringArray(... string args[ ])
Returns multiple string values together as an array.

math.ElementaryFunction ライブラリ

使用頻度の高い、基本的な数学関数を提供するライブラリです。

complex exp(complex arg)
The exponential function for complex numbers.
varcomplex exp(varcomplex arg)
The exponential function for complex numbers.
float abs(complex arg)
Returns the absolute value of a complex number.
varfloat abs(varcomplex arg)
Returns the absolute value of a complex number.

math.StatisticalFunction ライブラリ

平均や標準偏差などの統計関数を提供するライブラリです。

float sum( ... float args[ ] )
Calculates the sum.
varfloat sum( ... varfloat args[ ] )
Calculates the sum.
float mean( ... float args[ ] )
Calculates the mean value.
varfloat mean( ... varfloat args[ ] )
Calculates the mean value.
float van( ... float args[ ] )
Calculates the variance with n in the denominator.
varfloat van( ... varfloat args[ ] )
Calculates the variance with n in the denominator.
float van1( ... float args[ ] )
Calculates the unbiased variance with n-1 in the denominator.
varfloat van1( ... varfloat args[ ] )
Calculates the unbiased variance with n-1 in the denominator.
float sdn( ... float args[ ] )
Calculates the standard deviation with n in the denominator.
varfloat sdn( ... varfloat args[ ] )
Calculates the standard deviation with n in the denominator.
float sdn1( ... float args[ ] )
Calculates the unbiased standard deviation with n-1 in the denominator.
varfloat sdn1( ... varfloat args[ ] )
Calculates the unbiased standard deviation with n-1 in the denominator.

math.GaussianFunction ライブラリ

ガウス関数を提供するライブラリです。

float gauss(float x, float a, float b, float c)
The Gaussian function for real numbers.Returns the value of a * exp( -(x-b)**2 / c**2 ). The difference from the gaussian function is that the denominator of the exponent part does not have the factor 2.
varfloat gauss(varfloat x, varfloat a, varfloat b, varfloat c)
The Gaussian function for real numbers.Returns the value of a * exp( -(x-b)**2 / c**2 ). The difference from the gaussian function is that the denominator of the exponent part does not have the factor 2.
float gaussian(float x, float a, float b, float c)
The Gaussian function for real numbers. The difference from the gauss function is that the denominator of the exponent part has the factor 2.Returns the value of a * exp( -(x-b)**2 / (2 * c**2) ).
varfloat gaussian(varfloat x, varfloat a, varfloat b, varfloat c)
The Gaussian function for real numbers. The difference from the gauss function is that the denominator of the exponent part has the factor 2.Returns the value of a * exp( -(x-b)**2 / (2 * c**2) ).

math.FourierTransform ライブラリ

離散フーリエ変換処理を提供するライブラリです。

const int FORWARD
The exponent sign of the Fourier transform for forward transformation.
const int BACKWARD
The exponent sign of the Fourier transform for backward transformation.
complex[ ] dft(complex arg[ ], int sgn)
Performs a discrete Fourier transform.The definition domain is from 0 to 2pi, and no normalization is performed after the transformation.
varcomplex[ ] dft(varcomplex arg[ ], int sgn)
Performs a discrete Fourier transform.The definition domain is from 0 to 2pi, and no normalization is performed after the transformation.

gui.ButtonPanel ライブラリ

GUI部品として、ボタンが並ぶパネルを提供するライブラリです。

struct ButtonPanel
The button panel struct.
ButtonPanel newButtonPanel(int x, int y, int width, int height, string labelText[ ])
Creates a button panel.
void deleteComponent(ButtonPanel &panelInstance)
Destroys a button panel.
void paintComponent(ButtonPanel &panelInstance)
Repaints a button panel.
void mountComponent(ButtonPanel &panelInstance, int componentID)
Mounts a button panel onto another GUI component.
void demountComponent(ButtonPanel &panelInstance, int componentID)
Demounts a button panel from another GUI component.
int getPanel(ButtonPanel &panelInstance)
Returns the component ID of the panel.
int getButton(ButtonPanel &panelInstance, string labelText)
Gets the button corresponding to the specified label.
int getButton(ButtonPanel &panelInstance, int index)
Gets the button at the specified index.
int[ ] getComponentSize(ButtonPanel &panelInstance)
Returns the size of the panel.
void setComponentSize(ButtonPanel &panelInstance, int width, int height)
Sets the size of the panel.
void setComponentSize(ButtonPanel &panelInstance)
Automatically adjusts the sizes of the internal components to match the current panel size. Use this when the panel size has been changed externally.
int[ ] getComponentLocation(ButtonPanel &panelInstance)
Returns the location of the panel.
void setComponentLocation(ButtonPanel &panelInstance, int x, int y)
Sets the location of the panel.

gui.ButtonWindow ライブラリ

GUI部品として、ボタンが並ぶウィンドウを提供するライブラリです。

struct ButtonWindow
The button window struct.
ButtonWindow newButtonWindow(int x, int y, int width, int height, string title, string labelText[ ])
Creates a button window.
ButtonWindow newButtonWindow(string labelText[ ])
Creates a button window with its size determined automatically.
void deleteComponent(ButtonWindow &windowInstance)
Destroys a button window.
int getWindow(ButtonWindow &windowInstance)
Gets the GUI component ID of the window.
int getButton(ButtonWindow &windowInstance, string labelText)
Gets the button corresponding to the specified label.
int getButton(ButtonWindow &windowInstance, int index)
Gets the button at the specified index.
void setComponentSize(ButtonWindow &windowInstance, int width, int height)
Sets the size of the window.
void setComponentSize(ButtonWindow &windowInstance)
Automatically adjusts the sizes of the internal components to match the current window size. Use this when the window size has been changed externally.
int[ ] getComponentSize(ButtonWindow &windowInstance)
Returns the size of the window.
int[ ] getComponentLocation(ButtonWindow &windowInstance)
Returns the location of the window.
void setComponentLocation(ButtonWindow &windowInstance, int x, int y)
Sets the location of the window.
void paintComponent(ButtonWindow &windowInstance)
Repaints the window.
void hideComponent(ButtonWindow &windowInstance)
Hides the window.
void showComponent(ButtonWindow &windowInstance)
Shows the window.

gui.CheckBoxPanel ライブラリ

GUI部品として、チェックボックスが並ぶパネルを提供するライブラリです。

struct CheckBoxPanel
The check box panel struct.
CheckBoxPanel newCheckBoxPanel(int x, int y, int width, int height, string labelText[ ], bool defaultValue[ ])
Creates a check box panel.
void deleteComponent(CheckBoxPanel &panelInstance)
Destroys a check box panel.
void paintComponent(CheckBoxPanel &panelInstance)
Repaints a check box panel.
void mountComponent(CheckBoxPanel &panelInstance, int componentID)
Mounts a check box panel onto another GUI component.
void demountComponent(CheckBoxPanel &panelInstance, int componentID)
Demounts a check box panel from another GUI component.
int getPanel(CheckBoxPanel &panelInstance)
Returns the component ID of the panel.
int getCheckBox(CheckBoxPanel &panelInstance, string labelText)
Gets the text field corresponding to the specified label.
int getCheckBox(CheckBoxPanel &panelInstance, int index)
Gets the text field at the specified index.
int[ ] getComponentSize(CheckBoxPanel &panelInstance)
Returns the size of the panel.
void setComponentSize(CheckBoxPanel &panelInstance, int width, int height)
Sets the size of the panel.
void setComponentSize(CheckBoxPanel &panelInstance)
Automatically adjusts the sizes of the internal components to match the current panel size. Use this when the panel size has been changed externally.
int[ ] getComponentLocation(CheckBoxPanel &panelInstance)
Returns the location of the panel.
void setComponentLocation(CheckBoxPanel &panelInstance, int x, int y)
Sets the location of the panel.

gui.CheckBoxWindow ライブラリ

GUI部品として、チェックボックスが並ぶウィンドウを提供するライブラリです。

struct CheckBoxWindow
The check box window struct.
CheckBoxWindow newCheckBoxWindow(int x, int y, int width, int height, string title, string labelText[ ], bool[ ] defaultValue)
Creates a check box window.
CheckBoxWindow newCheckBoxWindow(string labelText[ ], bool[ ] defaultValue)
Creates a check box window with its size determined automatically.
void deleteComponent(CheckBoxWindow &windowInstance)
Destroys a check box window.
void setButton(CheckBoxWindow &windowInstance, string label)
Displays a button at the bottom of the window.
int getButton(CheckBoxWindow &windowInstance)
Gets the component ID of the button.
int getWindow(CheckBoxWindow &windowInstance)
Gets the GUI component ID of the window.
int getCheckBox(CheckBoxWindow &windowInstance, string labelText)
Gets the text field corresponding to the specified label.
int getCheckBox(CheckBoxWindow &windowInstance, int index)
Gets the text field at the specified index.
int[ ] getComponentSize(CheckBoxWindow &windowInstance)
Returns the size of the window.
void setComponentSize(CheckBoxWindow &windowInstance, int width, int height)
Sets the size of the window.
void setComponentSize(CheckBoxWindow &windowInstance)
Automatically adjusts the sizes of the internal components to match the current window size. Use this when the window size has been changed externally.
int[ ] getComponentLocation(CheckBoxWindow &windowInstance)
Returns the location of the window.
void setComponentLocation(CheckBoxWindow &windowInstance, int x, int y)
Sets the location of the window.
void paintComponent(CheckBoxWindow &windowInstance)
Repaints the window.
void hideComponent(CheckBoxWindow &windowInstance)
Hides the window.
void showComponent(CheckBoxWindow &windowInstance)
Shows the window.

gui.ImageLabelWindow ライブラリ

GUI部品として、画像ラベルが配置されているウィンドウを提供するライブラリです。

struct ImageLabelWindow
The image label window struct.
ImageLabelWindow newImageLabelWindow(int x, int y, int width, int height, string title, int graphics)
Creates an image label window.
ImageLabelWindow newImageLabelWindow(int graphics)
Creates an image label window with its size determined automatically.
void deleteComponent(ImageLabelWindow &windowInstance)
Destroys an image label window.
int getWindow(ImageLabelWindow &windowInstance)
Returns the GUI component ID of the window.
int getImageLabel(ImageLabelWindow &windowInstance)
Returns the GUI component ID of the image label.
void setComponentSize(ImageLabelWindow &windowInstance, int width, int height)
Sets the size of the window.
void setComponentSize(ImageLabelWindow &windowInstance)
Automatically adjusts the layout of the internal components to match the current window size. Use this when the window size has been changed externally.
int[ ] getComponentSize(ImageLabelWindow &windowInstance)
Returns the size of the window.
void fitComponentSize(ImageLabelWindow &windowInstance)
Sets the window size to fit the graphics resource exactly.
void setComponentLocation(ImageLabelWindow &windowInstance, int x, int y)
Sets the location of the window.
int[ ] getComponentLocation(ImageLabelWindow &windowInstance)
Returns the location of the window.
void paintComponent(ImageLabelWindow &windowInstance)
Repaints the window.
void hideComponent(ImageLabelWindow &windowInstance)
Hides the window.
void showComponent(ImageLabelWindow &windowInstance)
Shows the window.

gui.HorizontalSliderPanel ライブラリ

GUI部品として、水平スライダーが並ぶパネルを提供するライブラリです。

struct HorizontalSliderPanel
The slider panel struct.
HorizontalSliderPanel newHorizontalSliderPanel(int x, int y, int width, int height, string labelText[ ], float defaultValue[ ], float minValue[ ], float maxValue[ ])
Creates a slider panel.
HorizontalSliderPanel newHorizontalSliderPanel(int x, int y, int width, int height, string labelText[ ], int defaultValue[ ], int minValue[ ], int maxValue[ ])
Creates a slider panel.
void deleteComponent(HorizontalSliderPanel &panelInstance)
Destroys a slider panel.
void paintComponent(HorizontalSliderPanel &panelInstance)
Repaints a slider panel.
void mountComponent(HorizontalSliderPanel &panelInstance, int componentID)
Mounts a slider panel onto another GUI component.
void demountComponent(HorizontalSliderPanel &panelInstance, int componentID)
Demounts a slider panel from another GUI component.
void setTextLabelWidth(HorizontalSliderPanel &panelInstance, int labelWidth)
Sets the width of the label area.
void setLabelWidth(HorizontalSliderPanel panelInstance, int labelWidth)
This function is supported for compatibility. Use getTextLabelWidth.Sets the width of the label area.
int getPanel(HorizontalSliderPanel &panelInstance)
Returns the component ID of the panel.
int getHorizontalSlider(HorizontalSliderPanel &panelInstance, string labelText)
Gets the slider corresponding to the specified label.
int getHorizontalSlider(HorizontalSliderPanel &panelInstance, int index)
Gets the slider at the specified index.
int[ ] getComponentSize(HorizontalSliderPanel &panelInstance)
Returns the size of the panel.
void setComponentSize(HorizontalSliderPanel &panelInstance, int width, int height)
Sets the size of the panel.
void setComponentSize(HorizontalSliderPanel &panelInstance)
Automatically adjusts the sizes of the internal components to match the current panel size. Use this when the panel size has been changed externally.
int[ ] getComponentLocation(HorizontalSliderPanel &panelInstance)
Returns the location of the panel.
void setComponentLocation(HorizontalSliderPanel &panelInstance, int x, int y)
Sets the location of the panel.

gui.HorizontalSliderWindow ライブラリ

GUI部品として、水平スライダーが並ぶウィンドウを提供するライブラリです。

struct HorizontalSliderWindow
The slider window struct.
HorizontalSliderWindow newHorizontalSliderWindow(int x, int y, int width, int height, string title, string labelText[ ], float defaultValue[ ], float minValue[ ], float maxValue[ ])
Creates a slider window.
HorizontalSliderWindow newHorizontalSliderWindow(string labelText[ ], float defaultValue[ ], float minValue[ ], float maxValue[ ])
Creates a slider window with its size determined automatically.
HorizontalSliderWindow newHorizontalSliderWindow(int x, int y, int width, int height, string title, string labelText[ ], int defaultValue[ ], int minValue[ ], int maxValue[ ])
Creates a slider window.
HorizontalSliderWindow newHorizontalSliderWindow(string labelText[ ], int defaultValue[ ], int minValue[ ], int maxValue[ ])
Creates a slider window with its size determined automatically.
void deleteComponent(HorizontalSliderWindow &windowInstance)
Destroys a slider window.
void setTextLabelWidth(HorizontalSliderWindow &windowInstance, int labelWidth)
Sets the width of the label area.
void setButton(HorizontalSliderWindow &windowInstance, string label)
Displays a button at the bottom of the window.
int getButton(HorizontalSliderWindow &windowInstance)
Gets the GUI component ID of the button.
int getWindow(HorizontalSliderWindow &windowInstance)
Gets the GUI component ID of the window.
int getHorizontalSlider(HorizontalSliderWindow &windowInstance, string labelText)
Gets the slider corresponding to the specified label.
int getHorizontalSlider(HorizontalSliderWindow &windowInstance, int index)
Gets the slider at the specified index.
int[ ] getComponentSize(HorizontalSliderWindow &windowInstance)
Returns the size of the window.
void setComponentSize(HorizontalSliderWindow &windowInstance, int width, int height)
Sets the size of the window.
void setComponentSize(HorizontalSliderWindow &windowInstance)
Automatically adjusts the sizes of the internal components to match the current window size. Use this when the window size has been changed externally.
int[ ] getComponentLocation(HorizontalSliderWindow &windowInstance)
Returns the location of the window.
void setComponentLocation(HorizontalSliderWindow &windowInstance, int x, int y)
Sets the location of the window.
void setComponentLocation(HorizontalSliderWindow &windowInstance, int x, int y)
Sets the location of the window.
void paintComponent(HorizontalSliderWindow &windowInstance)
Repaints the window.
void hideComponent(HorizontalSliderWindow &windowInstance)
Hides the window.
void showComponent(HorizontalSliderWindow &windowInstance)
Shows the window.

gui.TextFieldPanel ライブラリ

GUI部品として、テキストフィールドが並ぶパネルを提供するライブラリです。

struct TextFieldPanel
The text field panel struct.
TextFieldPanel newTextFieldPanel(int x, int y, int width, int height, string labelText[ ], string defaultText[ ])
Creates a text field panel.
void deleteComponent(TextFieldPanel &panelInstance)
Destroys a text field panel.
void paintComponent(TextFieldPanel &panelInstance)
Repaints a text field panel.
void mountComponent(TextFieldPanel &panelInstance, int componentID)
Mounts a text field panel onto another GUI component.
void demountComponent(TextFieldPanel &panelInstance, int componentID)
Demounts a text field panel from another GUI component.
void setLabelWidth(TextFieldPanel &panelInstance, int labelWidth)
This function is supported for compatibility. Use getTextLabelWidth.Sets the width of the label area.
void setTextLabelWidth(TextFieldPanel &panelInstance, int labelWidth)
Sets the width of the label area.
int getPanel(TextFieldPanel &panelInstance)
Returns the component ID of the panel.
int getTextField(TextFieldPanel &panelInstance, string labelText)
Gets the text field corresponding to the specified label.
int getTextField(TextFieldPanel &panelInstance, int index)
Gets the text field at the specified index.
int[ ] getComponentSize(TextFieldPanel &panelInstance)
Returns the size of the panel.
void setComponentSize(TextFieldPanel &panelInstance, int width, int height)
Sets the size of the panel.
void setComponentSize(TextFieldPanel &panelInstance)
Automatically adjusts the sizes of the internal components to match the current panel size. Use this when the panel size has been changed externally.
int[ ] getComponentLocation(TextFieldPanel &panelInstance)
Returns the location of the panel.
void setComponentLocation(TextFieldPanel &panelInstance, int x, int y)
Sets the location of the panel.

gui.TextFieldWindow ライブラリ

GUI部品として、テキストフィールドが並ぶウィンドウを提供するライブラリです。

struct TextFieldWindow
The text field window struct.
TextFieldWindow newTextFieldWindow(int x, int y, int width, int height, string title, string labelText[ ], string defaultValue[ ])
Creates a text field window with its size determined automatically.
TextFieldWindow newTextFieldWindow(string labelText[ ], string defaultValue[ ])
Creates a text field window with its size determined automatically.
void deleteComponent(TextFieldWindow &windowInstance)
Destroys a text field window.
void setTextLabelWidth(TextFieldWindow &windowInstance, int labelWidth)
Sets the width of the label area.
void setButton(TextFieldWindow &windowInstance, string label)
Displays a button at the bottom of the window.
int getButton(TextFieldWindow &windowInstance)
Gets the GUI component ID of the button.
int getWindow(TextFieldWindow &windowInstance)
Gets the GUI component ID of the window.
int getTextField(TextFieldWindow &windowInstance, string labelText)
Gets the text field corresponding to the specified label.
int getTextField(TextFieldWindow &windowInstance, int index)
Gets the text field at the specified index.
int[ ] getComponentSize(TextFieldWindow &windowInstance)
Returns the size of the window.
void setComponentSize(TextFieldWindow &windowInstance, int width, int height)
Sets the size of the window.
void setComponentSize(TextFieldWindow &windowInstance)
Automatically adjusts the sizes of the internal components to match the current window size. Use this when the window size has been changed externally.
int[ ] getComponentLocation(TextFieldWindow &windowInstance)
Returns the location of the window.
int[ ] getComponentLocation(TextFieldWindow &windowInstance)
Returns the location of the window.
void setComponentLocation(TextFieldWindow &windowInstance, int x, int y)
Sets the location of the window.
void paintComponent(TextFieldWindow &windowInstance)
Repaints the window.
void hideComponent(TextFieldWindow &windowInstance)
Hides the window.
void showComponent(TextFieldWindow &windowInstance)
Shows the window.