ftp.nice.ch/pub/next/science/chemistry/BeakerBoy.0.31.s.tar.gz#/BeakerBoy.0.31.s/BBBasicShapeSpacefilling.m

This is BBBasicShapeSpacefilling.m in view mode; [Download] [Up]

/* BBBasicShapeSpacefilling.h				 
 *
 * This region shape draws a spacefilling region in v.d.Waals atomsize.
 *
 * For more interface-info see the header file. More in depth information
 * can be found in the source-code.
 *
 * Written by: 		Thomas Engel
 * Created:    		23.05.1994 (Copyleft)
 * Last modified: 	23.05.1994
 */

#import "BBBasicShapeSpacefilling.h"
#import "BBAtomShape.h"
#import "BBMolecule.h"
#import "BBAtom.h"

@implementation BBBasicShapeSpacefilling

- addSubshapesTo:aList
{
	// Spacefilling... all atoms in v.d.Waals size. Quite simple.
	
	id	tempList;
	id	newShape;
	int	i;
	
	[super addSubshapesTo:aList];
	
	tempList = [[self region] atomList];
	for( i=0; i<[tempList count]; i++ )
	{
		newShape = [[BBAtomShape alloc] initFrom:[tempList objectAt:i]
										asPartOf:self];
		[aList addObject:newShape];
	}
	
	return self;
}

- (float)atomRadius:sender
{
	return [[sender atom] vanDerWaalsRadius];
}

@end

/*
 * History: 23.05.94 Another regionShape subclass.
 *
 *
 * Bugs: - Nop
 */

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.