ftp.nice.ch/pub/next/science/chemistry/BeakerBoy.0.31.s.tar.gz#/BeakerBoy.0.31.s/BBBondShape.h

This is BBBondShape.h in view mode; [Download] [Up]

/* BBBondShape.h				 
 *
 * This is a N3DShape the draws a simple Bond. For faster drawing we store
 * the needed data.
 *
 * Usage: Just init it for a Bond and Group. It will do the reset which means
 *		  that it will render itself as needed.
 *
 * Written by: 		Thomas Engel
 * Created:    		25.12.1993 (Copyleft)
 * Last modified: 	07.05.1994
 */

#import <3Dkit/3Dkit.h>

@interface BBBondShape:N3DShape
{
	id		ourBond;
	id		ourRegionShape;
	float	fromX, fromY, fromZ;
	float	axisX, axisY, axisZ;
	float	radius;
	float	startingZ;
	float	length;
	float 	angle;
	RtColor	color1, color2;
}

- initFrom:aBond asPartOf:aRegionShape;
- renderSelf:(N3DCamera *)theCamera;
- renderSelfAsBox:(N3DCamera *)theCamera;
- update;

- bond;

- setDrawAsBox:(BOOL)flag;
- getBoundingBox:(RtBound *)boundingBox;

@end

/*
 * History: 23.05.94 Small changes to work with the new shape stuff.
 *
 *			07.05.94 Changed the naming to BB...
 *
 *			24.01.94 added startingZ.
 *
 *			18.01.94 Switched to the axis instances because the calculation
 *					 will change.
 *
 *			15.01.94 First coded entered here. RenderMan stuff taken from 
 *					 MolViewer.
 *
 *
 * Bugs: - Hmm sure..
 *
 *		 - Well I know that this object consums a lot of memory. But it draws
 *		   faster. And I prefer speed to memory when it comes to displaying.
 */

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