Lines Matching refs:sphere
124 * rsIsSphereInFrustum: Checks if a sphere is within the frustum planes
126 * Returns true if the sphere is within the 6 frustum planes.
129 * sphere: float4 representing the sphere.
139 rsIsSphereInFrustum(float4* sphere, float4* left, float4* right, float4* top, float4* bottom,
141 float distToCenter = dot(left->xyz, sphere->xyz) + left->w;
142 if (distToCenter < -sphere->w) {
145 distToCenter = dot(right->xyz, sphere->xyz) + right->w;
146 if (distToCenter < -sphere->w) {
149 distToCenter = dot(top->xyz, sphere->xyz) + top->w;
150 if (distToCenter < -sphere->w) {
153 distToCenter = dot(bottom->xyz, sphere->xyz) + bottom->w;
154 if (distToCenter < -sphere->w) {
157 distToCenter = dot(near->xyz, sphere->xyz) + near->w;
158 if (distToCenter < -sphere->w) {
161 distToCenter = dot(far->xyz, sphere->xyz) + far->w;
162 if (distToCenter < -sphere->w) {
171 rsIsSphereInFrustum(float4* sphere, float4* left, float4* right, float4* top, float4* bottom,