OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::ArraySphere Class Reference

Cache-friendly array of Sphere represented as a SoA array. More...

#include <OgreArraySphere.h>

+ Collaboration diagram for Ogre::ArraySphere:

Public Member Functions

 ArraySphere ()
 
 ArraySphere ()
 
 ArraySphere ()
 
 ArraySphere (const ArrayReal &radius, const ArrayVector3 &center)
 
 ArraySphere (const ArrayReal &radius, const ArrayVector3 &center)
 
 ArraySphere (const ArrayReal &radius, const ArrayVector3 &center)
 
void getAsSphere (Sphere &out, size_t index) const
 
void getAsSphere (Sphere &out, size_t index) const
 
void getAsSphere (Sphere &out, size_t index) const
 
Sphere getAsSphere (size_t index) const
 Prefer using. More...
 
Sphere getAsSphere (size_t index) const
 Prefer using. More...
 
Sphere getAsSphere (size_t index) const
 Prefer using. More...
 
ArrayMaskR intersects (const ArraySphere &s) const
 Returns whether or not this sphere intersects another sphere. More...
 
ArrayReal intersects (const ArraySphere &s) const
 Returns whether or not this sphere intersects another sphere. More...
 
ArrayMaskR intersects (const ArraySphere &s) const
 Returns whether or not this sphere intersects another sphere. More...
 
ArrayMaskR intersects (const ArrayAabb &aabb) const
 Returns whether or not this sphere intersects another sphere. More...
 
ArrayMaskR intersects (const ArrayAabb &aabb) const
 Returns whether or not this sphere intersects another sphere. More...
 
ArrayReal intersects (const ArrayAabb &aabb) const
 Returns whether or not this sphere intersects another sphere. More...
 
ArrayReal intersects (const ArrayVector3 &v) const
 Returns whether or not this sphere intersects another sphere. More...
 
ArrayMaskR intersects (const ArrayVector3 &v) const
 Returns whether or not this sphere intersects another sphere. More...
 
ArrayMaskR intersects (const ArrayVector3 &v) const
 Returns whether or not this sphere intersects another sphere. More...
 
void setAll (const Sphere &sphere)
 Sets all packed spheres to the same value as the scalar input sphere. More...
 
void setAll (const Sphere &sphere)
 Sets all packed spheres to the same value as the scalar input sphere. More...
 
void setAll (const Sphere &sphere)
 Sets all packed spheres to the same value as the scalar input sphere. More...
 
void setFromSphere (const Sphere &sphere, size_t index)
 
void setFromSphere (const Sphere &sphere, size_t index)
 
void setFromSphere (const Sphere &sphere, size_t index)
 

Public Attributes

ArrayVector3 mCenter
 
ArrayReal mRadius
 

Detailed Description

Cache-friendly array of Sphere represented as a SoA array.

Remarks
ArraySphere is a SIMD & cache-friendly version of Sphere. ArrayVector3 for more information.
Extracting one sphere needs 64 bytes, which is within the 64 byte size of common cache lines. Architectures where the cache line == 32 bytes may want to set ARRAY_PACKED_REALS = 2 depending on their needs

Definition at line 58 of file C/OgreArraySphere.h.

Constructor & Destructor Documentation

Ogre::ArraySphere::ArraySphere ( )
inline

Definition at line 64 of file C/OgreArraySphere.h.

Ogre::ArraySphere::ArraySphere ( const ArrayReal radius,
const ArrayVector3 center 
)
inline

Definition at line 68 of file C/OgreArraySphere.h.

Ogre::ArraySphere::ArraySphere ( )
inline

Definition at line 64 of file NEON/Single/OgreArraySphere.h.

Ogre::ArraySphere::ArraySphere ( const ArrayReal radius,
const ArrayVector3 center 
)
inline

Definition at line 68 of file NEON/Single/OgreArraySphere.h.

Ogre::ArraySphere::ArraySphere ( )
inline

Definition at line 64 of file SSE2/Single/OgreArraySphere.h.

Ogre::ArraySphere::ArraySphere ( const ArrayReal radius,
const ArrayVector3 center 
)
inline

Definition at line 68 of file SSE2/Single/OgreArraySphere.h.

Member Function Documentation

void Ogre::ArraySphere::getAsSphere ( Sphere out,
size_t  index 
) const
inline

Definition at line 74 of file C/OgreArraySphere.h.

References Ogre::Sphere::setCenter(), and Ogre::Sphere::setRadius().

void Ogre::ArraySphere::getAsSphere ( Sphere out,
size_t  index 
) const
inline
void Ogre::ArraySphere::getAsSphere ( Sphere out,
size_t  index 
) const
inline
Sphere Ogre::ArraySphere::getAsSphere ( size_t  index) const
inline

Prefer using.

See also
getAsSphere() because this function may have more overhead (the other one is faster)

Definition at line 87 of file C/OgreArraySphere.h.

Sphere Ogre::ArraySphere::getAsSphere ( size_t  index) const
inline

Prefer using.

See also
getAsSphere() because this function may have more overhead (the other one is faster)

Definition at line 87 of file SSE2/Single/OgreArraySphere.h.

Sphere Ogre::ArraySphere::getAsSphere ( size_t  index) const
inline

Prefer using.

See also
getAsSphere() because this function may have more overhead (the other one is faster)

Definition at line 87 of file NEON/Single/OgreArraySphere.h.

ArrayReal Ogre::ArraySphere::intersects ( const ArraySphere s) const
inline

Returns whether or not this sphere intersects another sphere.

ArrayMaskR Ogre::ArraySphere::intersects ( const ArraySphere s) const
inline

Returns whether or not this sphere intersects another sphere.

ArrayMaskR Ogre::ArraySphere::intersects ( const ArraySphere s) const
inline

Returns whether or not this sphere intersects another sphere.

ArrayReal Ogre::ArraySphere::intersects ( const ArrayAabb aabb) const
inline

Returns whether or not this sphere intersects another sphere.

ArrayMaskR Ogre::ArraySphere::intersects ( const ArrayAabb aabb) const
inline

Returns whether or not this sphere intersects another sphere.

ArrayMaskR Ogre::ArraySphere::intersects ( const ArrayAabb aabb) const
inline

Returns whether or not this sphere intersects another sphere.

ArrayReal Ogre::ArraySphere::intersects ( const ArrayVector3 v) const
inline

Returns whether or not this sphere intersects another sphere.

ArrayMaskR Ogre::ArraySphere::intersects ( const ArrayVector3 v) const
inline

Returns whether or not this sphere intersects another sphere.

ArrayMaskR Ogre::ArraySphere::intersects ( const ArrayVector3 v) const
inline

Returns whether or not this sphere intersects another sphere.

void Ogre::ArraySphere::setAll ( const Sphere sphere)
inline

Sets all packed spheres to the same value as the scalar input sphere.

Definition at line 102 of file SSE2/Single/OgreArraySphere.h.

References Ogre::Sphere::getCenter(), Ogre::Sphere::getRadius(), Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

void Ogre::ArraySphere::setAll ( const Sphere sphere)
inline

Sets all packed spheres to the same value as the scalar input sphere.

Definition at line 102 of file C/OgreArraySphere.h.

References Ogre::Sphere::getCenter(), Ogre::Sphere::getRadius(), Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

void Ogre::ArraySphere::setAll ( const Sphere sphere)
inline

Sets all packed spheres to the same value as the scalar input sphere.

Definition at line 102 of file NEON/Single/OgreArraySphere.h.

References Ogre::Sphere::getCenter(), Ogre::Sphere::getRadius(), Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

void Ogre::ArraySphere::setFromSphere ( const Sphere sphere,
size_t  index 
)
inline
void Ogre::ArraySphere::setFromSphere ( const Sphere sphere,
size_t  index 
)
inline
void Ogre::ArraySphere::setFromSphere ( const Sphere sphere,
size_t  index 
)
inline

Definition at line 94 of file C/OgreArraySphere.h.

References Ogre::Sphere::getCenter(), and Ogre::Sphere::getRadius().

Member Data Documentation

ArrayVector3 Ogre::ArraySphere::mCenter

Definition at line 62 of file C/OgreArraySphere.h.

ArrayReal Ogre::ArraySphere::mRadius

Definition at line 61 of file C/OgreArraySphere.h.


The documentation for this class was generated from the following file: