vrsphere
Module: Maths
A sphere.
#include <lua_api.h>
Public Functions
Type | Name |
---|---|
boolean | contains(Any b) (vrTestContain) Returns whether or object A completly contains object B. |
Any | copy() (vrCopy) Returns a copy of a Vector, Matrix, Ray, Sphere, AABBox, Quaternion or Plane |
boolean | intersects(Any b) (vrTestIntersection) Returns whether or not two objects are intersecting one another. |
vrsphere | merge(vrsphere](../classes/vrsphere.mdx) right) (vrSphereMerge) Returns a sphere that encapsulates two spheres. |
Any | operator=() |
vrsphere | transform(vrmatrix4](../classes/vrmatrix4.mdx) matrix) (vrSphereTransform) Returns a sphere transformed by a matrix. |
Public Attributes
Type | Name |
---|---|
vrvec3 | center Centre of the sphere. |
vrvec3 | centre Centre of the sphere. |
number | radius Radius of the sphere. |
Public Functions Documentation
contains
boolean contains(
Any b
)
(vrTestContain) Returns whether or object A completly contains object B.
Parameters:
- b A sphere, AABB, or vec3
Return: true if b is inside a
copy
Any copy()
(vrCopy) Returns a copy of a Vector, Matrix, Ray, Sphere, AABBox, Quaternion or Plane
intersects
boolean intersects(
Any b
)
(vrTestIntersection) Returns whether or not two objects are intersecting one another.
Parameters:
- b A sphere or AABB
Return: True if the objects are intersecting
merge
vrsphere merge(
vrsphere right
)
(vrSphereMerge) Returns a sphere that encapsulates two spheres.
operator=
Any operator=()
transform
vrsphere transform(
vrmatrix4 matrix
)
(vrSphereTransform) Returns a sphere transformed by a matrix.
Public Attributes Documentation
center
vrvec3 center;
Centre of the sphere.
centre
vrvec3 centre;
Centre of the sphere.
radius
number radius;
Radius of the sphere.