Oolite
Loading...
Searching...
No Matches
Octree.m File Reference
import "Octree.h"
import "Entity.h"
import "NSObjectOOExtensions.h"
import "OOCollectionExtractors.h"
import "OODebugFlags.h"
import "OODebugGLDrawing.h"
import "OOMacroOpenGL.h"
import "OOMaths.h"
import "OOOpenGL.h"
Include dependency graph for Octree.m:

Go to the source code of this file.

Classes

struct  Octree_details
category  Octree(Private)

Macros

#define OctreeDebugLog(...)

Enumerations

enum  { kMinimumBuilderCapacity = 16 << 10 }

Functions

static BOOL isHitByLine (const int *octbuffer, unsigned char *collbuffer, int level, GLfloat rad, Vector v0, Vector v1, Vector off, int face_hit)
static GLfloat volumeOfOctree (Octree_details octree_details, unsigned depthLimit)
static Vector randomFullNodeFrom (Octree_details details, Vector offset)
static BOOL isHitByOctree (Octree_details axialDetails, Octree_details otherDetails, Vector delta, Triangle other_ijk)

Variables

static const int change_oct [] = { 0, 1, 2, 4, 3, 5, 6, 7 }
static BOOL hasCollided = NO
static GLfloat hit_dist = 0.0

Macro Definition Documentation

◆ OctreeDebugLog

#define OctreeDebugLog ( ...)
Value:
do { \
} while (0)

Definition at line 42 of file Octree.m.

42#define OctreeDebugLog(...) \
43 do { \
44 } while (0)

Referenced by Octree::isHitByLine, Octree::isHitByLine:v1:, and Octree::isHitByOctree.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMinimumBuilderCapacity 

Definition at line 730 of file Octree.m.

730 {
731 /*
732 Initial capacity of OOOctreeBuilder. 16 KibiEntries is enough to handle
733 all but 2 built-in models; I expect similar results for OXPs, since
734 geometry detail has limited effect on the octree. Large models with
735 higher depth are more likely to need growth.
736 */
737 kMinimumBuilderCapacity = 16 << 10
738};
@ kMinimumBuilderCapacity
Definition Octree.m:737

Function Documentation

◆ isHitByLine()

BOOL isHitByLine ( const int * octbuffer,
unsigned char * collbuffer,
int level,
GLfloat rad,
Vector v0,
Vector v1,
Vector off,
int face_hit )
static

Referenced by Octree::isHitByLine:v1:, and Octree::isHitByLineSub.

Here is the caller graph for this function:

◆ isHitByOctree()

BOOL isHitByOctree ( Octree_details axialDetails,
Octree_details otherDetails,
Vector delta,
Triangle other_ijk )
static

Referenced by ShipEntity::doOctreesCollide, Octree::isHitByOctree, Octree::isHitByOctree:withOrigin:andIJK:, and Octree::isHitByOctree:withOrigin:andIJK:s1:s2:.

Here is the caller graph for this function:

◆ randomFullNodeFrom()

Vector randomFullNodeFrom ( Octree_details details,
Vector offset )
static

Referenced by Octree::randomFullNodeFrom, and Octree::randomPoint.

Here is the caller graph for this function:

◆ volumeOfOctree()

GLfloat volumeOfOctree ( Octree_details octree_details,
unsigned depthLimit )
static

Referenced by Octree::volume, and Octree::volumeOfOctree.

Here is the caller graph for this function:

Variable Documentation

◆ change_oct

const int change_oct[] = { 0, 1, 2, 4, 3, 5, 6, 7 }
static

Definition at line 70 of file Octree.m.

70{ 0, 1, 2, 4, 3, 5, 6, 7 }; // used to move from nearest to furthest octant

Referenced by Octree::isHitByOctree.

◆ hasCollided

BOOL hasCollided = NO
static

Definition at line 345 of file Octree.m.

Referenced by Octree::isHitByLine, and Octree::isHitByLine:v1:.

◆ hit_dist

GLfloat hit_dist = 0.0
static

Definition at line 346 of file Octree.m.

Referenced by Octree::isHitByLine, and Octree::isHitByLine:v1:.