Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - [Matrix1] Return Vectors into CSV Strings

Author
Message
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 7th Jul 2015 21:04 Edited at: 8th Jul 2015 22:05
This requires Matrix1 Utilities.

The vector CSV functions in this snippet provides you with what you need to quickly output text or assign values containing the position, rotation, scale or size of objects or limbs.

Rather than writing the following frequently used operation:

Text 0, 0, Str$( X Vector3(id), 1) + "," + Str$( Y Vector3(id), 1) + "," + Str$( Z Vector3(id), 1)

You can perform the same with less code by writing the following:

Text 0, 0, Vec3$( id, iDecimalPoints )

Each function has an additional version which returns the comma seperated string with spaces. All functions require a decimal point count.

Note: If a vector used with the string return function does not exist; or is of the wrong vector type; an error string is returned.

The object vector equivalent has been posted here



Login to post a reply

Server time is: 2024-11-21 12:13:18
Your offset time is: 2024-11-21 12:13:18