OGRE-Next  3.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::ArraySphere Class Reference

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

#include <OgreArraySphere.h>

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)
 
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...
 
void getAsSphere (Sphere &out, size_t index) const
 
void getAsSphere (Sphere &out, size_t index) const
 
void getAsSphere (Sphere &out, size_t index) const
 
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...
 
ArrayMaskR 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...
 
ArrayReal intersects (const ArraySphere &s) 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...
 
ArrayReal 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. See 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

Constructor & Destructor Documentation

◆ ArraySphere() [1/6]

Ogre::ArraySphere::ArraySphere ( )
inline

◆ ArraySphere() [2/6]

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

◆ ArraySphere() [3/6]

Ogre::ArraySphere::ArraySphere ( )
inline

◆ ArraySphere() [4/6]

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

◆ ArraySphere() [5/6]

Ogre::ArraySphere::ArraySphere ( )
inline

◆ ArraySphere() [6/6]

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

Member Function Documentation

◆ getAsSphere() [1/6]

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)

◆ getAsSphere() [2/6]

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)

◆ getAsSphere() [3/6]

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)

◆ getAsSphere() [4/6]

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

◆ getAsSphere() [5/6]

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

◆ getAsSphere() [6/6]

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

◆ intersects() [1/9]

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

Returns whether or not this sphere intersects another sphere.

◆ intersects() [2/9]

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

Returns whether or not this sphere intersects another sphere.

◆ intersects() [3/9]

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

Returns whether or not this sphere intersects another sphere.

◆ intersects() [4/9]

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

Returns whether or not this sphere intersects another sphere.

◆ intersects() [5/9]

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

Returns whether or not this sphere intersects another sphere.

◆ intersects() [6/9]

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

Returns whether or not this sphere intersects another sphere.

◆ intersects() [7/9]

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

Returns whether or not this sphere intersects another sphere.

◆ intersects() [8/9]

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

Returns whether or not this sphere intersects another sphere.

◆ intersects() [9/9]

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

Returns whether or not this sphere intersects another sphere.

◆ setAll() [1/3]

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

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

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

◆ setAll() [2/3]

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

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

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

◆ setAll() [3/3]

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

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

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

◆ setFromSphere() [1/3]

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

◆ setFromSphere() [2/3]

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

◆ setFromSphere() [3/3]

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

Member Data Documentation

◆ mCenter

ArrayVector3 Ogre::ArraySphere::mCenter

◆ mRadius

ArrayReal Ogre::ArraySphere::mRadius

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