Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOCacheManager(Octree) Category Reference

#include <OOMesh.h>

Class Methods

(Octree *) + octreeForModel:
 
(void) + setOctree:forModel:
 
(static void) + VFRAddFace [implementation]
 
(static NSUInteger) + VFRGetCount [implementation]
 
(static NSUInteger) + VFRGetFaceAtIndex [implementation]
 

Detailed Description

Definition at line 192 of file OOMesh.h.

Method Documentation

◆ octreeForModel:

+ (Octree *) octreeForModel: (NSString *) inKey

Extends class OOCacheManager.

Definition at line 1792 of file OOMesh.m.

2239 :(NSString *)inKey
2240{
2241 NSDictionary *dict = nil;
2242 Octree *result = nil;
2243
2244 if (inKey == nil) return nil;
2245
2246 dict = [[self sharedCache] objectForKey:inKey inCache:kOOCacheOctrees];
2247 if (dict != nil)
2248 {
2249 result = [[Octree alloc] initWithDictionary:dict];
2250 [result autorelease];
2251 }
2252
2253 return result;
2254}
return nil

◆ setOctree:forModel:

+ (void) setOctree: (Octree *) inOctree
forModel: (NSString *) inKey 

Extends class OOCacheManager.

Definition at line 1792 of file OOMesh.m.

2257 :(Octree *)inOctree forModel:(NSString *)inKey
2258{
2259 if (inOctree != nil && inKey != nil)
2260 {
2261 [[self sharedCache] setObject:[inOctree dictionaryRepresentation] forKey:inKey inCache:kOOCacheOctrees];
2262 }
2263}
NSDictionary * dictionaryRepresentation()
Definition Octree.m:667

◆ VFRAddFace

+ (static void) VFRAddFace (VertexFaceRef *) vfr
(NSUInteger) index 
implementation

Extends class OOCacheManager.

Definition at line 2266 of file OOMesh.m.

2267{
2268 NSCParameterAssert(vfr != NULL);
2269
2270 if (index < UINT16_MAX && vfr->internCount < kVertexFaceDefInternalCount)
2271 {
2272 vfr->internFaces[vfr->internCount++] = index;
2273 }
2274 else
2275 {
2276 if (vfr->extra == nil) vfr->extra = [NSMutableArray array];
2277 [vfr->extra addObject:[NSNumber numberWithInteger:index]];
2278 }
2279}
@ kVertexFaceDefInternalCount
Definition OOMesh.m:113
uint16_t internFaces[kVertexFaceDefInternalCount]
Definition OOMesh.m:120
NSMutableArray * extra
Definition OOMesh.m:121

References VertexFaceRef::extra, VertexFaceRef::internFaces, kVertexFaceDefInternalCount, and nil.

◆ VFRGetCount

+ (static NSUInteger) VFRGetCount (VertexFaceRef *) vfr
implementation

Extends class OOCacheManager.

Definition at line 2282 of file OOMesh.m.

2283{
2284 NSCParameterAssert(vfr != NULL);
2285
2286 return vfr->internCount + [vfr->extra count];
2287}
unsigned count
uint16_t internCount
Definition OOMesh.m:119

References VertexFaceRef::internCount.

◆ VFRGetFaceAtIndex

+ (static NSUInteger) VFRGetFaceAtIndex (VertexFaceRef *) vfr
(NSUInteger) index 
implementation

Extends class OOCacheManager.

Definition at line 2290 of file OOMesh.m.

2291{
2292 NSCParameterAssert(vfr != NULL && index < VFRGetCount(vfr));
2293
2294 if (index < vfr->internCount) return vfr->internFaces[index];
2295 else return [vfr->extra oo_unsignedIntegerAtIndex:index - vfr->internCount];
2296}
static NSUInteger VFRGetCount(VertexFaceRef *vfr)
Definition OOMesh.m:2282

References VertexFaceRef::internFaces, and VFRGetCount().

+ Here is the call graph for this function:

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