![]() |
VR-Forces Developer's Guide
|
Hold a value in the range of [0, 2PI) in the number of bits specified used by T_Storage. This has the precision of 2PI / 2^16 Note: If set to any values outside the range, the value will be converted into the range [-PI, PI). For example, 2PI+1 will become 1. Template class allows for instantiation of angles with different precisions using different storage classes. T_Storage should be something like a DtU16, DtU32, etc.

Public Member Functions | |
| DtFixedPointAngle () | |
| DtFixedPointAngle (double v) | |
| DtFixedPointAngle (const DtFixedPointAngle &rhs) | |
| DtFixedPointAngle & | operator= (const DtFixedPointAngle &rhs) |
| operator double () const | |
| void | setValue (double v) |
| double | value () const |
| double | precision () const |
| int | netRepSize () const |
| bool | setFromNet (const char *contentBuffer, unsigned contentSize=0) |
| bool | setToNet (char *contentBuffer) const |
Private Attributes | |
| T_Storage | myValue |
| DtFixedPointAngle< T_Storage >::DtFixedPointAngle | ( | ) |
| DtFixedPointAngle< T_Storage >::DtFixedPointAngle | ( | double | v | ) |
| DtFixedPointAngle< T_Storage >::DtFixedPointAngle | ( | const DtFixedPointAngle< T_Storage > & | rhs | ) |
| DtFixedPointAngle& DtFixedPointAngle< T_Storage >::operator= | ( | const DtFixedPointAngle< T_Storage > & | rhs | ) |
| DtFixedPointAngle< T_Storage >::operator double | ( | ) | const |
| void DtFixedPointAngle< T_Storage >::setValue | ( | double | v | ) |
Set the value of the angle in radians.
| double DtFixedPointAngle< T_Storage >::value | ( | ) | const |
The value of the angle in radians.
| double DtFixedPointAngle< T_Storage >::precision | ( | ) | const |
| int DtFixedPointAngle< T_Storage >::netRepSize | ( | ) | const |
Returns the size of the full network representation padded to an 8-byte boundary.
| bool DtFixedPointAngle< T_Storage >::setFromNet | ( | const char * | contentBuffer, |
| unsigned | contentSize = 0 |
||
| ) |
Fills in the task from the network buffer. Content size is not used.
| bool DtFixedPointAngle< T_Storage >::setToNet | ( | char * | contentBuffer | ) | const |
Fills in the network buffer with the task contents. Buffer must be allocated by the caller, with size netRepSize.
|
private |