diff --git a/DefoldDocs/api/gui.lua b/DefoldDocs/api/gui.lua index 5362e3a..fa4db43 100644 --- a/DefoldDocs/api/gui.lua +++ b/DefoldDocs/api/gui.lua @@ -1,7 +1,5 @@ ---GUI API documentation ----GUI core hooks, functions, messages, properties and constants for ----creation and manipulation of GUI nodes. The "gui" namespace is ----accessible only from gui scripts. +---GUI API documentation ---@class gui gui = {} ---This is a callback-function, which is called by the engine when a gui component is finalized (destroyed). It can @@ -327,7 +325,7 @@ function gui.get_height() end ---@return hash the id of the node function gui.get_id(node) end ----Retrieve the index of the specified node. +---Retrieve the index of the specified node among its siblings. ---The index defines the order in which a node appear in a GUI scene. ---Higher index means the node is drawn on top of lower indexed nodes. ---@param node node the node to retrieve the id from @@ -537,8 +535,9 @@ function gui.hide_keyboard() end ---Returns true if a node is enabled and false if it's not. ---Disabled nodes are not rendered and animations acting on them are not evaluated. ---@param node node node to query +---@param recursive boolean check hierarchy recursively ---@return boolean whether the node is enabled or not -function gui.is_enabled(node) end +function gui.is_enabled(node, recursive) end ---Alters the ordering of the two supplied nodes by moving the first node ---above the second. diff --git a/DefoldDocs/doc/dmGameObject_doc.json b/DefoldDocs/doc/dmGameObject_doc.json index b7e2146..1e88dc8 100644 --- a/DefoldDocs/doc/dmGameObject_doc.json +++ b/DefoldDocs/doc/dmGameObject_doc.json @@ -1,1720 +1,1797 @@ { "info": { - "group": "DEFOLD SDK", - "description": "API for manipulating game objects", + "description": "<dmsdk/gameobject/script.h>", "namespace": "dmGameObject", - "brief": "Game object functions", - "file": "dmsdk/gameobject/gameobject.h", - "path": "engine/gameobject/src/dmsdk/gameobject/gameobject.h", - "name": "Gameobject" + "brief": "SDK GameObject script API documentation", + "file": "", + "path": "", + "name": "Script" }, "elements": [ { "replaces": "", - "description": "Get component user data from a url.\nThe object referenced by the url must be in the same collection as the caller.", - "parameters": [ - { - "doc": "Lua state", - "name": "L", - "types": [ - "lua_State*" - ] - }, - { - "doc": "index to argument (a url)", - "name": "index", - "types": [ - "lua_State*" - ] - }, - { - "doc": "the call will fail if the found component does not have the specified extension", - "name": "component_type", - "types": [ - "const char*" - ] - }, - { - "doc": "The world associated owning the component. May be 0", - "name": "world", - "types": [ - "void**" - ] - }, - { - "doc": "The component data associated with the url. May be 0", - "name": "component", - "types": [ - "void**" - ] - }, - { - "doc": "The resolved url. May be 0", - "name": "url", - "types": [ - "dmMessage::URL*" - ] - } - ], + "description": "Value for an invalid instance index, this must be the same as defined in gamesys_ddf.proto for Create#index.", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "Get component user data from a url", + "brief": "Value for an invalid instance index, this must be ...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetComponentFromLua" + "name": "INVALID_INSTANCE_POOL_INDEX" }, { "replaces": "", - "description": "Callback when iterating over the properties for a component.", + "description": "Gameobject instance handle", "parameters": [], "returnvalues": [], "notes": [], - "brief": "Callback when iterating over the properties for a ...", + "brief": "Gameobject instance handle", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "" + "type": "TYPEDEF", + "name": "HInstance" }, { "replaces": "", - "description": "Set the new world callback. Called when a collection (i.e. a \"world\") is created.", - "parameters": [ - { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] - }, - { - "doc": "", - "name": "", - "types": [ - "" - ] - } - ], + "description": "Script handle", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the new world callback", + "brief": "Script handle", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetNewWorldFn" + "type": "TYPEDEF", + "name": "HScript" }, { "replaces": "", - "description": "Set the world destroy callback. Called when a collection (i.e. a \"world\") is destroyed.", - "parameters": [ - { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] - }, - { - "doc": "", - "name": "", - "types": [ - "" - ] - } - ], + "description": "Script instance handle", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the world destroy callback", + "brief": "Script instance handle", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetDeleteWorldFn" + "type": "TYPEDEF", + "name": "HScriptInstance" }, { "replaces": "", - "description": "Set the component create callback. Called when a component instance is created.", - "parameters": [ - { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] - }, - { - "doc": "", - "name": "", - "types": [ - "" - ] - } - ], + "description": "Collection register.", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the component create callback", + "brief": "Collection register.", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetCreateFn" + "type": "TYPEDEF", + "name": "HRegister" }, { "replaces": "", - "description": "Set the component destroy callback. Called when a component instance is destroyed.", - "parameters": [ - { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] - }, - { - "doc": "", - "name": "", - "types": [ - "" - ] - } - ], + "description": "Gameobject collection handle", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the component destroy callback", + "brief": "Gameobject collection handle", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetDestroyFn" + "type": "TYPEDEF", + "name": "HCollection" }, { "replaces": "", - "description": "Set the component init callback. Called on each gameobject's components, during a gameobject's initialization.", - "parameters": [ - { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] - }, - { - "doc": "", - "name": "", - "types": [ - "" - ] - } - ], + "description": "Gameobject prototype handle", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the component init callback", + "brief": "Gameobject prototype handle", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetInitFn" + "type": "TYPEDEF", + "name": "HPrototype" }, { "replaces": "", - "description": "Set the component finalize callback. Called on each gameobject's components, during a gameobject's finalization.", - "parameters": [ - { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] - }, - { - "doc": "", - "name": "", - "types": [ - "" - ] - } - ], + "description": "Gameobject properties handle", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the component finalize callback", + "brief": "Gameobject properties handle", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetFinalFn" + "type": "TYPEDEF", + "name": "HProperties" }, { "replaces": "", - "description": "Set the component add-to-update callback. Called for each component instal, when the game object is spawned.", - "parameters": [ - { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] - }, - { - "doc": "", - "name": "", - "types": [ - "" - ] - } - ], + "description": "Result enumeration.", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the component add-to-update callback", + "brief": "result enumeration", "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetAddToUpdateFn" - }, - { - "replaces": "", - "description": "Set the component get callback. Called when the scripts want to retrieve the individual component user data given an url.", - "parameters": [ + "members": [ { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_OK" }, { "doc": "", - "name": "", - "types": [ - "" - ] - } - ], - "returnvalues": [], - "notes": [], - "brief": "set the component get callback", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetGetFn" - }, - { - "replaces": "", - "description": "Set the component render callback. Called when it's time to render all component instances.", - "parameters": [ + "type": "", + "name": "dmGameObject::RESULT_OUT_OF_RESOURCES" + }, { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_ALREADY_REGISTERED" }, { "doc": "", - "name": "", - "types": [ - "" - ] + "type": "", + "name": "dmGameObject::RESULT_IDENTIFIER_IN_USE" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_IDENTIFIER_ALREADY_SET" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_COMPONENT_NOT_FOUND" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_MAXIMUM_HIEARCHICAL_DEPTH" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_INVALID_OPERATION" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_RESOURCE_TYPE_NOT_FOUND" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_BUFFER_OVERFLOW" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::RESULT_UNKNOWN_ERROR" } ], - "returnvalues": [], - "notes": [], - "brief": "set the component render callback", - "examples": "", - "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetRenderFn" + "type": "ENUM", + "name": "Result" }, { "replaces": "", - "description": "Set the component update callback. Called when it's time to update all component instances.", - "parameters": [ + "description": "Property types.", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "property types", + "examples": "", + "members": [ { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_TYPE_NUMBER" }, { "doc": "", - "name": "", - "types": [ - "" - ] + "type": "", + "name": "dmGameObject::PROPERTY_TYPE_HASH" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_TYPE_URL" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_TYPE_VECTOR3" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_TYPE_VECTOR4" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_TYPE_QUAT" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_TYPE_BOOLEAN" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_TYPE_COUNT" } ], - "returnvalues": [], - "notes": [], - "brief": "set the component update callback", - "examples": "", - "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetUpdateFn" + "type": "ENUM", + "name": "PropertyType" }, { "replaces": "", - "description": "Set the component post update callback. Called for each collection after the update, before the render.", - "parameters": [ + "description": "Property result.", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "property result", + "examples": "", + "members": [ { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_OK" }, { "doc": "", - "name": "", - "types": [ - "" - ] + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_NOT_FOUND" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_INVALID_FORMAT" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_UNSUPPORTED_TYPE" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_TYPE_MISMATCH" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_COMP_NOT_FOUND" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_INVALID_INSTANCE" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_BUFFER_OVERFLOW" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_UNSUPPORTED_VALUE" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_UNSUPPORTED_OPERATION" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::PROPERTY_RESULT_RESOURCE_NOT_FOUND" } ], + "error": "", + "tparams": [], + "type": "ENUM", + "name": "PropertyResult" + }, + { + "replaces": "", + "description": "Playback type enum", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the component post update callback", + "brief": "Playback type enum", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetPostUpdateFn" + "type": "ENUM", + "name": "Playback" }, { "replaces": "", - "description": "Set the component on-message callback. Called multiple times per frame, to flush messages.", - "parameters": [ + "description": "Create result enum.", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "Create result enum", + "examples": "", + "members": [ { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] + "doc": "", + "type": "", + "name": "dmGameObject::CREATE_RESULT_OK" }, { "doc": "", - "name": "", - "types": [ - "" - ] + "type": "", + "name": "dmGameObject::CREATE_RESULT_UNKNOWN_ERROR" } ], - "returnvalues": [], - "notes": [], - "brief": "set the component on-message callback", - "examples": "", - "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetOnMessageFn" + "type": "ENUM", + "name": "Result" }, { "replaces": "", - "description": "Set the component on-input callback. Called once per frame, before the Update function.", - "parameters": [ - { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] + "description": "Update result enum.", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "Update result enum", + "examples": "", + "members": [ + { + "doc": "", + "type": "", + "name": "dmGameObject::UPDATE_RESULT_OK" }, { "doc": "", - "name": "", - "types": [ - "" - ] + "type": "", + "name": "dmGameObject::UPDATE_RESULT_UNKNOWN_ERROR" } ], + "error": "", + "tparams": [], + "type": "ENUM", + "name": "Result" + }, + { + "replaces": "", + "description": "Property variant that holds the data for a variable", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the component on-input callback", + "brief": "property variant", "examples": "", - "members": [], + "members": [ + { + "doc": "property type", + "type": "dmGameObject::PropertyType", + "name": "m_Type" + }, + { + "doc": "A floating point value (union)", + "type": "double", + "name": "m_Number" + }, + { + "doc": "A hash value (union)", + "type": "dmhash_t", + "name": "m_Hash" + }, + { + "doc": "An URL value (union)", + "type": "const uin8_t*", + "name": "m_Url" + }, + { + "doc": "A vector4 value (union)", + "type": "float", + "name": "m_V4" + }, + { + "doc": "A boolean value (union)", + "type": "bool", + "name": "m_Bool" + } + ], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetOnInputFn" + "type": "STRUCT", + "name": "PropertyVar" }, { "replaces": "", - "description": "Set the component on-reload callback. Called when the resource of a component instance is reloaded.", - "parameters": [ + "description": "Description of a property.\nIf the property is externally mutable, m_ValuePtr points to the value and its length is m_ElementCount.\nm_Variant always reflects the value.", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "Description of a property", + "examples": "", + "members": [ { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] + "doc": "For composite properties (float arrays), these ids name each element", + "type": "dmhash_t", + "name": "m_ElementIds" }, { - "doc": "", - "name": "", - "types": [ - "" - ] + "doc": "Variant holding the value", + "type": "PropertyVar", + "name": "m_Variant" + }, + { + "doc": "Pointer to the value, only set for mutable values. The actual data type is described by the variant.", + "type": "float*", + "name": "m_ValuePtr" + }, + { + "doc": "Determines whether we are permitted to write to this property.", + "type": "bool", + "name": "m_ReadOnly" } ], + "error": "", + "tparams": [], + "type": "STRUCT", + "name": "PropertyDesc" + }, + { + "replaces": "", + "description": "Update context", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "set the component on-reload callback", + "brief": "Update context", + "examples": "", + "members": [ + { + "doc": "the delta time elapsed since last frame (seconds)", + "type": "float", + "name": "m_DT" + } + ], + "error": "", + "tparams": [], + "type": "STRUCT", + "name": "UpdateContext" + }, + { + "replaces": "", + "description": "Container of input related information.", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "Container of input related information.", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetOnReloadFn" + "type": "STRUCT", + "name": "InputAction" }, { "replaces": "", - "description": "Set the component set properties callback. Called when the component instance is being spwned.", - "parameters": [ + "description": "Input result enum", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "Input result enum", + "examples": "", + "members": [ { - "doc": "the type", - "name": "type", - "types": [ - "ComponentType*" - ] + "doc": "= 0", + "type": "", + "name": "INPUT_RESULT_IGNORED" }, { - "doc": "", - "name": "", - "types": [ - "" - ] + "doc": "= 1", + "type": "", + "name": "INPUT_RESULT_CONSUMED" + }, + { + "doc": "= -1000", + "type": "", + "name": "INPUT_RESULT_UNKNOWN_ERROR" } ], - "returnvalues": [], - "notes": [], - "brief": "set the component set properties callback", - "examples": "", - "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "ComponentTypeSetSetPropertiesFn" + "type": "ENUM", + "name": "InputResult" }, { "replaces": "", - "description": "Set the component get property callback. Called when accessing a property via go.get()", + "description": "Retrieve the message socket for the specified collection.", "parameters": [ { - "doc": "the type", - "name": "type", + "doc": "Collection handle", + "name": "collection", "types": [ - "ComponentType*" + "dmGameObject::HCollection" ] - }, + } + ], + "returnvalues": [ { - "doc": "", - "name": "", + "doc": "The message socket of the specified collection", + "name": "socket", "types": [ - "" + "dmMessage::HSocket" ] } ], - "returnvalues": [], "notes": [], - "brief": "set the component get property callback", + "brief": "Retrieve the message socket for the specified coll...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ComponentTypeSetGetPropertyFn" + "name": "GetMessageSocket" }, { "replaces": "", - "description": "Set the component set property callback. Called when accessing a property via go.set()", + "description": "Retrieve a collection from the specified instance", "parameters": [ { - "doc": "the type", - "name": "type", + "doc": "Game object instance", + "name": "instance", "types": [ - "ComponentType*" + "dmGameObject::HInstance" ] - }, + } + ], + "returnvalues": [ { - "doc": "", - "name": "", + "doc": "The collection the specified instance belongs to", + "name": "collection", "types": [ - "" + "dmGameObject::HInstance" ] } ], - "returnvalues": [], "notes": [], - "brief": "set the component set property callback", + "brief": "Retrieve a collection from the specified instance", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ComponentTypeSetSetPropertyFn" + "name": "GetCollection" }, { "replaces": "", - "description": "Set the component type global context. Usually set when registering the component type.", + "description": "Create a new gameobject instance", "parameters": [ { - "doc": "the type", - "name": "type", + "doc": "Gameobject collection", + "name": "collection", "types": [ - "ComponentType*" + "dmGameObject::HCollection" ] }, { - "doc": "", - "name": "", + "doc": "|type: const char*] Prototype file name. May be 0.", + "name": "prototype_name", "types": [ "" ] } ], - "returnvalues": [], + "returnvalues": [ + { + "doc": "New gameobject instance. NULL if any error occured", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], "notes": [], - "brief": "set the component type global context", + "brief": "Create a new gameobject instance", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ComponentTypeSetContext" + "name": "New" }, { "replaces": "", - "description": "Set the component type transform dependency flag.\nIf this flag is set, it might trigger an dmGameObject::UpdateTransforms() (if there are dirty transforms)", + "description": "Delete gameobject instance", "parameters": [ { - "doc": "the type", - "name": "type", + "doc": "Gameobject collection", + "name": "collection", "types": [ - "ComponentType*" + "dmGameObject::HCollection" ] }, { - "doc": "", - "name": "", + "doc": "Gameobject instance", + "name": "instance", "types": [ - "" + "dmGameObject::HInstance" + ] + }, + { + "doc": "If true, delete child hierarchy recursively in child to parent order (leaf first)", + "name": "recursive", + "types": [ + "bool" ] } ], "returnvalues": [], "notes": [], - "brief": "set the component type transform dependency flag", + "brief": "Delete gameobject instance", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ComponentTypeSetReadsTransforms" + "name": "Delete" }, { "replaces": "", - "description": "Set the component type prio order. Defines the update order of the component types.", + "description": "Construct a hash of an instance id based on the index provided.", "parameters": [ { - "doc": "the type", - "name": "type", + "doc": "The index to base the id off of.", + "name": "index", "types": [ - "ComponentType*" + "uint32_t" ] - }, + } + ], + "returnvalues": [ { - "doc": "", - "name": "", + "doc": "hash of the instance id constructed.", + "name": "id", "types": [ - "" + "dmhash_t" ] } ], - "returnvalues": [], "notes": [], - "brief": "set the component type prio order", + "brief": "Construct a hash of an instance id based on the in...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ComponentTypeSetPrio" + "name": "ConstructInstanceId" }, { "replaces": "", - "description": "Set the component type need for a per component instance user data. Defaults to true.", + "description": "Retrieve an instance index from the index pool for the collection.", "parameters": [ { - "doc": "the type", - "name": "type", + "doc": "Collection from which to retrieve the instance index.", + "name": "collection", "types": [ - "ComponentType*" + "dmGameObject::HColleciton" ] - }, + } + ], + "returnvalues": [ { - "doc": "", - "name": "", + "doc": "index from the index pool of collection.", + "name": "instance", "types": [ - "" + "uint32_t" ] } ], - "returnvalues": [], "notes": [], - "brief": "set the component type need for a per component instance user data", + "brief": "Retrieve an instance index from the index pool for...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ComponentTypeSetHasUserData" + "name": "AcquireInstanceIndex" }, { "replaces": "", - "description": "set the component property iterator function. Called during inspection", + "description": "Assign an index to the instance, only if the instance is not null.", "parameters": [ { - "doc": "the type", - "name": "type", + "doc": "The index to assign.", + "name": "index", "types": [ - "ComponentType*" + "uint32_t" ] }, { - "doc": "", - "name": "", + "doc": "The instance that should be assigned the index.", + "name": "instance", "types": [ - "" + "dmGameObject::HInstance" ] } ], "returnvalues": [], "notes": [], - "brief": "set the component property iterator function", + "brief": "Assign an index to the instance, only if the insta...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ComponentTypeSetChilldIteratorFn" + "name": "AssignInstanceIndex" }, { "replaces": "", - "description": "set the component property iterator function. Called during inspection", + "description": "Get instance identifier", "parameters": [ { - "doc": "the type", - "name": "type", + "doc": "Gameobject instance", + "name": "instance", "types": [ - "ComponentType*" + "dmGameObject::HInstance" ] - }, + } + ], + "returnvalues": [ { - "doc": "", + "doc": "Identifier. dmGameObject::UNNAMED_IDENTIFIER if not set.", "name": "", "types": [ - "" + "dmhash_t" ] } ], - "returnvalues": [], "notes": [], - "brief": "set the component property iterator function", + "brief": "Get instance identifier", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ComponentTypeSetPropertyIteratorFn" + "name": "GetIdentifier" }, { "replaces": "", - "description": "Context used when registering a new component type", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "Context used when registering a new component type", - "examples": "", - "members": [ - { - "doc": "The config file", - "type": "dmConfigFile::HConfig", - "name": "m_Config" - }, + "description": "Set instance identifier. Must be unique within the collection.", + "parameters": [ { - "doc": "The resource factory", - "type": "dmResource::HFactory", - "name": "m_Factory" + "doc": "Collection", + "name": "collection", + "types": [ + "dmGameObject::HCollection" + ] }, { - "doc": "The game object registry", - "type": "dmGameObject::HRegister", - "name": "m_Register" + "doc": "Instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] }, { - "doc": "The shared script context", - "type": "dmScript::HContext", - "name": "m_Script" - }, + "doc": "Identifier", + "name": "identifier", + "types": [ + "dmhash_t" + ] + } + ], + "returnvalues": [ { - "doc": "Mappings between names and contextx", - "type": "dmHashTable64", - "name": "m_Contextx" + "doc": "RESULT_OK on success", + "name": "result", + "types": [ + "dmGameObject::Result" + ] } ], + "notes": [], + "brief": "Set instance identifier. Must be unique within the...", + "examples": "", + "members": [], "error": "", "tparams": [], - "type": "STRUCT", - "name": "ComponentTypeCreateCtx" + "type": "FUNCTION", + "name": "SetIdentifier" }, { "replaces": "", - "description": "Value for an invalid instance index, this must be the same as defined in gamesys_ddf.proto for Create#index.", - "parameters": [], - "returnvalues": [], + "description": "Get component id from component index.", + "parameters": [ + { + "doc": "Instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + }, + { + "doc": "Component index", + "name": "component_index", + "types": [ + "uint16_t" + ] + }, + { + "doc": "[type: dmhash_t* Component id as out-argument", + "name": "component_id", + "types": [ + "" + ] + } + ], + "returnvalues": [ + { + "doc": "RESULT_OK if the comopnent was found", + "name": "result", + "types": [ + "dmGameObject::Result" + ] + } + ], "notes": [], - "brief": "Value for an invalid instance index, this must be ...", + "brief": "Get component id from component index.", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "INVALID_INSTANCE_POOL_INDEX" + "name": "GetComponentId" }, { "replaces": "", - "description": "Gameobject instance handle", - "parameters": [], + "description": "Set gameobject instance position", + "parameters": [ + { + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + }, + { + "doc": "New Position", + "name": "position", + "types": [ + "dmGameObject::Point3" + ] + } + ], "returnvalues": [], "notes": [], - "brief": "Gameobject instance handle", + "brief": "set position", "examples": "", "members": [], "error": "", "tparams": [], - "type": "TYPEDEF", - "name": "HInstance" + "type": "FUNCTION", + "name": "SetPosition" }, { "replaces": "", - "description": "Script handle", - "parameters": [], - "returnvalues": [], + "description": "Get gameobject instance position", + "parameters": [ + { + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ + { + "doc": "Position", + "name": "", + "types": [ + "dmGameObject::Point3" + ] + } + ], "notes": [], - "brief": "Script handle", + "brief": "get position", "examples": "", "members": [], "error": "", "tparams": [], - "type": "TYPEDEF", - "name": "HScript" + "type": "FUNCTION", + "name": "GetPosition" }, { "replaces": "", - "description": "Script instance handle", - "parameters": [], + "description": "Set gameobject instance rotation", + "parameters": [ + { + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + }, + { + "doc": "New Position", + "name": "position", + "types": [ + "" + ] + } + ], "returnvalues": [], "notes": [], - "brief": "Script instance handle", + "brief": "set rotation", "examples": "", "members": [], "error": "", "tparams": [], - "type": "TYPEDEF", - "name": "HScriptInstance" + "type": "FUNCTION", + "name": "SetRotation" }, { "replaces": "", - "description": "Collection register.", - "parameters": [], - "returnvalues": [], + "description": "Get gameobject instance rotation", + "parameters": [ + { + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ + { + "doc": "rotation", + "name": "", + "types": [ + "dmGameObject::Quat" + ] + } + ], "notes": [], - "brief": "Collection register.", + "brief": "get rotation", "examples": "", "members": [], "error": "", "tparams": [], - "type": "TYPEDEF", - "name": "HRegister" + "type": "FUNCTION", + "name": "GetRotation" }, { "replaces": "", - "description": "Gameobject collection handle", - "parameters": [], + "description": "Set gameobject instance uniform scale", + "parameters": [ + { + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + }, + { + "doc": "New uniform scale", + "name": "scale", + "types": [ + "" + ] + } + ], "returnvalues": [], "notes": [], - "brief": "Gameobject collection handle", + "brief": "set uniform scale", "examples": "", "members": [], "error": "", "tparams": [], - "type": "TYPEDEF", - "name": "HCollection" + "type": "FUNCTION", + "name": "SetScale" }, { "replaces": "", - "description": "Gameobject prototype handle", - "parameters": [], + "description": "Set gameobject instance non-uniform scale", + "parameters": [ + { + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + }, + { + "doc": "New uniform scale", + "name": "scale", + "types": [ + "" + ] + } + ], "returnvalues": [], "notes": [], - "brief": "Gameobject prototype handle", + "brief": "set scale", "examples": "", "members": [], "error": "", "tparams": [], - "type": "TYPEDEF", - "name": "HPrototype" + "type": "FUNCTION", + "name": "SetScale" }, { "replaces": "", - "description": "Gameobject properties handle", - "parameters": [], - "returnvalues": [], + "description": "Get gameobject instance uniform scale", + "parameters": [ + { + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ + { + "doc": "Uniform scale", + "name": "", + "types": [ + "float" + ] + } + ], "notes": [], - "brief": "Gameobject properties handle", + "brief": "get uniform scale", "examples": "", "members": [], "error": "", "tparams": [], - "type": "TYPEDEF", - "name": "HProperties" + "type": "FUNCTION", + "name": "GetUniformScale" }, { "replaces": "", - "description": "Result enumeration.", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "result enumeration", - "examples": "", - "members": [ - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_OK" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_OUT_OF_RESOURCES" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_ALREADY_REGISTERED" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_IDENTIFIER_IN_USE" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_IDENTIFIER_ALREADY_SET" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_COMPONENT_NOT_FOUND" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_MAXIMUM_HIEARCHICAL_DEPTH" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_INVALID_OPERATION" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_RESOURCE_TYPE_NOT_FOUND" - }, + "description": "Get gameobject instance scale", + "parameters": [ { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_BUFFER_OVERFLOW" - }, + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ { - "doc": "", - "type": "", - "name": "dmGameObject::RESULT_UNKNOWN_ERROR" + "doc": "Non-uniform scale", + "name": "", + "types": [ + "dmGameObject::Vector3" + ] } ], + "notes": [], + "brief": "get scale", + "examples": "", + "members": [], "error": "", "tparams": [], - "type": "ENUM", - "name": "Result" + "type": "FUNCTION", + "name": "GetScale" }, { "replaces": "", - "description": "Property types.", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "property types", - "examples": "", - "members": [ - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_TYPE_NUMBER" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_TYPE_HASH" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_TYPE_URL" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_TYPE_VECTOR3" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_TYPE_VECTOR4" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_TYPE_QUAT" - }, + "description": "Get gameobject instance world position", + "parameters": [ { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_TYPE_BOOLEAN" - }, + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_TYPE_COUNT" + "doc": "World position", + "name": "", + "types": [ + "dmGameObject::Point3" + ] } ], + "notes": [], + "brief": "get world position", + "examples": "", + "members": [], "error": "", "tparams": [], - "type": "ENUM", - "name": "PropertyType" + "type": "FUNCTION", + "name": "GetWorldPosition" }, { "replaces": "", - "description": "Property result.", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "property result", - "examples": "", - "members": [ - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_OK" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_NOT_FOUND" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_INVALID_FORMAT" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_UNSUPPORTED_TYPE" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_TYPE_MISMATCH" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_COMP_NOT_FOUND" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_INVALID_INSTANCE" - }, + "description": "Get gameobject instance world rotation", + "parameters": [ { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_BUFFER_OVERFLOW" - }, + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_UNSUPPORTED_VALUE" - }, + "doc": "World rotation", + "name": "", + "types": [ + "dmGameObject::Quat" + ] + } + ], + "notes": [], + "brief": "get world rotation", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "GetWorldRotation" + }, + { + "replaces": "", + "description": "Get game object instance world transform", + "parameters": [ { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_UNSUPPORTED_OPERATION" - }, + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ { - "doc": "", - "type": "", - "name": "dmGameObject::PROPERTY_RESULT_RESOURCE_NOT_FOUND" + "doc": "World scale", + "name": "", + "types": [ + "dmGameObject::Vector3" + ] } ], + "notes": [], + "brief": "get world scale", + "examples": "", + "members": [], "error": "", "tparams": [], - "type": "ENUM", - "name": "PropertyResult" + "type": "FUNCTION", + "name": "GetWorldScale" }, { "replaces": "", - "description": "Playback type enum", - "parameters": [], - "returnvalues": [], + "description": "Get game object instance uniform scale", + "parameters": [ + { + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ + { + "doc": "World uniform scale", + "name": "", + "types": [ + "float" + ] + } + ], "notes": [], - "brief": "Playback type enum", + "brief": "get world uniform scale", "examples": "", "members": [], "error": "", "tparams": [], - "type": "ENUM", - "name": "Playback" + "type": "FUNCTION", + "name": "GetWorldUniformScale" }, { "replaces": "", - "description": "Create result enum.", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "Create result enum", - "examples": "", - "members": [ + "description": "Get game object instance world transform as Matrix4.", + "parameters": [ { - "doc": "", - "type": "", - "name": "dmGameObject::CREATE_RESULT_OK" - }, + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ { - "doc": "", - "type": "", - "name": "dmGameObject::CREATE_RESULT_UNKNOWN_ERROR" + "doc": "World transform matrix.", + "name": "", + "types": [ + "dmGameObject::MAtrix4" + ] } ], + "notes": [], + "brief": "get world matrix", + "examples": "", + "members": [], "error": "", "tparams": [], - "type": "ENUM", - "name": "Result" + "type": "FUNCTION", + "name": "GetWorldMatrix" }, { "replaces": "", - "description": "Update result enum.", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "Update result enum", - "examples": "", - "members": [ + "description": "Get game object instance world transform", + "parameters": [ { - "doc": "", - "type": "", - "name": "dmGameObject::UPDATE_RESULT_OK" - }, + "doc": "Gameobject instance", + "name": "instance", + "types": [ + "dmGameObject::HInstance" + ] + } + ], + "returnvalues": [ { - "doc": "", - "type": "", - "name": "dmGameObject::UPDATE_RESULT_UNKNOWN_ERROR" + "doc": "World transform", + "name": "", + "types": [ + "dmTransform::Transform" + ] } ], + "notes": [], + "brief": "get world transform", + "examples": "", + "members": [], "error": "", "tparams": [], - "type": "ENUM", - "name": "Result" + "type": "FUNCTION", + "name": "GetWorldTransform" }, { "replaces": "", - "description": "Property variant that holds the data for a variable", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "property variant", - "examples": "", - "members": [ - { - "doc": "property type", - "type": "dmGameObject::PropertyType", - "name": "m_Type" - }, - { - "doc": "A floating point value (union)", - "type": "double", - "name": "m_Number" - }, - { - "doc": "A hash value (union)", - "type": "dmhash_t", - "name": "m_Hash" - }, - { - "doc": "An URL value (union)", - "type": "const uin8_t*", - "name": "m_Url" - }, + "description": "Set whether the instance should be flagged as a bone.\nInstances flagged as bones can have their transforms updated in a batch through SetBoneTransforms.\nUsed for animated skeletons.", + "parameters": [ { - "doc": "A vector4 value (union)", - "type": "float", - "name": "m_V4" + "doc": "Instance", + "name": "instance", + "types": [ + "HImstance" + ] }, { - "doc": "A boolean value (union)", - "type": "bool", - "name": "m_Bool" + "doc": "true if the instance is a bone", + "name": "bone", + "types": [ + "bool" + ] } ], - "error": "", - "tparams": [], - "type": "STRUCT", - "name": "PropertyVar" - }, - { - "replaces": "", - "description": "Description of a property.\nIf the property is externally mutable, m_ValuePtr points to the value and its length is m_ElementCount.\nm_Variant always reflects the value.", - "parameters": [], "returnvalues": [], "notes": [], - "brief": "Description of a property", + "brief": "Set whether the instance should be flagged as a bo...", "examples": "", - "members": [ - { - "doc": "For composite properties (float arrays), these ids name each element", - "type": "dmhash_t", - "name": "m_ElementIds" - }, - { - "doc": "Variant holding the value", - "type": "PropertyVar", - "name": "m_Variant" - }, - { - "doc": "Pointer to the value, only set for mutable values. The actual data type is described by the variant.", - "type": "float*", - "name": "m_ValuePtr" - }, - { - "doc": "Determines whether we are permitted to write to this property.", - "type": "bool", - "name": "m_ReadOnly" - } - ], + "members": [], "error": "", "tparams": [], - "type": "STRUCT", - "name": "PropertyDesc" + "type": "FUNCTION", + "name": "SetBone" }, { "replaces": "", - "description": "Update context", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "Update context", - "examples": "", - "members": [ + "description": "Check whether the instance is flagged as a bone.", + "parameters": [ { - "doc": "the delta time elapsed since last frame (seconds)", - "type": "float", - "name": "m_DT" + "doc": "Instance", + "name": "instance", + "types": [ + "HImstance" + ] + } + ], + "returnvalues": [ + { + "doc": "True if flagged as a bone", + "name": "result", + "types": [ + "bool" + ] } ], - "error": "", - "tparams": [], - "type": "STRUCT", - "name": "UpdateContext" - }, - { - "replaces": "", - "description": "Container of input related information.", - "parameters": [], - "returnvalues": [], "notes": [], - "brief": "Container of input related information.", + "brief": "Check whether the instance is flagged as a bone.", "examples": "", "members": [], "error": "", "tparams": [], - "type": "STRUCT", - "name": "InputAction" + "type": "FUNCTION", + "name": "IsBone" }, { "replaces": "", - "description": "Input result enum", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "Input result enum", - "examples": "", - "members": [ + "description": "Set the local transforms recursively of all instances flagged as bones, starting with component with id.\nThe order of the transforms is depth-first.", + "parameters": [ { - "doc": "= 0", - "type": "", - "name": "INPUT_RESULT_IGNORED" + "doc": "First Instance of the hierarchy to set", + "name": "instance", + "types": [ + "HImstance" + ] }, { - "doc": "= 1", - "type": "", - "name": "INPUT_RESULT_CONSUMED" + "doc": "the transform for component root", + "name": "component_transform", + "types": [ + "dmTransform::Transform" + ] }, { - "doc": "= -1000", - "type": "", - "name": "INPUT_RESULT_UNKNOWN_ERROR" - } - ], - "error": "", - "tparams": [], - "type": "ENUM", - "name": "InputResult" - }, - { - "replaces": "", - "description": "Retrieve the message socket for the specified collection.", - "parameters": [ + "doc": "Array of transforms to set depth-first for the bone instances", + "name": "transforms", + "types": [ + "" + ] + }, { - "doc": "Collection handle", - "name": "collection", + "doc": "Size of the transforms array", + "name": "transform_count", "types": [ - "dmGameObject::HCollection" + "" ] } ], "returnvalues": [ { - "doc": "The message socket of the specified collection", - "name": "socket", + "doc": "of instances found", + "name": "Number", "types": [ - "dmMessage::HSocket" + "" ] } ], "notes": [], - "brief": "Retrieve the message socket for the specified coll...", + "brief": "Set the local transforms recursively of all instan...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetMessageSocket" + "name": "SetBoneTransforms" }, { "replaces": "", - "description": "Retrieve a collection from the specified instance", + "description": "Recursively delete all instances flagged as bones under the given parent instance.\nThe order of deletion is depth-first, so that the children are deleted before the parents.", "parameters": [ { - "doc": "Game object instance", - "name": "instance", - "types": [ - "dmGameObject::HInstance" - ] - } - ], - "returnvalues": [ - { - "doc": "The collection the specified instance belongs to", - "name": "collection", + "doc": "Parent instance of the hierarchy", + "name": "parent", "types": [ - "dmGameObject::HInstance" + "HInstance" ] } ], + "returnvalues": [], "notes": [], - "brief": "Retrieve a collection from the specified instance", + "brief": "Recursively delete all instances flagged as bones ...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetCollection" + "name": "DeleteBones" }, { "replaces": "", - "description": "Create a new gameobject instance", - "parameters": [ - { - "doc": "Gameobject collection", - "name": "collection", - "types": [ - "dmGameObject::HCollection" - ] - }, - { - "doc": "|type: const char*] Prototype file name. May be 0.", - "name": "prototype_name", - "types": [ - "" - ] - } - ], - "returnvalues": [ - { - "doc": "New gameobject instance. NULL if any error occured", - "name": "instance", - "types": [ - "dmGameObject::HInstance" - ] - } - ], + "description": "Opaque struct that holds info about the current node", + "parameters": [], + "returnvalues": [], "notes": [], - "brief": "Create a new gameobject instance", + "brief": "scene graph traversal node", "examples": "", "members": [], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "New" + "type": "STRUCT", + "name": "SceneNode" }, { "replaces": "", - "description": "Delete gameobject instance", + "description": "Opaque struct that holds info about the current position when traversing the scene", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "scene graph traversal iterator", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "STRUCT", + "name": "SceneNodeIterator" + }, + { + "replaces": "", + "description": "Gets the top node of the whole game (the main collection)", "parameters": [ { - "doc": "Gameobject collection", - "name": "collection", + "doc": "the full gameobject register", + "name": "regist", "types": [ - "dmGameObject::HCollection" + "dmGameObject::HRegister" ] }, { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the node to inspect", + "name": "node", "types": [ - "dmGameObject::HInstance" + "dmGameObject::HRegister" ] - }, + } + ], + "returnvalues": [ { - "doc": "If true, delete child hierarchy recursively in child to parent order (leaf first)", - "name": "recursive", + "doc": "True if successful", + "name": "result", "types": [ "bool" ] } ], - "returnvalues": [], "notes": [], - "brief": "Delete gameobject instance", - "examples": "", + "brief": "Gets the top node of the whole game (the main coll...", + "examples": "The following examples show how to iterate over currently loaded scene graph\n
void OutputNode(dmGameObject::SceneNode* node) {\n    dmGameObject::SceneNodeIterator it = dmGameObject::TraverseIterateChildren(node);\n    while(dmGameObject::TraverseIterateNext(&it))\n    {\n        OutputProperties(&it.m_Node); // see dmGameObject::TraverseIterateProperties()\n        OutputNode(&it.m_Node);\n    }\n}\n\nbool OutputScene(HRegister regist) {\n    dmGameObject::SceneNode root;\n    if (!dmGameObject::TraverseGetRoot(regist, &root))\n        return false;\n    OutputNode(&node);\n}\n
", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "Delete" + "name": "TraverseGetRoot" }, { "replaces": "", - "description": "Construct a hash of an instance id based on the index provided.", + "description": "Get a scene node iterator for the nodes' children", "parameters": [ { - "doc": "The index to base the id off of.", - "name": "index", + "doc": "the parent node", + "name": "node", "types": [ - "uint32_t" + "dmGameObject::SceneNode*" ] } ], "returnvalues": [ { - "doc": "hash of the instance id constructed.", - "name": "id", + "doc": "the iterator", + "name": "iterator", "types": [ - "dmhash_t" + "dmGameObject::SceneNodeIterator" ] } ], "notes": [], - "brief": "Construct a hash of an instance id based on the in...", + "brief": "Get a scene node iterator for the nodes' children", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "ConstructInstanceId" + "name": "TraverseIterateChildren" }, { "replaces": "", - "description": "Retrieve an instance index from the index pool for the collection.", + "description": "Step a scene node iterator to the next sibling", "parameters": [ { - "doc": "Collection from which to retrieve the instance index.", - "name": "collection", + "doc": "the iterator", + "name": "it", "types": [ - "dmGameObject::HColleciton" + "dmGameObject::SceneNodeIterator*" ] } ], "returnvalues": [ { - "doc": "index from the index pool of collection.", - "name": "instance", + "doc": "true if successful. false if the iterator is finished", + "name": "result", "types": [ - "uint32_t" + "bool" ] } ], "notes": [], - "brief": "Retrieve an instance index from the index pool for...", + "brief": "Step a scene node iterator to the next sibling", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "AcquireInstanceIndex" + "name": "TraverseIterateNext" }, { "replaces": "", - "description": "Assign an index to the instance, only if the instance is not null.", - "parameters": [ + "description": "scene node property types", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "scene node property types", + "examples": "", + "members": [ { - "doc": "The index to assign.", - "name": "index", - "types": [ - "uint32_t" - ] + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_NUMBER" }, { - "doc": "The instance that should be assigned the index.", - "name": "instance", - "types": [ - "dmGameObject::HInstance" - ] + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_HASH" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_URL" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_VECTOR3" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_VECTOR4" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_QUAT" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_BOOLEAN" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_TEXT" + }, + { + "doc": "", + "type": "", + "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_COUNT" } ], + "error": "", + "tparams": [], + "type": "ENUM", + "name": "SceneNodePropertyType" + }, + { + "replaces": "", + "description": "Struct that holds info about the current position when traversing the scene", + "parameters": [], "returnvalues": [], "notes": [], - "brief": "Assign an index to the instance, only if the insta...", + "brief": "scene traversal node property", "examples": "", - "members": [], + "members": [ + { + "doc": "name", + "type": "dmhash_t", + "name": "m_NameHash" + }, + { + "doc": "type", + "type": "dmGameObject::SceneNodePropertyType", + "name": "m_Type" + }, + { + "doc": "value\n
\n
m_Number
\n
double floating point number
\n
m_Hash
\n
dmhash_t The hashed value.
\n
m_URL
\n
char[1024] The text representation of the url (if reverse hashes are enabled)
\n
m_V4
\n
float[4] Used for Vector3, Vector4 and Quat
\n
m_Bool
\n
bool A boolean value
\n
m_Text
\n
const char* Text from a text property
\n
", + "type": "union", + "name": "m_Value" + } + ], "error": "", "tparams": [], - "type": "FUNCTION", - "name": "AssignInstanceIndex" + "type": "STRUCT", + "name": "SceneNodeProperty" + }, + { + "replaces": "", + "description": "Holds the property", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "scene traversal node property", + "examples": "", + "members": [ + { + "doc": "property", + "type": "dmGameObject::SceneNodeProperty", + "name": "m_Property" + } + ], + "error": "", + "tparams": [], + "type": "STRUCT", + "name": "SceneNodePropertyIterator" }, { "replaces": "", - "description": "Get instance identifier", + "description": "Create a scene node traversal property iterator", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the node to inspect", + "name": "node", "types": [ - "dmGameObject::HInstance" + "dmGameObject::SceneNode*" ] } ], "returnvalues": [ { - "doc": "Identifier. dmGameObject::UNNAMED_IDENTIFIER if not set.", - "name": "", + "doc": "the property iterator", + "name": "iterator", "types": [ - "dmhash_t" + "dmGameObject::SceneNodePropertyIterator" ] } ], "notes": [], - "brief": "Get instance identifier", - "examples": "", + "brief": "Create a scene node traversal property iterator", + "examples": "The following examples show how to iterate over the properties of a node\n
dmGameObject::SceneNodePropertyIterator pit = TraverseIterateProperties(node);\nwhile(dmGameObject::TraverseIteratePropertiesNext(&pit))\n{\n    const char* name = dmHashReverseSafe64(pit.m_Property.m_NameHash);\n    switch(pit.m_Property.m_Type)\n    {\n    case dmGameObject::SCENE_NODE_PROPERTY_TYPE_NUMBER: ...\n    ...\n    }\n}\n
", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetIdentifier" + "name": "TraverseIterateProperties" }, { "replaces": "", - "description": "Set instance identifier. Must be unique within the collection.", + "description": "Steps the scene node traversal property iterator to the next property", "parameters": [ { - "doc": "Collection", - "name": "collection", - "types": [ - "dmGameObject::HCollection" - ] - }, - { - "doc": "Instance", - "name": "instance", - "types": [ - "dmGameObject::HInstance" - ] - }, - { - "doc": "Identifier", - "name": "identifier", + "doc": "the iterator", + "name": "it", "types": [ - "dmhash_t" + "dmGameObject::SceneNodePropertyIterator*" ] } ], "returnvalues": [ { - "doc": "RESULT_OK on success", - "name": "result", + "doc": "True if the iterator it valid, false if the iterator is finished.", + "name": "finished", "types": [ - "dmGameObject::Result" + "bool" ] } ], "notes": [], - "brief": "Set instance identifier. Must be unique within the...", + "brief": "Steps the scene node traversal property iterator t...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetIdentifier" + "name": "TraverseIteratePropertiesNext" }, { "replaces": "", - "description": "Get component id from component index.", - "parameters": [ - { - "doc": "Instance", - "name": "instance", - "types": [ - "dmGameObject::HInstance" - ] - }, - { - "doc": "Component index", - "name": "component_index", - "types": [ - "uint16_t" - ] - }, - { - "doc": "[type: dmhash_t* Component id as out-argument", - "name": "component_id", - "types": [ - "" - ] - } - ], - "returnvalues": [ - { - "doc": "RESULT_OK if the comopnent was found", - "name": "result", - "types": [ - "dmGameObject::Result" - ] - } - ], + "description": "Callback when iterating over the properties for a component.", + "parameters": [], + "returnvalues": [], "notes": [], - "brief": "Get component id from component index.", + "brief": "Callback when iterating over the properties for a ...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetComponentId" + "name": "" }, { "replaces": "", - "description": "Set gameobject instance position", + "description": "Set the new world callback. Called when a collection (i.e. a \"world\") is created.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] }, { - "doc": "New Position", - "name": "position", + "doc": "", + "name": "", "types": [ - "dmGameObject::Point3" + "" ] } ], "returnvalues": [], "notes": [], - "brief": "set position", + "brief": "set the new world callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetPosition" + "name": "ComponentTypeSetNewWorldFn" }, { "replaces": "", - "description": "Get gameobject instance position", + "description": "Set the world destroy callback. Called when a collection (i.e. a \"world\") is destroyed.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "Position", + "doc": "", "name": "", "types": [ - "dmGameObject::Point3" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get position", + "brief": "set the world destroy callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetPosition" + "name": "ComponentTypeSetDeleteWorldFn" }, { "replaces": "", - "description": "Set gameobject instance rotation", + "description": "Set the component create callback. Called when a component instance is created.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] }, { - "doc": "New Position", - "name": "position", + "doc": "", + "name": "", "types": [ "" ] @@ -1722,58 +1799,57 @@ ], "returnvalues": [], "notes": [], - "brief": "set rotation", + "brief": "set the component create callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetRotation" + "name": "ComponentTypeSetCreateFn" }, { "replaces": "", - "description": "Get gameobject instance rotation", + "description": "Set the component destroy callback. Called when a component instance is destroyed.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "rotation", + "doc": "", "name": "", "types": [ - "dmGameObject::Quat" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get rotation", + "brief": "set the component destroy callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetRotation" + "name": "ComponentTypeSetDestroyFn" }, { "replaces": "", - "description": "Set gameobject instance uniform scale", + "description": "Set the component init callback. Called on each gameobject's components, during a gameobject's initialization.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] }, { - "doc": "New uniform scale", - "name": "scale", + "doc": "", + "name": "", "types": [ "" ] @@ -1781,28 +1857,28 @@ ], "returnvalues": [], "notes": [], - "brief": "set uniform scale", + "brief": "set the component init callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetScale" + "name": "ComponentTypeSetInitFn" }, { "replaces": "", - "description": "Set gameobject instance non-uniform scale", + "description": "Set the component finalize callback. Called on each gameobject's components, during a gameobject's finalization.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] }, { - "doc": "New uniform scale", - "name": "scale", + "doc": "", + "name": "", "types": [ "" ] @@ -1810,680 +1886,603 @@ ], "returnvalues": [], "notes": [], - "brief": "set scale", + "brief": "set the component finalize callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetScale" + "name": "ComponentTypeSetFinalFn" }, { "replaces": "", - "description": "Get gameobject instance uniform scale", + "description": "Set the component add-to-update callback. Called for each component instal, when the game object is spawned.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "Uniform scale", + "doc": "", "name": "", "types": [ - "float" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get uniform scale", + "brief": "set the component add-to-update callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetUniformScale" + "name": "ComponentTypeSetAddToUpdateFn" }, { "replaces": "", - "description": "Get gameobject instance scale", + "description": "Set the component get callback. Called when the scripts want to retrieve the individual component user data given an url.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "Non-uniform scale", + "doc": "", "name": "", "types": [ - "dmGameObject::Vector3" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get scale", + "brief": "set the component get callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetScale" + "name": "ComponentTypeSetGetFn" }, { "replaces": "", - "description": "Get gameobject instance world position", + "description": "Set the component render callback. Called when it's time to render all component instances.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "World position", + "doc": "", "name": "", "types": [ - "dmGameObject::Point3" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get world position", + "brief": "set the component render callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetWorldPosition" + "name": "ComponentTypeSetRenderFn" }, { "replaces": "", - "description": "Get gameobject instance world rotation", + "description": "Set the component update callback. Called when it's time to update all component instances.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "World rotation", + "doc": "", "name": "", "types": [ - "dmGameObject::Quat" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get world rotation", + "brief": "set the component update callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetWorldRotation" + "name": "ComponentTypeSetUpdateFn" }, { "replaces": "", - "description": "Get game object instance world transform", + "description": "Set the component post update callback. Called for each collection after the update, before the render.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "World scale", + "doc": "", "name": "", "types": [ - "dmGameObject::Vector3" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get world scale", + "brief": "set the component post update callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetWorldScale" + "name": "ComponentTypeSetPostUpdateFn" }, { "replaces": "", - "description": "Get game object instance uniform scale", + "description": "Set the component on-message callback. Called multiple times per frame, to flush messages.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "World uniform scale", + "doc": "", "name": "", "types": [ - "float" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get world uniform scale", + "brief": "set the component on-message callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetWorldUniformScale" + "name": "ComponentTypeSetOnMessageFn" }, { "replaces": "", - "description": "Get game object instance world transform as Matrix4.", + "description": "Set the component on-input callback. Called once per frame, before the Update function.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "World transform matrix.", + "doc": "", "name": "", "types": [ - "dmGameObject::MAtrix4" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get world matrix", + "brief": "set the component on-input callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetWorldMatrix" + "name": "ComponentTypeSetOnInputFn" }, { "replaces": "", - "description": "Get game object instance world transform", + "description": "Set the component on-reload callback. Called when the resource of a component instance is reloaded.", "parameters": [ { - "doc": "Gameobject instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HInstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "World transform", + "doc": "", "name": "", "types": [ - "dmTransform::Transform" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "get world transform", + "brief": "set the component on-reload callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetWorldTransform" + "name": "ComponentTypeSetOnReloadFn" }, { "replaces": "", - "description": "Set whether the instance should be flagged as a bone.\nInstances flagged as bones can have their transforms updated in a batch through SetBoneTransforms.\nUsed for animated skeletons.", + "description": "Set the component set properties callback. Called when the component instance is being spwned.", "parameters": [ { - "doc": "Instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "HImstance" + "ComponentType*" ] }, { - "doc": "true if the instance is a bone", - "name": "bone", + "doc": "", + "name": "", "types": [ - "bool" + "" ] } ], "returnvalues": [], "notes": [], - "brief": "Set whether the instance should be flagged as a bo...", + "brief": "set the component set properties callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetBone" + "name": "ComponentTypeSetSetPropertiesFn" }, { "replaces": "", - "description": "Check whether the instance is flagged as a bone.", + "description": "Set the component get property callback. Called when accessing a property via go.get()", "parameters": [ { - "doc": "Instance", - "name": "instance", + "doc": "the type", + "name": "type", "types": [ - "HImstance" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "True if flagged as a bone", - "name": "result", + "doc": "", + "name": "", "types": [ - "bool" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "Check whether the instance is flagged as a bone.", + "brief": "set the component get property callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "IsBone" + "name": "ComponentTypeSetGetPropertyFn" }, { "replaces": "", - "description": "Set the local transforms recursively of all instances flagged as bones, starting with component with id.\nThe order of the transforms is depth-first.", + "description": "Set the component set property callback. Called when accessing a property via go.set()", "parameters": [ { - "doc": "First Instance of the hierarchy to set", - "name": "instance", - "types": [ - "HImstance" - ] - }, - { - "doc": "the transform for component root", - "name": "component_transform", - "types": [ - "dmTransform::Transform" - ] - }, - { - "doc": "Array of transforms to set depth-first for the bone instances", - "name": "transforms", + "doc": "the type", + "name": "type", "types": [ - "" + "ComponentType*" ] }, { - "doc": "Size of the transforms array", - "name": "transform_count", - "types": [ - "" - ] - } - ], - "returnvalues": [ - { - "doc": "of instances found", - "name": "Number", + "doc": "", + "name": "", "types": [ "" ] } ], + "returnvalues": [], "notes": [], - "brief": "Set the local transforms recursively of all instan...", + "brief": "set the component set property callback", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetBoneTransforms" + "name": "ComponentTypeSetSetPropertyFn" }, { "replaces": "", - "description": "Recursively delete all instances flagged as bones under the given parent instance.\nThe order of deletion is depth-first, so that the children are deleted before the parents.", + "description": "Set the component type global context. Usually set when registering the component type.", "parameters": [ { - "doc": "Parent instance of the hierarchy", - "name": "parent", + "doc": "the type", + "name": "type", "types": [ - "HInstance" + "ComponentType*" + ] + }, + { + "doc": "", + "name": "", + "types": [ + "" ] } ], "returnvalues": [], "notes": [], - "brief": "Recursively delete all instances flagged as bones ...", + "brief": "set the component type global context", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "DeleteBones" + "name": "ComponentTypeSetContext" }, { "replaces": "", - "description": "Opaque struct that holds info about the current node", - "parameters": [], + "description": "Set the component type transform dependency flag.\nIf this flag is set, it might trigger an dmGameObject::UpdateTransforms() (if there are dirty transforms)", + "parameters": [ + { + "doc": "the type", + "name": "type", + "types": [ + "ComponentType*" + ] + }, + { + "doc": "", + "name": "", + "types": [ + "" + ] + } + ], "returnvalues": [], "notes": [], - "brief": "scene graph traversal node", + "brief": "set the component type transform dependency flag", "examples": "", "members": [], "error": "", "tparams": [], - "type": "STRUCT", - "name": "SceneNode" + "type": "FUNCTION", + "name": "ComponentTypeSetReadsTransforms" }, { "replaces": "", - "description": "Opaque struct that holds info about the current position when traversing the scene", - "parameters": [], + "description": "Set the component type prio order. Defines the update order of the component types.", + "parameters": [ + { + "doc": "the type", + "name": "type", + "types": [ + "ComponentType*" + ] + }, + { + "doc": "", + "name": "", + "types": [ + "" + ] + } + ], "returnvalues": [], "notes": [], - "brief": "scene graph traversal iterator", + "brief": "set the component type prio order", "examples": "", "members": [], "error": "", "tparams": [], - "type": "STRUCT", - "name": "SceneNodeIterator" + "type": "FUNCTION", + "name": "ComponentTypeSetPrio" }, { "replaces": "", - "description": "Gets the top node of the whole game (the main collection)", + "description": "Set the component type need for a per component instance user data. Defaults to true.", "parameters": [ { - "doc": "the full gameobject register", - "name": "regist", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::HRegister" + "ComponentType*" ] }, { - "doc": "the node to inspect", - "name": "node", - "types": [ - "dmGameObject::HRegister" - ] - } - ], - "returnvalues": [ - { - "doc": "True if successful", - "name": "result", + "doc": "", + "name": "", "types": [ - "bool" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "Gets the top node of the whole game (the main coll...", - "examples": "The following examples show how to iterate over currently loaded scene graph\n
void OutputNode(dmGameObject::SceneNode* node) {\n    dmGameObject::SceneNodeIterator it = dmGameObject::TraverseIterateChildren(node);\n    while(dmGameObject::TraverseIterateNext(&it))\n    {\n        OutputProperties(&it.m_Node); // see dmGameObject::TraverseIterateProperties()\n        OutputNode(&it.m_Node);\n    }\n}\n\nbool OutputScene(HRegister regist) {\n    dmGameObject::SceneNode root;\n    if (!dmGameObject::TraverseGetRoot(regist, &root))\n        return false;\n    OutputNode(&node);\n}\n
", + "brief": "set the component type need for a per component instance user data", + "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "TraverseGetRoot" + "name": "ComponentTypeSetHasUserData" }, { "replaces": "", - "description": "Get a scene node iterator for the nodes' children", + "description": "set the component property iterator function. Called during inspection", "parameters": [ { - "doc": "the parent node", - "name": "node", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::SceneNode*" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "the iterator", - "name": "iterator", + "doc": "", + "name": "", "types": [ - "dmGameObject::SceneNodeIterator" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "Get a scene node iterator for the nodes' children", + "brief": "set the component property iterator function", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "TraverseIterateChildren" + "name": "ComponentTypeSetChilldIteratorFn" }, { "replaces": "", - "description": "Step a scene node iterator to the next sibling", + "description": "set the component property iterator function. Called during inspection", "parameters": [ { - "doc": "the iterator", - "name": "it", + "doc": "the type", + "name": "type", "types": [ - "dmGameObject::SceneNodeIterator*" + "ComponentType*" ] - } - ], - "returnvalues": [ + }, { - "doc": "true if successful. false if the iterator is finished", - "name": "result", + "doc": "", + "name": "", "types": [ - "bool" + "" ] } ], + "returnvalues": [], "notes": [], - "brief": "Step a scene node iterator to the next sibling", + "brief": "set the component property iterator function", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "TraverseIterateNext" + "name": "ComponentTypeSetPropertyIteratorFn" }, { "replaces": "", - "description": "scene node property types", + "description": "Context used when registering a new component type", "parameters": [], "returnvalues": [], "notes": [], - "brief": "scene node property types", + "brief": "Context used when registering a new component type", "examples": "", "members": [ { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_NUMBER" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_HASH" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_URL" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_VECTOR3" - }, - { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_VECTOR4" + "doc": "The config file", + "type": "dmConfigFile::HConfig", + "name": "m_Config" }, { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_QUAT" + "doc": "The resource factory", + "type": "dmResource::HFactory", + "name": "m_Factory" }, { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_BOOLEAN" + "doc": "The game object registry", + "type": "dmGameObject::HRegister", + "name": "m_Register" }, { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_TEXT" + "doc": "The shared script context", + "type": "dmScript::HContext", + "name": "m_Script" }, { - "doc": "", - "type": "", - "name": "dmGameObject::SCENE_NODE_PROPERTY_TYPE_COUNT" + "doc": "Mappings between names and contextx", + "type": "dmHashTable64", + "name": "m_Contextx" } ], "error": "", "tparams": [], - "type": "ENUM", - "name": "SceneNodePropertyType" + "type": "STRUCT", + "name": "ComponentTypeCreateCtx" }, { "replaces": "", - "description": "Struct that holds info about the current position when traversing the scene", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "scene traversal node property", - "examples": "", - "members": [ + "description": "Get component user data from a url.\nThe object referenced by the url must be in the same collection as the caller.", + "parameters": [ { - "doc": "name", - "type": "dmhash_t", - "name": "m_NameHash" + "doc": "Lua state", + "name": "L", + "types": [ + "lua_State*" + ] }, { - "doc": "type", - "type": "dmGameObject::SceneNodePropertyType", - "name": "m_Type" + "doc": "index to argument (a url)", + "name": "index", + "types": [ + "lua_State*" + ] }, { - "doc": "value\n
\n
m_Number
\n
double floating point number
\n
m_Hash
\n
dmhash_t The hashed value.
\n
m_URL
\n
char[1024] The text representation of the url (if reverse hashes are enabled)
\n
m_V4
\n
float[4] Used for Vector3, Vector4 and Quat
\n
m_Bool
\n
bool A boolean value
\n
m_Text
\n
const char* Text from a text property
\n
", - "type": "union", - "name": "m_Value" - } - ], - "error": "", - "tparams": [], - "type": "STRUCT", - "name": "SceneNodeProperty" - }, - { - "replaces": "", - "description": "Holds the property", - "parameters": [], - "returnvalues": [], - "notes": [], - "brief": "scene traversal node property", - "examples": "", - "members": [ - { - "doc": "property", - "type": "dmGameObject::SceneNodeProperty", - "name": "m_Property" - } - ], - "error": "", - "tparams": [], - "type": "STRUCT", - "name": "SceneNodePropertyIterator" - }, - { - "replaces": "", - "description": "Create a scene node traversal property iterator", - "parameters": [ - { - "doc": "the node to inspect", - "name": "node", + "doc": "the call will fail if the found component does not have the specified extension", + "name": "component_type", "types": [ - "dmGameObject::SceneNode*" + "const char*" ] - } - ], - "returnvalues": [ + }, { - "doc": "the property iterator", - "name": "iterator", + "doc": "The world associated owning the component. May be 0", + "name": "world", "types": [ - "dmGameObject::SceneNodePropertyIterator" + "void**" ] - } - ], - "notes": [], - "brief": "Create a scene node traversal property iterator", - "examples": "The following examples show how to iterate over the properties of a node\n
dmGameObject::SceneNodePropertyIterator pit = TraverseIterateProperties(node);\nwhile(dmGameObject::TraverseIteratePropertiesNext(&pit))\n{\n    const char* name = dmHashReverseSafe64(pit.m_Property.m_NameHash);\n    switch(pit.m_Property.m_Type)\n    {\n    case dmGameObject::SCENE_NODE_PROPERTY_TYPE_NUMBER: ...\n    ...\n    }\n}\n
", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "TraverseIterateProperties" - }, - { - "replaces": "", - "description": "Steps the scene node traversal property iterator to the next property", - "parameters": [ + }, { - "doc": "the iterator", - "name": "it", + "doc": "The component data associated with the url. May be 0", + "name": "component", "types": [ - "dmGameObject::SceneNodePropertyIterator*" + "void**" ] - } - ], - "returnvalues": [ + }, { - "doc": "True if the iterator it valid, false if the iterator is finished.", - "name": "finished", + "doc": "The resolved url. May be 0", + "name": "url", "types": [ - "bool" + "dmMessage::URL*" ] } ], + "returnvalues": [], "notes": [], - "brief": "Steps the scene node traversal property iterator t...", + "brief": "Get component user data from a url", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "TraverseIteratePropertiesNext" + "name": "GetComponentFromLua" } ] } \ No newline at end of file diff --git a/DefoldDocs/doc/dmGraphics_doc.json b/DefoldDocs/doc/dmGraphics_doc.json index d9b7bca..85ca40c 100644 --- a/DefoldDocs/doc/dmGraphics_doc.json +++ b/DefoldDocs/doc/dmGraphics_doc.json @@ -1,343 +1,14 @@ { "info": { - "description": "<dmsdk/graphics/graphics.h>\nGraphics API", + "group": "DEFOLD SDK", + "description": "Platform specific native graphics functions.", "namespace": "dmGraphics", - "brief": "Graphics API documentation", - "file": "", - "path": "", + "brief": "SDK Graphics API documentation", + "file": "dmsdk/graphics/graphics_native.h", + "path": "engine/dlib/src/dmsdk/graphics/graphics_native.h", "name": "Graphics" }, "elements": [ - { - "replaces": "", - "description": "Get iOS UIWindow native handle (id). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "id", - "types": [ - "id" - ] - } - ], - "notes": [], - "brief": "get iOS UIWindow", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeiOSUIWindow" - }, - { - "replaces": "", - "description": "Get iOS UIView native handle (id). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "id", - "types": [ - "id" - ] - } - ], - "notes": [], - "brief": "get iOS UIView", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeiOSUIView" - }, - { - "replaces": "", - "description": "Get iOS EAGLContext native handle (id). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "id", - "types": [ - "id" - ] - } - ], - "notes": [], - "brief": "get iOS EAGLContext", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeiOSEAGLContext" - }, - { - "replaces": "", - "description": "Get OSX NSWindow native handle (id). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "id", - "types": [ - "id" - ] - } - ], - "notes": [], - "brief": "get OSX NSWindow", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeOSXNSWindow" - }, - { - "replaces": "", - "description": "Get OSX NSView native handle (id). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "id", - "types": [ - "id" - ] - } - ], - "notes": [], - "brief": "get OSX NSView", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeOSXNSView" - }, - { - "replaces": "", - "description": "Get OSX NSOpenGLContext native handle (id). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "id", - "types": [ - "id" - ] - } - ], - "notes": [], - "brief": "get OSX NSOpenGLContext", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeOSXNSOpenGLContext" - }, - { - "replaces": "", - "description": "Get Win32 windows native handle (HWND). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "HWND", - "types": [ - "HWND" - ] - } - ], - "notes": [], - "brief": "get Win32 HWND", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeWindowsHWND" - }, - { - "replaces": "", - "description": "Get Win32 gl rendercontext native handle (HGLRC). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "HGLRC", - "types": [ - "HGLRC" - ] - } - ], - "notes": [], - "brief": "get Win32 HGLRC", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeWindowsHGLRC" - }, - { - "replaces": "", - "description": "Get Android EGLContext native handle (EGLContext). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "EGLContext", - "types": [ - "EGLContext" - ] - } - ], - "notes": [], - "brief": "get Android EGLContext", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeAndroidEGLContext" - }, - { - "replaces": "", - "description": "Get Android EGLSurface native handle (EGLSurface). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "EGLSurface", - "types": [ - "EGLSurface" - ] - } - ], - "notes": [], - "brief": "get Android EGLSurface", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeAndroidEGLSurface" - }, - { - "replaces": "", - "description": "Get Android JavaVM ptr. Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "JavaVM*", - "types": [ - "JavaVM*" - ] - } - ], - "notes": [], - "brief": "get Android native JavaVM", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeAndroidJavaVM" - }, - { - "replaces": "", - "description": "Get Android native jobject. Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "jobject", - "types": [ - "jobject" - ] - } - ], - "notes": [], - "brief": "get Android native jobject", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeAndroidActivity" - }, - { - "replaces": "", - "description": "Get Android app object. Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "app", - "types": [ - "struct android_app*" - ] - } - ], - "notes": [], - "brief": "get Android app object", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeAndroidApp" - }, - { - "replaces": "", - "description": "Get Linux X11Window windows native handle (Window). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "Window", - "types": [ - "Window" - ] - } - ], - "notes": [], - "brief": "get Linux X11Window", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeX11Window" - }, - { - "replaces": "", - "description": "Get Linux X11GLXContext native handle (GLXContext). Any other platform return zero.", - "parameters": [], - "returnvalues": [ - { - "doc": "native handle", - "name": "GLXContext", - "types": [ - "GLXContext" - ] - } - ], - "notes": [], - "brief": "get Linux X11GLXContext", - "examples": "", - "members": [], - "error": "", - "tparams": [], - "type": "FUNCTION", - "name": "dmGraphics::GetNativeX11GLXContext" - }, { "replaces": "", "description": "Context handle", @@ -505,6 +176,31 @@ "type": "ENUM", "name": "CompareFunc" }, + { + "replaces": "", + "description": "", + "parameters": [], + "returnvalues": [], + "notes": [], + "brief": "", + "examples": "", + "members": [ + { + "doc": "", + "type": "", + "name": "FACE_WINDING_CCW" + }, + { + "doc": "", + "type": "", + "name": "FACE_WINDING_CW" + } + ], + "error": "", + "tparams": [], + "type": "ENUM", + "name": "FaceWinding" + }, { "replaces": "", "description": "", @@ -931,70 +627,259 @@ ] }, { - "doc": "the array of vertex elements", - "name": "element", + "doc": "the array of vertex elements", + "name": "element", + "types": [ + "dmGraphics::VertexElement*" + ] + }, + { + "doc": "the number of items in the element array", + "name": "count", + "types": [ + "uint32_t" + ] + }, + { + "doc": "the stride between the start of each vertex (in bytes)", + "name": "stride", + "types": [ + "uint32_t" + ] + } + ], + "returnvalues": [ + { + "doc": "the vertex declaration", + "name": "declaration", + "types": [ + "dmGraphics::HVertexDeclaration" + ] + } + ], + "notes": [], + "brief": "Create new vertex declaration", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "NewVertexDeclaration" + }, + { + "replaces": "", + "description": "Delete vertex declaration", + "parameters": [ + { + "doc": "the vertex declaration", + "name": "vertex_declaration", + "types": [ + "dmGraphics::HVertexDeclaration" + ] + } + ], + "returnvalues": [], + "notes": [], + "brief": "Delete vertex declaration", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "DeleteVertexDeclaration" + }, + { + "replaces": "", + "description": "Create new vertex buffer with initial data", + "parameters": [ + { + "doc": "the context", + "name": "context", + "types": [ + "dmGraphics::HContext" + ] + }, + { + "doc": "the size of the buffer (in bytes). May be 0", + "name": "size", + "types": [ + "uint32_t" + ] + }, + { + "doc": "the data", + "name": "data", + "types": [ + "void*" + ] + }, + { + "doc": "the usage", + "name": "buffer_usage", + "types": [ + "dmGraphics::BufferUsage" + ] + } + ], + "returnvalues": [ + { + "doc": "the vertex buffer", + "name": "buffer", + "types": [ + "dmGraphics::HVertexBuffer" + ] + } + ], + "notes": [], + "brief": "Create new vertex buffer with initial data", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "NewVertexBuffer" + }, + { + "replaces": "", + "description": "Delete vertex buffer", + "parameters": [ + { + "doc": "the buffer", + "name": "buffer", + "types": [ + "dmGraphics::HVertexBuffer" + ] + } + ], + "returnvalues": [], + "notes": [], + "brief": "Delete vertex buffer", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "DeleteVertexBuffer" + }, + { + "replaces": "", + "description": "Set vertex buffer data", + "parameters": [ + { + "doc": "the buffer", + "name": "buffer", + "types": [ + "dmGraphics::HVertexBuffer" + ] + }, + { + "doc": "the size of the buffer (in bytes). May be 0", + "name": "size", + "types": [ + "uint32_t" + ] + }, + { + "doc": "the data", + "name": "data", + "types": [ + "void*" + ] + }, + { + "doc": "the usage", + "name": "buffer_usage", + "types": [ + "dmGraphics::BufferUsage" + ] + } + ], + "returnvalues": [], + "notes": [], + "brief": "Set vertex buffer data", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "SetVertexBufferData" + }, + { + "replaces": "", + "description": "Set subset of vertex buffer data", + "parameters": [ + { + "doc": "the buffer", + "name": "buffer", "types": [ - "dmGraphics::VertexElement*" + "dmGraphics::HVertexBuffer" ] }, { - "doc": "the number of items in the element array", - "name": "count", + "doc": "the offset into the desination buffer (in bytes)", + "name": "offset", "types": [ "uint32_t" ] }, { - "doc": "the stride between the start of each vertex (in bytes)", - "name": "stride", + "doc": "the size of the buffer (in bytes). May be 0", + "name": "size", "types": [ "uint32_t" ] - } - ], - "returnvalues": [ + }, { - "doc": "the vertex declaration", - "name": "declaration", + "doc": "the data", + "name": "data", "types": [ - "dmGraphics::HVertexDeclaration" + "void*" ] } ], + "returnvalues": [], "notes": [], - "brief": "Create new vertex declaration", + "brief": "Set subset of vertex buffer data", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "NewVertexDeclaration" + "name": "SetVertexBufferSubData" }, { "replaces": "", - "description": "Delete vertex declaration", + "description": "Get the max number of vertices allowed by the system in a vertex buffer", "parameters": [ { - "doc": "the vertex declaration", - "name": "vertex_declaration", + "doc": "the context", + "name": "context", "types": [ - "dmGraphics::HVertexDeclaration" + "dmGraphics::HContext" + ] + } + ], + "returnvalues": [ + { + "doc": "the count", + "name": "count", + "types": [ + "uint32_t" ] } ], - "returnvalues": [], "notes": [], - "brief": "Delete vertex declaration", + "brief": "Get the max number of vertices allowed by the syst...", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "DeleteVertexDeclaration" + "name": "GetMaxElementsVertices" }, { "replaces": "", - "description": "Create new vertex buffer with initial data", + "description": "Create new index buffer with initial data", "parameters": [ { "doc": "the context", @@ -1027,53 +912,53 @@ ], "returnvalues": [ { - "doc": "the vertex buffer", + "doc": "the index buffer", "name": "buffer", "types": [ - "dmGraphics::HVertexBuffer" + "dmGraphics::HIndexBuffer" ] } ], "notes": [], - "brief": "Create new vertex buffer with initial data", + "brief": "Create new index buffer with initial data", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "NewVertexBuffer" + "name": "NewIndexBuffer" }, { "replaces": "", - "description": "Delete vertex buffer", + "description": "Delete the index buffer", "parameters": [ { - "doc": "the buffer", + "doc": "the index buffer", "name": "buffer", "types": [ - "dmGraphics::HVertexBuffer" + "dmGraphics::HIndexBuffer" ] } ], "returnvalues": [], "notes": [], - "brief": "Delete vertex buffer", + "brief": "Delete the index buffer", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "DeleteVertexBuffer" + "name": "DeleteIndexBuffer" }, { "replaces": "", - "description": "Set vertex buffer data", + "description": "Set index buffer data", "parameters": [ { "doc": "the buffer", "name": "buffer", "types": [ - "dmGraphics::HVertexBuffer" + "dmGraphics::HIndexBuffer" ] }, { @@ -1100,17 +985,17 @@ ], "returnvalues": [], "notes": [], - "brief": "Set vertex buffer data", + "brief": "Set index buffer data", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetVertexBufferData" + "name": "SetIndexBufferData" }, { "replaces": "", - "description": "Set subset of vertex buffer data", + "description": "Set subset of index buffer data", "parameters": [ { "doc": "the buffer", @@ -1134,277 +1019,418 @@ ] }, { - "doc": "the data", - "name": "data", + "doc": "the data", + "name": "data", + "types": [ + "void*" + ] + } + ], + "returnvalues": [], + "notes": [], + "brief": "Set subset of index buffer data", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "SetIndexBufferSubData" + }, + { + "replaces": "", + "description": "Check if the index format is supported", + "parameters": [ + { + "doc": "the context", + "name": "context", + "types": [ + "dmGraphics::HContext" + ] + }, + { + "doc": "the format", + "name": "format", + "types": [ + "dmGraphics::IndexBufferFormat" + ] + }, + { + "doc": "true if the format is supoprted", + "name": "result", + "types": [ + "bool" + ] + } + ], + "returnvalues": [], + "notes": [], + "brief": "Check if the index format is supported", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "IsIndexBufferFormatSupported" + }, + { + "replaces": "", + "description": "Get the max number of indices allowed by the system in an index buffer", + "parameters": [ + { + "doc": "the context", + "name": "context", + "types": [ + "dmGraphics::HContext" + ] + } + ], + "returnvalues": [ + { + "doc": "the count", + "name": "count", + "types": [ + "uint32_t" + ] + } + ], + "notes": [], + "brief": "Get the max number of indices allowed by the syste...", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "GetMaxElementsIndices" + }, + { + "replaces": "", + "description": "Get iOS UIWindow native handle (id). Any other platform return zero.", + "parameters": [], + "returnvalues": [ + { + "doc": "native handle", + "name": "id", + "types": [ + "id" + ] + } + ], + "notes": [], + "brief": "get iOS UIWindow", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "dmGraphics::GetNativeiOSUIWindow" + }, + { + "replaces": "", + "description": "Get iOS UIView native handle (id). Any other platform return zero.", + "parameters": [], + "returnvalues": [ + { + "doc": "native handle", + "name": "id", + "types": [ + "id" + ] + } + ], + "notes": [], + "brief": "get iOS UIView", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "dmGraphics::GetNativeiOSUIView" + }, + { + "replaces": "", + "description": "Get iOS EAGLContext native handle (id). Any other platform return zero.", + "parameters": [], + "returnvalues": [ + { + "doc": "native handle", + "name": "id", + "types": [ + "id" + ] + } + ], + "notes": [], + "brief": "get iOS EAGLContext", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "dmGraphics::GetNativeiOSEAGLContext" + }, + { + "replaces": "", + "description": "Get OSX NSWindow native handle (id). Any other platform return zero.", + "parameters": [], + "returnvalues": [ + { + "doc": "native handle", + "name": "id", + "types": [ + "id" + ] + } + ], + "notes": [], + "brief": "get OSX NSWindow", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "dmGraphics::GetNativeOSXNSWindow" + }, + { + "replaces": "", + "description": "Get OSX NSView native handle (id). Any other platform return zero.", + "parameters": [], + "returnvalues": [ + { + "doc": "native handle", + "name": "id", "types": [ - "void*" + "id" ] } ], - "returnvalues": [], "notes": [], - "brief": "Set subset of vertex buffer data", + "brief": "get OSX NSView", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetVertexBufferSubData" + "name": "dmGraphics::GetNativeOSXNSView" }, { "replaces": "", - "description": "Get the max number of vertices allowed by the system in a vertex buffer", - "parameters": [ + "description": "Get OSX NSOpenGLContext native handle (id). Any other platform return zero.", + "parameters": [], + "returnvalues": [ { - "doc": "the context", - "name": "context", + "doc": "native handle", + "name": "id", "types": [ - "dmGraphics::HContext" + "id" ] } ], + "notes": [], + "brief": "get OSX NSOpenGLContext", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "dmGraphics::GetNativeOSXNSOpenGLContext" + }, + { + "replaces": "", + "description": "Get Win32 windows native handle (HWND). Any other platform return zero.", + "parameters": [], "returnvalues": [ { - "doc": "the count", - "name": "count", + "doc": "native handle", + "name": "HWND", "types": [ - "uint32_t" + "HWND" ] } ], "notes": [], - "brief": "Get the max number of vertices allowed by the syst...", + "brief": "get Win32 HWND", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetMaxElementsVertices" + "name": "dmGraphics::GetNativeWindowsHWND" }, { "replaces": "", - "description": "Create new index buffer with initial data", - "parameters": [ - { - "doc": "the context", - "name": "context", - "types": [ - "dmGraphics::HContext" - ] - }, - { - "doc": "the size of the buffer (in bytes). May be 0", - "name": "size", - "types": [ - "uint32_t" - ] - }, - { - "doc": "the data", - "name": "data", - "types": [ - "void*" - ] - }, + "description": "Get Win32 gl rendercontext native handle (HGLRC). Any other platform return zero.", + "parameters": [], + "returnvalues": [ { - "doc": "the usage", - "name": "buffer_usage", + "doc": "native handle", + "name": "HGLRC", "types": [ - "dmGraphics::BufferUsage" + "HGLRC" ] } ], + "notes": [], + "brief": "get Win32 HGLRC", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "dmGraphics::GetNativeWindowsHGLRC" + }, + { + "replaces": "", + "description": "Get Android EGLContext native handle (EGLContext). Any other platform return zero.", + "parameters": [], "returnvalues": [ { - "doc": "the index buffer", - "name": "buffer", + "doc": "native handle", + "name": "EGLContext", "types": [ - "dmGraphics::HIndexBuffer" + "EGLContext" ] } ], "notes": [], - "brief": "Create new index buffer with initial data", + "brief": "get Android EGLContext", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "NewIndexBuffer" + "name": "dmGraphics::GetNativeAndroidEGLContext" }, { "replaces": "", - "description": "Delete the index buffer", - "parameters": [ + "description": "Get Android EGLSurface native handle (EGLSurface). Any other platform return zero.", + "parameters": [], + "returnvalues": [ { - "doc": "the index buffer", - "name": "buffer", + "doc": "native handle", + "name": "EGLSurface", "types": [ - "dmGraphics::HIndexBuffer" + "EGLSurface" ] } ], - "returnvalues": [], "notes": [], - "brief": "Delete the index buffer", + "brief": "get Android EGLSurface", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "DeleteIndexBuffer" + "name": "dmGraphics::GetNativeAndroidEGLSurface" }, { "replaces": "", - "description": "Set index buffer data", - "parameters": [ - { - "doc": "the buffer", - "name": "buffer", - "types": [ - "dmGraphics::HIndexBuffer" - ] - }, - { - "doc": "the size of the buffer (in bytes). May be 0", - "name": "size", - "types": [ - "uint32_t" - ] - }, - { - "doc": "the data", - "name": "data", - "types": [ - "void*" - ] - }, + "description": "Get Android JavaVM ptr. Any other platform return zero.", + "parameters": [], + "returnvalues": [ { - "doc": "the usage", - "name": "buffer_usage", + "doc": "native handle", + "name": "JavaVM*", "types": [ - "dmGraphics::BufferUsage" + "JavaVM*" ] } ], - "returnvalues": [], "notes": [], - "brief": "Set index buffer data", + "brief": "get Android native JavaVM", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetIndexBufferData" + "name": "dmGraphics::GetNativeAndroidJavaVM" }, { "replaces": "", - "description": "Set subset of index buffer data", - "parameters": [ - { - "doc": "the buffer", - "name": "buffer", - "types": [ - "dmGraphics::HVertexBuffer" - ] - }, - { - "doc": "the offset into the desination buffer (in bytes)", - "name": "offset", - "types": [ - "uint32_t" - ] - }, - { - "doc": "the size of the buffer (in bytes). May be 0", - "name": "size", - "types": [ - "uint32_t" - ] - }, + "description": "Get Android native jobject. Any other platform return zero.", + "parameters": [], + "returnvalues": [ { - "doc": "the data", - "name": "data", + "doc": "native handle", + "name": "jobject", "types": [ - "void*" + "jobject" ] } ], - "returnvalues": [], "notes": [], - "brief": "Set subset of index buffer data", + "brief": "get Android native jobject", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "SetIndexBufferSubData" + "name": "dmGraphics::GetNativeAndroidActivity" }, { "replaces": "", - "description": "Check if the index format is supported", - "parameters": [ - { - "doc": "the context", - "name": "context", - "types": [ - "dmGraphics::HContext" - ] - }, - { - "doc": "the format", - "name": "format", - "types": [ - "dmGraphics::IndexBufferFormat" - ] - }, + "description": "Get Android app object. Any other platform return zero.", + "parameters": [], + "returnvalues": [ { - "doc": "true if the format is supoprted", - "name": "result", + "doc": "native handle", + "name": "app", "types": [ - "bool" + "struct android_app*" ] } ], - "returnvalues": [], "notes": [], - "brief": "Check if the index format is supported", + "brief": "get Android app object", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "IsIndexBufferFormatSupported" + "name": "dmGraphics::GetNativeAndroidApp" }, { "replaces": "", - "description": "Get the max number of indices allowed by the system in an index buffer", - "parameters": [ + "description": "Get Linux X11Window windows native handle (Window). Any other platform return zero.", + "parameters": [], + "returnvalues": [ { - "doc": "the context", - "name": "context", + "doc": "native handle", + "name": "Window", "types": [ - "dmGraphics::HContext" + "Window" ] } ], + "notes": [], + "brief": "get Linux X11Window", + "examples": "", + "members": [], + "error": "", + "tparams": [], + "type": "FUNCTION", + "name": "dmGraphics::GetNativeX11Window" + }, + { + "replaces": "", + "description": "Get Linux X11GLXContext native handle (GLXContext). Any other platform return zero.", + "parameters": [], "returnvalues": [ { - "doc": "the count", - "name": "count", + "doc": "native handle", + "name": "GLXContext", "types": [ - "uint32_t" + "GLXContext" ] } ], "notes": [], - "brief": "Get the max number of indices allowed by the syste...", + "brief": "get Linux X11GLXContext", "examples": "", "members": [], "error": "", "tparams": [], "type": "FUNCTION", - "name": "GetMaxElementsIndices" + "name": "dmGraphics::GetNativeX11GLXContext" } ] } \ No newline at end of file diff --git a/DefoldDocs/doc/gui_doc.json b/DefoldDocs/doc/gui_doc.json index ecda271..977494a 100644 --- a/DefoldDocs/doc/gui_doc.json +++ b/DefoldDocs/doc/gui_doc.json @@ -1,7 +1,7 @@ { "info": { "group": "SYSTEM", - "description": "GUI core hooks, functions, messages, properties and constants for\ncreation and manipulation of GUI nodes. The \"gui\" namespace is\naccessible only from gui scripts.", + "description": "GUI API documentation", "namespace": "gui", "brief": "GUI API documentation", "file": "", @@ -9,35 +9,6 @@ "name": "GUI" }, "elements": [ - { - "replaces": "", - "description": "This message is broadcast to every GUI component when a layout change has been initiated\non device.", - "parameters": [ - { - "doc": "the id of the layout the engine is changing to", - "name": "id", - "types": [ - "hash" - ] - }, - { - "doc": "the id of the layout the engine is changing from", - "name": "previous_id", - "types": [ - "hash" - ] - } - ], - "returnvalues": [], - "notes": [], - "brief": "reports a layout change", - "examples": "
function on_message(self, message_id, message, sender)\n   if message_id == hash("layout_changed") and message.id == hash("Landscape") then\n       -- switching layout to "Landscape"...\n       ...\n   end\nend\n
", - "members": [], - "error": "", - "tparams": [], - "type": "MESSAGE", - "name": "layout_changed" - }, { "replaces": "", "description": "The material used when rendering the gui. The type of the property is hash.", @@ -145,7 +116,7 @@ }, { "replaces": "", - "description": "Retrieve the index of the specified node.\nThe index defines the order in which a node appear in a GUI scene.\nHigher index means the node is drawn on top of lower indexed nodes.", + "description": "Retrieve the index of the specified node among its siblings.\nThe index defines the order in which a node appear in a GUI scene.\nHigher index means the node is drawn on top of lower indexed nodes.", "parameters": [ { "doc": "the node to retrieve the id from", @@ -166,7 +137,7 @@ ], "notes": [], "brief": "gets the index of the specified node", - "examples": "Compare the index order of two nodes:\n
local node1 = gui.get_node("my_node_1")\nlocal node2 = gui.get_node("my_node_2")\n\nif gui.get_index(node1) < gui.get_index(node2) then\n    -- node1 is drawn below node2\nelse\n    -- node2 is drawn below node1\nend\n
", + "examples": "Compare the index order of two sibling nodes:\n
local node1 = gui.get_node("my_node_1")\nlocal node2 = gui.get_node("my_node_2")\n\nif gui.get_index(node1) < gui.get_index(node2) then\n    -- node1 is drawn below node2\nelse\n    -- node2 is drawn below node1\nend\n
", "members": [], "error": "", "tparams": [], @@ -2710,6 +2681,13 @@ "types": [ "node" ] + }, + { + "doc": "check hierarchy recursively", + "name": "recursive", + "types": [ + "boolean" + ] } ], "returnvalues": [ @@ -5102,6 +5080,35 @@ "tparams": [], "type": "FUNCTION", "name": "on_reload" + }, + { + "replaces": "", + "description": "This message is broadcast to every GUI component when a layout change has been initiated\non device.", + "parameters": [ + { + "doc": "the id of the layout the engine is changing to", + "name": "id", + "types": [ + "hash" + ] + }, + { + "doc": "the id of the layout the engine is changing from", + "name": "previous_id", + "types": [ + "hash" + ] + } + ], + "returnvalues": [], + "notes": [], + "brief": "reports a layout change", + "examples": "
function on_message(self, message_id, message, sender)\n   if message_id == hash("layout_changed") and message.id == hash("Landscape") then\n       -- switching layout to "Landscape"...\n       ...\n   end\nend\n
", + "members": [], + "error": "", + "tparams": [], + "type": "MESSAGE", + "name": "layout_changed" } ] } \ No newline at end of file