C# Class Tao.Ode.Ode.dVector3

显示文件 Open project: WolfgangSt/axiom

Public Properties

Property Type Description
SIMD_PADDING dReal
X dReal

Public Methods

Method Description
ToArray ( ) : dReal[]

dVector3 ( dReal x, dReal y, dReal z ) : System

this ( int index ) : dReal

Indexer to support use of array syntax as found in ODE examples X = 0, Y = 1, Z = 2

Method Details

ToArray() public method

public ToArray ( ) : dReal[]
return dReal[]

dVector3() public method

public dVector3 ( dReal x, dReal y, dReal z ) : System
x dReal
y dReal
z dReal
return System

this() public method

Indexer to support use of array syntax as found in ODE examples X = 0, Y = 1, Z = 2
public this ( int index ) : dReal
index int
return dReal

Property Details

SIMD_PADDING public_oe property

In ODE's common.h: typedef dReal dVector3[4]; From ODE mailing list: dVector3 is a dReal[4] to allow for future SIMD extension (the dMatrix3 is similarily defined). However, there may already be a speed difference by defining it as a dReal[4]; the reason is that properly alligned memory data can be accessed more efficiently by the CPU. You should go to great lengths to ensure that every instance of dVector3 in your projects are atleast 4-byte aligned (virtually default), 16-byte alignments are better still and usually need to be enforced. This ensures that memory access (read/write) can be performed just a little bit faster. For example: You'll notice that if you used dReal[3] for an array of dVector3, then not every vector would fall onto a 16-byte boundary (provided that the first vector was properly alligned). Whereas it is guaranteed with dReal[4] (provided that the first vector was properly alligned).
public dReal SIMD_PADDING
return dReal

X public_oe property

public dReal X
return dReal