Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
Octree.m File Reference
import "Octree.h"
import "OOMaths.h"
import "Entity.h"
import "OOOpenGL.h"
import "OODebugGLDrawing.h"
import "OOMacroOpenGL.h"
import "OODebugFlags.h"
import "NSObjectOOExtensions.h"
import "OOCollectionExtractors.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(format, ...)   do { if (EXPECT_NOT(gDebugFlags & DEBUG_OCTREE_LOGGING)) OOLog(@"octree.debug", format, ## __VA_ARGS__); } while (0)
 
#define OCTREE_COLOR(r, g, b, a)   do {} while (0)
 

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 drawTestForCollisions
 
static BOOL hasCollided = NO
 
static GLfloat hit_dist = 0.0
 

Macro Definition Documentation

◆ OCTREE_COLOR

#define OCTREE_COLOR ( r,
g,
b,
a )   do {} while (0)

Definition at line 200 of file Octree.m.

◆ OctreeDebugLog

#define OctreeDebugLog ( format,
... )   do { if (EXPECT_NOT(gDebugFlags & DEBUG_OCTREE_LOGGING)) OOLog(@"octree.debug", format, ## __VA_ARGS__); } while (0)

Definition at line 37 of file Octree.m.

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMinimumBuilderCapacity 

Definition at line 779 of file Octree.m.

780{
781 /*
782 Initial capacity of OOOctreeBuilder. 16 KibiEntries is enough to handle
783 all but 2 built-in models; I expect similar results for OXPs, since
784 geometry detail has limited effect on the octree. Large models with
785 higher depth are more likely to need growth.
786 */
787 kMinimumBuilderCapacity = 16 << 10
788};
@ kMinimumBuilderCapacity
Definition Octree.m:787

Function Documentation

◆ isHitByLine()

static 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::isHitByLineSub.

+ Here is the caller graph for this function:

◆ isHitByOctree()

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

Referenced by ShipEntity::absoluteIJKForSubentity, and Octree::dictionaryRepresentation.

+ Here is the caller graph for this function:

◆ randomFullNodeFrom()

static Vector randomFullNodeFrom ( Octree_details details,
Vector offset )
static

Referenced by Octree::randomFullNodeFrom.

+ Here is the caller graph for this function:

◆ volumeOfOctree()

static GLfloat volumeOfOctree ( Octree_details octree_details,
unsigned depthLimit )
static

Referenced by Octree::volume.

+ 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 68 of file Octree.m.

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

Referenced by Octree::dictionaryRepresentation.

◆ drawTestForCollisions

BOOL drawTestForCollisions
static

Definition at line 270 of file Octree.m.

Referenced by Octree(Private)::drawOctreeCollisionFromLocation:loc:scale:.

◆ hasCollided

BOOL hasCollided = NO
static

Definition at line 370 of file Octree.m.

Referenced by Octree::isHitByLine.

◆ hit_dist

GLfloat hit_dist = 0.0
static

Definition at line 371 of file Octree.m.

Referenced by Octree::isHitByLine.