This is CX3DObject.rtf in view mode; [Download] [Up]
intuitiv'3d API documentation Copyright ©1993 by Cub'x SystÜmes. All Rights Reserved. CX3DObject Inherits From: ObjectView : View : Responder :Object Declared In: i3d/CX3DObject.h Class Description CX3DObject is an abstract superclass used to implement all classes of object that are leaves of the 3D object tree. Subclasses of CX3DObject are currently drawing primitives (Sphere , Cube , Lathe, ... ) and lights (CX3DLightSource). If you want to make a particular node, you must make a subclass of CX3DNode. If you want to make a new shader, you must make a subclass of CX3DShader. Although CX3DObject is a complex class, you have to overload a few instance methods in order to make a new class: - You must make your own version of - exportedVariable or - exportedVariableFor: in order to inform the system which of yours instance variable have to be archived. - You must provide a version of - init, - copy. - You must write what your object is drawing by overloading the - render, - getBoundingBox:. - You can provides a new inspector for your new object using the CX3DAttributeInsp or your own code and by overloading the method - attributeInspClass. The TorusWave object in the Examples/CustomObject folder shows how to make a CX3DObject subclass using a custom inspector. The ColoredPlan object in the Example/AdvancedObject folder shows how to make a CX3DObject subclass using the CX3DAttributeInsp class. This file is a documentation for features specific to CX3DObject. The file CX3DObjectAndNode.rtf is a documentation for methods that you can use on CX3DObject and CX3DNode instance. This documentation describes only instance variables and methods that you can use or overload in your own subclasses. Other methods are not documented and are subject to change. Instance Variables float scale[3]; float rotate[3]; float translate[3]; float oldValue[3]; RtMatrix transform; RtMatrix rotateMatrix; RtMatrix oldRotateMatrix; int surfaceType; id shape; unsigned char visible; unsigned int precision; id metaShader; BOOL shouldDisplayAsBBox; BOOL transformDirty; int lastUsedInsp; scale scale transformation. rotate rotate transformation. translate translate transformation. surfaceType A variable to store the surface type shape A N3DShape instance visible A bit field to store visibility flags precision Drawing precision (tesselation) oldValue Private metaShader Private shouldDisplayAsBBox Private transform Private rotateMatrix Private oldRotateMatrix Private transformDirty Private lastUsedInsp Private Method Types Initializing, freeing and copying - init - copy - free Bounding box. - getBoundingBox: Instance Methods getBoundingBox - getBoundingBox: (RtBound) aBox The CX3DObject version of this method fills aBox with { 0 , 0 , 0 , 0 , 0, 0 }. Since bounding boxes are used a lot inside intuitiv'3d, you must overload this method and fill aBox with correct values. init - init Initializes and returns the receiver, a new CX3Object instance. The subclass should overload the - init method to initialize its new instance variables. Subclass's version of - init should begin with a [super init] call. copy - copy Duplicates the receiver. Return the new instance. You should overload this method and duplicate your own instance variable. Your implementation of - copy should call [super copy]. free - free Used to free the memory used by the receiver. You should overload this method in order to free the memory used by your own instance variables.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.