|
[1 introduction] [2 overview] [3 reference] [4 GUI] IndexE3dScene_Init E3dScene_New E3dScene_CollectNodeNames E3d_Init E3dScene_NodeHrcAdd E3dScene_NodeHrcInsert E3dScene_NodeHrcRemove E3dScene_MaterialCopy E3dScene_ImageLoad E3dScene_TextureImageLoad E3dScene_NodeHrcReadTextures E3dScene_GlobalAnimationAppend E3dScene_GlobalAnimationAdd E3dScene_GlobalAnimationRemove E3dScene_AnimStackAppend E3dScene_AnimStackRemove E3dScene_AnimationAppend E3dScene_AnimationAdd E3dScene_AnimationRemove E3dScene_GetAnimatedObjects E3d_AnimatedObjectsFree E3d_ClassToItemID E3dObject_Copy E3dObject_CopyTo E3dObject_UpdateForDisplay E3dSpline_Changed E3d_IsObject E3dScene_ObjectAnimations E3dObject_CollectMaterials E3dScene_GetObjects E3dScene_GetInstances E3dModel_CollectMaterials E3dScene_Clear E3dScene_RemoveAllCallbacks E3dScene_HasSelectedAnimationChannel E3dScene_InitInitialize a 3D SceneSyntax Argument Description This function initializes the given E3dScene structure. Return value None. See also E3dScene_NewAllocate and initialize a 3D SceneSyntax Argument Description This function allocates memory for and initializes an E3dScene structure. Return value Pointer to the allocated E3dScene structure or NULL in case of an error. See also E3dScene_CollectNodeNamesCollect the names of all Models in a Scene into an arraySyntax Arguments Description This function parses the hierarchies in the given Scene and collects the names of all Models into a dynamically allocated array of strings. Return value The number of items in the array (the nuber of Models found). E3d_InitInitialize E3DSyntax Arguments None. Description Initialize libE3D. This function must be called before E3D can be used. It initializes built-in Shader classes, Animation classes, etc. Return value None. E3dScene_NodeHrcAddAdd a Node-hierarchy to the end of a SceneSyntax Arguments Description Checks if the given hierarchy is in the given Scene. If not, adds to the array: Scene->RootNodes. PCallFlags accepted flags:
Return value None. See also E3dScene_NodeHrcInsertAdd a Node-hierarchy to a Scene before a given position in the listSyntax Arguments Description Checks if the given hierarchy is in the given Scene. If not, inserts in the array: Scene->RootNodes, before the index "LHere". To add the new Hierarchy to the end, use ELstEND for the index. Return value None. See also E3dScene_NodeHrcRemoveRemove Node-hierarchy from a SceneSyntax Arguments Description Checks if the given Hierarchy is in the Scene (it's in RootNodes array of the Scene). If it is, it removes it from that array. Return value None. See also E3dScene_MaterialCopyClone a MaterialSyntax Arguments Description Creates a duplicate of the given Material. If the PScene argument is not NULL, this function makes sure that the name of the new Material will be unique among the Materials in that Scene. For example, if the name of PMaterial is "Iron" and PScene already has a Material called "Iron", the new Material will be called "Iron-1". If PCopyCaches is TRUE, this function will copy internal buffers of the Material and its Textures. This may use a lot of memory and it may not be necessary, if you are just copying a Material to change it, as these buffers will have to be re-generated when you modify the Material or its Textures. It may, hovever save a lot of computation, if the Material is just cloned for safety, for example when a renderer is started. In that case, this copying allows the user to safely modify the Scene while the renderer is running (it's multi-threaded and EQX remains interactive while rendering). Return value Pointer to the new Material, or NULL in case of an error. E3dScene_ImageLoadRead image fileSyntax Arguments Description Checks if an Image with the given path/filename exists in PScene. If it does, it simply returns this Image. If the Image is not in the Scene yet, it loads it. Return value E_SUCCESS, or an error code if an error occured E3dScene_TextureImageLoadRead image fileSyntax Arguments Description Checks if an Image with the given path/filename exists in PScene. If it does, and PTexture is NULL, it simply returns this Image. If the Image is not in the Scene yet, it loads it. If PTexture is NULL, it simply loads the Image. This is useful if you want to create the texture only if the Image load was successful. If PTexure is not NULL, it will also assign the Image to PTexure. If PTexture already has this image, but PForceReRead is TRUE, it will reload the Image. Return value E_SUCCESS, or an error code if an error occured E3dScene_NodeHrcReadTextures(Re)read 2DTexture images for a Model hierarchySyntax Argument Description This function parses through the given hierarchy and (re)reads the texture images for all the Textures on the Geometries. Return value None. E3dScene_GlobalAnimationAppendAppend a global Animation to a SceneSyntax Arguments Description Checks if the given Animation is in the given Scene. If not, adds it to the array: Scene->GlobalAnimations. Global Animations don't belong to a specific AnimStack. Return value None. See also E3dScene_GlobalAnimationAddCreate a new Animation and add it to a SceneSyntax Arguments Description Creates an Animation of the given Class and adds it to the array: PScene->Animations. Return value None. See also E3dScene_GlobalAnimationRemoveRemove an Animation from a SceneSyntax Arguments Description Checks if the given hierarchy is in the Scene (it's in Animations array of the Scene). If it is, it removes it from that array. Return value TRUE on success, FALSE if failed (e.g. PAnimation was not in PScene) See also E3dScene_AnimStackAppendAppend an AnimStack to a SceneSyntax Arguments Description Checks if the given AnimStack is in the given Scene. If not, adds it to the first animation stack: Scene->AnimStacks. Return value None. See also E3dScene_AnimStackRemoveRemove an AnimStack from a SceneSyntax Arguments Description Checks if the given AnimStack is in the given Scene. If so, it removes it. Return value None. See also E3dScene_AnimationAppendAppend an Animation to a SceneSyntax Arguments Description Checks if the given Animation is in the given Scene. If not, adds it to the first animation stack: Scene->CurrentAnimStack. If the Scene has no AnimStacks, it adds a default stack. Return value None. See also E3dScene_AnimationAddAllocate and append an Animation to a SceneSyntax Arguments Description Allocate an Animation of the given Class, initialize it and add it to the array: Scene->Animations. Return value None. See also E3dScene_AnimationRemoveRemove an Animation from a SceneSyntax Arguments Description Checks if the given hierarchy is in the Scene (it's in Animations array of the Scene). If it is, it removes it from that array. Return value TRUE on success, FALSE if failed (e.g. PAnimation was not in PScene) See also E3dScene_GetAnimatedObjectsReturn an array of animated ObjectsSyntax Arguments Description Returns an array of Objects (Models etc.) that have Animation. The caller must free the returned array when it's not used any more. Return value The number of animated Objects in PScene. See also E3d_AnimatedObjectsFreeFree an array of animated Objects returned by E3dScene_GetAnimatedObjectsSyntax Arguments Description Frees the list, including any dynamically allocated data within the elements. Return value None. See also E3d_ClassToItemIDConvert a Class pointer to an identifierSyntax Arguments Description Converts a class pointer to an OR-able type quick-identifier flag. Return value The ID or 0 if there was no match E3dObject_CopyClone an ObjectSyntax Arguments Description This function creates an exact duplicate of the given Object by creating a new Object of the same class and calling the constructors and copy-constructors (if any) of the class. The option flags are OR-ed together bits that have the following meaning:
Return value A pointer to the copy, or NULL in case of an error E3dObject_CopyToClone an Object to an existing ObjectSyntax Arguments Description This function creates an exact duplicate of the given Object by calling the constructors and copy-constructors (if any) of the class. The option flags are OR-ed together bits that have the following meaning:
Return value A pointer to the copy, or NULL in case of an error E3dObject_UpdateForDisplayUpdate an E3dObject for renderingSyntax Arguments Description Creates / updates rendering information for the given E3dObject by calling its UpdateForDisplay() member function. Such data includes GPU vertex arrays for Meshes, Spline and Face tesselation information etc. Calling this function for an E3dObject after change, with only the necessary flags set, helps E3D greatly improve performance by only updating things that really changed. For example, if the position of a few Vertices changed in a Mesh, use the E3dUpdateMeshSHAPE flag. Return value Flags of changes triggered by the update, as returned by the Object's output handlers. For example, updating a Spline that is used as a Revolve profile will cause the E3dChgMeshSHAPE flag to be set in the return value. See also E3dSpline_ChangedIndicate to any Faces using a Spline that they need to be updatedSyntax Arguments Description This function should be called for Splines that are used in Faces, when the Spline changes. Return value OR-ed flags to indicate any triggered changes, such as E3dChgFACE E3d_IsObjectCheck if a pointer points to an ObjectSyntax Argument Description Checks all classes known to E3D (based on EObject), to see if PObject belongs to any of them. Return value TRUE, if PObject is an Object, FALSE otherwise E3dScene_ObjectAnimationsCheck if an object is Animated / return the list of Animations that target this ObjectSyntax Argument Description Walks through PScene->AnimationStacks and checks if any Channels of those Animations specifies PObject as its TargetObject or TargetSubObject. Return value The number of Animations that target this Object. E3dObject_CollectMaterialsCollect Materials from an ObjectSyntax Arguments Description Collects Materials used on E3dObject (Mesh, Face etc.). The list must be initialized by the caller, and this function may be called, to collect Materials from multiple Objects. Return value None. See also E3dScene_GetObjectsCollect Objects in a SceneSyntax Arguments Description Parses the hierarchies in the given Scene and collects the Objects into an array of pointers. This array must be freed by the application after use. If PAddReferences is TRUE, the Objects will be reference-tracked in the array, so they won't be physically deleted elsewhere. In this case you should call ELst_ObjectsFree() on the array (vs ELst_PointersFree or EFree), or E_Delete on individual entries in the array. If PObjects is NULL, this function simply returns the number of matching Objects found. This example collects all selected Meshes: LNumOfObjects = E3dScene_GetObjects(MyScene, &LObjects, E3dItemMESH, E3dSELECTED, FALSE); Where LObjects is the type of E3dObject** This example collects all the Objects, regardless of their type, or wheter they are selected or not: LNumOfObjects = E3dScene_GetObjects(MyScene, &LObjects, E3dItemALL, E3dSELECTED|E3dUNSELECTED, TRUE); Return value The number of E3dObject pointers in the array (the number of matching Objects found). E3dScene_GetInstancesCollect Object instances in a SceneSyntax Arguments Description Parses the hierarchies in the given Scene and collects the Objects into an array of pointers. This array must be freed by the application after use. If PAddReferences is TRUE, the Objects will be reference-tracked in the array, so they won't be physically deleted elsewhere. In this case you should call ELst_ObjectsFree() on the array (vs ELst_PointersFree or EFree), or E_Delete on individual entries in the array. If PObjects is NULL, this function simply returns the number of matching Objects found. This example collects all selected Meshes: LNumOfObjects = E3dScene_GetObjects(MyScene, &LObjects, E3dItemMESH, E3dSELECTED, FALSE); Where LObjects is the type of E3dObject** This example collects all the Objects, regardless of their type, or wheter they are selected or not: LNumOfObjects = E3dScene_GetObjects(MyScene, &LObjects, E3dItemALL, E3dSELECTED|E3dUNSELECTED, TRUE); Return value The number of E3dObject pointers in the array (the number of matching Objects found). E3dModel_CollectMaterialsCollect Materials used in a ModelSyntax Arguments Description Collects Materials used by PModel. Return value An array of pointers to the Materials found, or NULL. The number is returned in PNumOfMaterialsPtr E3dScene_ClearFree the contents of a SceneSyntax Arguments Description Makes a Scene empty Return value None. See also E3dScene_RemoveAllCallbacksRemove all callbacks from a SceneSyntax Argument Description Removes all call-backs from a Scene. Return value None. See also E3dScene_HasSelectedAnimationChannelCheck if a Scene contains a KeyFrameAnimation with a selected ChannelSyntax Arguments Description Checks whether a Scene contains a KeyFrameAnimation with a selected Channel. Return value TRUE, if a Scene contains a KeyFrameAnimation with a selected Channel, otherwise FALSE. |