This is the staging area for the fieldOfView plugins for krpano. A copy of these pages is included on krpano.com. The pages in this staging area may be newer than the respective pages on krpano.com.
Vectormath Plugin vectormath.swf
for Flash
This plugin provides a number of tigonometry and vector math methods.
- sin(destVar, angle)
- Sets destVar to the sine of 'angle'.
- cos(destVar, angle)
- Sets destVar to the cosine of 'angle'.
- tan(destVar, angle)
- Sets destVar to the tangens of 'angle'.
- asin(destVar, number)
- Sets destVar to the inverse sine of 'number'.
- acos(destVar, number)
- Sets destVar to the inverse cosine of 'number'.
- atan(destVar, number)
- Sets destVar to the inverse tangent of 'number'.
- atan2(destVar, opposite, adjacent)
- Sets destVar to the inverse tangent of 'opposite'/'adjacent'.
- anglebetween(destVar, ath1, atv1, ath2, atv2)
- Sets destVar to the angle between the two vectors defined by ('ath1', 'atv1') and ('ath2', 'atv2').
- normal(destVarH, destVarV, ath1, atv1, ath2, atv2)
- Sets destVarH and destVarV to align with the normal of the two vectors defined by ('ath1', 'atv1') and ('ath2', 'atv2').
- rotatevector(destVarH, destVarV, destVarRotate, ath1, atv1, rotate1, ath2, atv2, rotate2)
- Sets destVarH, destVarV and destVarRotate to align with the vector ('ath1', 'atv1', 'rotate1') after it has been rotated by ('ath2', 'atv2', 'rotate2').
Note that all parameters except destVar are taken as literals. If you want to pass the value of a variable or property, you have to use the get() function.
All angles are specified and returned in degrees, and axis rotations are done in the same order as in krpano.
The plugin can be used free of charge, in commercial or non-commercial applications. The source code is available under a Creative Commons Attribution license.
In a nutshell, this means you are free to use the software and its source code in your projects. If you use the source code in another software project, you are required to add attribution to the author(s). You are encouraged to share the your source code under a similar fashion, but it is not a requirement.
If you use the plugins regularly, you may consider making a donation so I can afford to continue making these plugins and making them available.