OGRE-Next: Ogre::ArraySphere Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Ogre::ArraySphere Class Reference
Core » Math

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.
Sphere | getAsSphere (size_t index) const
| Prefer using.
Sphere | getAsSphere (size_t index) const
| Prefer using.
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.
ArrayMaskR | intersects (const ArrayAabb &aabb) const
| Returns whether or not this sphere intersects another sphere.
ArrayReal | intersects (const ArrayAabb &aabb) const
| Returns whether or not this sphere intersects another sphere.
ArrayMaskR | intersects (const ArraySphere &s) const
| Returns whether or not this sphere intersects another sphere.
ArrayMaskR | intersects (const ArraySphere &s) const
| Returns whether or not this sphere intersects another sphere.
ArrayReal | intersects (const ArraySphere &s) const
| Returns whether or not this sphere intersects another sphere.
ArrayMaskR | intersects (const ArrayVector3 &v) const
| Returns whether or not this sphere intersects another sphere.
ArrayMaskR | intersects (const ArrayVector3 &v) const
| Returns whether or not this sphere intersects another sphere.
ArrayReal | intersects (const ArrayVector3 &v) const
| Returns whether or not this sphere intersects another sphere.
void | setAll (const Sphere &sphere)
| Sets all packed spheres to the same value as the scalar input sphere.
void | setAll (const Sphere &sphere)
| Sets all packed spheres to the same value as the scalar input sphere.
void | setAll (const Sphere &sphere)
| Sets all packed spheres to the same value as the scalar input sphere.
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

Referenced by intersects().

## ◆ ArraySphere() [2/6]

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

References mCenter, and mRadius.

## ◆ ArraySphere() [3/6]

Ogre::ArraySphere::ArraySphere | ( |  | ) |
| inline

## ◆ ArraySphere() [4/6]

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

References mCenter, and mRadius.

## ◆ ArraySphere() [5/6]

Ogre::ArraySphere::ArraySphere | ( |  | ) |
| inline

## ◆ ArraySphere() [6/6]

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

References mCenter, and mRadius.

## 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)

References getAsSphere().

## ◆ 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)

References getAsSphere().

## ◆ 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)

References getAsSphere().

## ◆ getAsSphere() [4/6]

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

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

Referenced by getAsSphere().

## ◆ getAsSphere() [5/6]

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

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

## ◆ getAsSphere() [6/6]

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

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

## ◆ 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.

References ArraySphere().

## ◆ intersects() [5/9]

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

Returns whether or not this sphere intersects another sphere.

References ArraySphere().

## ◆ intersects() [6/9]

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

Returns whether or not this sphere intersects another sphere.

References ArraySphere().

## ◆ 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(), mCenter, mRadius, 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(), mCenter, mRadius, 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(), mCenter, mRadius, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

## ◆ setFromSphere() [1/3]

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

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

## ◆ setFromSphere() [2/3]

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

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

## ◆ setFromSphere() [3/3]

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

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

## Member Data Documentation

## ◆ mCenter

ArrayVector3 Ogre::ArraySphere::mCenter

Referenced by ArraySphere(), getAsSphere(), setAll(), and setFromSphere().

## ◆ mRadius

ArrayReal Ogre::ArraySphere::mRadius

Referenced by ArraySphere(), getAsSphere(), setAll(), and setFromSphere().

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

- C/OgreArraySphere.h
- NEON/Single/OgreArraySphere.h
- SSE2/Single/OgreArraySphere.h