ActiViz .NET
5.8.0
|
vtkFastNumericConversion - Enables fast conversion of floating point to fixed point More...
Public Member Functions | |
vtkFastNumericConversion (IntPtr rawCppThis, bool callDisposalMethod, bool strong) | |
Automatically generated constructor - called from generated code. DO NOT call directly. | |
vtkFastNumericConversion () | |
Undocumented Block. | |
int | ConvertFixedPoint (ref double val, ref int fracPart) |
Add one to the requested number of fractional bits, to make the conversion safe with respect to rounding mode. This is the same as the difference between QuickFloor and SafeFloor. | |
override int | IsA (string type) |
Undocumented Block. | |
new vtkFastNumericConversion | NewInstance () |
Undocumented Block. | |
void | SetReservedFracBits (int bits) |
Set the number of bits reserved for fractional precision that are maintained as part of the flooring process. This number affects the flooring arithmetic. It may be useful if the factional part is to be used to index into a lookup table of some sort. However, if you are only interested in knowing the fractional remainder after flooring, there doesn't appear to be any advantage to using these bits, either in terms of a lookup table, or by directly multiplying by some unit fraction, over simply subtracting the floored value from the original value. Note that since only 32 bits are used for the entire fixed point representation, increasing the number of reserved fractional bits reduces the range of integer values that can be floored to. | |
int | TestConvertFixedPointFracPart (double val) |
Undocumented Block. | |
int | TestConvertFixedPointIntPart (double val) |
Undocumented Block. | |
int | TestQuickFloor (double val) |
Undocumented Block. | |
int | TestRound (double val) |
Undocumented Block. | |
int | TestSafeFloor (double val) |
Undocumented Block. | |
Static Public Member Functions | |
static new vtkFastNumericConversion | New () |
Undocumented Block. | |
static new int | IsTypeOf (string type) |
Undocumented Block. | |
static int | QuickFloor (ref double val) |
Add one to the requested number of fractional bits, to make the conversion safe with respect to rounding mode. This is the same as the difference between QuickFloor and SafeFloor. | |
static int | Round (ref double val) |
Add one to the requested number of fractional bits, to make the conversion safe with respect to rounding mode. This is the same as the difference between QuickFloor and SafeFloor. | |
static double | RoundingTieBreaker () |
Undocumented Block. | |
static new vtkFastNumericConversion | SafeDownCast (vtkObjectBase o) |
Undocumented Block. | |
static int | SafeFloor (ref double val) |
Add one to the requested number of fractional bits, to make the conversion safe with respect to rounding mode. This is the same as the difference between QuickFloor and SafeFloor. | |
Public Attributes | |
new const string | MRFullTypeName = "Kitware.VTK.vtkFastNumericConversion" |
Automatically generated type registration mechanics. | |
Static Public Attributes | |
static new readonly string | MRClassNameKey = "24vtkFastNumericConversion" |
Automatically generated type registration mechanics. | |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly. | |
Private Member Functions | |
static internal IntPtr | vtkFastNumericConversion_New (ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount) |
static internal int | vtkFastNumericConversion_ConvertFixedPoint_01 (HandleRef pThis, ref double val, ref int fracPart) |
static internal int | vtkFastNumericConversion_IsA_02 (HandleRef pThis, string type) |
static internal int | vtkFastNumericConversion_IsTypeOf_03 (string type) |
static internal IntPtr | vtkFastNumericConversion_NewInstance_05 (HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount) |
static internal int | vtkFastNumericConversion_QuickFloor_06 (ref double val) |
static internal int | vtkFastNumericConversion_Round_07 (ref double val) |
static internal double | vtkFastNumericConversion_RoundingTieBreaker_08 () |
static internal IntPtr | vtkFastNumericConversion_SafeDownCast_09 (HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount) |
static internal int | vtkFastNumericConversion_SafeFloor_10 (ref double val) |
static internal void | vtkFastNumericConversion_SetReservedFracBits_11 (HandleRef pThis, int bits) |
static internal int | vtkFastNumericConversion_TestConvertFixedPointFracPart_12 (HandleRef pThis, double val) |
static internal int | vtkFastNumericConversion_TestConvertFixedPointIntPart_13 (HandleRef pThis, double val) |
static internal int | vtkFastNumericConversion_TestQuickFloor_14 (HandleRef pThis, double val) |
static internal int | vtkFastNumericConversion_TestRound_15 (HandleRef pThis, double val) |
static internal int | vtkFastNumericConversion_TestSafeFloor_16 (HandleRef pThis, double val) |
Static Private Member Functions | |
static | vtkFastNumericConversion () |
Automatically generated type registration mechanics. |
vtkFastNumericConversion - Enables fast conversion of floating point to fixed point
Description vtkFastNumericConversion uses a portable (assuming IEEE format) method for converting single and double precision floating point values to a fixed point representation. This allows fast integer floor operations on platforms, such as Intel X86, in which CPU floating point conversion algorithms are very slow. It is based on the techniques described in Chris Hecker's article, "Let's Get to the (Floating) Point", in Game Developer Magazine, Feb/Mar 1996, and the techniques described in Michael Herf's website, http://www.stereopsis.com/FPU.html. The Hecker article can be found at http://www.d6.com/users/checker/pdfs/gdmfp.pdf. Unfortunately, each of these techniques is incomplete, and doesn't convert properly, in a way that depends on how many bits are reserved for fixed point fractional use, due to failing to properly account for the default round-towards-even rounding mode of the X86. Thus, my implementation incorporates some rounding correction that undoes the rounding that the FPU performs during denormalization of the floating point value. Note that the rounding affect I'm talking about here is not the effect on the fistp instruction, but rather the effect that occurs during the denormalization of a value that occurs when adding it to a much larger value. The bits must be shifted to the right, and when a "1" bit falls off the edge, the rounding mode determines what happens next, in order to avoid completely "losing" the 1-bit. Furthermore, my implementation works on Linux, where the default precision mode is 64-bit extended precision.
static Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion | ( | ) | [static, private] |
Automatically generated type registration mechanics.
Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion | ( | IntPtr | rawCppThis, |
bool | callDisposalMethod, | ||
bool | strong | ||
) |
Automatically generated constructor - called from generated code. DO NOT call directly.
Undocumented Block.
int Kitware.VTK.vtkFastNumericConversion.ConvertFixedPoint | ( | ref double | val, |
ref int | fracPart | ||
) |
Add one to the requested number of fractional bits, to make the conversion safe with respect to rounding mode. This is the same as the difference between QuickFloor and SafeFloor.
override void Kitware.VTK.vtkFastNumericConversion.Dispose | ( | bool | disposing | ) | [protected] |
Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.
Reimplemented from Kitware.VTK.vtkObject.
override int Kitware.VTK.vtkFastNumericConversion.IsA | ( | string | type | ) | [virtual] |
Undocumented Block.
Reimplemented from Kitware.VTK.vtkObject.
static new int Kitware.VTK.vtkFastNumericConversion.IsTypeOf | ( | string | type | ) | [static] |
Undocumented Block.
Reimplemented from Kitware.VTK.vtkObject.
static new vtkFastNumericConversion Kitware.VTK.vtkFastNumericConversion.New | ( | ) | [static] |
Undocumented Block.
Reimplemented from Kitware.VTK.vtkObject.
Undocumented Block.
Reimplemented from Kitware.VTK.vtkObject.
static int Kitware.VTK.vtkFastNumericConversion.QuickFloor | ( | ref double | val | ) | [static] |
Add one to the requested number of fractional bits, to make the conversion safe with respect to rounding mode. This is the same as the difference between QuickFloor and SafeFloor.
static int Kitware.VTK.vtkFastNumericConversion.Round | ( | ref double | val | ) | [static] |
Add one to the requested number of fractional bits, to make the conversion safe with respect to rounding mode. This is the same as the difference between QuickFloor and SafeFloor.
static double Kitware.VTK.vtkFastNumericConversion.RoundingTieBreaker | ( | ) | [static] |
Undocumented Block.
static new vtkFastNumericConversion Kitware.VTK.vtkFastNumericConversion.SafeDownCast | ( | vtkObjectBase | o | ) | [static] |
Undocumented Block.
Reimplemented from Kitware.VTK.vtkObject.
static int Kitware.VTK.vtkFastNumericConversion.SafeFloor | ( | ref double | val | ) | [static] |
Add one to the requested number of fractional bits, to make the conversion safe with respect to rounding mode. This is the same as the difference between QuickFloor and SafeFloor.
void Kitware.VTK.vtkFastNumericConversion.SetReservedFracBits | ( | int | bits | ) |
Set the number of bits reserved for fractional precision that are maintained as part of the flooring process. This number affects the flooring arithmetic. It may be useful if the factional part is to be used to index into a lookup table of some sort. However, if you are only interested in knowing the fractional remainder after flooring, there doesn't appear to be any advantage to using these bits, either in terms of a lookup table, or by directly multiplying by some unit fraction, over simply subtracting the floored value from the original value. Note that since only 32 bits are used for the entire fixed point representation, increasing the number of reserved fractional bits reduces the range of integer values that can be floored to.
int Kitware.VTK.vtkFastNumericConversion.TestConvertFixedPointFracPart | ( | double | val | ) |
Undocumented Block.
int Kitware.VTK.vtkFastNumericConversion.TestConvertFixedPointIntPart | ( | double | val | ) |
Undocumented Block.
int Kitware.VTK.vtkFastNumericConversion.TestQuickFloor | ( | double | val | ) |
Undocumented Block.
int Kitware.VTK.vtkFastNumericConversion.TestRound | ( | double | val | ) |
Undocumented Block.
int Kitware.VTK.vtkFastNumericConversion.TestSafeFloor | ( | double | val | ) |
Undocumented Block.
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_ConvertFixedPoint_01 | ( | HandleRef | pThis, |
ref double | val, | ||
ref int | fracPart | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_IsA_02 | ( | HandleRef | pThis, |
string | type | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_IsTypeOf_03 | ( | string | type | ) | [private] |
static internal IntPtr Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_New | ( | ref uint | mteStatus, |
ref uint | mteIndex, | ||
ref uint | rawRefCount | ||
) | [private] |
static internal IntPtr Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_NewInstance_05 | ( | HandleRef | pThis, |
ref uint | mteStatus, | ||
ref uint | mteIndex, | ||
ref uint | rawRefCount | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_QuickFloor_06 | ( | ref double | val | ) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_Round_07 | ( | ref double | val | ) | [private] |
static internal double Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_RoundingTieBreaker_08 | ( | ) | [private] |
static internal IntPtr Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_SafeDownCast_09 | ( | HandleRef | o, |
ref uint | mteStatus, | ||
ref uint | mteIndex, | ||
ref uint | rawRefCount | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_SafeFloor_10 | ( | ref double | val | ) | [private] |
static internal void Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_SetReservedFracBits_11 | ( | HandleRef | pThis, |
int | bits | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_TestConvertFixedPointFracPart_12 | ( | HandleRef | pThis, |
double | val | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_TestConvertFixedPointIntPart_13 | ( | HandleRef | pThis, |
double | val | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_TestQuickFloor_14 | ( | HandleRef | pThis, |
double | val | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_TestRound_15 | ( | HandleRef | pThis, |
double | val | ||
) | [private] |
static internal int Kitware.VTK.vtkFastNumericConversion.vtkFastNumericConversion_TestSafeFloor_16 | ( | HandleRef | pThis, |
double | val | ||
) | [private] |
new readonly string Kitware.VTK.vtkFastNumericConversion.MRClassNameKey = "24vtkFastNumericConversion" [static] |
Automatically generated type registration mechanics.
Reimplemented from Kitware.VTK.vtkObject.
new const string Kitware.VTK.vtkFastNumericConversion.MRFullTypeName = "Kitware.VTK.vtkFastNumericConversion" |
Automatically generated type registration mechanics.
Reimplemented from Kitware.VTK.vtkObject.